示例#1
0
        private void SetupThread()
        {
            this.logger.LogInformation($"[{this.Name}] Setting up Thread");
            this.executerThread = new Thread(new ThreadStart(this.LoopExecuting))
            {
                Name             = this.Name,
                CurrentCulture   = this.CurrentCulture,
                CurrentUICulture = this.CurrentUICulture,
            };

            // ApartmentState for COM Objects is not support on linux
            if (OSHelper.IsRunningOnWindows())
            {
                this.executerThread.SetApartmentState(ApartmentState.MTA);
            }
        }