Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / ActivityInterfaces.cs / 1305376 / ActivityInterfaces.cs
// **************************************************************************** // Copyright (C) 2000-2001 Microsoft Corporation. All rights reserved. // // CONTENTS // Activity interface // // DESCRIPTION // // REVISIONS // Date Ver By Remarks // ~~~~~~~~~~ ~~~ ~~~~~~~~ ~~~~~~~~~~~~~~ // 03/19/04 1.0 MayankM interfaces // *************************************************************************** namespace System.Workflow.ComponentModel { using System; using System.IO; using System.Text; using System.ComponentModel; using System.ComponentModel.Design; using System.CodeDom; using System.ComponentModel.Design.Serialization; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.Reflection; using System.Security.Principal; using System.Security.Cryptography; using Microsoft.CSharp; using System.Workflow.ComponentModel.Compiler; using System.Workflow.ComponentModel.Design; using System.Workflow.ComponentModel.Serialization; using System.Collections.ObjectModel; using System.Runtime.Serialization; using System.Threading; public interface IDynamicPropertyTypeProvider { Type GetPropertyType(IServiceProvider serviceProvider, string propertyName); AccessTypes GetAccessType(IServiceProvider serviceProvider, string propertyName); } internal interface ISupportWorkflowChanges { void OnActivityAdded(ActivityExecutionContext rootContext, Activity addedActivity); void OnActivityRemoved(ActivityExecutionContext rootContext, Activity removedActivity); void OnWorkflowChangesCompleted(ActivityExecutionContext rootContext); } internal interface ISupportAlternateFlow { IListAlternateFlowActivities { get; } } [AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = false)] internal sealed class ActivityExecutorAttribute : Attribute { private string executorTypeName = string.Empty; public ActivityExecutorAttribute(Type executorType) { if (executorType != null) this.executorTypeName = executorType.AssemblyQualifiedName; } public ActivityExecutorAttribute(string executorTypeName) { this.executorTypeName = executorTypeName; } public string ExecutorTypeName { get { return this.executorTypeName; } } } public enum ActivityExecutionStatus : byte { Initialized = 0, Executing = 1, Canceling = 2, Closed = 3, Compensating = 4, Faulting = 5 } public enum ActivityExecutionResult : byte { None = 0, Succeeded = 1, Canceled = 2, Compensated = 3, Faulted = 4, Uninitialized = 5 } internal interface IDependencyObjectAccessor { //This method is invoked during the definition creation time void InitializeDefinitionForRuntime(DependencyObject parentDependencyObject); //This is invoked for every instance (not necessarily activating) void InitializeInstanceForRuntime(IWorkflowCoreRuntime workflowCoreRuntime); //This is invoked for every activating instance void InitializeActivatingInstanceForRuntime(DependencyObject parentDependencyObject,IWorkflowCoreRuntime workflowCoreRuntime); T[] GetInvocationList (DependencyProperty dependencyEvent); } public interface IStartWorkflow { Guid StartWorkflow(Type workflowType, Dictionary namedArgumentValues); } internal interface IWorkflowCoreRuntime : IServiceProvider { // context information Activity RootActivity { get; } Activity CurrentActivity { get; } Activity CurrentAtomicActivity { get; } IDisposable SetCurrentActivity(Activity activity); void ScheduleItem(SchedulableItem item, bool isInAtomicTransaction, bool transacted, bool queueInTransaction); void ActivityStatusChanged(Activity activity, bool transacted, bool committed); void RaiseException(Exception e, Activity activity, string responsibleActivity); void RaiseActivityExecuting(Activity activity); void RaiseHandlerInvoking(Delegate delegateHandler); void RaiseHandlerInvoked(); Guid StartWorkflow(Type workflowType, Dictionary namedArgumentValues); // context activity related int GetNewContextActivityId(); void RegisterContextActivity(Activity activity); void UnregisterContextActivity(Activity activity); Activity LoadContextActivity(ActivityExecutionContextInfo contextInfo, Activity outerContextActivity); void SaveContextActivity(Activity contextActivity); Activity GetContextActivityForId(int id); Object GetService(Activity currentActivity, Type serviceType); void PersistInstanceState(Activity activity); //Dynamic change notifications bool OnBeforeDynamicChange(IList changes); void OnAfterDynamicChange(bool updateSucceeded, IList changes); bool IsDynamicallyUpdated { get; } // root level access Guid InstanceID { get; } bool SuspendInstance(string suspendDescription); void TerminateInstance(Exception e); bool Resume(); void CheckpointInstanceState(Activity currentActivity); void RequestRevertToCheckpointState(Activity currentActivity, EventHandler callbackHandler, EventArgs callbackData, bool suspendOnRevert, string suspendReason); void DisposeCheckpointState(); // User Tracking void Track(string key, object data); // Timer Events WaitCallback ProcessTimersCallback { get; } } internal interface ITimerService { void ScheduleTimer(WaitCallback callback, Guid workflowInstanceId, DateTime whenUtc, Guid timerId); void CancelTimer(Guid timerId); } [Serializable()] public sealed class WorkflowTerminatedException : Exception { private WorkflowTerminatedException(SerializationInfo info, StreamingContext context) : base(info, context) { } public WorkflowTerminatedException() : base(SR.GetString(SR.Error_WorkflowTerminated)) { } public WorkflowTerminatedException(string message): base(message) { } public WorkflowTerminatedException(string message, Exception exception) : base(message, exception) { } } public interface ICompensatableActivity { ActivityExecutionStatus Compensate(ActivityExecutionContext executionContext); } #region Class AlternateFlowActivityAttribute [AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = false)] public sealed class AlternateFlowActivityAttribute : Attribute { } #endregion #region Class SupportsTransactionAttribute [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] internal sealed class SupportsTransactionAttribute : Attribute { } #endregion #region Class SupportsSynchronizationAttribute [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] internal sealed class SupportsSynchronizationAttribute : Attribute { } #endregion #region Class PersistOnCloseAttribute [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] public sealed class PersistOnCloseAttribute : Attribute { } #endregion } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. // **************************************************************************** // Copyright (C) 2000-2001 Microsoft Corporation. All rights reserved. // // CONTENTS // Activity interface // // DESCRIPTION // // REVISIONS // Date Ver By Remarks // ~~~~~~~~~~ ~~~ ~~~~~~~~ ~~~~~~~~~~~~~~ // 03/19/04 1.0 MayankM interfaces // *************************************************************************** namespace System.Workflow.ComponentModel { using System; using System.IO; using System.Text; using System.ComponentModel; using System.ComponentModel.Design; using System.CodeDom; using System.ComponentModel.Design.Serialization; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.Reflection; using System.Security.Principal; using System.Security.Cryptography; using Microsoft.CSharp; using System.Workflow.ComponentModel.Compiler; using System.Workflow.ComponentModel.Design; using System.Workflow.ComponentModel.Serialization; using System.Collections.ObjectModel; using System.Runtime.Serialization; using System.Threading; public interface IDynamicPropertyTypeProvider { Type GetPropertyType(IServiceProvider serviceProvider, string propertyName); AccessTypes GetAccessType(IServiceProvider serviceProvider, string propertyName); } internal interface ISupportWorkflowChanges { void OnActivityAdded(ActivityExecutionContext rootContext, Activity addedActivity); void OnActivityRemoved(ActivityExecutionContext rootContext, Activity removedActivity); void OnWorkflowChangesCompleted(ActivityExecutionContext rootContext); } internal interface ISupportAlternateFlow { IList AlternateFlowActivities { get; } } [AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = false)] internal sealed class ActivityExecutorAttribute : Attribute { private string executorTypeName = string.Empty; public ActivityExecutorAttribute(Type executorType) { if (executorType != null) this.executorTypeName = executorType.AssemblyQualifiedName; } public ActivityExecutorAttribute(string executorTypeName) { this.executorTypeName = executorTypeName; } public string ExecutorTypeName { get { return this.executorTypeName; } } } public enum ActivityExecutionStatus : byte { Initialized = 0, Executing = 1, Canceling = 2, Closed = 3, Compensating = 4, Faulting = 5 } public enum ActivityExecutionResult : byte { None = 0, Succeeded = 1, Canceled = 2, Compensated = 3, Faulted = 4, Uninitialized = 5 } internal interface IDependencyObjectAccessor { //This method is invoked during the definition creation time void InitializeDefinitionForRuntime(DependencyObject parentDependencyObject); //This is invoked for every instance (not necessarily activating) void InitializeInstanceForRuntime(IWorkflowCoreRuntime workflowCoreRuntime); //This is invoked for every activating instance void InitializeActivatingInstanceForRuntime(DependencyObject parentDependencyObject,IWorkflowCoreRuntime workflowCoreRuntime); T[] GetInvocationList (DependencyProperty dependencyEvent); } public interface IStartWorkflow { Guid StartWorkflow(Type workflowType, Dictionary namedArgumentValues); } internal interface IWorkflowCoreRuntime : IServiceProvider { // context information Activity RootActivity { get; } Activity CurrentActivity { get; } Activity CurrentAtomicActivity { get; } IDisposable SetCurrentActivity(Activity activity); void ScheduleItem(SchedulableItem item, bool isInAtomicTransaction, bool transacted, bool queueInTransaction); void ActivityStatusChanged(Activity activity, bool transacted, bool committed); void RaiseException(Exception e, Activity activity, string responsibleActivity); void RaiseActivityExecuting(Activity activity); void RaiseHandlerInvoking(Delegate delegateHandler); void RaiseHandlerInvoked(); Guid StartWorkflow(Type workflowType, Dictionary namedArgumentValues); // context activity related int GetNewContextActivityId(); void RegisterContextActivity(Activity activity); void UnregisterContextActivity(Activity activity); Activity LoadContextActivity(ActivityExecutionContextInfo contextInfo, Activity outerContextActivity); void SaveContextActivity(Activity contextActivity); Activity GetContextActivityForId(int id); Object GetService(Activity currentActivity, Type serviceType); void PersistInstanceState(Activity activity); //Dynamic change notifications bool OnBeforeDynamicChange(IList changes); void OnAfterDynamicChange(bool updateSucceeded, IList changes); bool IsDynamicallyUpdated { get; } // root level access Guid InstanceID { get; } bool SuspendInstance(string suspendDescription); void TerminateInstance(Exception e); bool Resume(); void CheckpointInstanceState(Activity currentActivity); void RequestRevertToCheckpointState(Activity currentActivity, EventHandler callbackHandler, EventArgs callbackData, bool suspendOnRevert, string suspendReason); void DisposeCheckpointState(); // User Tracking void Track(string key, object data); // Timer Events WaitCallback ProcessTimersCallback { get; } } internal interface ITimerService { void ScheduleTimer(WaitCallback callback, Guid workflowInstanceId, DateTime whenUtc, Guid timerId); void CancelTimer(Guid timerId); } [Serializable()] public sealed class WorkflowTerminatedException : Exception { private WorkflowTerminatedException(SerializationInfo info, StreamingContext context) : base(info, context) { } public WorkflowTerminatedException() : base(SR.GetString(SR.Error_WorkflowTerminated)) { } public WorkflowTerminatedException(string message): base(message) { } public WorkflowTerminatedException(string message, Exception exception) : base(message, exception) { } } public interface ICompensatableActivity { ActivityExecutionStatus Compensate(ActivityExecutionContext executionContext); } #region Class AlternateFlowActivityAttribute [AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = false)] public sealed class AlternateFlowActivityAttribute : Attribute { } #endregion #region Class SupportsTransactionAttribute [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] internal sealed class SupportsTransactionAttribute : Attribute { } #endregion #region Class SupportsSynchronizationAttribute [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] internal sealed class SupportsSynchronizationAttribute : Attribute { } #endregion #region Class PersistOnCloseAttribute [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] public sealed class PersistOnCloseAttribute : Attribute { } #endregion } // 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
- BoolLiteral.cs
- BlurEffect.cs
- EntityDataSourceQueryBuilder.cs
- MenuDesigner.cs
- ExpressionBinding.cs
- X509CertificateRecipientClientCredential.cs
- DesignerValidatorAdapter.cs
- MobileListItemCollection.cs
- QilGenerator.cs
- TemplateKey.cs
- URLMembershipCondition.cs
- CompositionAdorner.cs
- SoapServerProtocol.cs
- SecurityDocument.cs
- LogLogRecordEnumerator.cs
- DesignerVerb.cs
- FakeModelPropertyImpl.cs
- CleanUpVirtualizedItemEventArgs.cs
- VirtualizedContainerService.cs
- ResolveDuplexAsyncResult.cs
- StartUpEventArgs.cs
- WebPartMenuStyle.cs
- RuntimeConfigLKG.cs
- FacetValues.cs
- pingexception.cs
- TransactionScopeDesigner.cs
- ParserExtension.cs
- CryptoKeySecurity.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- GroupQuery.cs
- UniqueIdentifierService.cs
- UseLicense.cs
- JournalEntry.cs
- ThreadAttributes.cs
- _SingleItemRequestCache.cs
- OptimalBreakSession.cs
- ClientOperationFormatterProvider.cs
- DBPropSet.cs
- HttpVersion.cs
- TabletDeviceInfo.cs
- SqlDataRecord.cs
- sitestring.cs
- Helpers.cs
- ObjectDataSourceMethodEventArgs.cs
- WeakReferenceList.cs
- LoginDesigner.cs
- TreeIterator.cs
- GetLastErrorDetailsRequest.cs
- ToolStripDropDownClosingEventArgs.cs
- UnsafeNetInfoNativeMethods.cs
- ListBoxAutomationPeer.cs
- FontWeightConverter.cs
- OdbcConnectionStringbuilder.cs
- Mutex.cs
- FormsAuthentication.cs
- StorageScalarPropertyMapping.cs
- DomNameTable.cs
- MetadataArtifactLoaderCompositeResource.cs
- Light.cs
- UnsafeNativeMethods.cs
- XmlSchemaSimpleContentRestriction.cs
- RectConverter.cs
- PartBasedPackageProperties.cs
- HiddenField.cs
- ProfilePropertySettingsCollection.cs
- HelpProvider.cs
- ObjectDataSourceStatusEventArgs.cs
- WebPartConnectionCollection.cs
- WinOEToolBoxItem.cs
- BrushMappingModeValidation.cs
- SchemaExporter.cs
- XmlDownloadManager.cs
- CodeExporter.cs
- FusionWrap.cs
- BinHexEncoder.cs
- WindowsGraphicsCacheManager.cs
- TextBoxRenderer.cs
- HtmlSelect.cs
- VisualStateGroup.cs
- UIAgentRequest.cs
- OracleColumn.cs
- ProfileServiceManager.cs
- _BaseOverlappedAsyncResult.cs
- WebPartConnectionsDisconnectVerb.cs
- WebBrowserProgressChangedEventHandler.cs
- VerticalAlignConverter.cs
- SignatureToken.cs
- CopyNodeSetAction.cs
- DocumentViewerConstants.cs
- DataGrid.cs
- ConfigErrorGlyph.cs
- HelpKeywordAttribute.cs
- WebWorkflowRole.cs
- DispatcherFrame.cs
- AttributeConverter.cs
- DataGridCellsPanel.cs
- ServerType.cs
- ViewStateModeByIdAttribute.cs
- Bidi.cs
- SQLStringStorage.cs