Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / Configuration / ConnectionManagementElement.cs / 1305376 / ConnectionManagementElement.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net.Configuration { using System; using System.Configuration; using System.Reflection; using System.Security.Permissions; public sealed class ConnectionManagementElement : ConfigurationElement { public ConnectionManagementElement() { this.properties.Add(this.address); this.properties.Add(this.maxconnection); } public ConnectionManagementElement(string address, int maxConnection) : this() { this.Address = address; this.MaxConnection = maxConnection; } protected override ConfigurationPropertyCollection Properties { get { return this.properties; } } [ConfigurationProperty(ConfigurationStrings.Address, IsRequired=true, IsKey = true)] public string Address { get { return (string)this[this.address]; } set { this[this.address] = value; } } [ConfigurationProperty(ConfigurationStrings.MaxConnection, IsRequired=true, DefaultValue=(int)1)] public int MaxConnection { get { return (int)this[this.maxconnection]; } set { this[this.maxconnection] = value; } } internal string Key { get { return this.Address; } } ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection(); readonly ConfigurationProperty address = new ConfigurationProperty(ConfigurationStrings.Address, typeof(string), null, ConfigurationPropertyOptions.IsKey); // CODE REVIEWER: Should the default value here be int.MaxInt, 2, or something else? readonly ConfigurationProperty maxconnection = new ConfigurationProperty(ConfigurationStrings.MaxConnection, typeof(int), 1, ConfigurationPropertyOptions.None); } } // 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
- SecurityUtils.cs
- AmbiguousMatchException.cs
- ApplicationSettingsBase.cs
- CryptoProvider.cs
- DbConnectionPool.cs
- MapPathBasedVirtualPathProvider.cs
- TableStyle.cs
- HyperLinkStyle.cs
- PerfCounterSection.cs
- WmlPanelAdapter.cs
- Columns.cs
- FramingDecoders.cs
- DotExpr.cs
- EntitySqlException.cs
- XmlSerializationReader.cs
- FtpWebResponse.cs
- SharedPersonalizationStateInfo.cs
- HttpModuleAction.cs
- ExpandedWrapper.cs
- NonPrimarySelectionGlyph.cs
- ObjectDataSourceView.cs
- GenerateTemporaryAssemblyTask.cs
- RelationshipWrapper.cs
- RegisteredArrayDeclaration.cs
- CompleteWizardStep.cs
- ImageMap.cs
- GeneralTransformGroup.cs
- TextProperties.cs
- DataGridRelationshipRow.cs
- ExecutedRoutedEventArgs.cs
- DataGridViewSortCompareEventArgs.cs
- ZipFileInfo.cs
- ProfileManager.cs
- OracleInternalConnection.cs
- CodeTypeParameter.cs
- AttributeCollection.cs
- GenerateTemporaryTargetAssembly.cs
- SubpageParaClient.cs
- Pen.cs
- ResourceReferenceKeyNotFoundException.cs
- COM2Enum.cs
- NetDataContractSerializer.cs
- DerivedKeyCachingSecurityTokenSerializer.cs
- DeobfuscatingStream.cs
- OciLobLocator.cs
- Message.cs
- LineGeometry.cs
- DataRelationPropertyDescriptor.cs
- WinFormsSecurity.cs
- WindowsScroll.cs
- KeyValueConfigurationElement.cs
- XmlException.cs
- XmlDownloadManager.cs
- AutoResetEvent.cs
- DataBindingHandlerAttribute.cs
- ClientCultureInfo.cs
- DeviceContext2.cs
- XmlILModule.cs
- Decimal.cs
- GreenMethods.cs
- LookupNode.cs
- DataGridViewRowConverter.cs
- ImmutableDispatchRuntime.cs
- MenuStrip.cs
- SoapReflectionImporter.cs
- CryptoHandle.cs
- ValueExpressions.cs
- XhtmlBasicSelectionListAdapter.cs
- LinkDesigner.cs
- AnnotationComponentChooser.cs
- SessionStateUtil.cs
- ProvidersHelper.cs
- ConsoleTraceListener.cs
- HtmlTableCell.cs
- CodeNamespace.cs
- HttpCapabilitiesEvaluator.cs
- ContractInstanceProvider.cs
- XhtmlBasicValidatorAdapter.cs
- DataGridToolTip.cs
- SettingsPropertyWrongTypeException.cs
- ChtmlMobileTextWriter.cs
- XmlLinkedNode.cs
- TextEditorCharacters.cs
- _DigestClient.cs
- ISCIIEncoding.cs
- ButtonColumn.cs
- DefaultMemberAttribute.cs
- ChildChangedEventArgs.cs
- DataGridViewColumnEventArgs.cs
- PageWrapper.cs
- PackWebRequestFactory.cs
- ClientTargetCollection.cs
- OutputScopeManager.cs
- WebReferencesBuildProvider.cs
- HScrollProperties.cs
- BufferModeSettings.cs
- FormsAuthenticationConfiguration.cs
- PeerCollaboration.cs
- ListItemCollection.cs
- FlowDocumentFormatter.cs