Пример #1
0
 public static void Register()
 {
     if (doNotModify)
     {
         return;
     }
     object o = null;
     {
         UnityEngine.WaitForSeconds v = (UnityEngine.WaitForSeconds)o;
         v = new UnityEngine.WaitForSeconds((System.Single)o);
         v.Equals((System.Object)o);
         v.GetHashCode();
         v.ToString();
     }
     {
         System.Threading.Thread v = (System.Threading.Thread)o;
         v = new System.Threading.Thread((System.Threading.ThreadStart)o);
         v = new System.Threading.Thread((System.Threading.ThreadStart)o, (System.Int32)o);
         v = new System.Threading.Thread((System.Threading.ParameterizedThreadStart)o);
         v = new System.Threading.Thread((System.Threading.ParameterizedThreadStart)o, (System.Int32)o);
         var p1 = v.CurrentUICulture;
         var p2 = v.CurrentCulture;
         var p3 = System.Threading.Thread.CurrentPrincipal;
         System.Threading.Thread.CurrentPrincipal = (System.Security.Principal.IPrincipal)o;
         var p4 = System.Threading.Thread.CurrentThread;
         var p5 = v.IsThreadPoolThread;
         var p6 = v.IsAlive;
         var p7 = v.IsBackground;
         v.IsBackground = (System.Boolean)o;
         var p8 = v.Name;
         v.Name = (System.String)o;
         var p9 = v.ThreadState;
         var pA = v.ManagedThreadId;
         v.Start();
         v.Start((System.Object)o);
         v.Join((System.TimeSpan)o);
         System.Threading.Thread.Sleep((System.TimeSpan)o);
         System.Threading.Thread.AllocateDataSlot();
         System.Threading.Thread.AllocateNamedDataSlot((System.String)o);
         System.Threading.Thread.GetNamedDataSlot((System.String)o);
         System.Threading.Thread.FreeNamedDataSlot((System.String)o);
         System.Threading.Thread.GetData((System.LocalDataStoreSlot)o);
         System.Threading.Thread.SetData((System.LocalDataStoreSlot)o, (System.Object)o);
         System.Threading.Thread.GetDomain();
         v.Abort();
         v.Abort((System.Object)o);
         System.Threading.Thread.SpinWait((System.Int32)o);
         System.Threading.Thread.BeginCriticalRegion();
         System.Threading.Thread.EndCriticalRegion();
         System.Threading.Thread.BeginThreadAffinity();
         System.Threading.Thread.EndThreadAffinity();
         v.GetApartmentState();
         v.SetApartmentState((System.Threading.ApartmentState)o);
         v.TrySetApartmentState((System.Threading.ApartmentState)o);
         v.GetHashCode();
         v.DisableComObjectEagerCleanup();
         v.Equals((System.Object)o);
         v.ToString();
     }
 }
Пример #2
0
 /// <summary>
 /// Таймер, ограничивающий работу потока.
 /// </summary>
 /// <param name="th">Поток, который должен отключиться по таймеру.</param>
 private static void Timer(object th)
 {
     System.Threading.Thread.Sleep(tick);
     if (thread.IsAlive && thread.Equals(th))
     {
         thread.Abort();
         res = "-1";
     }
 }
Пример #3
0
 public bool IsMainThread()
 {
     return(mainThread?.Equals(System.Threading.Thread.CurrentThread) ?? false);
 }
Пример #4
0
 public bool IsMainThread()
 {
     return(_mainThread.Equals(System.Threading.Thread.CurrentThread));
 }
Пример #5
0
 /// <summary>
 /// Checks if we are running on Main thread
 /// </summary>
 /// <returns><c>true</c>, if main thread was ised, <c>false</c> otherwise.</returns>
 private bool isMainThread()
 {
     // return true;
     return(mainThread.Equals(System.Threading.Thread.CurrentThread));
 }