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

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DependencyObjectProvider.cs
- DbConnectionPoolGroup.cs
- FixedSOMSemanticBox.cs
- SplashScreenNativeMethods.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- QilStrConcat.cs
- PageVisual.cs
- StyleReferenceConverter.cs
- DynamicMetaObjectBinder.cs
- ExpandSegmentCollection.cs
- ArraySegment.cs
- MetadataCacheItem.cs
- DataServiceException.cs
- RuntimeTransactionHandle.cs
- MessageEncoder.cs
- SpecularMaterial.cs
- DockPanel.cs
- QueueProcessor.cs
- BookmarkOptionsHelper.cs
- FixedStringLookup.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- StandardToolWindows.cs
- SqlDataSourceCustomCommandPanel.cs
- UIPropertyMetadata.cs
- QilStrConcatenator.cs
- DataSpaceManager.cs
- TriggerActionCollection.cs
- DurableInstanceContextProvider.cs
- DataGridViewCellParsingEventArgs.cs
- XPathDocumentNavigator.cs
- BookmarkScopeInfo.cs
- StateRuntime.cs
- FileStream.cs
- AppLevelCompilationSectionCache.cs
- ThrowHelper.cs
- ModelUIElement3D.cs
- DetailsViewInsertedEventArgs.cs
- RegexInterpreter.cs
- IPPacketInformation.cs
- wgx_sdk_version.cs
- ScopelessEnumAttribute.cs
- ToolZoneDesigner.cs
- OracleFactory.cs
- Line.cs
- EFColumnProvider.cs
- DeviceContext.cs
- MenuItemStyle.cs
- DataGridViewRowHeaderCell.cs
- CollectionTypeElement.cs
- Typeface.cs
- WebServiceErrorEvent.cs
- TargetFrameworkAttribute.cs
- DoubleAnimation.cs
- FocusTracker.cs
- DocumentXPathNavigator.cs
- HttpPostProtocolReflector.cs
- SingleAnimation.cs
- ToolbarAUtomationPeer.cs
- GeneralTransform3DTo2D.cs
- AssemblyBuilder.cs
- ListViewAutomationPeer.cs
- bidPrivateBase.cs
- FixedLineResult.cs
- CodeConstructor.cs
- Form.cs
- StringFreezingAttribute.cs
- ExtenderProvidedPropertyAttribute.cs
- OdbcDataAdapter.cs
- SingleStorage.cs
- ResourceManagerWrapper.cs
- SupportingTokenAuthenticatorSpecification.cs
- TreeViewImageKeyConverter.cs
- Relationship.cs
- SystemIdentity.cs
- TextTreeTextBlock.cs
- SubclassTypeValidatorAttribute.cs
- Pointer.cs
- DataGridCommandEventArgs.cs
- FileLogRecordEnumerator.cs
- UInt16.cs
- mediapermission.cs
- EventWaitHandle.cs
- SslStream.cs
- XmlSchema.cs
- GcHandle.cs
- HttpCapabilitiesSectionHandler.cs
- DataPager.cs
- MultiDataTrigger.cs
- CollectionViewGroupInternal.cs
- QilExpression.cs
- ItemsPresenter.cs
- DBDataPermission.cs
- IsolatedStorage.cs
- OutputCacheProfile.cs
- SQLMoney.cs
- TableProviderWrapper.cs
- SystemResources.cs
- WeakReference.cs
- UnmanagedHandle.cs
- FileUtil.cs