public static void GetStatus(object obj) { bool result = true; GroupOPThread.GroupOPContext groupOPContext = (GroupOPThread.GroupOPContext)obj; DevSnmpConfig devsnmpcfg = groupOPContext.devsnmpcfg; DevAccessAPI devAccessAPI = new DevAccessAPI(devsnmpcfg); devAccessAPI.GetDeviceOutletsStatus(); if (groupOPContext.opCallback != null) { groupOPContext.opCallback(result, devsnmpcfg); } }
public static void Reboot(object obj) { bool result = true; GroupOPThread.GroupOPContext groupOPContext = (GroupOPThread.GroupOPContext)obj; DevSnmpConfig devsnmpcfg = groupOPContext.devsnmpcfg; DevAccessAPI devAccessAPI = new DevAccessAPI(devsnmpcfg); if (!devAccessAPI.RebootGroupOutlets(devsnmpcfg.groupOutlets)) { result = false; } if (groupOPContext.opCallback != null) { groupOPContext.opCallback(result, devsnmpcfg); } }