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


C# ActivityExecutor类代码示例

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


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


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