MalwareSourceCode/MSIL/Trojan/Win32/P/Trojan.Win32.Patched.mf-fd200e64412b6be5c177c3cfa7b94e83e807ff04211ce324f12e2ffa5537eb36/Net/LShift/Utilities/ThreadWrapper.cs

45 lines
1.1 KiB
C#
Raw Normal View History

2022-08-18 11:28:56 +00:00
// Decompiled with JetBrains decompiler
// Type: Net.LShift.Utilities.ThreadWrapper
// Assembly: ticketservice, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 3DFB8186-7053-43AF-8B45-70866071B1F2
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00001-msil\Trojan.Win32.Patched.mf-fd200e64412b6be5c177c3cfa7b94e83e807ff04211ce324f12e2ffa5537eb36.exe
using System;
using System.Threading;
namespace Net.LShift.Utilities
{
public class ThreadWrapper
{
public ThreadStart inner;
public Exception _Exception;
public ThreadWrapper(ThreadStart inner) => this.inner = inner;
public void Run()
{
this._Exception = (Exception) null;
try
{
this.inner();
}
catch (Exception ex)
{
this._Exception = ex;
}
}
public Exception Exception => this._Exception;
public Thread GetThread() => new Thread(new ThreadStart(this.Run));
public void Start() => this.GetThread().Start();
public void End()
{
if (this.Exception != null)
throw this.Exception;
}
}
}