Esempio n. 1
0
        private static object[] StoreUserPropertiesForMethodMessage(IMethodMessage msg)
        {
            ArrayList   arrayList  = null;
            IDictionary properties = msg.Properties;

            if (properties == null)
            {
                return(null);
            }
            MessageDictionary messageDictionary = properties as MessageDictionary;

            if (messageDictionary != null)
            {
                if (messageDictionary.HasUserData())
                {
                    int num = 0;
                    foreach (object obj in messageDictionary.InternalDictionary)
                    {
                        DictionaryEntry dictionaryEntry = (DictionaryEntry)obj;
                        if (arrayList == null)
                        {
                            arrayList = new ArrayList();
                        }
                        arrayList.Add(dictionaryEntry);
                        num++;
                    }
                    return(arrayList.ToArray());
                }
                return(null);
            }
            else
            {
                int num2 = 0;
                foreach (object obj2 in properties)
                {
                    DictionaryEntry dictionaryEntry2 = (DictionaryEntry)obj2;
                    if (arrayList == null)
                    {
                        arrayList = new ArrayList();
                    }
                    arrayList.Add(dictionaryEntry2);
                    num2++;
                }
                if (arrayList != null)
                {
                    return(arrayList.ToArray());
                }
                return(null);
            }
        }
Esempio n. 2
0
        private static object[] StoreUserPropertiesForMethodMessage(IMethodMessage msg)
        {
            ArrayList   arrayList  = (ArrayList)null;
            IDictionary properties = msg.Properties;

            if (properties == null)
            {
                return((object[])null);
            }
            MessageDictionary messageDictionary = properties as MessageDictionary;

            if (messageDictionary != null)
            {
                if (!messageDictionary.HasUserData())
                {
                    return((object[])null);
                }
                int num = 0;
                foreach (DictionaryEntry @internal in messageDictionary.InternalDictionary)
                {
                    if (arrayList == null)
                    {
                        arrayList = new ArrayList();
                    }
                    arrayList.Add((object)@internal);
                    ++num;
                }
                return(arrayList.ToArray());
            }
            int num1 = 0;

            foreach (DictionaryEntry dictionaryEntry in properties)
            {
                if (arrayList == null)
                {
                    arrayList = new ArrayList();
                }
                arrayList.Add((object)dictionaryEntry);
                ++num1;
            }
            if (arrayList != null)
            {
                return(arrayList.ToArray());
            }
            return((object[])null);
        }
Esempio n. 3
0
        private static object[] StoreUserPropertiesForMethodMessage(IMethodMessage msg)
        {
            ArrayList   list       = null;
            IDictionary properties = msg.Properties;

            if (properties != null)
            {
                MessageDictionary dictionary2 = properties as MessageDictionary;
                if (dictionary2 != null)
                {
                    if (!dictionary2.HasUserData())
                    {
                        return(null);
                    }
                    int num = 0;
                    foreach (DictionaryEntry entry in dictionary2.InternalDictionary)
                    {
                        if (list == null)
                        {
                            list = new ArrayList();
                        }
                        list.Add(entry);
                        num++;
                    }
                    return(list.ToArray());
                }
                int num2 = 0;
                foreach (DictionaryEntry entry2 in properties)
                {
                    if (list == null)
                    {
                        list = new ArrayList();
                    }
                    list.Add(entry2);
                    num2++;
                }
                if (list != null)
                {
                    return(list.ToArray());
                }
            }
            return(null);
        }