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
- ApplicationGesture.cs
- RectangleConverter.cs
- nulltextcontainer.cs
- ProtocolsConfiguration.cs
- HttpGetProtocolReflector.cs
- UIAgentCrashedException.cs
- SliderAutomationPeer.cs
- xml.cs
- ClientSponsor.cs
- Color.cs
- ContextProperty.cs
- Line.cs
- TraceSection.cs
- CheckBoxRenderer.cs
- DispatcherExceptionFilterEventArgs.cs
- UrlAuthorizationModule.cs
- SafeArrayTypeMismatchException.cs
- NativeMethods.cs
- AutomationPatternInfo.cs
- UndirectedGraph.cs
- BrushProxy.cs
- AuthorizationRule.cs
- DiscoveryClientChannelFactory.cs
- HttpConfigurationContext.cs
- DebugControllerThread.cs
- BitmapMetadataEnumerator.cs
- BitmapData.cs
- ClockController.cs
- _AutoWebProxyScriptWrapper.cs
- OdbcConnectionFactory.cs
- DesignerFrame.cs
- TypedRowGenerator.cs
- XamlClipboardData.cs
- PathParser.cs
- BrowserCapabilitiesFactory.cs
- EntityDataSourceContainerNameItem.cs
- NavigationPropertySingletonExpression.cs
- NamespaceInfo.cs
- InvalidFilterCriteriaException.cs
- UnsafeNativeMethods.cs
- DbgCompiler.cs
- DisplayInformation.cs
- XPathNavigator.cs
- AnnouncementClient.cs
- precedingquery.cs
- FixedSOMLineCollection.cs
- ReadOnlyHierarchicalDataSourceView.cs
- HttpChannelHelper.cs
- ListBindableAttribute.cs
- ContractsBCL.cs
- TypeHelpers.cs
- WSHttpBindingCollectionElement.cs
- FrameDimension.cs
- LoginUtil.cs
- PriorityQueue.cs
- XmlQueryCardinality.cs
- ItemsControlAutomationPeer.cs
- AssemblyBuilder.cs
- AccessorTable.cs
- MethodResolver.cs
- TreeViewImageIndexConverter.cs
- GlyphElement.cs
- ImmutableObjectAttribute.cs
- DrawingContextDrawingContextWalker.cs
- File.cs
- ContentDesigner.cs
- InsufficientMemoryException.cs
- DoubleUtil.cs
- ApplyTemplatesAction.cs
- StorageModelBuildProvider.cs
- ClientScriptManagerWrapper.cs
- TimeSpanParse.cs
- MobilePage.cs
- EmptyReadOnlyDictionaryInternal.cs
- MarkupProperty.cs
- WaitHandle.cs
- XmlDocumentFieldSchema.cs
- HttpStreamXmlDictionaryReader.cs
- StatusBarDrawItemEvent.cs
- VisualStyleTypesAndProperties.cs
- DBBindings.cs
- ListView.cs
- PackagePartCollection.cs
- AssemblyAttributesGoHere.cs
- GridViewColumnHeader.cs
- PaperSize.cs
- SchemaTableColumn.cs
- HtmlInputCheckBox.cs
- EntityTemplateUserControl.cs
- BamlRecordWriter.cs
- CodeMemberProperty.cs
- SqlXml.cs
- DataSetSchema.cs
- WebBrowserBase.cs
- FontWeights.cs
- DefaultExpressionVisitor.cs
- InfoCardTraceRecord.cs
- RecordManager.cs
- ComplexObject.cs
- HelpKeywordAttribute.cs