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
- OracleDateTime.cs
- TransformPatternIdentifiers.cs
- ControlAdapter.cs
- ZipIORawDataFileBlock.cs
- NullableDecimalMinMaxAggregationOperator.cs
- NamespaceEmitter.cs
- WorkflowViewService.cs
- DispatcherFrame.cs
- HtmlHead.cs
- MarkupProperty.cs
- FileDetails.cs
- AVElementHelper.cs
- StackOverflowException.cs
- QuaternionValueSerializer.cs
- IpcClientManager.cs
- PolicyStatement.cs
- __TransparentProxy.cs
- XmlSchemaComplexContentRestriction.cs
- RecordsAffectedEventArgs.cs
- BindableTemplateBuilder.cs
- StorageMappingFragment.cs
- HierarchicalDataBoundControl.cs
- Tokenizer.cs
- BypassElement.cs
- MenuItemStyle.cs
- TableItemPatternIdentifiers.cs
- FlowDocumentScrollViewer.cs
- ThemeInfoAttribute.cs
- TypeExtensionSerializer.cs
- TraceUtility.cs
- SocketException.cs
- QuotedPairReader.cs
- AuthorizationRuleCollection.cs
- __Filters.cs
- SystemIPGlobalProperties.cs
- CultureTableRecord.cs
- WindowsGraphicsCacheManager.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- ChannelCacheSettings.cs
- Html32TextWriter.cs
- hresults.cs
- DataMemberFieldConverter.cs
- ConnectionStringsExpressionBuilder.cs
- TextRenderer.cs
- ThreadPool.cs
- ExpressionConverter.cs
- RotateTransform3D.cs
- Mouse.cs
- clipboard.cs
- MultiplexingDispatchMessageFormatter.cs
- ChildDocumentBlock.cs
- RenderTargetBitmap.cs
- DbgUtil.cs
- FtpCachePolicyElement.cs
- TreeNodeStyle.cs
- PageCatalogPart.cs
- XmlAtomicValue.cs
- CLRBindingWorker.cs
- UInt32Storage.cs
- TraceListeners.cs
- WebConfigurationManager.cs
- GeneralTransform.cs
- _BaseOverlappedAsyncResult.cs
- CryptoStream.cs
- graph.cs
- DbSetClause.cs
- Mappings.cs
- ImageSourceConverter.cs
- Logging.cs
- BuildProvidersCompiler.cs
- LiteralText.cs
- NativeMethods.cs
- BaseHashHelper.cs
- DataServiceQueryProvider.cs
- SqlDependencyListener.cs
- ProbeDuplex11AsyncResult.cs
- VirtualPathExtension.cs
- NotifyCollectionChangedEventArgs.cs
- HostedHttpRequestAsyncResult.cs
- HtmlUtf8RawTextWriter.cs
- SparseMemoryStream.cs
- SqlCharStream.cs
- FindCriteriaElement.cs
- remotingproxy.cs
- ControlPager.cs
- DivideByZeroException.cs
- AutomationPatternInfo.cs
- HttpCacheParams.cs
- XPathScanner.cs
- Timer.cs
- DesignOnlyAttribute.cs
- XXXInfos.cs
- State.cs
- CellConstant.cs
- CircleHotSpot.cs
- ScriptingRoleServiceSection.cs
- formatter.cs
- CustomAttributeBuilder.cs
- ReservationCollection.cs
- ValidationRule.cs