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
- QilVisitor.cs
- CookieHandler.cs
- ScriptResourceMapping.cs
- NotSupportedException.cs
- TraceContextEventArgs.cs
- WorkflowMarkupElementEventArgs.cs
- BitmapData.cs
- OrderedDictionary.cs
- PieceNameHelper.cs
- RawStylusInputReport.cs
- QilName.cs
- OracleLob.cs
- ConsoleCancelEventArgs.cs
- InvalidPipelineStoreException.cs
- VisualBrush.cs
- XslAst.cs
- TextPattern.cs
- TableCell.cs
- MutexSecurity.cs
- ConfigurationStrings.cs
- DbConnectionPoolCounters.cs
- RegexGroupCollection.cs
- FontUnitConverter.cs
- RemotingConfigParser.cs
- WebZoneDesigner.cs
- Sql8ExpressionRewriter.cs
- PolyBezierSegmentFigureLogic.cs
- GraphicsPathIterator.cs
- XmlBoundElement.cs
- ObjectMemberMapping.cs
- Restrictions.cs
- SettingsProperty.cs
- HttpServerProtocol.cs
- Matrix3D.cs
- ColumnWidthChangingEvent.cs
- ReachFixedDocumentSerializerAsync.cs
- EntityConnectionStringBuilder.cs
- WebScriptMetadataFormatter.cs
- QilXmlWriter.cs
- DragEventArgs.cs
- isolationinterop.cs
- AssemblySettingAttributes.cs
- AuthorizationRuleCollection.cs
- NopReturnReader.cs
- ObjectHelper.cs
- HttpStreamXmlDictionaryWriter.cs
- TypeBrowser.xaml.cs
- ObjectDataSourceDisposingEventArgs.cs
- CustomTypeDescriptor.cs
- DataGridAutomationPeer.cs
- StrokeNodeOperations.cs
- TextServicesDisplayAttributePropertyRanges.cs
- OleAutBinder.cs
- WebBrowserProgressChangedEventHandler.cs
- ChainOfResponsibility.cs
- SecurityCriticalDataForSet.cs
- MarkerProperties.cs
- PathGeometry.cs
- HandleExceptionArgs.cs
- SortAction.cs
- CompiledQueryCacheKey.cs
- HierarchicalDataBoundControl.cs
- RenderingBiasValidation.cs
- DelegateHelpers.cs
- WorkflowMarkupSerializerMapping.cs
- ManipulationInertiaStartingEventArgs.cs
- GradientBrush.cs
- RefreshPropertiesAttribute.cs
- DataServiceRequest.cs
- AttachedPropertyBrowsableAttribute.cs
- MissingMemberException.cs
- ClassicBorderDecorator.cs
- SchemaNamespaceManager.cs
- PerfCounterSection.cs
- TraceEventCache.cs
- HttpListenerException.cs
- IsolatedStorageException.cs
- DefaultValueMapping.cs
- RegistryDataKey.cs
- SwitchDesigner.xaml.cs
- MetadataCollection.cs
- Int32AnimationUsingKeyFrames.cs
- SelectionEditor.cs
- AnimationClock.cs
- XsltFunctions.cs
- XmlNamespaceMapping.cs
- ReflectTypeDescriptionProvider.cs
- PauseStoryboard.cs
- ExitEventArgs.cs
- WebPartVerbCollection.cs
- SectionInformation.cs
- FormViewUpdatedEventArgs.cs
- Visual3DCollection.cs
- TransformerTypeCollection.cs
- GlobalProxySelection.cs
- SslStream.cs
- CompositeFontInfo.cs
- TextCollapsingProperties.cs
- DataObject.cs
- SimpleWebHandlerParser.cs