Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- Animatable.cs
- DataColumnMappingCollection.cs
- HandlerFactoryCache.cs
- SQLInt32Storage.cs
- COM2TypeInfoProcessor.cs
- MailAddressParser.cs
- HtmlPanelAdapter.cs
- HtmlHead.cs
- IDictionary.cs
- XhtmlBasicSelectionListAdapter.cs
- ControlBuilder.cs
- Int64AnimationUsingKeyFrames.cs
- WindowsClaimSet.cs
- mediaeventshelper.cs
- CultureInfoConverter.cs
- OdbcHandle.cs
- DebugHandleTracker.cs
- MethodCallExpression.cs
- HttpListenerResponse.cs
- WebPartConnectionsCancelEventArgs.cs
- XmlSchemaComplexContent.cs
- Empty.cs
- EditableTreeList.cs
- ArcSegment.cs
- UnsupportedPolicyOptionsException.cs
- IndexedWhereQueryOperator.cs
- MediaContextNotificationWindow.cs
- FixedDocumentPaginator.cs
- ConsoleCancelEventArgs.cs
- LOSFormatter.cs
- MemberNameValidator.cs
- ObjectTag.cs
- ObjectIDGenerator.cs
- CodeVariableDeclarationStatement.cs
- ChtmlImageAdapter.cs
- SqlWorkflowInstanceStoreLock.cs
- AssemblyBuilder.cs
- SSmlParser.cs
- MULTI_QI.cs
- MenuItemCollection.cs
- RadioButtonRenderer.cs
- HtmlInputHidden.cs
- LogManagementAsyncResult.cs
- IDQuery.cs
- SendingRequestEventArgs.cs
- ProxyHwnd.cs
- NetMsmqSecurityElement.cs
- DelayDesigner.cs
- DrawingContext.cs
- X509Chain.cs
- ItemsPanelTemplate.cs
- DataGridViewCellEventArgs.cs
- Stream.cs
- ScriptControlManager.cs
- EnumValAlphaComparer.cs
- EntityDataSourceMemberPath.cs
- ToolStripOverflow.cs
- GeneratedView.cs
- TraceLog.cs
- DataBindingList.cs
- WebHttpBindingElement.cs
- UserControl.cs
- ToolStripDropDownClosingEventArgs.cs
- ColumnTypeConverter.cs
- CqlErrorHelper.cs
- EpmTargetPathSegment.cs
- DrawingGroupDrawingContext.cs
- EntityContainerRelationshipSetEnd.cs
- Thumb.cs
- OutOfMemoryException.cs
- thaishape.cs
- validation.cs
- FakeModelItemImpl.cs
- ConfigXmlCDataSection.cs
- HttpClientCredentialType.cs
- RestHandler.cs
- MultipleViewProviderWrapper.cs
- SingleSelectRootGridEntry.cs
- CultureInfoConverter.cs
- EnvironmentPermission.cs
- RegistryPermission.cs
- RenderingBiasValidation.cs
- ReflectTypeDescriptionProvider.cs
- KeyManager.cs
- PingOptions.cs
- CapabilitiesAssignment.cs
- ContextStack.cs
- PKCS1MaskGenerationMethod.cs
- Unit.cs
- _SafeNetHandles.cs
- AssemblyHash.cs
- AxisAngleRotation3D.cs
- StreamUpgradeAcceptor.cs
- SystemInformation.cs
- _OverlappedAsyncResult.cs
- IODescriptionAttribute.cs
- ServiceMoniker.cs
- sqlinternaltransaction.cs
- LambdaCompiler.ControlFlow.cs
- HtmlInputRadioButton.cs