Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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; } } // 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
- SeverityFilter.cs
- AncillaryOps.cs
- TextModifier.cs
- TimeZone.cs
- Label.cs
- HandlerMappingMemo.cs
- GeneralTransform2DTo3D.cs
- ChildrenQuery.cs
- MobileTextWriter.cs
- LinearKeyFrames.cs
- FontWeight.cs
- PaperSource.cs
- XmlNamespaceMapping.cs
- ListView.cs
- InputBuffer.cs
- PngBitmapEncoder.cs
- SafeSecurityHandles.cs
- EdmTypeAttribute.cs
- OutputScope.cs
- QueryOutputWriter.cs
- ToolboxItem.cs
- CheckoutException.cs
- LoginUtil.cs
- LayoutInformation.cs
- OracleDataAdapter.cs
- SchemaElementDecl.cs
- DictionarySectionHandler.cs
- PointIndependentAnimationStorage.cs
- ScrollEventArgs.cs
- RedistVersionInfo.cs
- ChtmlSelectionListAdapter.cs
- HtmlTableRow.cs
- TitleStyle.cs
- Types.cs
- Sql8ConformanceChecker.cs
- MemberPath.cs
- PageParserFilter.cs
- DoubleUtil.cs
- DiscardableAttribute.cs
- Int64KeyFrameCollection.cs
- DataGridCommandEventArgs.cs
- DataGridViewCellStyle.cs
- ReaderContextStackData.cs
- EdmProviderManifest.cs
- FileDialog_Vista_Interop.cs
- ValidationErrorCollection.cs
- WebResourceUtil.cs
- SemaphoreFullException.cs
- DesignerActionTextItem.cs
- TableLayoutColumnStyleCollection.cs
- SessionEndingEventArgs.cs
- LineGeometry.cs
- RepeatBehavior.cs
- ErrorWrapper.cs
- ListParaClient.cs
- SiteMapNode.cs
- AssociationType.cs
- ByteStack.cs
- Processor.cs
- Automation.cs
- ExtensionSimplifierMarkupObject.cs
- ResolvePPIDRequest.cs
- TraceLevelStore.cs
- PersonalizationProvider.cs
- DataGridColumnReorderingEventArgs.cs
- Oid.cs
- TextMarkerSource.cs
- BinaryObjectReader.cs
- PackageFilter.cs
- CrossContextChannel.cs
- ZipIOLocalFileBlock.cs
- XmlEnumAttribute.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- TimersDescriptionAttribute.cs
- TextProperties.cs
- RootProjectionNode.cs
- ConfigXmlAttribute.cs
- ProgressBarAutomationPeer.cs
- MonitorWrapper.cs
- ControlDesigner.cs
- CompareValidator.cs
- WebPartExportVerb.cs
- ObjectHandle.cs
- FormParameter.cs
- VirtualizingStackPanel.cs
- PriorityQueue.cs
- util.cs
- MDIClient.cs
- CornerRadiusConverter.cs
- CodeTypeParameterCollection.cs
- XmlDeclaration.cs
- TransportSecurityProtocol.cs
- JavaScriptString.cs
- DesignerUtility.cs
- BaseDataList.cs
- PassportAuthentication.cs
- DesignerVerbCollection.cs
- DataGridItemEventArgs.cs
- ImageSource.cs
- WeakHashtable.cs