Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Net / System / Net / Configuration / UriSection.cs / 4 / 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; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// 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; } } // 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
- SchemaImporterExtensionsSection.cs
- InkCanvasFeedbackAdorner.cs
- ValueSerializer.cs
- TableDetailsRow.cs
- FixedSchema.cs
- DefaultPropertyAttribute.cs
- OracleMonthSpan.cs
- GAC.cs
- SimpleRecyclingCache.cs
- IPEndPoint.cs
- EventHandlersDesigner.cs
- ProxyElement.cs
- MenuStrip.cs
- SimpleWebHandlerParser.cs
- EdmError.cs
- FontStyleConverter.cs
- Win32.cs
- TabControlCancelEvent.cs
- EncryptedData.cs
- SHA256.cs
- ControlCommandSet.cs
- SRDisplayNameAttribute.cs
- SiteMapDataSource.cs
- PrintPreviewDialog.cs
- GeometryModel3D.cs
- SubstitutionResponseElement.cs
- RootProfilePropertySettingsCollection.cs
- PrimitiveXmlSerializers.cs
- ClipboardData.cs
- ObjectDataProvider.cs
- TextRange.cs
- BlurBitmapEffect.cs
- StructuredTypeInfo.cs
- DashStyle.cs
- BatchParser.cs
- FormatSettings.cs
- _OverlappedAsyncResult.cs
- PageVisual.cs
- CultureNotFoundException.cs
- WebPartDisplayModeCollection.cs
- URLMembershipCondition.cs
- SafeFileMapViewHandle.cs
- Stack.cs
- StdValidatorsAndConverters.cs
- CircleHotSpot.cs
- SqlServices.cs
- TypeSystemHelpers.cs
- SafeNativeMethods.cs
- HandleRef.cs
- ArgumentException.cs
- EditorZoneBase.cs
- EdmEntityTypeAttribute.cs
- ToolStrip.cs
- WebResourceUtil.cs
- BufferBuilder.cs
- KeyValuePair.cs
- NavigateEvent.cs
- ConnectionPointGlyph.cs
- SelectionRangeConverter.cs
- TdsParser.cs
- XPathParser.cs
- QilDataSource.cs
- StorageMappingItemLoader.cs
- HwndTarget.cs
- SpecialNameAttribute.cs
- FixUpCollection.cs
- Range.cs
- ComponentManagerBroker.cs
- UriTemplateCompoundPathSegment.cs
- ProofTokenCryptoHandle.cs
- SymbolMethod.cs
- TimeSpanStorage.cs
- SerializationInfoEnumerator.cs
- RotateTransform3D.cs
- AudioFormatConverter.cs
- ParseNumbers.cs
- PeerTransportListenAddressValidator.cs
- ListViewDesigner.cs
- TaskExtensions.cs
- FixedSOMTableRow.cs
- PerspectiveCamera.cs
- SystemResourceHost.cs
- InfoCardArgumentException.cs
- StringUtil.cs
- InvokeProviderWrapper.cs
- AppearanceEditorPart.cs
- ListBase.cs
- ClickablePoint.cs
- WindowsHyperlink.cs
- CommonDialog.cs
- Timer.cs
- DefaultAsyncDataDispatcher.cs
- OperationResponse.cs
- CacheRequest.cs
- CustomAttribute.cs
- ActivityInstanceReference.cs
- keycontainerpermission.cs
- CompositeActivityDesigner.cs
- SQLString.cs
- ObjectDataSourceStatusEventArgs.cs