Exemplo n.º 1
0
        // Token: 0x060006B8 RID: 1720 RVA: 0x0002A62C File Offset: 0x0002882C
        private AuditingDAL.NetObjectInfo GetNetObjectInfo(IDictionary <string, string> arguments)
        {
            int?   networkNodeID = null;
            int?   num           = null;
            string text          = null;

            if (arguments.ContainsKey(KnownKeys.NetObject) && arguments[KnownKeys.NetObject] != null)
            {
                string[] array = NetObjectHelper.ParseNetObject(arguments[KnownKeys.NetObject]);
                text = array[0];
                num  = new int?(int.Parse(array[1]));
            }
            if (arguments.ContainsKey(KnownKeys.NodeID))
            {
                networkNodeID = new int?(int.Parse(arguments[KnownKeys.NodeID]));
            }
            else if (text != null && text.Equals("N", StringComparison.OrdinalIgnoreCase))
            {
                networkNodeID = num;
            }
            return(new AuditingDAL.NetObjectInfo
            {
                NetObjectID = num,
                NetObjectType = text,
                NetworkNodeID = networkNodeID
            });
        }
Exemplo n.º 2
0
        private AuditingDAL.NetObjectInfo GetNetObjectInfo(
            IDictionary <string, string> arguments)
        {
            int?   nullable1 = new int?();
            int?   nullable2 = new int?();
            string str       = (string)null;

            if (arguments.ContainsKey((string)KnownKeys.NetObject) && arguments[(string)KnownKeys.NetObject] != null)
            {
                string[] netObject = NetObjectHelper.ParseNetObject(arguments[(string)KnownKeys.NetObject]);
                str       = netObject[0];
                nullable2 = new int?(int.Parse(netObject[1]));
            }
            if (arguments.ContainsKey((string)KnownKeys.NodeID))
            {
                nullable1 = new int?(int.Parse(arguments[(string)KnownKeys.NodeID]));
            }
            else if (str != null && str.Equals("N", StringComparison.OrdinalIgnoreCase))
            {
                nullable1 = nullable2;
            }
            return(new AuditingDAL.NetObjectInfo()
            {
                NetObjectID = nullable2,
                NetObjectType = str,
                NetworkNodeID = nullable1
            });
        }
 // Token: 0x0600060A RID: 1546 RVA: 0x00024488 File Offset: 0x00022688
 internal string GetNodeIDFromUrl(string[] urls)
 {
     foreach (string input in urls)
     {
         Match match = DowntimeMonitoringNotificationSubscriber.NodeIdRegex.Match(input);
         if (match.Success)
         {
             return(NetObjectHelper.GetObjectID(match.Value));
         }
     }
     throw new ArgumentException(string.Format("Cannot parse NodeId from AncestorUrl. Urls: {0}.", string.Join(",", urls)), "urls");
 }