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
- ObjectViewQueryResultData.cs
- ListView.cs
- SqlConnectionPoolProviderInfo.cs
- MarkupExtensionSerializer.cs
- UmAlQuraCalendar.cs
- SafeSecurityHelper.cs
- ValueSerializerAttribute.cs
- MatrixIndependentAnimationStorage.cs
- ResourceContainer.cs
- CategoryAttribute.cs
- TraceContextEventArgs.cs
- WindowsListBox.cs
- ListView.cs
- DataObjectFieldAttribute.cs
- DrawingImage.cs
- Matrix3D.cs
- SubclassTypeValidator.cs
- UInt64Converter.cs
- NamedObject.cs
- SynchronizationLockException.cs
- ApplicationBuildProvider.cs
- ProtocolsConfigurationEntry.cs
- FolderBrowserDialogDesigner.cs
- CustomWebEventKey.cs
- DataGridViewCellEventArgs.cs
- DecimalConverter.cs
- ProcessStartInfo.cs
- COM2FontConverter.cs
- AssertSection.cs
- BlobPersonalizationState.cs
- UnsafeNativeMethods.cs
- CryptoStream.cs
- VectorAnimationBase.cs
- AccessibleObject.cs
- DotExpr.cs
- HostProtectionPermission.cs
- BinaryQueryOperator.cs
- ToolStripDropDownItemDesigner.cs
- HttpRequestCacheValidator.cs
- EntitySetRetriever.cs
- WindowsBrush.cs
- NonVisualControlAttribute.cs
- Suspend.cs
- NonBatchDirectoryCompiler.cs
- WebPartExportVerb.cs
- ConfigXmlWhitespace.cs
- MetaData.cs
- SendContent.cs
- MailWebEventProvider.cs
- ColumnReorderedEventArgs.cs
- FontCacheUtil.cs
- X509SecurityTokenAuthenticator.cs
- HttpConfigurationSystem.cs
- UnsafeNativeMethodsCLR.cs
- EntityObject.cs
- X509CertificateTrustedIssuerElementCollection.cs
- ParallelTimeline.cs
- EventItfInfo.cs
- ColumnMapVisitor.cs
- CompilationSection.cs
- RegionIterator.cs
- Panel.cs
- ArgumentFixer.cs
- SyntaxCheck.cs
- SettingsSavedEventArgs.cs
- ComplexBindingPropertiesAttribute.cs
- InputLanguageManager.cs
- SessionEndedEventArgs.cs
- XmlDocumentType.cs
- DataPagerCommandEventArgs.cs
- ModelService.cs
- Clock.cs
- WindowsSolidBrush.cs
- SQLBytes.cs
- SynchronizedDispatch.cs
- DbParameterHelper.cs
- XPathSelfQuery.cs
- XmlReflectionImporter.cs
- FontWeight.cs
- CollectionsUtil.cs
- ObjectParameter.cs
- ClientSideQueueItem.cs
- RectangleF.cs
- XmlArrayItemAttribute.cs
- FixedSOMTableCell.cs
- sqlnorm.cs
- SubstitutionList.cs
- MatrixValueSerializer.cs
- PriorityChain.cs
- ImageConverter.cs
- RoutedPropertyChangedEventArgs.cs
- SemanticValue.cs
- Geometry3D.cs
- DataGridViewHeaderCell.cs
- EraserBehavior.cs
- RowVisual.cs
- AssemblyBuilderData.cs
- XmlEntity.cs
- PhoneCallDesigner.cs
- DbMetaDataColumnNames.cs