Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / RunTime / Hosting / WorkflowTimerService.cs / 1305376 / WorkflowTimerService.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- using System.Workflow.ComponentModel; using System.Workflow.Runtime; using System.Threading; namespace System.Workflow.Runtime.Hosting { class WorkflowTimerService : WorkflowRuntimeService, ITimerService { public WorkflowTimerService() : base() { } public void ScheduleTimer(WaitCallback callback, Guid workflowInstanceId, DateTime whenUtc, Guid timerId) { WorkflowSchedulerService schedulerService = this.Runtime.GetService(typeof(WorkflowSchedulerService)) as WorkflowSchedulerService; schedulerService.Schedule(callback, workflowInstanceId, whenUtc, timerId); } public void CancelTimer(Guid timerId) { WorkflowSchedulerService schedulerService = this.Runtime.GetService(typeof(WorkflowSchedulerService)) as WorkflowSchedulerService; schedulerService.Cancel(timerId); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- using System.Workflow.ComponentModel; using System.Workflow.Runtime; using System.Threading; namespace System.Workflow.Runtime.Hosting { class WorkflowTimerService : WorkflowRuntimeService, ITimerService { public WorkflowTimerService() : base() { } public void ScheduleTimer(WaitCallback callback, Guid workflowInstanceId, DateTime whenUtc, Guid timerId) { WorkflowSchedulerService schedulerService = this.Runtime.GetService(typeof(WorkflowSchedulerService)) as WorkflowSchedulerService; schedulerService.Schedule(callback, workflowInstanceId, whenUtc, timerId); } public void CancelTimer(Guid timerId) { WorkflowSchedulerService schedulerService = this.Runtime.GetService(typeof(WorkflowSchedulerService)) as WorkflowSchedulerService; schedulerService.Cancel(timerId); } } } // 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
- UpnEndpointIdentityExtension.cs
- TableLayoutPanelCellPosition.cs
- OwnerDrawPropertyBag.cs
- DateTimeValueSerializer.cs
- ProviderIncompatibleException.cs
- CmsInterop.cs
- RenderOptions.cs
- CheckedListBox.cs
- ExtentKey.cs
- SynchronousReceiveElement.cs
- MonitorWrapper.cs
- ImpersonateTokenRef.cs
- Compilation.cs
- EDesignUtil.cs
- DelegatedStream.cs
- BuildProviderAppliesToAttribute.cs
- MetadataLocation.cs
- HandoffBehavior.cs
- BitConverter.cs
- TypeCacheManager.cs
- Expressions.cs
- CodeIterationStatement.cs
- CustomError.cs
- UpdateTranslator.cs
- Aggregates.cs
- DesignerActionMethodItem.cs
- SiteMapProvider.cs
- URI.cs
- SimpleBitVector32.cs
- IPipelineRuntime.cs
- RectAnimationBase.cs
- PointLightBase.cs
- ItemsPresenter.cs
- EventProviderWriter.cs
- MultiPageTextView.cs
- DataAdapter.cs
- CompositeDuplexElement.cs
- Timeline.cs
- PropertySourceInfo.cs
- WebServiceFault.cs
- FullTextBreakpoint.cs
- StaticExtensionConverter.cs
- ResponseStream.cs
- PopupRoot.cs
- PackWebResponse.cs
- SoapCommonClasses.cs
- DBCSCodePageEncoding.cs
- InputLangChangeEvent.cs
- SqlProviderUtilities.cs
- UrlPath.cs
- ProfilePropertySettingsCollection.cs
- RC2.cs
- ByteStack.cs
- ReadOnlyDictionary.cs
- Model3DGroup.cs
- AuthenticationServiceManager.cs
- EtwTrace.cs
- SafeBitVector32.cs
- SecurityUtils.cs
- Animatable.cs
- UIntPtr.cs
- LifetimeServices.cs
- ListDictionaryInternal.cs
- ListItemParagraph.cs
- TextAnchor.cs
- PersonalizationProvider.cs
- MetaData.cs
- DockingAttribute.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- Identity.cs
- InstanceData.cs
- CornerRadius.cs
- XmlStringTable.cs
- StrongTypingException.cs
- DiscoveryServerProtocol.cs
- _NestedSingleAsyncResult.cs
- EventsTab.cs
- SocketCache.cs
- SqlAliasesReferenced.cs
- XmlRawWriter.cs
- StringUtil.cs
- MsmqIntegrationBindingCollectionElement.cs
- Ticks.cs
- BooleanProjectedSlot.cs
- ProgressChangedEventArgs.cs
- SocketElement.cs
- HtmlLiteralTextAdapter.cs
- XMLDiffLoader.cs
- sqlpipe.cs
- SystemInfo.cs
- PerformanceCounterLib.cs
- StaticTextPointer.cs
- DataServiceExpressionVisitor.cs
- ComponentTray.cs
- EntityTypeEmitter.cs
- KeyTime.cs
- DataGridSortCommandEventArgs.cs
- HttpFileCollection.cs
- ContainerFilterService.cs
- CodeVariableReferenceExpression.cs