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
- MarshalByValueComponent.cs
- CustomAttribute.cs
- SqlTriggerContext.cs
- XmlBindingWorker.cs
- ChtmlPageAdapter.cs
- ToolboxItemAttribute.cs
- ImportContext.cs
- SecureConversationSecurityTokenParameters.cs
- Rectangle.cs
- DPAPIProtectedConfigurationProvider.cs
- OdbcCommandBuilder.cs
- RegistryConfigurationProvider.cs
- RectangleHotSpot.cs
- TextHidden.cs
- DataStorage.cs
- RSAPKCS1SignatureFormatter.cs
- Request.cs
- BStrWrapper.cs
- EntityContainerRelationshipSet.cs
- DecryptRequest.cs
- autovalidator.cs
- SystemIPGlobalStatistics.cs
- DSASignatureDeformatter.cs
- PolyBezierSegment.cs
- CultureInfo.cs
- CalculatedColumn.cs
- _IPv6Address.cs
- TextModifier.cs
- InternalRelationshipCollection.cs
- AppliedDeviceFiltersEditor.cs
- Cursor.cs
- ItemsControlAutomationPeer.cs
- NamedObject.cs
- PropertySourceInfo.cs
- AssociationTypeEmitter.cs
- EntityContainerRelationshipSet.cs
- FocusChangedEventArgs.cs
- DbMetaDataFactory.cs
- TypedReference.cs
- PointHitTestResult.cs
- NamespaceQuery.cs
- Constants.cs
- ImplicitInputBrush.cs
- GridLength.cs
- ActionMismatchAddressingException.cs
- wgx_commands.cs
- TargetConverter.cs
- WebPartDescriptionCollection.cs
- ProtectedConfiguration.cs
- HttpClientCertificate.cs
- ItemsChangedEventArgs.cs
- EncryptedKeyIdentifierClause.cs
- ProtocolsConfigurationEntry.cs
- AnnotationStore.cs
- FormattedTextSymbols.cs
- DesignSurfaceEvent.cs
- RecognitionResult.cs
- GeometryGroup.cs
- PasswordRecoveryDesigner.cs
- HierarchicalDataBoundControl.cs
- XmlNodeList.cs
- StylusPointDescription.cs
- HMACSHA256.cs
- ControlParameter.cs
- PixelFormats.cs
- TimeoutValidationAttribute.cs
- EditorZoneBase.cs
- InkCanvas.cs
- ConfigurationException.cs
- HttpContext.cs
- HtmlTable.cs
- CompensatableTransactionScopeActivity.cs
- DetailsViewPageEventArgs.cs
- HtmlProps.cs
- WpfSharedXamlSchemaContext.cs
- PageCanvasSize.cs
- Console.cs
- Constraint.cs
- DWriteFactory.cs
- ConfigXmlText.cs
- MetabaseServerConfig.cs
- ResolveCriteriaApril2005.cs
- oledbmetadatacollectionnames.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- CheckBoxList.cs
- ToolStripLocationCancelEventArgs.cs
- KerberosSecurityTokenProvider.cs
- PermissionRequestEvidence.cs
- HtmlTernaryTree.cs
- SqlDuplicator.cs
- Int32RectConverter.cs
- HyperLinkColumn.cs
- PageAdapter.cs
- ConfigurationManager.cs
- MetadataUtil.cs
- PersonalizationDictionary.cs
- Scene3D.cs
- OleDbPropertySetGuid.cs
- WebServiceTypeData.cs
- WindowsRegion.cs