Esempio n. 1
0
 public static void CallInBackground(Func <bool> myThread)
 {
     SupportClass.CallInBackground(myThread, 100);
 }
Esempio n. 2
0
 public string ToStringFull()
 {
     return(string.Format("Event {0}: {1}", this.Code, SupportClass.DictionaryToString(this.Parameters)));
 }
Esempio n. 3
0
 public static int GetTickCount()
 {
     return(SupportClass.IntegerMilliseconds());
 }
Esempio n. 4
0
 public static string HashtableToString(Hashtable hash)
 {
     return(SupportClass.DictionaryToString(hash));
 }
Esempio n. 5
0
        public static string DictionaryToString(IDictionary dictionary, bool includeTypes)
        {
            bool   flag = dictionary == null;
            string result;

            if (flag)
            {
                result = "null";
            }
            else
            {
                StringBuilder stringBuilder = new StringBuilder();
                stringBuilder.Append("{");
                foreach (object obj in dictionary.Keys)
                {
                    bool flag2 = stringBuilder.Length > 1;
                    if (flag2)
                    {
                        stringBuilder.Append(", ");
                    }
                    bool   flag3 = dictionary[obj] == null;
                    Type   type;
                    string text;
                    if (flag3)
                    {
                        type = typeof(object);
                        text = "null";
                    }
                    else
                    {
                        type = dictionary[obj].GetType();
                        text = dictionary[obj].ToString();
                    }
                    bool flag4 = typeof(IDictionary) == type || typeof(Hashtable) == type;
                    if (flag4)
                    {
                        text = SupportClass.DictionaryToString((IDictionary)dictionary[obj]);
                    }
                    bool flag5 = typeof(string[]) == type;
                    if (flag5)
                    {
                        text = string.Format("{{{0}}}", string.Join(",", (string[])dictionary[obj]));
                    }
                    if (includeTypes)
                    {
                        stringBuilder.AppendFormat("({0}){1}=({2}){3}", new object[]
                        {
                            obj.GetType().Name,
                            obj,
                            type.Name,
                            text
                        });
                    }
                    else
                    {
                        stringBuilder.AppendFormat("{0}={1}", obj, text);
                    }
                }
                stringBuilder.Append("}");
                result = stringBuilder.ToString();
            }
            return(result);
        }
Esempio n. 6
0
 public static string DictionaryToString(IDictionary dictionary)
 {
     return(SupportClass.DictionaryToString(dictionary, true));
 }
Esempio n. 7
0
 public static void WriteStackTrace(Exception throwable)
 {
     SupportClass.WriteStackTrace(throwable, null);
 }