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
- UserPreferenceChangedEventArgs.cs
- ClientSettings.cs
- MatrixConverter.cs
- XmlSchemaElement.cs
- TextChangedEventArgs.cs
- RegexCode.cs
- EntityViewGenerator.cs
- LongValidator.cs
- HierarchicalDataSourceControl.cs
- ChangeInterceptorAttribute.cs
- MemoryRecordBuffer.cs
- SurrogateEncoder.cs
- OneWayChannelFactory.cs
- URIFormatException.cs
- Events.cs
- ConfigurationSettings.cs
- ResourcePermissionBaseEntry.cs
- HttpServerVarsCollection.cs
- HijriCalendar.cs
- ControlPaint.cs
- EventLog.cs
- ZipIOBlockManager.cs
- PermissionListSet.cs
- URI.cs
- BitArray.cs
- COM2PropertyBuilderUITypeEditor.cs
- CryptoKeySecurity.cs
- XPathNavigator.cs
- HttpRuntime.cs
- FieldBuilder.cs
- IPAddressCollection.cs
- SafeEventLogWriteHandle.cs
- TrackingServices.cs
- ContextInformation.cs
- Timeline.cs
- VBCodeProvider.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- InputLanguageCollection.cs
- WindowsGraphics.cs
- SqlProcedureAttribute.cs
- UnsafeNetInfoNativeMethods.cs
- ScriptingJsonSerializationSection.cs
- SafeNativeMethodsMilCoreApi.cs
- CaseCqlBlock.cs
- WindowsUpDown.cs
- updateconfighost.cs
- IPAddress.cs
- JsonWriter.cs
- SqlDependencyListener.cs
- X509CertificateTokenFactoryCredential.cs
- TableItemPatternIdentifiers.cs
- ValidatingReaderNodeData.cs
- FixedSOMTable.cs
- DesignerObjectListAdapter.cs
- ReceiveSecurityHeaderEntry.cs
- ToolStripPanel.cs
- KeyValuePair.cs
- ClientTargetCollection.cs
- NumericUpDownAccelerationCollection.cs
- _NestedSingleAsyncResult.cs
- QuaternionAnimationBase.cs
- CoreSwitches.cs
- SqlDependencyUtils.cs
- SQLString.cs
- IOThreadTimer.cs
- SelfIssuedSamlTokenFactory.cs
- X509RawDataKeyIdentifierClause.cs
- StatusBarPanelClickEvent.cs
- VerificationException.cs
- XmlSchemaSubstitutionGroup.cs
- DataBindingCollection.cs
- ListViewItemMouseHoverEvent.cs
- ServiceDescription.cs
- OpCopier.cs
- ellipse.cs
- SplineQuaternionKeyFrame.cs
- MdiWindowListStrip.cs
- DataGridViewControlCollection.cs
- ProcessProtocolHandler.cs
- XmlRawWriter.cs
- CallbackBehaviorAttribute.cs
- DoubleCollectionConverter.cs
- SmtpReplyReader.cs
- XPathAncestorIterator.cs
- FreeIndexList.cs
- SchemaImporterExtensionElement.cs
- TransformerTypeCollection.cs
- SqlAggregateChecker.cs
- HierarchicalDataTemplate.cs
- UrlPropertyAttribute.cs
- LayeredChannelFactory.cs
- SmtpCommands.cs
- PenThread.cs
- XhtmlBasicTextBoxAdapter.cs
- InternalResources.cs
- MouseGestureConverter.cs
- SweepDirectionValidation.cs
- SyndicationDeserializer.cs
- Partitioner.cs
- ExitEventArgs.cs