// Token: 0x0600085B RID: 2139 RVA: 0x0003BDB8 File Offset: 0x00039FB8 public static PollerAssignments GetAllPollersForNode(int nodeId, bool includeInterfacePollers) { PollerAssignments pollerAssignments = new PollerAssignments(); string text = "SELECT PollerID, PollerType, NetObjectType, NetObjectID, Enabled FROM Pollers WHERE NetObject = @NetObject "; if (includeInterfacePollers) { text += "OR NetObject IN\r\n (\r\n SELECT 'I:' + RTRIM(LTRIM(STR(InterfaceID))) FROM Interfaces WHERE NodeID=@NodeID\r\n )"; } using (SqlCommand textCommand = SqlHelper.GetTextCommand(text)) { if (includeInterfacePollers) { textCommand.Parameters.AddWithValue("@NodeID", nodeId); } textCommand.Parameters.Add("@NetObject", SqlDbType.VarChar, 50).Value = string.Format("N:{0}", nodeId); using (IDataReader dataReader = SqlHelper.ExecuteReader(textCommand)) { while (dataReader.Read()) { PollerAssignment pollerAssignment = PollerDAL.CreatePoller(dataReader); pollerAssignments.Add(pollerAssignment.PollerID, pollerAssignment); } } } return(pollerAssignments); }
public static PollerAssignments GetPollersForVolume(int volumeId) { PollerAssignments pollerAssignments = new PollerAssignments(); pollerAssignments.Add(PollerDAL.pollersDAL.GetNetObjectPollers("V", volumeId, Array.Empty <string>())); return(pollerAssignments); }