本文整理汇总了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));
}
示例2: Thread
public Thread(Generator generator, Action action)
: base(generator, typeof(IThread))
{
inner = (IThread)Handler;
this.action = action;
inner.Create();
}
示例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);
}
示例4: MessageReceiverWorkerThread
public MessageReceiverWorkerThread(
IReceiveFromEndpoints receiverQueue,
Func<IRouteMessagesToHandlers> routerFactory,
Func<Action, IThread> thread)
{
this.receiverQueue = receiverQueue;
this.routerFactory = routerFactory;
this.thread = thread(this.StartReceiving);
}
示例5: UpdateControl
public void UpdateControl(IThread currentThread)
{
if (currentThread == null)
{
listView1.Items.Clear();
return;
}
UpdateList(currentThread);
}
示例6: AllocateActor
public int AllocateActor(IThread thread)
{
lock (_lock)
{
int actorId = _nextActorId;
_nextActorId++;
_actorsToThreads.Add(actorId, thread);
return actorId;
}
}
示例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);
}
示例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;
}
示例9: Execute
public override void Execute(IThread thread)
{
thread.Syscall (thread.Regs.IntRegs[2]);
}
示例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;
}
示例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;
}
示例12: Dispose
public void Dispose()
{
ShutdownConsole();
if (thread != null) {
if (thread.Join(100)) {
thread = null;
IsRunning = false;
}
}
}
示例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();
}