Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Terminate.cs / 1305376 / Terminate.cs
namespace System.Workflow.ComponentModel { using System; using System.Text; using System.Reflection; using System.Collections; using System.CodeDom; using System.ComponentModel; using System.ComponentModel.Design; using System.Drawing; using System.Workflow.ComponentModel; using System.Workflow.ComponentModel.Design; using System.Collections.Generic; using System.Drawing.Design; using System.Workflow.ComponentModel.Compiler; using System.Workflow.Runtime; [SRDescription(SR.TerminateActivityDescription)] [ToolboxItem(typeof(ActivityToolboxItem))] [Designer(typeof(TerminateDesigner), typeof(IDesigner))] [ToolboxBitmap(typeof(TerminateActivity), "Resources.Terminate.png")] [SRCategory(SR.Standard)] public sealed class TerminateActivity: Activity { public static readonly DependencyProperty ErrorProperty = DependencyProperty.Register("Error", typeof(string), typeof(TerminateActivity)); #region Constructors public TerminateActivity() { } public TerminateActivity(string name) : base(name) { } #endregion protected internal override void Initialize(IServiceProvider provider) { if (this.Parent == null) throw new InvalidOperationException(SR.GetString(SR.Error_MustHaveParent)); base.Initialize(provider); } protected internal override sealed ActivityExecutionStatus Execute(ActivityExecutionContext executionContext) { executionContext.CloseActivity(); string terminateReason = this.Error; executionContext.TerminateWorkflowInstance(new WorkflowTerminatedException(terminateReason)); return ActivityExecutionStatus.Closed; } [Browsable(true)] [SRCategory(SR.Activity)] [SRDescription(SR.TerminateErrorMessageDescr)] [MergableProperty(false)] [DefaultValue((string)null)] public string Error { get { return (string)base.GetValue(ErrorProperty); } set { base.SetValue(ErrorProperty, value); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. namespace System.Workflow.ComponentModel { using System; using System.Text; using System.Reflection; using System.Collections; using System.CodeDom; using System.ComponentModel; using System.ComponentModel.Design; using System.Drawing; using System.Workflow.ComponentModel; using System.Workflow.ComponentModel.Design; using System.Collections.Generic; using System.Drawing.Design; using System.Workflow.ComponentModel.Compiler; using System.Workflow.Runtime; [SRDescription(SR.TerminateActivityDescription)] [ToolboxItem(typeof(ActivityToolboxItem))] [Designer(typeof(TerminateDesigner), typeof(IDesigner))] [ToolboxBitmap(typeof(TerminateActivity), "Resources.Terminate.png")] [SRCategory(SR.Standard)] public sealed class TerminateActivity: Activity { public static readonly DependencyProperty ErrorProperty = DependencyProperty.Register("Error", typeof(string), typeof(TerminateActivity)); #region Constructors public TerminateActivity() { } public TerminateActivity(string name) : base(name) { } #endregion protected internal override void Initialize(IServiceProvider provider) { if (this.Parent == null) throw new InvalidOperationException(SR.GetString(SR.Error_MustHaveParent)); base.Initialize(provider); } protected internal override sealed ActivityExecutionStatus Execute(ActivityExecutionContext executionContext) { executionContext.CloseActivity(); string terminateReason = this.Error; executionContext.TerminateWorkflowInstance(new WorkflowTerminatedException(terminateReason)); return ActivityExecutionStatus.Closed; } [Browsable(true)] [SRCategory(SR.Activity)] [SRDescription(SR.TerminateErrorMessageDescr)] [MergableProperty(false)] [DefaultValue((string)null)] public string Error { get { return (string)base.GetValue(ErrorProperty); } set { base.SetValue(ErrorProperty, value); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BmpBitmapDecoder.cs
- XPathSelfQuery.cs
- TimelineGroup.cs
- TimeSpanValidatorAttribute.cs
- AssemblyName.cs
- DESCryptoServiceProvider.cs
- SequenceDesigner.cs
- SecUtil.cs
- CollectionChange.cs
- PageContentCollection.cs
- BaseDataListDesigner.cs
- messageonlyhwndwrapper.cs
- TextElement.cs
- ZipQueryOperator.cs
- XPathNodeHelper.cs
- _NestedSingleAsyncResult.cs
- ManagedCodeMarkers.cs
- WebPartConnection.cs
- SettingsPropertyValue.cs
- ScriptingSectionGroup.cs
- XmlQueryOutput.cs
- BinaryParser.cs
- RichTextBoxAutomationPeer.cs
- URLAttribute.cs
- IteratorDescriptor.cs
- RegionInfo.cs
- SafeWaitHandle.cs
- CompiledRegexRunner.cs
- ImageBrush.cs
- Message.cs
- TextEditorSpelling.cs
- XmlReaderDelegator.cs
- IsolatedStorageFileStream.cs
- InternalControlCollection.cs
- DecoderReplacementFallback.cs
- SplayTreeNode.cs
- xsdvalidator.cs
- GuidelineSet.cs
- HighContrastHelper.cs
- OracleInternalConnection.cs
- ConnectionConsumerAttribute.cs
- AxisAngleRotation3D.cs
- EditorZoneBase.cs
- ReflectTypeDescriptionProvider.cs
- LineGeometry.cs
- StsCommunicationException.cs
- UInt32Converter.cs
- CompositeControl.cs
- TrustManager.cs
- ComponentManagerBroker.cs
- ToolStripOverflow.cs
- EmbeddedMailObjectCollectionEditor.cs
- BindingMemberInfo.cs
- Hex.cs
- RelationalExpressions.cs
- TileBrush.cs
- ToolboxItemImageConverter.cs
- CultureInfo.cs
- TargetPerspective.cs
- EnumConverter.cs
- TagPrefixAttribute.cs
- WebPartMinimizeVerb.cs
- InvalidDataException.cs
- _FtpDataStream.cs
- SqlTransaction.cs
- SelectedDatesCollection.cs
- DataGridViewButtonColumn.cs
- ExpandSegmentCollection.cs
- HttpContextWrapper.cs
- TripleDES.cs
- FontNamesConverter.cs
- PropertyGeneratedEventArgs.cs
- hresults.cs
- RemoteTokenFactory.cs
- Certificate.cs
- CodeTypeReferenceExpression.cs
- FtpWebResponse.cs
- WebPartZoneBase.cs
- OdbcError.cs
- XmlChildEnumerator.cs
- SqlOuterApplyReducer.cs
- JsonGlobals.cs
- Columns.cs
- HttpRuntime.cs
- ActiveXHelper.cs
- PageAction.cs
- SettingsPropertyNotFoundException.cs
- MultipartContentParser.cs
- ProgressPage.cs
- SubstitutionDesigner.cs
- WebBrowserProgressChangedEventHandler.cs
- IdentityHolder.cs
- VisualTreeUtils.cs
- ServiceControllerDesigner.cs
- MemberMaps.cs
- DataTrigger.cs
- TagNameToTypeMapper.cs
- TypedAsyncResult.cs
- GridEntry.cs
- WindowsGraphicsCacheManager.cs