Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RelationshipEntry.cs
- HtmlGenericControl.cs
- IdleTimeoutMonitor.cs
- RecordManager.cs
- EmissiveMaterial.cs
- AdornerPresentationContext.cs
- UserControl.cs
- NamedServiceModelExtensionCollectionElement.cs
- Process.cs
- BuildResultCache.cs
- CodeTypeMemberCollection.cs
- NotFiniteNumberException.cs
- TextServicesPropertyRanges.cs
- Native.cs
- CodeTypeDeclaration.cs
- MenuItemCollectionEditorDialog.cs
- ControlParser.cs
- DataListItemCollection.cs
- HwndMouseInputProvider.cs
- XmlSchemaAnnotated.cs
- SrgsNameValueTag.cs
- TextFragmentEngine.cs
- ForeignConstraint.cs
- IconConverter.cs
- EvidenceTypeDescriptor.cs
- IsolatedStorageFileStream.cs
- DispatcherExceptionEventArgs.cs
- oledbconnectionstring.cs
- HorizontalAlignConverter.cs
- PartialCachingControl.cs
- InternalConfigEventArgs.cs
- GroupItemAutomationPeer.cs
- ChannelBuilder.cs
- OdbcDataReader.cs
- _ScatterGatherBuffers.cs
- GeometryConverter.cs
- CompilerResults.cs
- FieldAccessException.cs
- VisualStyleInformation.cs
- TableRowCollection.cs
- StateDesigner.LayoutSelectionGlyph.cs
- FirstMatchCodeGroup.cs
- RequestSecurityToken.cs
- StringResourceManager.cs
- TextRangeAdaptor.cs
- ZipFileInfoCollection.cs
- ToolStripActionList.cs
- ProvidePropertyAttribute.cs
- SystemDiagnosticsSection.cs
- EndPoint.cs
- AssemblyResourceLoader.cs
- TdsParameterSetter.cs
- MoveSizeWinEventHandler.cs
- Scanner.cs
- EventMappingSettingsCollection.cs
- SqlDataAdapter.cs
- MediaSystem.cs
- LoginAutoFormat.cs
- DependencyPropertyValueSerializer.cs
- DataGrid.cs
- ServiceInfo.cs
- TableLayoutColumnStyleCollection.cs
- FieldMetadata.cs
- WebControlsSection.cs
- ContractListAdapter.cs
- JsonDeserializer.cs
- TextServicesDisplayAttribute.cs
- BehaviorDragDropEventArgs.cs
- SocketInformation.cs
- DictionaryBase.cs
- PriorityChain.cs
- NetPeerTcpBinding.cs
- XamlLoadErrorInfo.cs
- embossbitmapeffect.cs
- WindowsComboBox.cs
- HttpProfileGroupBase.cs
- StyleXamlTreeBuilder.cs
- GiveFeedbackEvent.cs
- PolicyLevel.cs
- TrustManager.cs
- SmiEventSink_Default.cs
- Assembly.cs
- Module.cs
- TreeViewBindingsEditor.cs
- DataTableReader.cs
- XmlSchemaAnnotation.cs
- GlobalizationSection.cs
- ResourceExpressionEditor.cs
- SessionIDManager.cs
- ProgressBarAutomationPeer.cs
- ImageDrawing.cs
- PointAnimation.cs
- BamlLocalizer.cs
- ToolBarButton.cs
- XmlComment.cs
- VariableAction.cs
- UIElementPropertyUndoUnit.cs
- BuildProviderAppliesToAttribute.cs
- Config.cs
- ProtocolState.cs