Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Net / System / Net / Configuration / IdnElement.cs / 2 / IdnElement.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Configuration { using System; using System.Reflection; using System.ComponentModel; using System.Globalization; public sealed class IdnElement : ConfigurationElement { public IdnElement() { this.properties.Add(this.enabled); } protected override ConfigurationPropertyCollection Properties { get{ return this.properties; } } [ConfigurationProperty(CommonConfigurationStrings.Enabled, DefaultValue = (UriIdnScope)UriIdnScope.None)] public UriIdnScope Enabled { get { return (UriIdnScope)this[this.enabled]; } set { this[this.enabled] = value; } } ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection(); readonly ConfigurationProperty enabled = new ConfigurationProperty(CommonConfigurationStrings.Enabled, typeof(UriIdnScope), UriIdnScope.None, new UriIdnScopeTypeConverter(), null, ConfigurationPropertyOptions.None); class UriIdnScopeTypeConverter : TypeConverter { public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { if (sourceType == typeof(string)){ return true; } return base.CanConvertFrom(context, sourceType); } public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { string s = value as string; if (s != null){ s = s.ToLower(CultureInfo.InvariantCulture); switch (s){ case "all": return UriIdnScope.All; case "none": return UriIdnScope.None; case "allexceptintranet": return UriIdnScope.AllExceptIntranet; } } return base.ConvertFrom(context, culture, value); } } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- NavigationCommands.cs
- EntityParameterCollection.cs
- ContextStack.cs
- PersonalizationDictionary.cs
- UpdateCommand.cs
- Polyline.cs
- MexNamedPipeBindingCollectionElement.cs
- HttpModuleActionCollection.cs
- XmlRootAttribute.cs
- MenuEventArgs.cs
- HorizontalAlignConverter.cs
- Stylus.cs
- PropertyItem.cs
- UIServiceHelper.cs
- SendingRequestEventArgs.cs
- FixedSOMTable.cs
- BindToObject.cs
- XmlSchemaGroupRef.cs
- BamlTreeNode.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- WindowsListView.cs
- Logging.cs
- WebCategoryAttribute.cs
- ItemCheckedEvent.cs
- Compilation.cs
- querybuilder.cs
- HttpListenerResponse.cs
- ServiceOperation.cs
- OutputChannel.cs
- ConfigurationValidatorBase.cs
- HttpDictionary.cs
- DbgUtil.cs
- UIHelper.cs
- CoreChannel.cs
- RoleManagerModule.cs
- MissingMethodException.cs
- StringFreezingAttribute.cs
- DefaultDialogButtons.cs
- BrowserCapabilitiesFactoryBase.cs
- Win32Interop.cs
- ArraySubsetEnumerator.cs
- HttpCapabilitiesSectionHandler.cs
- DesigntimeLicenseContextSerializer.cs
- TextFragmentEngine.cs
- SizeKeyFrameCollection.cs
- ToolStripRenderer.cs
- Command.cs
- MemoryMappedViewAccessor.cs
- SimpleParser.cs
- SchemaSetCompiler.cs
- Registry.cs
- ToolStripContainerDesigner.cs
- XmlDataSource.cs
- RubberbandSelector.cs
- DataColumnMappingCollection.cs
- TypeDescriptorContext.cs
- EntityContainer.cs
- DynamicRenderer.cs
- XamlPoint3DCollectionSerializer.cs
- PassportAuthenticationEventArgs.cs
- XmlDomTextWriter.cs
- XmlAggregates.cs
- HostingEnvironmentException.cs
- ColorContextHelper.cs
- XMLDiffLoader.cs
- Parallel.cs
- WebBaseEventKeyComparer.cs
- RijndaelCryptoServiceProvider.cs
- ObjectComplexPropertyMapping.cs
- DataGridTablesFactory.cs
- DataGridTextBox.cs
- InkPresenterAutomationPeer.cs
- ValidateNames.cs
- RegexCompilationInfo.cs
- DataTemplateKey.cs
- TextInfo.cs
- DataError.cs
- DataTemplate.cs
- MailWebEventProvider.cs
- DomainConstraint.cs
- ProtectedProviderSettings.cs
- ZipIOLocalFileDataDescriptor.cs
- GlyphRunDrawing.cs
- ValueTypePropertyReference.cs
- UriScheme.cs
- ConfigurationElementProperty.cs
- SelectorItemAutomationPeer.cs
- _ConnectionGroup.cs
- QuotedPrintableStream.cs
- LogicalExpr.cs
- AttributeEmitter.cs
- SortDescriptionCollection.cs
- CharacterBuffer.cs
- AggregateNode.cs
- RelatedView.cs
- WebPartUserCapability.cs
- WebPartAddingEventArgs.cs
- ReachPageContentCollectionSerializerAsync.cs
- TextParagraphView.cs
- ImageKeyConverter.cs