Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / Web / System / Web / Services / Configuration / ProtocolElement.cs / 1305376 / ProtocolElement.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.Web.Services.Configuration { using System; using System.Configuration; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.Security.Permissions; public sealed class ProtocolElement : ConfigurationElement { // These three constructors are used by the configuration system. public ProtocolElement() : base() { this.properties.Add(this.name); } public ProtocolElement(WebServiceProtocols protocol) : this() { this.Name = protocol; } [ConfigurationProperty("name", IsKey = true, DefaultValue = WebServiceProtocols.Unknown)] public WebServiceProtocols Name { get { return (WebServiceProtocols)base[this.name]; } set { if (!IsValidProtocolsValue(value)) { value = WebServiceProtocols.Unknown; } base[this.name] = value; } } protected override ConfigurationPropertyCollection Properties { get { return this.properties; } } bool IsValidProtocolsValue(WebServiceProtocols value) { return Enum.IsDefined(typeof(WebServiceProtocols), value); } ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection(); readonly ConfigurationProperty name = new ConfigurationProperty("name", typeof(WebServiceProtocols), WebServiceProtocols.Unknown, ConfigurationPropertyOptions.IsKey); } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.Web.Services.Configuration { using System; using System.Configuration; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.Security.Permissions; public sealed class ProtocolElement : ConfigurationElement { // These three constructors are used by the configuration system. public ProtocolElement() : base() { this.properties.Add(this.name); } public ProtocolElement(WebServiceProtocols protocol) : this() { this.Name = protocol; } [ConfigurationProperty("name", IsKey = true, DefaultValue = WebServiceProtocols.Unknown)] public WebServiceProtocols Name { get { return (WebServiceProtocols)base[this.name]; } set { if (!IsValidProtocolsValue(value)) { value = WebServiceProtocols.Unknown; } base[this.name] = value; } } protected override ConfigurationPropertyCollection Properties { get { return this.properties; } } bool IsValidProtocolsValue(WebServiceProtocols value) { return Enum.IsDefined(typeof(WebServiceProtocols), value); } ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection(); readonly ConfigurationProperty name = new ConfigurationProperty("name", typeof(WebServiceProtocols), WebServiceProtocols.Unknown, ConfigurationPropertyOptions.IsKey); } } // 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
- DiffuseMaterial.cs
- Column.cs
- ImmutableCollection.cs
- WmlPhoneCallAdapter.cs
- GeometryDrawing.cs
- ControlIdConverter.cs
- EntityUtil.cs
- Clock.cs
- ComplexLine.cs
- ListParaClient.cs
- LocalValueEnumerator.cs
- XmlSchemaIdentityConstraint.cs
- CodeTypeReferenceCollection.cs
- DocobjHost.cs
- contentDescriptor.cs
- WindowInteractionStateTracker.cs
- Style.cs
- SmtpDigestAuthenticationModule.cs
- SecurityImpersonationBehavior.cs
- WebRequestModuleElementCollection.cs
- ToolStripOverflowButton.cs
- CollectionViewGroup.cs
- PassportAuthenticationModule.cs
- _ShellExpression.cs
- DataSourceSelectArguments.cs
- AspNetPartialTrustHelpers.cs
- PageAsyncTaskManager.cs
- SchemaCollectionCompiler.cs
- ExtensionSimplifierMarkupObject.cs
- SkewTransform.cs
- HtmlButton.cs
- SecurityIdentifierElementCollection.cs
- ContextStack.cs
- TemplateInstanceAttribute.cs
- UriTemplatePathPartiallyEquivalentSet.cs
- MessageBox.cs
- TransactionManager.cs
- Positioning.cs
- PiiTraceSource.cs
- JulianCalendar.cs
- DataGridViewButtonColumn.cs
- SecurityKeyIdentifierClause.cs
- ConfigUtil.cs
- TcpClientChannel.cs
- WebPartZoneDesigner.cs
- SystemWebSectionGroup.cs
- IdentifierService.cs
- KeyGestureConverter.cs
- AliasExpr.cs
- DelegatingConfigHost.cs
- DesignerRegionMouseEventArgs.cs
- Stream.cs
- Imaging.cs
- StreamAsIStream.cs
- TypeSystemProvider.cs
- ExecutionEngineException.cs
- NavigationCommands.cs
- BamlLocalizableResource.cs
- AsyncResult.cs
- HtmlUtf8RawTextWriter.cs
- PixelFormatConverter.cs
- BuildProvider.cs
- ValidatorCollection.cs
- SelfIssuedAuthRSACryptoProvider.cs
- ClonableStack.cs
- LoginCancelEventArgs.cs
- ListParaClient.cs
- BindableTemplateBuilder.cs
- NaturalLanguageHyphenator.cs
- SqlConnectionPoolGroupProviderInfo.cs
- Matrix3D.cs
- DesignerSerializationOptionsAttribute.cs
- ItemAutomationPeer.cs
- BindingNavigatorDesigner.cs
- Literal.cs
- Int32Collection.cs
- BindValidationContext.cs
- DbTransaction.cs
- OutputCacheProfile.cs
- RenderingEventArgs.cs
- TypeFieldSchema.cs
- DtrList.cs
- ClusterRegistryConfigurationProvider.cs
- ExcludeFromCodeCoverageAttribute.cs
- PathData.cs
- FileDialogCustomPlaces.cs
- Viewport2DVisual3D.cs
- ControlEvent.cs
- TextSerializer.cs
- Thread.cs
- WebBrowserDocumentCompletedEventHandler.cs
- ColorKeyFrameCollection.cs
- Exceptions.cs
- StickyNoteAnnotations.cs
- MembershipSection.cs
- PersonalizationStateQuery.cs
- InheritanceRules.cs
- WebBrowserUriTypeConverter.cs
- HashCodeCombiner.cs
- FilteredAttributeCollection.cs