public void StartSynchronized()
{
Console.WriteLine("Component {0} StartSynchronized!", this);
var ElapsedTime = Logger.Measure(() =>
{
ComponentThreadThread = new Thread(() =>
{
Thread.CurrentThread.CurrentCulture = new CultureInfo(GlobalConfig.ThreadCultureName);
try
{
Main();
}
finally
{
Running = false;
RunningUpdatedEvent.Set();
StopCompleteEvent.Set();
Console.WriteLine("Component {0} Stopped!", this);
}
})
{
Name = this.ThreadName,
IsBackground = true,
};
ComponentThreadThread.Start();
ThreadTaskQueue.EnqueueAndWaitCompleted(() =>
{
});
});
//Logger.Notice("Component {0} Started! StartedTime({1})", this, ElapsedTime.TotalSeconds);
Console.WriteLine("Component {0} Started! StartedTime({1})", this, ElapsedTime.TotalSeconds);
}