コード例 #1
0
 internal static bool IsDefined(WorkflowUnhandledExceptionAction value)
 {
     return(value == WorkflowUnhandledExceptionAction.Abandon ||
            value == WorkflowUnhandledExceptionAction.Cancel ||
            value == WorkflowUnhandledExceptionAction.Terminate ||
            value == WorkflowUnhandledExceptionAction.AbandonAndSuspend);
 }
コード例 #2
0
 internal static bool IsDefined(WorkflowUnhandledExceptionAction value)
 {
     return (value == WorkflowUnhandledExceptionAction.Abandon ||
         value == WorkflowUnhandledExceptionAction.Cancel ||
         value == WorkflowUnhandledExceptionAction.Terminate ||
         value == WorkflowUnhandledExceptionAction.AbandonAndSuspend);
 }
 internal static bool IsDefined(WorkflowUnhandledExceptionAction value)
 {
     if (((value != WorkflowUnhandledExceptionAction.Abandon) && (value != WorkflowUnhandledExceptionAction.Cancel)) && (value != WorkflowUnhandledExceptionAction.Terminate))
     {
         return (value == WorkflowUnhandledExceptionAction.AbandonAndSuspend);
     }
     return true;
 }
 internal static bool IsDefined(WorkflowUnhandledExceptionAction value)
 {
     if (((value != WorkflowUnhandledExceptionAction.Abandon) && (value != WorkflowUnhandledExceptionAction.Cancel)) && (value != WorkflowUnhandledExceptionAction.Terminate))
     {
         return(value == WorkflowUnhandledExceptionAction.AbandonAndSuspend);
     }
     return(true);
 }
コード例 #5
0
 private void InitializeFromConstructor(WorkflowService serviceDefinition, params Uri[] baseAddresses)
 {
     this.idleTimeToPersist        = WorkflowIdleBehavior.defaultTimeToPersist;
     this.idleTimeToUnload         = WorkflowIdleBehavior.defaultTimeToUnload;
     this.unhandledExceptionAction = WorkflowUnhandledExceptionAction.AbandonAndSuspend;
     this.workflowExtensions       = new WorkflowServiceHostExtensions();
     if (System.ServiceModel.Activities.TD.CreateWorkflowServiceHostStartIsEnabled())
     {
         System.ServiceModel.Activities.TD.CreateWorkflowServiceHostStart();
     }
     if (serviceDefinition != null)
     {
         this.InitializeDescription(serviceDefinition, new UriSchemeKeyedCollection(baseAddresses));
     }
     this.durableInstanceManager = new System.ServiceModel.Activities.Dispatcher.DurableInstanceManager(this);
     if (System.ServiceModel.Activities.TD.CreateWorkflowServiceHostStopIsEnabled())
     {
         System.ServiceModel.Activities.TD.CreateWorkflowServiceHostStop();
     }
 }
コード例 #6
0
        void InitializeFromConstructor(WorkflowService serviceDefinition, params Uri[] baseAddresses)
        {
            // first initialize some values to their defaults
            this.idleTimeToPersist        = WorkflowIdleBehavior.defaultTimeToPersist;
            this.idleTimeToUnload         = WorkflowIdleBehavior.defaultTimeToUnload;
            this.unhandledExceptionAction = WorkflowUnhandledExceptionBehavior.defaultAction;
            this.workflowExtensions       = new WorkflowServiceHostExtensions();

            // If the AppSettings.DefaultAutomaticInstanceKeyDisassociation is specified and is true, create a DisassociateInstanceKeysExtension, set its
            // AutomaticDisassociationEnabled property to true, and add it to the extensions collection so that System.Activities.BookmarkScopeHandle will
            // unregister its BookmarkScope, which will cause key disassociation. KB2669774.
            if (AppSettings.DefaultAutomaticInstanceKeyDisassociation)
            {
                DisassociateInstanceKeysExtension extension = new DisassociateInstanceKeysExtension();
                extension.AutomaticDisassociationEnabled = true;
                this.workflowExtensions.Add(extension);
            }

            if (TD.CreateWorkflowServiceHostStartIsEnabled())
            {
                TD.CreateWorkflowServiceHostStart();
            }
            if (serviceDefinition != null)
            {
                this.workflowDefinitionProvider = new WorkflowDefinitionProvider(serviceDefinition, this);
                InitializeDescription(serviceDefinition, new UriSchemeKeyedCollection(baseAddresses));
            }
            this.durableInstanceManager = new DurableInstanceManager(this);

            if (TD.CreateWorkflowServiceHostStopIsEnabled())
            {
                TD.CreateWorkflowServiceHostStop();
            }

            this.workflowServiceHostPerformanceCounters = new WorkflowServiceHostPerformanceCounters(this);
        }
コード例 #7
0
 public UnhandledExceptionPolicyHelper(WorkflowServiceInstance instance, WorkflowUnhandledExceptionAction action)
 {
     Fx.Assert(instance != null, "instance must not be null!");
     Fx.Assert(WorkflowUnhandledExceptionActionHelper.IsDefined(action), action + " is invalid!");
     this.instance = instance;
     this.action = action;
 }
 public WorkflowUnhandledExceptionBehavior()
 {
     this.action = defaultAction;
 }
 public UnhandledExceptionPolicyHelper(WorkflowServiceInstance instance, WorkflowUnhandledExceptionAction action)
 {
     this.instance = instance;
     this.action = action;
 }
コード例 #10
0
 public WorkflowUnhandledExceptionBehavior()
 {
     this.action = defaultAction;
 }