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
- Typeface.cs
- XPathNodeInfoAtom.cs
- CompilationLock.cs
- UpdatePanel.cs
- TypeSystemProvider.cs
- PropertyExpression.cs
- RC2CryptoServiceProvider.cs
- ClientRolePrincipal.cs
- EpmSyndicationContentSerializer.cs
- SaveFileDialog.cs
- SystemGatewayIPAddressInformation.cs
- Form.cs
- DataGridViewCell.cs
- DirectoryRootQuery.cs
- FixedSOMLineCollection.cs
- NCryptNative.cs
- HandlerMappingMemo.cs
- MessageContractExporter.cs
- HttpResponse.cs
- SingleSelectRootGridEntry.cs
- RegexInterpreter.cs
- SourceLocationProvider.cs
- BuiltInExpr.cs
- GroupItemAutomationPeer.cs
- ListViewGroupItemCollection.cs
- Pkcs7Recipient.cs
- FacetChecker.cs
- DbProviderFactory.cs
- MultiTrigger.cs
- ImageEditor.cs
- Mouse.cs
- UriScheme.cs
- InvalidDataContractException.cs
- WindowsListViewItemCheckBox.cs
- DashStyle.cs
- XPathDocumentNavigator.cs
- VectorCollection.cs
- StorageSetMapping.cs
- ArrayWithOffset.cs
- PropertyValidationContext.cs
- RtType.cs
- StandardCommands.cs
- TextServicesHost.cs
- TabItemAutomationPeer.cs
- CodeTypeOfExpression.cs
- EntityObject.cs
- SpeechRecognitionEngine.cs
- ActivityBindForm.Designer.cs
- QfeChecker.cs
- ObjectDataSourceSelectingEventArgs.cs
- DetailsViewInsertEventArgs.cs
- ListBindingHelper.cs
- InstanceDescriptor.cs
- XmlReflectionImporter.cs
- QilStrConcatenator.cs
- DataBoundControlHelper.cs
- JsonXmlDataContract.cs
- SchemaMapping.cs
- ProfileServiceManager.cs
- GlobalProxySelection.cs
- RuleSettings.cs
- ElementAction.cs
- SqlRewriteScalarSubqueries.cs
- Pointer.cs
- CursorConverter.cs
- UnsafeNativeMethods.cs
- DataServiceExpressionVisitor.cs
- AdornerHitTestResult.cs
- ConditionalAttribute.cs
- LocatorBase.cs
- RequestCache.cs
- AppLevelCompilationSectionCache.cs
- ProcessThreadDesigner.cs
- UnSafeCharBuffer.cs
- DictionaryEditChange.cs
- BrowserDefinitionCollection.cs
- ChannelReliableSession.cs
- DbParameterHelper.cs
- GridSplitterAutomationPeer.cs
- DataBindingCollection.cs
- PointConverter.cs
- CngKeyCreationParameters.cs
- XmlIncludeAttribute.cs
- WindowClosedEventArgs.cs
- CancelEventArgs.cs
- InputLanguageManager.cs
- AnimatedTypeHelpers.cs
- AndCondition.cs
- XamlParser.cs
- StandardRuntimeEnumValidatorAttribute.cs
- DuplicateMessageDetector.cs
- ExtenderProvidedPropertyAttribute.cs
- CompModSwitches.cs
- arabicshape.cs
- InputQueue.cs
- DoubleMinMaxAggregationOperator.cs
- ProfileGroupSettings.cs
- QueryCacheEntry.cs
- SmiContext.cs
- SQLByteStorage.cs