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
- XmlProcessingInstruction.cs
- ThreadExceptionDialog.cs
- ServiceProviders.cs
- SelectedGridItemChangedEvent.cs
- PermissionSetTriple.cs
- ButtonStandardAdapter.cs
- mda.cs
- ServiceDescriptionSerializer.cs
- UITypeEditor.cs
- WebCategoryAttribute.cs
- OdbcConnectionStringbuilder.cs
- TransformValueSerializer.cs
- SafeEventLogWriteHandle.cs
- WebServiceAttribute.cs
- PartialTrustVisibleAssemblyCollection.cs
- codemethodreferenceexpression.cs
- ServiceObjectContainer.cs
- MediaElementAutomationPeer.cs
- BrowserInteropHelper.cs
- WindowsRichEdit.cs
- ApplicationProxyInternal.cs
- RewritingValidator.cs
- ProgressBarHighlightConverter.cs
- DescendantBaseQuery.cs
- BitmapFrameDecode.cs
- Socket.cs
- DataRecordInternal.cs
- DataGridViewCellPaintingEventArgs.cs
- Identity.cs
- Section.cs
- WpfMemberInvoker.cs
- HttpRequestTraceRecord.cs
- TextEditorLists.cs
- FacetValues.cs
- QilReplaceVisitor.cs
- HtmlObjectListAdapter.cs
- SystemInfo.cs
- TraceUtils.cs
- DbInsertCommandTree.cs
- InstanceData.cs
- AllMembershipCondition.cs
- Variable.cs
- Pts.cs
- IntSecurity.cs
- CommonObjectSecurity.cs
- SqlReorderer.cs
- HMACMD5.cs
- JoinCqlBlock.cs
- TextPointerBase.cs
- JournalEntry.cs
- HttpMethodConstraint.cs
- DiagnosticTraceSource.cs
- WebPartsSection.cs
- StrongNameKeyPair.cs
- NextPreviousPagerField.cs
- MonthCalendar.cs
- FontFamily.cs
- HttpListener.cs
- InstanceLockLostException.cs
- ResolvedKeyFrameEntry.cs
- NegotiateStream.cs
- WebDescriptionAttribute.cs
- TransformGroup.cs
- EastAsianLunisolarCalendar.cs
- CalendarDesigner.cs
- FixedSOMTableRow.cs
- BaseTemplatedMobileComponentEditor.cs
- XmlStreamStore.cs
- XmlQuerySequence.cs
- SecurityTokenException.cs
- DocumentOrderQuery.cs
- nulltextcontainer.cs
- ITreeGenerator.cs
- KoreanCalendar.cs
- DynamicControl.cs
- CodeTypeOfExpression.cs
- DataSetUtil.cs
- SafeCloseHandleCritical.cs
- SoundPlayer.cs
- RuntimeEnvironment.cs
- InputScope.cs
- DataTableMapping.cs
- DeferredSelectedIndexReference.cs
- ChannelListenerBase.cs
- datacache.cs
- AnimatedTypeHelpers.cs
- FrameAutomationPeer.cs
- HealthMonitoringSectionHelper.cs
- XmlSchemaObjectTable.cs
- ConfigurationProperty.cs
- SmtpTransport.cs
- WorkflowView.cs
- MILUtilities.cs
- printdlgexmarshaler.cs
- SessionSwitchEventArgs.cs
- KeySplineConverter.cs
- InputBuffer.cs
- Int32RectValueSerializer.cs
- ItemCollection.cs
- EntityDesignerUtils.cs