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
- WebRequestModuleElementCollection.cs
- CssClassPropertyAttribute.cs
- TextBox.cs
- ArglessEventHandlerProxy.cs
- StateItem.cs
- LineGeometry.cs
- WebUtil.cs
- WsrmMessageInfo.cs
- SchemaTableColumn.cs
- SafeFreeMibTable.cs
- ExtentKey.cs
- _SingleItemRequestCache.cs
- SetterBaseCollection.cs
- TextTreeRootTextBlock.cs
- ArglessEventHandlerProxy.cs
- RowCache.cs
- TableRowsCollectionEditor.cs
- StylusPointCollection.cs
- FlowLayoutPanel.cs
- _UriTypeConverter.cs
- KeyedHashAlgorithm.cs
- ToolStripDesignerAvailabilityAttribute.cs
- EmptyControlCollection.cs
- FatalException.cs
- AlphabetConverter.cs
- ConfigurationStrings.cs
- RootAction.cs
- WinEventHandler.cs
- CodeSnippetStatement.cs
- ModuleBuilder.cs
- CanonicalizationDriver.cs
- Int32CAMarshaler.cs
- GridViewAutomationPeer.cs
- MenuCommands.cs
- ProjectionCamera.cs
- AppDomainShutdownMonitor.cs
- SelectorItemAutomationPeer.cs
- LocalFileSettingsProvider.cs
- ImmutableObjectAttribute.cs
- WeakReference.cs
- LoginView.cs
- TableItemProviderWrapper.cs
- CopyAction.cs
- TextBox.cs
- SafeProcessHandle.cs
- MobileListItemCollection.cs
- DataGridViewTopRowAccessibleObject.cs
- SharedStatics.cs
- DependencyPropertyKind.cs
- ProtocolsConfigurationEntry.cs
- PropertyPathWorker.cs
- Compiler.cs
- SubtreeProcessor.cs
- GeneralTransform.cs
- ReaderOutput.cs
- VisualStyleRenderer.cs
- EventHandlersStore.cs
- RegexCode.cs
- MultiTargetingUtil.cs
- FlowLayout.cs
- DataTemplateKey.cs
- SQLInt64.cs
- ValueType.cs
- TransformerInfo.cs
- ServiceObjectContainer.cs
- IndentTextWriter.cs
- InvokeBase.cs
- DataSourceHelper.cs
- ElementInit.cs
- Signature.cs
- HttpPostedFile.cs
- DiagnosticsElement.cs
- CodeDelegateCreateExpression.cs
- ActiveDocumentEvent.cs
- MessageBox.cs
- PerformanceCounterPermission.cs
- StickyNote.cs
- QueryStringHandler.cs
- WindowProviderWrapper.cs
- CustomAttributeFormatException.cs
- StaticExtensionConverter.cs
- HandlerBase.cs
- MethodBody.cs
- GeometryHitTestResult.cs
- Grammar.cs
- SettingsPropertyValue.cs
- XXXOnTypeBuilderInstantiation.cs
- BaseTemplateCodeDomTreeGenerator.cs
- RewritingProcessor.cs
- QuadraticEase.cs
- COMException.cs
- OledbConnectionStringbuilder.cs
- ToolStripDropTargetManager.cs
- ByteKeyFrameCollection.cs
- MsmqBindingBase.cs
- XPathAncestorIterator.cs
- DesignTimeVisibleAttribute.cs
- CompoundFileIOPermission.cs
- EventProviderClassic.cs
- MobileUserControl.cs