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
- Literal.cs
- PbrsForward.cs
- DrawingDrawingContext.cs
- InheritanceUI.cs
- GridViewCancelEditEventArgs.cs
- InvalidTimeZoneException.cs
- FileDetails.cs
- ComMethodElementCollection.cs
- RequestCachingSection.cs
- WebContext.cs
- DBConnectionString.cs
- ServiceBusyException.cs
- TextDecorations.cs
- clipboard.cs
- SecurityDocument.cs
- WindowClosedEventArgs.cs
- TerminatorSinks.cs
- GACMembershipCondition.cs
- StylusPointPropertyInfoDefaults.cs
- MainMenu.cs
- PowerEase.cs
- FocusManager.cs
- StateItem.cs
- DataGridViewComponentPropertyGridSite.cs
- InkCanvasAutomationPeer.cs
- CqlParser.cs
- HttpWebResponse.cs
- FrameworkElementAutomationPeer.cs
- _ConnectOverlappedAsyncResult.cs
- DataGridViewColumnCollection.cs
- CodeAttributeArgument.cs
- EdmScalarPropertyAttribute.cs
- JavaScriptObjectDeserializer.cs
- WSSecurityOneDotOneSendSecurityHeader.cs
- storepermission.cs
- JoinCqlBlock.cs
- latinshape.cs
- XMLSyntaxException.cs
- DetailsViewPageEventArgs.cs
- PrincipalPermission.cs
- DecimalAnimationUsingKeyFrames.cs
- WsdlInspector.cs
- HwndHost.cs
- AggregateNode.cs
- ColumnHeader.cs
- StreamUpgradeBindingElement.cs
- FamilyTypefaceCollection.cs
- SqlUDTStorage.cs
- GridViewCancelEditEventArgs.cs
- EncoderBestFitFallback.cs
- SocketException.cs
- XamlSerializer.cs
- NameNode.cs
- RawStylusInputCustomData.cs
- ScrollChrome.cs
- base64Transforms.cs
- TableHeaderCell.cs
- OAVariantLib.cs
- Soap12ProtocolImporter.cs
- Part.cs
- StorageEntitySetMapping.cs
- SqlTypeConverter.cs
- GZipStream.cs
- FreezableCollection.cs
- CallSiteHelpers.cs
- SiteMapSection.cs
- SqlDataSourceView.cs
- HtmlMeta.cs
- FormatterConverter.cs
- BaseCAMarshaler.cs
- CLSCompliantAttribute.cs
- MoveSizeWinEventHandler.cs
- WaitHandle.cs
- RecognizerStateChangedEventArgs.cs
- BuiltInExpr.cs
- UdpDiscoveryEndpoint.cs
- XmlChildEnumerator.cs
- WindowsListViewGroup.cs
- StringFormat.cs
- TextCompositionEventArgs.cs
- LinqDataSourceSelectEventArgs.cs
- DateTimeOffsetConverter.cs
- XsltException.cs
- Clock.cs
- QueryPageSettingsEventArgs.cs
- BufferedGraphicsManager.cs
- NonSerializedAttribute.cs
- CustomServiceCredentials.cs
- VectorKeyFrameCollection.cs
- Control.cs
- BulletedListEventArgs.cs
- ExtenderProvidedPropertyAttribute.cs
- DayRenderEvent.cs
- RegexStringValidator.cs
- DebugView.cs
- ProfilePropertyMetadata.cs
- PersonalizableTypeEntry.cs
- JapaneseCalendar.cs
- Metafile.cs
- XPathItem.cs