• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IThread类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IThreadManager类代码示例发布时间:2022-05-24
下一篇:
C# IThemeManager类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap