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
- SafeRightsManagementHandle.cs
- StorageModelBuildProvider.cs
- KerberosSecurityTokenAuthenticator.cs
- ContentType.cs
- ProtectedConfiguration.cs
- DelegateSerializationHolder.cs
- SignatureHelper.cs
- HttpBindingExtension.cs
- KnownTypesHelper.cs
- Clock.cs
- BitArray.cs
- HostingEnvironmentSection.cs
- MsmqHostedTransportConfiguration.cs
- elementinformation.cs
- RequiredAttributeAttribute.cs
- Size3D.cs
- RowUpdatingEventArgs.cs
- AnimatedTypeHelpers.cs
- Panel.cs
- XsltException.cs
- Barrier.cs
- Invariant.cs
- LexicalChunk.cs
- RemoteWebConfigurationHost.cs
- SemaphoreFullException.cs
- VisualStates.cs
- LassoHelper.cs
- CacheMemory.cs
- TreeNodeSelectionProcessor.cs
- TraceUtility.cs
- AnimationClock.cs
- PropertiesTab.cs
- XamlHostingSectionGroup.cs
- CacheEntry.cs
- RankException.cs
- RuleInfoComparer.cs
- SAPICategories.cs
- TCEAdapterGenerator.cs
- altserialization.cs
- VideoDrawing.cs
- CacheHelper.cs
- XhtmlConformanceSection.cs
- TraceFilter.cs
- DiscriminatorMap.cs
- CurrentChangedEventManager.cs
- MailMessageEventArgs.cs
- CompilationSection.cs
- AggregationMinMaxHelpers.cs
- NextPreviousPagerField.cs
- SecurityBindingElementImporter.cs
- CompiledRegexRunner.cs
- DataAdapter.cs
- WebPermission.cs
- TextFormatterImp.cs
- CmsInterop.cs
- Brush.cs
- WindowsListViewItem.cs
- SqlTrackingQuery.cs
- MenuItemBinding.cs
- QueryInterceptorAttribute.cs
- DataServiceQueryProvider.cs
- HttpServerVarsCollection.cs
- TdsParserHelperClasses.cs
- CacheSection.cs
- StreamGeometry.cs
- ListItemConverter.cs
- SourceFileInfo.cs
- SelectedGridItemChangedEvent.cs
- UniqueIdentifierService.cs
- PolicyLevel.cs
- Action.cs
- codemethodreferenceexpression.cs
- FontFamilyIdentifier.cs
- OrderedDictionary.cs
- MatrixValueSerializer.cs
- ListControlBuilder.cs
- HtmlTernaryTree.cs
- ReflectPropertyDescriptor.cs
- CachedCompositeFamily.cs
- ScriptingScriptResourceHandlerSection.cs
- FormViewDeleteEventArgs.cs
- SortDescription.cs
- PointCollectionConverter.cs
- ResourceManagerWrapper.cs
- DrawListViewItemEventArgs.cs
- ColorTranslator.cs
- OneWayBindingElement.cs
- GridViewSelectEventArgs.cs
- AppSettingsExpressionBuilder.cs
- X509CertificateValidationMode.cs
- EncodingInfo.cs
- Context.cs
- FramingEncoders.cs
- WinHttpWebProxyFinder.cs
- ApplicationDirectory.cs
- SpeakInfo.cs
- SqlDataSourceSelectingEventArgs.cs
- PlaceHolder.cs
- FlowDocumentPaginator.cs
- WSUtilitySpecificationVersion.cs