Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.ServiceModel.Activities / System / ServiceModel / Activities / Configuration / ChannelSettingsElement.cs / 1305376 / ChannelSettingsElement.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Activities.Configuration { using System.Runtime; using System.Configuration; using System.ComponentModel; using System.Globalization; using System.ServiceModel.Configuration; using System.ServiceModel.Activities.Description; public sealed class ChannelSettingsElement : ConfigurationElement { ConfigurationPropertyCollection properties; public ChannelSettingsElement() { } [ConfigurationProperty(ConfigurationStrings.IdleTimeout, DefaultValue = ChannelCacheDefaults.DefaultIdleTimeoutString)] [TypeConverter(typeof(TimeSpanOrInfiniteConverter))] [ServiceModelTimeSpanValidator(MinValueString = ConfigurationStrings.TimeSpanZero)] public TimeSpan IdleTimeout { get { return (TimeSpan)base[ConfigurationStrings.IdleTimeout]; } set { base[ConfigurationStrings.IdleTimeout] = value; } } [ConfigurationProperty(ConfigurationStrings.LeaseTimeout, DefaultValue = ChannelCacheDefaults.DefaultChannelLeaseTimeoutString)] [TypeConverter(typeof(TimeSpanOrInfiniteConverter))] [ServiceModelTimeSpanValidator(MinValueString = ConfigurationStrings.TimeSpanZero)] public TimeSpan LeaseTimeout { get { return (TimeSpan)base[ConfigurationStrings.LeaseTimeout]; } set { base[ConfigurationStrings.LeaseTimeout] = value; } } [ConfigurationProperty(ConfigurationStrings.MaxItemsInCache, DefaultValue = ChannelCacheDefaults.DefaultMaxItemsPerCacheString)] [IntegerValidator(MinValue = 0)] public int MaxItemsInCache { get { return (int)base[ConfigurationStrings.MaxItemsInCache]; } set { base[ConfigurationStrings.MaxItemsInCache] = value; } } protected override ConfigurationPropertyCollection Properties { get { if (this.properties == null) { ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection(); properties.Add(new ConfigurationProperty(ConfigurationStrings.MaxItemsInCache, typeof(System.Int32), ChannelCacheDefaults.DefaultMaxItemsPerCache, null, new System.Configuration.IntegerValidator(1, 2147483647, false), System.Configuration.ConfigurationPropertyOptions.None)); properties.Add(new ConfigurationProperty(ConfigurationStrings.IdleTimeout, typeof(System.TimeSpan), ChannelCacheDefaults.DefaultIdleTimeout, new System.Runtime.TimeSpanOrInfiniteConverter(), new System.Runtime.TimeSpanOrInfiniteValidator(System.TimeSpan.Parse("00:00:00", CultureInfo.InvariantCulture), System.TimeSpan.Parse("24.20:31:23.6470000", CultureInfo.InvariantCulture)), System.Configuration.ConfigurationPropertyOptions.None)); properties.Add(new ConfigurationProperty(ConfigurationStrings.LeaseTimeout, typeof(System.TimeSpan), ChannelCacheDefaults.DefaultFactoryLeaseTimeoutString, new System.Runtime.TimeSpanOrInfiniteConverter(), new System.Runtime.TimeSpanOrInfiniteValidator(System.TimeSpan.Parse("00:00:00", CultureInfo.InvariantCulture), System.TimeSpan.Parse("24.20:31:23.6470000", CultureInfo.InvariantCulture)), System.Configuration.ConfigurationPropertyOptions.None)); this.properties = properties; } return this.properties; } } } } // 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
- UrlMappingCollection.cs
- Vector3DConverter.cs
- UrlPath.cs
- PageCatalogPart.cs
- GenericQueueSurrogate.cs
- PropertyInformation.cs
- BuildProvider.cs
- MembershipValidatePasswordEventArgs.cs
- SqlXmlStorage.cs
- IPAddress.cs
- XmlNodeChangedEventArgs.cs
- FileCodeGroup.cs
- DeflateStream.cs
- OutKeywords.cs
- PropertyDescriptorGridEntry.cs
- SiteMapProvider.cs
- MetaModel.cs
- GridSplitter.cs
- SecurityException.cs
- GlyphRunDrawing.cs
- UTF7Encoding.cs
- ButtonBaseAutomationPeer.cs
- StringCollection.cs
- InteropTrackingRecord.cs
- TemplatedWizardStep.cs
- SQLSingleStorage.cs
- XD.cs
- DataBoundControlHelper.cs
- TypeDelegator.cs
- StreamWriter.cs
- DLinqTableProvider.cs
- XmlTypeAttribute.cs
- SQLDecimalStorage.cs
- DisplayNameAttribute.cs
- Container.cs
- DateTimeFormatInfoScanner.cs
- Tablet.cs
- Errors.cs
- SqlClientWrapperSmiStreamChars.cs
- StateManagedCollection.cs
- HttpResponseInternalWrapper.cs
- HttpChannelBindingToken.cs
- XdrBuilder.cs
- oledbmetadatacolumnnames.cs
- Margins.cs
- CheckBoxDesigner.cs
- RemoteWebConfigurationHostServer.cs
- Token.cs
- SizeAnimationClockResource.cs
- CurrentChangingEventArgs.cs
- TextUtf8RawTextWriter.cs
- ListBox.cs
- AstTree.cs
- ToolStripSystemRenderer.cs
- VarRemapper.cs
- EntityDataSourceWizardForm.cs
- ObjectQuery_EntitySqlExtensions.cs
- ChangeProcessor.cs
- FocusManager.cs
- CommandBinding.cs
- DateTimeOffsetConverter.cs
- MasterPageParser.cs
- SoapRpcServiceAttribute.cs
- SecurityTokenAttachmentMode.cs
- HtmlTableCellCollection.cs
- COM2TypeInfoProcessor.cs
- RuleInfoComparer.cs
- BindableAttribute.cs
- Descriptor.cs
- HttpListenerPrefixCollection.cs
- CancelRequestedRecord.cs
- _LazyAsyncResult.cs
- DesignerActionMethodItem.cs
- SiteMembershipCondition.cs
- RegularExpressionValidator.cs
- SpanIndex.cs
- FreeFormDesigner.cs
- HtmlInputRadioButton.cs
- TagPrefixAttribute.cs
- ListBoxAutomationPeer.cs
- AxHost.cs
- BinaryFormatterSinks.cs
- SQLBinary.cs
- ExportOptions.cs
- EntityObject.cs
- TimeSpanSecondsConverter.cs
- Symbol.cs
- InvokeWebServiceDesigner.cs
- TextElementEnumerator.cs
- CreateParams.cs
- SocketInformation.cs
- SecurityAttributeGenerationHelper.cs
- SmtpReplyReader.cs
- ScrollBarRenderer.cs
- RepeaterItem.cs
- httpserverutility.cs
- ObjectCloneHelper.cs
- SqlCrossApplyToCrossJoin.cs
- _Events.cs
- ToolStripPanelRenderEventArgs.cs