Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Net / System / Net / Configuration / UriSection.cs / 1 / UriSection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Configuration { using System.Threading; ////// Summary description for UriSection. /// public sealed class UriSection : ConfigurationSection { public UriSection(){ this.properties.Add(this.idn); this.properties.Add(this.iriParsing); } [ConfigurationProperty(CommonConfigurationStrings.Idn)] public IdnElement Idn{ get { return (IdnElement)this[this.idn]; } } [ConfigurationProperty(CommonConfigurationStrings.IriParsing)] public IriParsingElement IriParsing { get{ return (IriParsingElement)this[this.iriParsing]; } } protected override ConfigurationPropertyCollection Properties { get{ return this.properties; } } ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection(); readonly ConfigurationProperty idn = new ConfigurationProperty(CommonConfigurationStrings.Idn, typeof(IdnElement), null, ConfigurationPropertyOptions.None); readonly ConfigurationProperty iriParsing = new ConfigurationProperty(CommonConfigurationStrings.IriParsing, typeof(IriParsingElement), null, ConfigurationPropertyOptions.None); } internal sealed class UriSectionInternal { internal UriSectionInternal(UriSection section) { this.idn = section.Idn.Enabled; this.iriParsing = section.IriParsing.Enabled; } internal UriIdnScope Idn { get { return this.idn; } } internal bool IriParsing { get { return this.iriParsing; } } bool iriParsing; UriIdnScope idn; internal static object ClassSyncObject { get{ if (classSyncObject == null){ Interlocked.CompareExchange(ref classSyncObject, new object(), null); } return classSyncObject; } } internal static UriSectionInternal GetSection() { lock (ClassSyncObject){ UriSection section = PrivilegedConfigurationManager.GetSection(CommonConfigurationStrings.UriSectionPath) as UriSection; if (section == null) return null; return new UriSectionInternal(section); } } private static object classSyncObject; } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BasicExpressionVisitor.cs
- Simplifier.cs
- XmlDataSource.cs
- VoiceSynthesis.cs
- ConsoleKeyInfo.cs
- PersonalizationStateQuery.cs
- BidPrivateBase.cs
- SystemKeyConverter.cs
- CultureMapper.cs
- ToolStripDropDownItem.cs
- WmpBitmapDecoder.cs
- CallContext.cs
- XmlJsonWriter.cs
- LeaseManager.cs
- LayoutEngine.cs
- LineSegment.cs
- DataGridViewLinkColumn.cs
- PropertyMetadata.cs
- XmlSchemaRedefine.cs
- documentsequencetextpointer.cs
- GridEntryCollection.cs
- ComEventsMethod.cs
- RulePatternOps.cs
- CaseInsensitiveComparer.cs
- ToolZone.cs
- SamlEvidence.cs
- QilDataSource.cs
- SystemColorTracker.cs
- DataTableReaderListener.cs
- Control.cs
- SBCSCodePageEncoding.cs
- StackSpiller.Temps.cs
- HttpClientCertificate.cs
- Variable.cs
- WebPartDisplayModeEventArgs.cs
- Compiler.cs
- InvokeHandlers.cs
- CheckableControlBaseAdapter.cs
- SystemDiagnosticsSection.cs
- StringCollectionMarkupSerializer.cs
- BamlResourceSerializer.cs
- NetStream.cs
- TextTreeExtractElementUndoUnit.cs
- DataTableExtensions.cs
- RtfToXamlLexer.cs
- Menu.cs
- PropertyPushdownHelper.cs
- ColumnHeaderConverter.cs
- AssemblyAttributesGoHere.cs
- HttpRequestWrapper.cs
- CustomPopupPlacement.cs
- TextTreeUndoUnit.cs
- ImageMap.cs
- CodeDirectoryCompiler.cs
- ACL.cs
- ServiceKnownTypeAttribute.cs
- PathSegment.cs
- SQLResource.cs
- HitTestFilterBehavior.cs
- CodeTypeReferenceSerializer.cs
- BindMarkupExtensionSerializer.cs
- ScriptingAuthenticationServiceSection.cs
- SchemaElementDecl.cs
- PropertyRecord.cs
- LineGeometry.cs
- WebControlsSection.cs
- HandlerFactoryWrapper.cs
- ImageDrawing.cs
- PropertyMapper.cs
- RangeValidator.cs
- EncodingNLS.cs
- shaperfactory.cs
- GridViewCancelEditEventArgs.cs
- CommandBindingCollection.cs
- documentsequencetextcontainer.cs
- ApplicationContext.cs
- InvokeMethodActivityDesigner.cs
- WebPartCancelEventArgs.cs
- MetadataItemCollectionFactory.cs
- ConstraintCollection.cs
- LabelEditEvent.cs
- ObjectContextServiceProvider.cs
- SaveLedgerEntryRequest.cs
- AssemblyName.cs
- UnsafeNativeMethods.cs
- ClientSettingsProvider.cs
- CookielessHelper.cs
- TypeRestriction.cs
- URL.cs
- Debugger.cs
- HttpHandlersSection.cs
- controlskin.cs
- EnterpriseServicesHelper.cs
- DebugView.cs
- JsonXmlDataContract.cs
- InterleavedZipPartStream.cs
- ContextBase.cs
- WebServiceMethodData.cs
- InternalCache.cs
- ProjectedSlot.cs