// Token: 0x06000940 RID: 2368 RVA: 0x000426B0 File Offset: 0x000408B0
 public RemoteCollectorStatusProvider(ISwisConnectionProxyCreator swisProxyCreator, int masterEngineId, int cacheExpiration) : this(cacheExpiration, () => RemoteCollectorStatusProvider.GetCurrentStatuses(swisProxyCreator, masterEngineId), () => DateTime.UtcNow)
 {
     if (swisProxyCreator == null)
     {
         throw new ArgumentNullException("swisProxyCreator");
     }
 }
Exemple #2
0
 internal static IEnumerable <KeyValuePair <int, AgentStatus> > GetStatuses(
     ISwisConnectionProxyCreator swisProxyCreator,
     int masterEngineId)
 {
     // ISSUE: object of a compiler-generated type is created
     return((IEnumerable <KeyValuePair <int, AgentStatus> >) new RemoteCollectorStatusProvider.\u003CGetStatuses\u003Ed__6(-2)
     {
         \u003C\u003E3__swisProxyCreator = swisProxyCreator,
         \u003C\u003E3__masterEngineId = masterEngineId
     });
 }
Exemple #3
0
 public RemoteCollectorStatusProvider(
     ISwisConnectionProxyCreator swisProxyCreator,
     int masterEngineId,
     int cacheExpiration)
     : this(cacheExpiration, (Func <IDictionary <int, AgentStatus> >)(() => RemoteCollectorStatusProvider.GetCurrentStatuses(swisProxyCreator, masterEngineId)), (Func <DateTime>)(() => DateTime.UtcNow))
 {
     if (swisProxyCreator == null)
     {
         throw new ArgumentNullException(nameof(swisProxyCreator));
     }
 }
        // Token: 0x06000945 RID: 2373 RVA: 0x000427C7 File Offset: 0x000409C7
        internal static IEnumerable <KeyValuePair <int, AgentStatus> > GetStatuses(ISwisConnectionProxyCreator swisProxyCreator, int masterEngineId)
        {
            using (IInformationServiceProxy2 proxy = swisProxyCreator.Create())
            {
                DataTable dataTable = proxy.Query("SELECT e.EngineID, a.AgentStatus FROM Orion.EngineProperties (nolock=true) p\r\nINNER JOIN Orion.AgentManagement.Agent (nolock=true) a\r\nON p.PropertyName='AgentId' AND a.AgentId=p.PropertyValue\r\nINNER JOIN Orion.Engines (nolock=true) e\r\nON e.EngineID=p.EngineID AND e.MasterEngineID=@MasterEngineId", new Dictionary <string, object>
                {
                    {
                        "MasterEngineId",
                        masterEngineId
                    }
                });
                foreach (object obj in dataTable.Rows)
                {
                    DataRow dataRow = (DataRow)obj;
                    yield return(new KeyValuePair <int, AgentStatus>((int)dataRow[0], (AgentStatus)dataRow[1]));
                }
                IEnumerator enumerator = null;
            }
            IInformationServiceProxy2 proxy = null;

            yield break;
            yield break;
        }
 // Token: 0x06000944 RID: 2372 RVA: 0x00042770 File Offset: 0x00040970
 private static IDictionary <int, AgentStatus> GetCurrentStatuses(ISwisConnectionProxyCreator swisProxyCreator, int masterEngineId)
 {
     return(RemoteCollectorStatusProvider.GetStatuses(swisProxyCreator, masterEngineId).ToDictionary((KeyValuePair <int, AgentStatus> i) => i.Key, (KeyValuePair <int, AgentStatus> i) => i.Value));
 }
Exemple #6
0
 private static IDictionary <int, AgentStatus> GetCurrentStatuses(
     ISwisConnectionProxyCreator swisProxyCreator,
     int masterEngineId)
 {
     return((IDictionary <int, AgentStatus>)RemoteCollectorStatusProvider.GetStatuses(swisProxyCreator, masterEngineId).ToDictionary <KeyValuePair <int, AgentStatus>, int, AgentStatus>((Func <KeyValuePair <int, AgentStatus>, int>)(i => i.Key), (Func <KeyValuePair <int, AgentStatus>, AgentStatus>)(i => i.Value)));
 }