コード例 #1
0
 public static void CallInBackground(Func <bool> myThread)
 {
     SupportClass.CallInBackground(myThread, 100);
 }
コード例 #2
0
 public string ToStringFull()
 {
     return(string.Format("Event {0}: {1}", this.Code, SupportClass.DictionaryToString(this.Parameters)));
 }
コード例 #3
0
 public static int GetTickCount()
 {
     return(SupportClass.IntegerMilliseconds());
 }
コード例 #4
0
 public static string HashtableToString(Hashtable hash)
 {
     return(SupportClass.DictionaryToString(hash));
 }
コード例 #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);
        }
コード例 #6
0
 public static string DictionaryToString(IDictionary dictionary)
 {
     return(SupportClass.DictionaryToString(dictionary, true));
 }
コード例 #7
0
 public static void WriteStackTrace(Exception throwable)
 {
     SupportClass.WriteStackTrace(throwable, null);
 }