Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Net / System / Net / Configuration / ConnectionManagementElement.cs / 1 / 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); } }
Link Menu
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ScrollViewer.cs
- ForceCopyBuildProvider.cs
- IPPacketInformation.cs
- OdbcError.cs
- ObjectSelectorEditor.cs
- XmlNotation.cs
- SecurityPermission.cs
- ProcessManager.cs
- HttpRequest.cs
- SignalGate.cs
- GeneralTransformCollection.cs
- DateTimeConverter2.cs
- SourceElementsCollection.cs
- IIS7UserPrincipal.cs
- ZipIOBlockManager.cs
- SerializationHelper.cs
- StrokeFIndices.cs
- AliasExpr.cs
- DataGridViewComboBoxEditingControl.cs
- ExecutionEngineException.cs
- prompt.cs
- TreeNodeClickEventArgs.cs
- SQLInt16Storage.cs
- AutoCompleteStringCollection.cs
- AuthenticationModuleElement.cs
- FileRecordSequenceCompletedAsyncResult.cs
- Sorting.cs
- WindowsStatic.cs
- MinimizableAttributeTypeConverter.cs
- WebPartManagerInternals.cs
- FixedNode.cs
- OSFeature.cs
- MessageBodyMemberAttribute.cs
- DateBoldEvent.cs
- AuthenticationSection.cs
- RuntimeConfigurationRecord.cs
- WebCategoryAttribute.cs
- SByteConverter.cs
- RefreshResponseInfo.cs
- StringConverter.cs
- ObjectQuery_EntitySqlExtensions.cs
- DetailsViewRowCollection.cs
- MenuItem.cs
- QueryStringParameter.cs
- ImmutableDispatchRuntime.cs
- XpsSerializerWriter.cs
- ZipIOLocalFileDataDescriptor.cs
- CellParaClient.cs
- MouseCaptureWithinProperty.cs
- Transform3DCollection.cs
- HostedElements.cs
- DataColumnChangeEvent.cs
- XPathBinder.cs
- SpotLight.cs
- NumericUpDownAcceleration.cs
- ACL.cs
- EditorResources.cs
- RC2.cs
- _BaseOverlappedAsyncResult.cs
- ScrollChrome.cs
- DataGridItemCollection.cs
- AsymmetricSignatureDeformatter.cs
- RootBrowserWindow.cs
- HttpProxyTransportBindingElement.cs
- ListCollectionView.cs
- DefaultBinder.cs
- XmlSchemaChoice.cs
- ExpressionBuilderContext.cs
- LineGeometry.cs
- Int64AnimationUsingKeyFrames.cs
- COAUTHIDENTITY.cs
- SchemaElement.cs
- PolyQuadraticBezierSegment.cs
- GlyphInfoList.cs
- TextSpan.cs
- Viewport3DVisual.cs
- ConstantExpression.cs
- FirstMatchCodeGroup.cs
- AdjustableArrowCap.cs
- IntranetCredentialPolicy.cs
- DesignerOptionService.cs
- StackSpiller.Temps.cs
- WebPartPersonalization.cs
- DataSetMappper.cs
- TranslateTransform.cs
- SettingsPropertyValueCollection.cs
- SqlMultiplexer.cs
- _AutoWebProxyScriptWrapper.cs
- PreviewPrintController.cs
- RowUpdatingEventArgs.cs
- SamlConstants.cs
- TargetPerspective.cs
- StorageInfo.cs
- InputElement.cs
- DictionaryBase.cs
- ObjectReaderCompiler.cs
- ProcessInputEventArgs.cs
- AuthStoreRoleProvider.cs
- UIElementHelper.cs
- OperatorExpressions.cs