Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.ServiceModel.Discovery / System / ServiceModel / Discovery / Configuration / ContractTypeNameElement.cs / 1305376 / ContractTypeNameElement.cs
//---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.ServiceModel.Discovery.Configuration { using System.Configuration; using System.Diagnostics.CodeAnalysis; using System.Runtime; using System.ServiceModel.Description; [Fx.Tag.XamlVisible(false)] public sealed class ContractTypeNameElement : ConfigurationElement { ConfigurationPropertyCollection properties; public ContractTypeNameElement() { } public ContractTypeNameElement(string name, string ns) { this.Name = name; this.Namespace = ns; } [ConfigurationProperty(ConfigurationStrings.Namespace, DefaultValue = NamingHelper.DefaultNamespace, Options = ConfigurationPropertyOptions.IsKey)] [SuppressMessage(FxCop.Category.Configuration, FxCop.Rule.ConfigurationValidatorAttributeRule, Justification = "Validator not requiered")] public string Namespace { get { return (string)base[ConfigurationStrings.Namespace]; } set { base[ConfigurationStrings.Namespace] = value; } } [ConfigurationProperty(ConfigurationStrings.Name, Options = ConfigurationPropertyOptions.IsKey | ConfigurationPropertyOptions.IsRequired)] [StringValidator(MinLength = 1)] public string Name { get { return (string)base[ConfigurationStrings.Name]; } set { base[ConfigurationStrings.Name] = value; } } protected override ConfigurationPropertyCollection Properties { get { if (this.properties == null) { ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection(); properties.Add( new ConfigurationProperty( ConfigurationStrings.Namespace, typeof(string), NamingHelper.DefaultNamespace, null, null, System.Configuration.ConfigurationPropertyOptions.IsKey)); properties.Add( new ConfigurationProperty( ConfigurationStrings.Name, typeof(string), null, null, new StringValidator(1), System.Configuration.ConfigurationPropertyOptions.IsKey | System.Configuration.ConfigurationPropertyOptions.IsRequired)); this.properties = properties; } return this.properties; } } } } // 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
- _ProxyChain.cs
- ValueCollectionParameterReader.cs
- NetworkInformationException.cs
- ByteStack.cs
- OracleParameterCollection.cs
- GridViewDeletedEventArgs.cs
- DataConnectionHelper.cs
- SelectionRangeConverter.cs
- QilName.cs
- WebRequest.cs
- Unit.cs
- IsolationInterop.cs
- ArrayTypeMismatchException.cs
- WindowsSysHeader.cs
- MissingSatelliteAssemblyException.cs
- TransportChannelFactory.cs
- RelationshipDetailsCollection.cs
- PenThreadPool.cs
- BaseTemplateCodeDomTreeGenerator.cs
- ListBox.cs
- StringValidator.cs
- BaseResourcesBuildProvider.cs
- SkipStoryboardToFill.cs
- Helpers.cs
- LinkLabel.cs
- HtmlLabelAdapter.cs
- EventlogProvider.cs
- DocumentsTrace.cs
- ContractUtils.cs
- ListSourceHelper.cs
- SHA384Managed.cs
- ObjectDataSourceFilteringEventArgs.cs
- WindowInteractionStateTracker.cs
- EdmSchemaError.cs
- KeyValueConfigurationElement.cs
- Accessible.cs
- InternalTypeHelper.cs
- TeredoHelper.cs
- DesigntimeLicenseContext.cs
- BitConverter.cs
- WebRequestModuleElementCollection.cs
- XPathMultyIterator.cs
- InlineObject.cs
- WorkflowRuntimeEndpoint.cs
- XPathSingletonIterator.cs
- ResourceLoader.cs
- ExpressionTextBoxAutomationPeer.cs
- ExtensibleClassFactory.cs
- BaseProcessProtocolHandler.cs
- JoinQueryOperator.cs
- StaticExtension.cs
- PropertyIdentifier.cs
- GenericWebPart.cs
- MultiAsyncResult.cs
- ModelTypeConverter.cs
- TaskFileService.cs
- FixedSOMFixedBlock.cs
- LayoutDump.cs
- DataTemplateSelector.cs
- SoapHeaderAttribute.cs
- HandleDictionary.cs
- HostingEnvironmentException.cs
- TransactionScope.cs
- XmlQueryContext.cs
- MetadataUtilsSmi.cs
- RootAction.cs
- HttpConfigurationSystem.cs
- OletxVolatileEnlistment.cs
- InputLangChangeEvent.cs
- MetadataPropertyCollection.cs
- FrameworkContentElement.cs
- HandlerFactoryWrapper.cs
- WindowsClaimSet.cs
- PreviewPageInfo.cs
- PersistChildrenAttribute.cs
- GCHandleCookieTable.cs
- BitmapEffectGroup.cs
- DateBoldEvent.cs
- DataGridItemAttachedStorage.cs
- WindowCollection.cs
- PrinterUnitConvert.cs
- DivideByZeroException.cs
- Models.cs
- WebPartConnectionsConfigureVerb.cs
- FieldNameLookup.cs
- WinFormsSecurity.cs
- SqlError.cs
- DataGridViewCellStyleBuilderDialog.cs
- SqlDataSourceTableQuery.cs
- CounterCreationDataCollection.cs
- TextElement.cs
- XmlEncoding.cs
- LabelLiteral.cs
- GetWinFXPath.cs
- ResourceReferenceKeyNotFoundException.cs
- CustomAttribute.cs
- RecordManager.cs
- TextCompositionManager.cs
- ImageCodecInfo.cs
- Transform3D.cs