Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / RunTime / WorkflowEventArgs.cs / 1305376 / WorkflowEventArgs.cs
// **************************************************************************** // Copyright (C) Microsoft Corporation. All rights reserved. // using System; using System.IO; using System.Threading; using System.Diagnostics; using System.Globalization; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Workflow.Runtime; using System.Workflow.ComponentModel; using System.Workflow.Runtime.Hosting; namespace System.Workflow.Runtime { public class WorkflowEventArgs : EventArgs { private WorkflowInstance _instance; internal WorkflowEventArgs(WorkflowInstance instance) { _instance = instance; } public WorkflowInstance WorkflowInstance { get { return _instance; } } } public class WorkflowCompletedEventArgs : WorkflowEventArgs { private Dictionary_outputParameters; private Activity _originalWorkflowDefinition; private Activity _workflowDefinition; internal WorkflowCompletedEventArgs(WorkflowInstance instance, Activity workflowDefinition) : base(instance) { this._outputParameters = new Dictionary (); this._originalWorkflowDefinition = workflowDefinition; this._workflowDefinition = null; } public Dictionary OutputParameters { get { return this._outputParameters; } } public Activity WorkflowDefinition { get { if (this._workflowDefinition == null) { using (new WorkflowDefinitionLock(this._originalWorkflowDefinition)) { if (this._workflowDefinition == null) { // Clone the original definition after locking the // definition's [....] object which was passed in // the constructor. This is so that the host cannot // corrupt the shared definition Activity tempDefinition = this._originalWorkflowDefinition.Clone(); Thread.MemoryBarrier(); this._workflowDefinition = tempDefinition; } } } return this._workflowDefinition; } } } public class WorkflowSuspendedEventArgs : WorkflowEventArgs { private String _error; internal WorkflowSuspendedEventArgs(WorkflowInstance instance, String error) : base(instance) { this._error = error; } public String Error { get { return this._error; } } } public class WorkflowTerminatedEventArgs : WorkflowEventArgs { private Exception exception; internal WorkflowTerminatedEventArgs(WorkflowInstance instance, String error) : base(instance) { this.exception = new WorkflowTerminatedException(error); } internal WorkflowTerminatedEventArgs(WorkflowInstance instance, Exception e) : base(instance) { this.exception = e; } public Exception Exception { get { return this.exception; } } } internal sealed class WorkflowDefinitionEventArgs : EventArgs { private Type _workflowType; private byte[] _xomlHashCode; internal WorkflowDefinitionEventArgs(Type scheduleType) { _workflowType = scheduleType; } internal WorkflowDefinitionEventArgs(byte[] scheduleDefHash) { _xomlHashCode = scheduleDefHash; } public Type WorkflowType { get { return _workflowType; } } public byte[] WorkflowDefinitionHashCode { get { return _xomlHashCode; } } } } // 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
- BitmapEffectDrawingContextState.cs
- MemberAccessException.cs
- XmlSerializerAssemblyAttribute.cs
- FamilyTypeface.cs
- ColumnResult.cs
- FigureParaClient.cs
- InvalidPropValue.cs
- RubberbandSelector.cs
- RegexCharClass.cs
- PropertyDescriptorComparer.cs
- GenericEnumerator.cs
- BezierSegment.cs
- UserControl.cs
- DataGridViewCellValidatingEventArgs.cs
- VirtualDirectoryMappingCollection.cs
- WebBrowserContainer.cs
- DiscreteKeyFrames.cs
- SmiXetterAccessMap.cs
- LaxModeSecurityHeaderElementInferenceEngine.cs
- WebBrowserProgressChangedEventHandler.cs
- FormViewDeleteEventArgs.cs
- CompositeScriptReferenceEventArgs.cs
- StubHelpers.cs
- ConfigurationLocationCollection.cs
- SecurityContextTokenValidationException.cs
- PartBasedPackageProperties.cs
- UserMapPath.cs
- EntityDataSourceWrapper.cs
- DragDeltaEventArgs.cs
- RemotingConfiguration.cs
- OperatingSystem.cs
- DescendantOverDescendantQuery.cs
- CodeChecksumPragma.cs
- ObjectDataSourceDisposingEventArgs.cs
- GroupQuery.cs
- SimpleWebHandlerParser.cs
- WebServiceFault.cs
- StringArrayConverter.cs
- RightsManagementInformation.cs
- ExpressionBuilder.cs
- _CacheStreams.cs
- SizeIndependentAnimationStorage.cs
- CollectionDataContract.cs
- DbDataReader.cs
- OdbcTransaction.cs
- ServiceObjectContainer.cs
- FieldTemplateUserControl.cs
- WebPartUserCapability.cs
- Gdiplus.cs
- DependencyPropertyKind.cs
- ImportCatalogPart.cs
- NamedPipeChannelFactory.cs
- FixedBufferAttribute.cs
- SplayTreeNode.cs
- XmlNamespaceDeclarationsAttribute.cs
- controlskin.cs
- BoundColumn.cs
- XPathMultyIterator.cs
- WebConfigurationFileMap.cs
- Cursors.cs
- TraceXPathNavigator.cs
- TrustManagerPromptUI.cs
- EntityContainerRelationshipSet.cs
- AcceptorSessionSymmetricTransportSecurityProtocol.cs
- CardSpaceShim.cs
- TypeUnloadedException.cs
- Memoizer.cs
- ActivityExecutorSurrogate.cs
- ProcessHost.cs
- listitem.cs
- Exception.cs
- LogEntryHeaderSerializer.cs
- TargetFrameworkAttribute.cs
- NetStream.cs
- Delegate.cs
- DocumentGridPage.cs
- NamespaceEmitter.cs
- WebPartsPersonalizationAuthorization.cs
- TextElement.cs
- ExceptionUtil.cs
- HttpResponseInternalWrapper.cs
- Substitution.cs
- ModuleBuilderData.cs
- MethodBody.cs
- storepermissionattribute.cs
- XmlJsonWriter.cs
- VirtualizingStackPanel.cs
- OSEnvironmentHelper.cs
- TemplateBindingExpression.cs
- RTLAwareMessageBox.cs
- Debug.cs
- PrimitiveXmlSerializers.cs
- BitmapVisualManager.cs
- EmptyQuery.cs
- Misc.cs
- HtmlImage.cs
- DropSource.cs
- UnderstoodHeaders.cs
- TextDpi.cs
- HtmlTableCell.cs