当前位置: 首页>>代码示例>>C#>>正文


C# IThread类代码示例

本文整理汇总了C#中IThread的典型用法代码示例。如果您正苦于以下问题:C# IThread类的具体用法?C# IThread怎么用?C# IThread使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IThread类属于命名空间,在下文中一共展示了IThread类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FromThread

 /// <inheritdoc />
 public IDispatcher FromThread(IThread thread)
 {
     var wrap = (thread as ThreadWrap);
     if (wrap == null) throw new ArgumentException("Thread should wrap CLR thread","thread");
     var real = ((IWrap<Thread>) wrap).UnderlyingObject;
     return new DispatcherWrap(Dispatcher.FromThread(real));
 }
开发者ID:CosminLazar,项目名称:SystemWrapper,代码行数:8,代码来源:DispatcherSystem.cs

示例2: Thread

 public Thread(Generator generator, Action action)
     : base(generator, typeof(IThread))
 {
     inner = (IThread)Handler;
     this.action = action;
     inner.Create();
 }
开发者ID:M1C,项目名称:Eto,代码行数:7,代码来源:Thread.cs

示例3: ExceptionDialog

        public ExceptionDialog(IThread thread)
        {
            InitializeComponent();
            this.Icon = _icon;

            _exceptionValue = thread.CurrentException;
            _sourceLocation = thread.GetCurrentSourceRange();

            // no need to hook to UILanguageChanged as this dialog will be closed 
            // before the user gets any chance to update the UI language.
            var _componentMuiIdentifiers = new Dictionary<object, string>()
            {
                {this, "ExceptionDialog.Title"},
                {headerLabel, "ExceptionDialog.ExceptionOccured"},
                {fileLabel, "ExceptionDialog.File"},
                {locationLabel, "ExceptionDialog.Location"},
                {messageLabel, "ExceptionDialog.Message"},
                {closeButton, "ExceptionDialog.Close"},
                {goToFileButton, "ExceptionDialog.GoToFile"},
                {detailsButton, "ExceptionDialog.Details"},
            };
            
            DebuggerBase.Instance.MuiProcessor.ApplyLanguageOnComponents(_componentMuiIdentifiers);

            fileTextBox.Text = _sourceLocation.FilePath.FullPath;
            locationTextBox.Text = DebuggerBase.Instance.MuiProcessor.GetString("ExceptionDialog.LocationFormat",
                "line=" + _sourceLocation.Line,
                "column=" + _sourceLocation.Column);
            messageTextBox.Text = _exceptionValue.ValueAsString(thread);
        }
开发者ID:die-Deutsche-Orthopaedie,项目名称:LiteDevelop,代码行数:30,代码来源:ExceptionDialog.cs

示例4: MessageReceiverWorkerThread

        public MessageReceiverWorkerThread(
			IReceiveFromEndpoints receiverQueue,
			Func<IRouteMessagesToHandlers> routerFactory,
			Func<Action, IThread> thread)
        {
            this.receiverQueue = receiverQueue;
            this.routerFactory = routerFactory;
            this.thread = thread(this.StartReceiving);
        }
开发者ID:JamesTryand,项目名称:NanoMessageBus,代码行数:9,代码来源:MessageReceiverWorkerThread.cs

示例5: UpdateControl

        public void UpdateControl(IThread currentThread)
        {
            if (currentThread == null)
            {
                listView1.Items.Clear();
                return;
            }

            UpdateList(currentThread);
        }
开发者ID:die-Deutsche-Orthopaedie,项目名称:LiteDevelop,代码行数:10,代码来源:ThreadsControl.cs

示例6: AllocateActor

        public int AllocateActor(IThread thread)
        {
            lock (_lock)
            {
                int actorId = _nextActorId;
                _nextActorId++;

                _actorsToThreads.Add(actorId, thread);
                return actorId;
            }
        }
开发者ID:snjee,项目名称:actor-http,代码行数:11,代码来源:RuntimeData.cs

示例7: WorkerPoolWorker

        public WorkerPoolWorker(
            int ordinal,
            IThreadFactory threadFactory,
            BlockingCollection<IDelivery> deliveries,
            IDeliveryProcessor connectedProcessor)
            : base(connectedProcessor)
        {
            this.ordinal = ordinal;
            this.deliveries = deliveries;

            thread = threadFactory.Create(StartTakingMessages);
        }
开发者ID:jamescrowley,项目名称:chinchilla,代码行数:12,代码来源:WorkerPoolWorker.cs

示例8: IsReviewThread

        private bool IsReviewThread(IThread thread)
        {
            var isReview = false;

            if (thread.Behavior == null)
            {
                isReview = thread.Key.EndsWith("_review", StringComparison.Ordinal);
            }
            else
            {
                isReview = thread.Behavior == "review";
            }

            return isReview;
        }
开发者ID:RifasRazick,项目名称:feather,代码行数:15,代码来源:ReviewNotificationStrategy.cs

示例9: Execute

 public override void Execute(IThread thread)
 {
     thread.Syscall (thread.Regs.IntRegs[2]);
 }
开发者ID:mcai,项目名称:FleximSharp,代码行数:4,代码来源:Instructions.cs

示例10: Ea

 public override uint Ea(IThread thread)
 {
     uint addr = (uint)(thread.Regs.IntRegs[this[BitField.RS]] + this.Displacement);
     uint ea = addr & ~3u;
     return ea;
 }
开发者ID:mcai,项目名称:FleximSharp,代码行数:6,代码来源:Instructions.cs

示例11: ProcessInformation

 public ProcessInformation(IntPtr processHandle, int processId, IntPtr threadHandle, int threadId)
 {
     _process = new Process(new ProcessHandle(processHandle));
     _processId = processId;
     _thread = new Thread(new ThreadHandle(threadHandle));
     _threadId = threadId;
 }
开发者ID:tdctaz,项目名称:NativeWindows,代码行数:7,代码来源:ProcessInformation.cs

示例12: Dispose

		public void Dispose()
		{
			ShutdownConsole();
			
			if (thread != null) {
				if (thread.Join(100)) {
					thread = null;
					IsRunning = false;
				}
			}
		}
开发者ID:Rpinski,项目名称:SharpDevelop,代码行数:11,代码来源:PackageManagementConsoleHost.cs

示例13: Once

 public Once(OncePool nOncePool)
 {
     mLock = new object();
     mRunning = false;
     mOncePool = nOncePool;
     mRunnable = null;
     PlatformSingleton platformSingleton_ = __singleton<PlatformSingleton>._instance();
     mThread = platformSingleton_._createThread();
     mThread.m_tRunSlot += _runOnce;
     mThread._startRun();
 }
开发者ID:zyouhua,项目名称:nvwa,代码行数:11,代码来源:Once.cs


注:本文中的IThread类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。