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
- ProviderConnectionPoint.cs
- RC2CryptoServiceProvider.cs
- keycontainerpermission.cs
- AliasedSlot.cs
- DefinitionBase.cs
- CannotUnloadAppDomainException.cs
- PbrsForward.cs
- OutputCacheSection.cs
- XmlElementAttribute.cs
- ContextBase.cs
- IdentityVerifier.cs
- Type.cs
- CultureInfoConverter.cs
- Clause.cs
- itemelement.cs
- GradientPanel.cs
- DataContractSerializer.cs
- ContainerTracking.cs
- BooleanAnimationBase.cs
- ShutDownListener.cs
- DataGridViewCellConverter.cs
- DockingAttribute.cs
- PermissionRequestEvidence.cs
- ReadOnlyNameValueCollection.cs
- ProofTokenCryptoHandle.cs
- AttributeTableBuilder.cs
- CatchBlock.cs
- SoapExtensionTypeElement.cs
- SourceItem.cs
- LabelAutomationPeer.cs
- ActivityBindForm.Designer.cs
- ArraySegment.cs
- ExternalFile.cs
- AttributeCollection.cs
- UIHelper.cs
- Aggregates.cs
- XpsSerializationException.cs
- CharacterBufferReference.cs
- CatalogZone.cs
- ProjectionCamera.cs
- FileDialog.cs
- FtpWebResponse.cs
- RuleSettingsCollection.cs
- Paragraph.cs
- TransportChannelFactory.cs
- AsyncResult.cs
- MediaPlayer.cs
- DesignerDataStoredProcedure.cs
- HashCodeCombiner.cs
- Membership.cs
- printdlgexmarshaler.cs
- CacheSection.cs
- LabelAutomationPeer.cs
- PenLineJoinValidation.cs
- InplaceBitmapMetadataWriter.cs
- BooleanToSelectiveScrollingOrientationConverter.cs
- ComboBoxAutomationPeer.cs
- LinkDescriptor.cs
- StylusButtonEventArgs.cs
- Descriptor.cs
- XmlAtomicValue.cs
- FlowNode.cs
- WorkflowEventArgs.cs
- DSASignatureFormatter.cs
- Int32.cs
- GridToolTip.cs
- AddIn.cs
- RuleRef.cs
- X509ChainElement.cs
- EmissiveMaterial.cs
- SQLDecimalStorage.cs
- DataControlField.cs
- ClonableStack.cs
- PhoneCall.cs
- XPathDescendantIterator.cs
- MetadataItem_Static.cs
- CustomErrorsSectionWrapper.cs
- VectorAnimationBase.cs
- RunWorkerCompletedEventArgs.cs
- ClientSession.cs
- DataChangedEventManager.cs
- ModelTreeEnumerator.cs
- Soap12FormatExtensions.cs
- NativeMethods.cs
- XPathItem.cs
- XMLSyntaxException.cs
- Main.cs
- SerializationException.cs
- EncryptedKeyIdentifierClause.cs
- FormsAuthenticationUserCollection.cs
- UnmanagedHandle.cs
- UnionCodeGroup.cs
- Style.cs
- ProtocolsConfigurationEntry.cs
- BoolLiteral.cs
- ConnectionConsumerAttribute.cs
- TreeViewImageKeyConverter.cs
- PrintingPermission.cs
- ExtendedProperty.cs
- DateTimeOffsetAdapter.cs