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
- EventLogPermissionEntry.cs
- TextMessageEncodingElement.cs
- ApplicationServicesHostFactory.cs
- SamlAction.cs
- BreakSafeBase.cs
- SByteStorage.cs
- ProfileGroupSettingsCollection.cs
- Cursor.cs
- HwndTarget.cs
- TextServicesDisplayAttribute.cs
- RijndaelManagedTransform.cs
- DataListCommandEventArgs.cs
- CodeMemberEvent.cs
- TraceRecord.cs
- PermissionSetEnumerator.cs
- MasterPageParser.cs
- SizeAnimationUsingKeyFrames.cs
- DataGridViewToolTip.cs
- ClientProxyGenerator.cs
- DesignerSerializationOptionsAttribute.cs
- UserPreferenceChangingEventArgs.cs
- XmlSchemaCollection.cs
- ScrollBar.cs
- BorderGapMaskConverter.cs
- DBSqlParser.cs
- DesignTimeVisibleAttribute.cs
- XamlHttpHandlerFactory.cs
- HotCommands.cs
- Aggregates.cs
- CodeDOMUtility.cs
- DependencyPropertyHelper.cs
- StringSource.cs
- WindowsFormsHostPropertyMap.cs
- CodeTypeReference.cs
- UrlMapping.cs
- GraphicsContext.cs
- SortedList.cs
- TextRangeEdit.cs
- RetrieveVirtualItemEventArgs.cs
- ParseNumbers.cs
- MetafileHeaderEmf.cs
- AnnotationHelper.cs
- CompiledQuery.cs
- DictionaryBase.cs
- SqlUtil.cs
- IisTraceWebEventProvider.cs
- PropertyChangedEventArgs.cs
- CodeTypeOfExpression.cs
- TimeSpanValidatorAttribute.cs
- SelectedCellsCollection.cs
- ParameterReplacerVisitor.cs
- StructuredTypeEmitter.cs
- ConfigurationStrings.cs
- MediaSystem.cs
- _BaseOverlappedAsyncResult.cs
- XmlDataLoader.cs
- SystemTcpConnection.cs
- CancelEventArgs.cs
- HttpModuleActionCollection.cs
- XmlSchemaObject.cs
- SafeRegistryHandle.cs
- PrintDialogException.cs
- TypeForwardedToAttribute.cs
- UriSection.cs
- HashStream.cs
- ServicesUtilities.cs
- SqlCrossApplyToCrossJoin.cs
- DefaultHttpHandler.cs
- Math.cs
- AccessText.cs
- DataBinder.cs
- CheckBox.cs
- Matrix.cs
- XmlSignificantWhitespace.cs
- ImageFormat.cs
- EpmContentDeSerializer.cs
- LayoutEditorPart.cs
- ITextView.cs
- DataTableNewRowEvent.cs
- Ops.cs
- Grid.cs
- TagPrefixCollection.cs
- StorageBasedPackageProperties.cs
- DbSetClause.cs
- TableLayoutCellPaintEventArgs.cs
- DataServiceException.cs
- Connector.xaml.cs
- DbUpdateCommandTree.cs
- COSERVERINFO.cs
- SecureConversationVersion.cs
- Ops.cs
- XmlResolver.cs
- RuleConditionDialog.cs
- ImageMapEventArgs.cs
- TileModeValidation.cs
- ParenthesizePropertyNameAttribute.cs
- Descriptor.cs
- NamespaceListProperty.cs
- CompilerHelpers.cs
- SqlLiftIndependentRowExpressions.cs