Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.ServiceModel.Activities / System / ServiceModel / Activities / Description / WorkflowIdleBehavior.cs / 1305376 / WorkflowIdleBehavior.cs
//---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.ServiceModel.Activities.Description { using System.Collections.ObjectModel; using System.Globalization; using System.Runtime; using System.ServiceModel.Channels; using System.ServiceModel.Description; [Fx.Tag.XamlVisible(false)] public class WorkflowIdleBehavior : IServiceBehavior { internal const string defaultTimeToPersistString = "Infinite"; internal static TimeSpan defaultTimeToPersist = TimeSpan.MaxValue; internal const string defaultTimeToUnloadString = "00:01:00"; internal static TimeSpan defaultTimeToUnload = TimeSpan.Parse(defaultTimeToUnloadString, CultureInfo.InvariantCulture); TimeSpan timeToPersist; TimeSpan timeToUnload; public WorkflowIdleBehavior() { this.timeToPersist = defaultTimeToPersist; this.timeToUnload = defaultTimeToUnload; } public TimeSpan TimeToPersist { get { return this.timeToPersist; } set { if (value < TimeSpan.Zero) { throw FxTrace.Exception.ArgumentOutOfRange("value", value, SR.ErrorTimeToPersistLessThanZero); } this.timeToPersist = value; } } public TimeSpan TimeToUnload { get { return this.timeToUnload; } set { if (value < TimeSpan.Zero) { throw FxTrace.Exception.ArgumentOutOfRange("value", value, SR.ErrorTimeToUnloadLessThanZero); } this.timeToUnload = value; } } public void AddBindingParameters(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase, Collectionendpoints, BindingParameterCollection bindingParameters) { } public void ApplyDispatchBehavior(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase) { WorkflowServiceHost workflowServiceHost = serviceHostBase as WorkflowServiceHost; if (workflowServiceHost != null) { workflowServiceHost.IdleTimeToPersist = this.TimeToPersist; workflowServiceHost.IdleTimeToUnload = this.TimeToUnload; } } public void Validate(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase) { if (serviceDescription == null) { throw FxTrace.Exception.ArgumentNull("serviceDescription"); } if (serviceHostBase == null) { throw FxTrace.Exception.ArgumentNull("serviceHostBase"); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlSchemaIdentityConstraint.cs
- DataListCommandEventArgs.cs
- SessionStateSection.cs
- CodeNamespaceCollection.cs
- XamlSerializerUtil.cs
- FillErrorEventArgs.cs
- Attributes.cs
- ShaderEffect.cs
- Pair.cs
- MonthChangedEventArgs.cs
- SingleTagSectionHandler.cs
- CommandEventArgs.cs
- NoneExcludedImageIndexConverter.cs
- RNGCryptoServiceProvider.cs
- DbgUtil.cs
- WebConfigurationHost.cs
- ObjectListCommandEventArgs.cs
- BidOverLoads.cs
- IsolatedStorage.cs
- ProfileModule.cs
- SafeNativeMethods.cs
- HtmlGenericControl.cs
- StrokeNodeOperations2.cs
- ResourceDictionaryCollection.cs
- Utils.cs
- MetadataFile.cs
- CacheChildrenQuery.cs
- MutexSecurity.cs
- DataColumnMapping.cs
- PopupRoot.cs
- RotateTransform3D.cs
- BrushValueSerializer.cs
- StorageFunctionMapping.cs
- PagerSettings.cs
- TextTreeNode.cs
- IndexerNameAttribute.cs
- FormViewModeEventArgs.cs
- PrefixHandle.cs
- ViewSimplifier.cs
- DragEvent.cs
- _NestedSingleAsyncResult.cs
- TreeViewItemAutomationPeer.cs
- Debug.cs
- Win32Exception.cs
- AppDomainAttributes.cs
- ProviderIncompatibleException.cs
- UpdateProgress.cs
- CommandSet.cs
- OrderByQueryOptionExpression.cs
- PersonalizableTypeEntry.cs
- EmptyQuery.cs
- Label.cs
- Model3D.cs
- PerfCounterSection.cs
- ColumnCollection.cs
- StateRuntime.cs
- CalendarDay.cs
- DataBoundControlAdapter.cs
- StorageEntityTypeMapping.cs
- PopupRoot.cs
- ScriptBehaviorDescriptor.cs
- RootBuilder.cs
- ApplicationBuildProvider.cs
- RuntimeResourceSet.cs
- _IPv4Address.cs
- OracleInternalConnection.cs
- MembershipSection.cs
- StaticSiteMapProvider.cs
- ImageDrawing.cs
- Int32RectConverter.cs
- RunWorkerCompletedEventArgs.cs
- ThreadPool.cs
- WindowsRichEdit.cs
- SafeNativeMethods.cs
- SortedDictionary.cs
- Quaternion.cs
- PageParser.cs
- RSAPKCS1SignatureFormatter.cs
- AsymmetricKeyExchangeFormatter.cs
- SubpageParaClient.cs
- WebPartCatalogAddVerb.cs
- DetectRunnableInstancesTask.cs
- LinqDataSourceView.cs
- EntityDesignerUtils.cs
- PolyLineSegmentFigureLogic.cs
- CustomAttributeBuilder.cs
- AppDomainAttributes.cs
- EntityDataSourceQueryBuilder.cs
- SqlDataRecord.cs
- RecognizerBase.cs
- PinnedBufferMemoryStream.cs
- DelegateBodyWriter.cs
- XPathNodePointer.cs
- ReferencedCollectionType.cs
- Color.cs
- SafeRightsManagementEnvironmentHandle.cs
- BamlResourceContent.cs
- PartialCachingControl.cs
- XmlSchemaIdentityConstraint.cs
- StorageModelBuildProvider.cs