本文整理汇总了C#中ActivityExecutor类的典型用法代码示例。如果您正苦于以下问题:C# ActivityExecutor类的具体用法?C# ActivityExecutor怎么用?C# ActivityExecutor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ActivityExecutor类属于命名空间,在下文中一共展示了ActivityExecutor类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: InternalAbort
internal override void InternalAbort(System.Activities.ActivityInstance instance, ActivityExecutor executor, Exception terminationReason)
{
using (NativeActivityAbortContext context = new NativeActivityAbortContext(instance, executor, terminationReason))
{
this.Abort(context);
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:NativeActivity.cs
示例2: WorkflowDataContext
internal WorkflowDataContext(ActivityExecutor executor, ActivityInstance activityInstance, bool includeLocalVariables)
{
this.executor = executor;
this.activityInstance = activityInstance;
this.IncludesLocalVariables = includeLocalVariables;
this.properties = CreateProperties();
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:7,代码来源:WorkflowDataContext.cs
示例3: InternalExecute
internal override void InternalExecute(System.Activities.ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
{
if (this.runtimeImplementation != null)
{
executor.ScheduleActivity(this.runtimeImplementation, instance, null, null, null);
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:DynamicActivity.cs
示例4: InternalExecute
internal sealed override void InternalExecute(System.Activities.ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
{
AsyncOperationContext asyncContext = executor.SetupAsyncOperationBlock(instance);
instance.IncrementBusyCount();
AsyncCodeActivityContext context = new AsyncCodeActivityContext(asyncContext, instance, executor);
bool flag = false;
try
{
IAsyncResult result = this.BeginExecute(context, OnExecuteComplete, asyncContext);
if (result == null)
{
throw FxTrace.Exception.AsError(new InvalidOperationException(System.Activities.SR.BeginExecuteMustNotReturnANullAsyncResult));
}
if (!object.ReferenceEquals(result.AsyncState, asyncContext))
{
throw FxTrace.Exception.AsError(new InvalidOperationException(System.Activities.SR.BeginExecuteMustUseProvidedStateAsAsyncResultState));
}
if (result.CompletedSynchronously)
{
this.EndExecute(context, result);
asyncContext.CompleteOperation();
}
flag = true;
}
finally
{
context.Dispose();
if (!flag)
{
asyncContext.CancelOperation();
}
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:33,代码来源:AsyncCodeActivity.cs
示例5: Execute
public override bool Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
{
NativeActivityContext nativeContext = executor.NativeActivityContextPool.Acquire();
try
{
nativeContext.Initialize(this.ActivityInstance, executor, bookmarkManager);
this.callbackWrapper.Invoke(nativeContext, this.bookmark, this.state);
}
catch (Exception e)
{
if (Fx.IsFatal(e))
{
throw;
}
this.ExceptionToPropagate = e;
}
finally
{
nativeContext.Dispose();
executor.NativeActivityContextPool.Release(nativeContext);
}
return true;
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:26,代码来源:BookmarkWorkItem.cs
示例6: Execute
public override bool Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
{
NativeActivityFaultContext faultContext = null;
try
{
faultContext = new NativeActivityFaultContext(base.ActivityInstance, executor, bookmarkManager, this.propagatedException, this.originalExceptionSource);
this.callbackWrapper.Invoke(faultContext, this.propagatedException, this.propagatedFrom);
if (!faultContext.IsFaultHandled)
{
base.SetExceptionToPropagateWithoutAbort(this.propagatedException);
}
}
catch (Exception exception)
{
if (Fx.IsFatal(exception))
{
throw;
}
base.ExceptionToPropagate = exception;
}
finally
{
if (faultContext != null)
{
faultContext.Dispose();
}
}
return true;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:29,代码来源:FaultCallbackWrapper.cs
示例7: CreateWorkItem
internal WorkItem CreateWorkItem(ActivityInstance completedInstance, ActivityExecutor executor)
{
// We use the property to guard against the virtual method call
// since we don't need it in the common case
if (this.NeedsToGatherOutputs)
{
this.GatherOutputs(completedInstance);
}
CompletionWorkItem workItem;
if (this.checkForCancelation)
{
workItem = new CompletionWithCancelationCheckWorkItem(this, completedInstance);
}
else
{
workItem = executor.CompletionWorkItemPool.Acquire();
workItem.Initialize(this, completedInstance);
}
if (completedInstance.InstanceMap != null)
{
completedInstance.InstanceMap.AddEntry(workItem);
}
return workItem;
}
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:28,代码来源:CompletionCallbackWrapper.cs
示例8: ReleaseToPool
protected override void ReleaseToPool(ActivityExecutor executor)
{
base.ClearForReuse();
this.nextArgumentIndex = 0;
this.resultLocation = null;
this.argumentValueOverrides = null;
executor.ResolveNextArgumentWorkItemPool.Release(this);
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:ResolveNextArgumentWorkItem.cs
示例9: PostProcess
public override void PostProcess(ActivityExecutor executor)
{
if ((this.completedInstance.State != ActivityInstanceState.Closed) && base.ActivityInstance.IsPerformingDefaultCancelation)
{
base.ActivityInstance.MarkCanceled();
}
base.PostProcess(executor);
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:EmptyWithCancelationCheckWorkItem.cs
示例10: Execute
public override bool Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
{
if ((base.CompletedInstance.State != ActivityInstanceState.Closed) && base.ActivityInstance.IsPerformingDefaultCancelation)
{
base.ActivityInstance.MarkCanceled();
}
return base.Execute(executor, bookmarkManager);
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:CompletionCallbackWrapper.cs
示例11: BookmarkWorkItem
public BookmarkWorkItem(ActivityExecutor executor, bool isExternal, BookmarkCallbackWrapper callbackWrapper, Bookmark bookmark, object value)
: this(callbackWrapper, bookmark, value)
{
if (isExternal)
{
executor.EnterNoPersist();
this.ExitNoPersistRequired = true;
}
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:9,代码来源:BookmarkWorkItem.cs
示例12: NativeActivityFaultContext
internal NativeActivityFaultContext(ActivityInstance executingActivityInstance,
ActivityExecutor executor, BookmarkManager bookmarkManager, Exception exception, ActivityInstanceReference source)
: base(executingActivityInstance, executor, bookmarkManager)
{
Fx.Assert(exception != null, "There must be an exception.");
Fx.Assert(source != null, "There must be a source.");
this.exception = exception;
this.source = source;
}
开发者ID:REALTOBIZ,项目名称:mono,代码行数:10,代码来源:NativeActivityFaultContext.cs
示例13: Dispose
public void Dispose(ActivityExecutor executor)
{
if (FxTrace.ShouldTraceVerboseToTraceSource)
{
this.TraceCompleted();
}
if (this.IsPooled)
{
this.ReleaseToPool(executor);
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:11,代码来源:WorkItem.cs
示例14: CreateWorkItem
public ActivityExecutionWorkItem CreateWorkItem(ActivityExecutor executor, bool isExternal, Bookmark bookmark, object value)
{
if (this.IsCallbackNull)
{
return executor.CreateEmptyWorkItem(this.ActivityInstance);
}
else
{
return new BookmarkWorkItem(executor, isExternal, this, bookmark, value);
}
}
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:11,代码来源:BookmarkCallbackWrapper.cs
示例15: InternalCancel
internal sealed override void InternalCancel(System.Activities.ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
{
AsyncOperationContext context;
if (executor.TryGetPendingOperation(instance, out context))
{
using (AsyncCodeActivityContext context2 = new AsyncCodeActivityContext(context, instance, executor))
{
context.HasCalledAsyncCodeActivityCancel = true;
this.Cancel(context2);
}
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:12,代码来源:AsyncCodeActivity.cs
示例16: InternalExecute
internal sealed override void InternalExecute(System.Activities.ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
{
CodeActivityContext context = executor.CodeActivityContextPool.Acquire();
try
{
context.Initialize(instance, executor);
this.Execute(context);
}
finally
{
context.Dispose();
executor.CodeActivityContextPool.Release(context);
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:14,代码来源:CodeActivity.cs
示例17: InternalCancel
internal override void InternalCancel(System.Activities.ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
{
NativeActivityContext context = executor.NativeActivityContextPool.Acquire();
try
{
context.Initialize(instance, executor, bookmarkManager);
this.Cancel(context);
}
finally
{
context.Dispose();
executor.NativeActivityContextPool.Release(context);
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:14,代码来源:NativeActivity.cs
示例18: PostProcess
public override void PostProcess(ActivityExecutor executor)
{
if ((base.ExceptionToPropagate != null) && !this.skipActivityInstanceAbort)
{
executor.AbortActivityInstance(base.ActivityInstance, base.ExceptionToPropagate);
}
else if (base.ActivityInstance.UpdateState(executor))
{
Exception exception = executor.CompleteActivityInstance(base.ActivityInstance);
if (exception != null)
{
base.ExceptionToPropagate = exception;
}
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:15,代码来源:ActivityExecutionWorkItem.cs
示例19: ClearAllWorkItems
public void ClearAllWorkItems(ActivityExecutor executor)
{
if (this.firstWorkItem != null)
{
this.firstWorkItem.Release(executor);
this.firstWorkItem = null;
if (this.workItemQueue != null)
{
while (this.workItemQueue.Count > 0)
{
this.workItemQueue.Dequeue().Release(executor);
}
}
}
this.workItemQueue = null;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:16,代码来源:Scheduler.cs
示例20: GenerateWorkItem
public WorkItem GenerateWorkItem(ActivityInstance completedInstance, ActivityExecutor executor)
{
if (this.callbackWrapper != null)
{
return this.callbackWrapper.CreateWorkItem(completedInstance, executor);
}
else
{
// Variable defaults and argument expressions always have a parent
// and never have a CompletionBookmark
if (completedInstance.State != ActivityInstanceState.Closed && completedInstance.Parent.HasNotExecuted)
{
completedInstance.Parent.SetInitializationIncomplete();
}
return new EmptyWithCancelationCheckWorkItem(completedInstance.Parent, completedInstance);
}
}
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:18,代码来源:CompletionBookmark.cs
注:本文中的ActivityExecutor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论