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
- TargetInvocationException.cs
- BamlLocalizabilityResolver.cs
- EntityParameterCollection.cs
- GeometryDrawing.cs
- SHA256Cng.cs
- SafeNativeMethodsMilCoreApi.cs
- nulltextcontainer.cs
- HttpConfigurationContext.cs
- AlternateView.cs
- SamlSecurityToken.cs
- RetriableClipboard.cs
- OdbcConnectionStringbuilder.cs
- HebrewNumber.cs
- SizeAnimationBase.cs
- CodeDomSerializerException.cs
- WebPartDeleteVerb.cs
- XmlWrappingWriter.cs
- SweepDirectionValidation.cs
- ZipPackage.cs
- IndicCharClassifier.cs
- PerspectiveCamera.cs
- Viewport3DVisual.cs
- ExtendedPropertyDescriptor.cs
- TrustLevelCollection.cs
- XPathNode.cs
- XamlHttpHandlerFactory.cs
- BinHexEncoder.cs
- SafeCloseHandleCritical.cs
- BoundingRectTracker.cs
- SignedXml.cs
- GridViewRowEventArgs.cs
- GeneratedContractType.cs
- FilteredDataSetHelper.cs
- XmlConvert.cs
- SocketPermission.cs
- GroupByQueryOperator.cs
- EntityConnection.cs
- CompilerLocalReference.cs
- TableCellCollection.cs
- OdbcCommand.cs
- Opcode.cs
- LocalizationParserHooks.cs
- DeferredReference.cs
- NegationPusher.cs
- SafeRightsManagementPubHandle.cs
- StorageFunctionMapping.cs
- WebPartEditVerb.cs
- LinkedResourceCollection.cs
- CompensatableTransactionScopeActivityDesigner.cs
- NegationPusher.cs
- HandlerFactoryCache.cs
- ClrProviderManifest.cs
- DragDeltaEventArgs.cs
- ClientApiGenerator.cs
- Rotation3D.cs
- ThreadStartException.cs
- FlowLayoutPanel.cs
- AbstractDataSvcMapFileLoader.cs
- TextServicesDisplayAttribute.cs
- ButtonFieldBase.cs
- SuppressMessageAttribute.cs
- DbConnectionOptions.cs
- HitTestFilterBehavior.cs
- SQLBinary.cs
- DrawingState.cs
- DisableDpiAwarenessAttribute.cs
- TrackingStringDictionary.cs
- ControlBuilderAttribute.cs
- ObjectViewQueryResultData.cs
- ClientSettingsProvider.cs
- CompositeDataBoundControl.cs
- ILGen.cs
- FileLogRecordStream.cs
- WindowsFormsSectionHandler.cs
- UnescapedXmlDiagnosticData.cs
- SqlConnectionPoolGroupProviderInfo.cs
- PersonalizationEntry.cs
- CodeCompileUnit.cs
- ScriptControl.cs
- TemplateBamlTreeBuilder.cs
- MarkupProperty.cs
- NullExtension.cs
- SiteMapHierarchicalDataSourceView.cs
- SchemaElement.cs
- ImmComposition.cs
- ReadOnlyCollectionBase.cs
- StringConverter.cs
- BaseTemplatedMobileComponentEditor.cs
- SHA512Managed.cs
- StreamInfo.cs
- EncryptedPackage.cs
- TraceSection.cs
- NumericUpDownAccelerationCollection.cs
- TabletDeviceInfo.cs
- TableItemProviderWrapper.cs
- TableLayout.cs
- HttpListenerContext.cs
- XslTransform.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- FormsAuthenticationEventArgs.cs