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
- IdentifierService.cs
- OdbcRowUpdatingEvent.cs
- UnmanagedMarshal.cs
- ObjectDataSource.cs
- CompilerGeneratedAttribute.cs
- Viewport2DVisual3D.cs
- FixedSOMContainer.cs
- CompiledRegexRunner.cs
- ExpressionBuilderContext.cs
- AssemblyCache.cs
- XmlSchemaGroup.cs
- ThreadInterruptedException.cs
- BasePattern.cs
- XmlWrappingReader.cs
- CodeStatementCollection.cs
- HostedAspNetEnvironment.cs
- XsltCompileContext.cs
- ResourcesGenerator.cs
- Queue.cs
- DataGridViewColumnHeaderCell.cs
- TransformValueSerializer.cs
- WsdlBuildProvider.cs
- GroupItemAutomationPeer.cs
- DataGridViewCellEventArgs.cs
- ParsedAttributeCollection.cs
- ToolBarPanel.cs
- TableStyle.cs
- OdbcDataAdapter.cs
- KeyedCollection.cs
- RadioButton.cs
- AutomationInteropProvider.cs
- LocalizableAttribute.cs
- ListControlConvertEventArgs.cs
- HttpCookieCollection.cs
- TextLine.cs
- RegisteredArrayDeclaration.cs
- HttpHostedTransportConfiguration.cs
- BinaryNode.cs
- CompiledAction.cs
- TearOffProxy.cs
- NativeMethods.cs
- MethodImplAttribute.cs
- TokenBasedSetEnumerator.cs
- CompressedStack.cs
- PriorityChain.cs
- SqlUserDefinedAggregateAttribute.cs
- SqlTypesSchemaImporter.cs
- BamlTreeMap.cs
- ReadOnlyHierarchicalDataSourceView.cs
- SafePointer.cs
- ImageButton.cs
- GeneralTransformCollection.cs
- IndexedString.cs
- PaperSize.cs
- CompositeControlDesigner.cs
- EventBindingService.cs
- ResourcePart.cs
- XMLDiffLoader.cs
- TabControlAutomationPeer.cs
- EditorZoneBase.cs
- StyleSheetRefUrlEditor.cs
- PerformanceCounterPermission.cs
- InstanceStore.cs
- DependencyObjectPropertyDescriptor.cs
- SEHException.cs
- ObjectView.cs
- WindowInteractionStateTracker.cs
- Dynamic.cs
- StaticTextPointer.cs
- Stream.cs
- LogEntrySerialization.cs
- IIS7UserPrincipal.cs
- ListView.cs
- HttpConfigurationContext.cs
- IBuiltInEvidence.cs
- OleStrCAMarshaler.cs
- SourceFileInfo.cs
- ToolStripPanelCell.cs
- StorageConditionPropertyMapping.cs
- BamlStream.cs
- StateItem.cs
- SchemaCreator.cs
- OleDbDataAdapter.cs
- UIElement.cs
- Stroke2.cs
- AliasedExpr.cs
- EmptyControlCollection.cs
- PinnedBufferMemoryStream.cs
- PrintPreviewGraphics.cs
- GPStream.cs
- IndexOutOfRangeException.cs
- MapPathBasedVirtualPathProvider.cs
- RegexWorker.cs
- ServiceDescriptionImporter.cs
- ToolStripOverflowButton.cs
- QilCloneVisitor.cs
- ComNativeDescriptor.cs
- Point3DAnimationBase.cs
- RenderOptions.cs
- BamlTreeMap.cs