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
- SerialErrors.cs
- RemotingException.cs
- HyperlinkAutomationPeer.cs
- BufferBuilder.cs
- NodeLabelEditEvent.cs
- TypefaceCollection.cs
- SettingsBindableAttribute.cs
- IgnoreSectionHandler.cs
- TraceContext.cs
- UndoEngine.cs
- CommandHelper.cs
- WorkBatch.cs
- TdsParserHelperClasses.cs
- FormatException.cs
- OleDbDataReader.cs
- GridToolTip.cs
- GraphicsContainer.cs
- Point3D.cs
- ThrowHelper.cs
- FileSystemInfo.cs
- MachineKeySection.cs
- HttpListener.cs
- SymbolPair.cs
- RecommendedAsConfigurableAttribute.cs
- QilPatternVisitor.cs
- TextBoxAutoCompleteSourceConverter.cs
- UserNameSecurityToken.cs
- WindowsPen.cs
- XmlTextReader.cs
- baseaxisquery.cs
- VectorCollectionConverter.cs
- Tracer.cs
- NameService.cs
- ParallelTimeline.cs
- StringUtil.cs
- SerialReceived.cs
- shaperfactoryquerycacheentry.cs
- SourceFilter.cs
- unsafeIndexingFilterStream.cs
- BrowserCapabilitiesFactoryBase.cs
- AttachmentCollection.cs
- ThreadNeutralSemaphore.cs
- EventLogTraceListener.cs
- ExpressionBindingCollection.cs
- SBCSCodePageEncoding.cs
- Nullable.cs
- CheckableControlBaseAdapter.cs
- LeftCellWrapper.cs
- ByteFacetDescriptionElement.cs
- StorageBasedPackageProperties.cs
- TextViewSelectionProcessor.cs
- RepeatBehavior.cs
- AccessDataSource.cs
- SelectionItemPattern.cs
- StrokeNode.cs
- EditorZoneBase.cs
- ImplicitInputBrush.cs
- CustomError.cs
- _KerberosClient.cs
- IndicFontClient.cs
- CheckableControlBaseAdapter.cs
- IMembershipProvider.cs
- HtmlButton.cs
- WebBrowserNavigatedEventHandler.cs
- CoTaskMemHandle.cs
- SQlBooleanStorage.cs
- GridViewCancelEditEventArgs.cs
- Transform3DGroup.cs
- Path.cs
- BackStopAuthenticationModule.cs
- StringKeyFrameCollection.cs
- HwndHost.cs
- TreeNodeStyle.cs
- ImageMap.cs
- KeyGesture.cs
- DbProviderFactoriesConfigurationHandler.cs
- PolygonHotSpot.cs
- HttpDictionary.cs
- OpenTypeLayoutCache.cs
- Registry.cs
- StringSource.cs
- MailMessage.cs
- MemoryStream.cs
- ACE.cs
- UserPreferenceChangedEventArgs.cs
- CustomErrorsSectionWrapper.cs
- FileDialogCustomPlacesCollection.cs
- XmlSchemaGroup.cs
- FormatVersion.cs
- TextContainerHelper.cs
- PrintPreviewDialog.cs
- printdlgexmarshaler.cs
- SoapEnumAttribute.cs
- IsolatedStorageFile.cs
- PropertyManager.cs
- PropertyGrid.cs
- RepeatBehavior.cs
- DocumentPageHost.cs
- AlternateView.cs
- AxisAngleRotation3D.cs