Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Configuration / System / Configuration / ProtectedConfiguration.cs / 1 / ProtectedConfiguration.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Configuration { using System.Collections; using System.Collections.Specialized; using System.Runtime.Serialization; using System.Configuration.Provider; using System.Xml; using System.Security.Permissions; [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")] public static class ProtectedConfiguration { public static ProtectedConfigurationProviderCollection Providers { get { ProtectedConfigurationSection config = PrivilegedConfigurationManager.GetSection(BaseConfigurationRecord.RESERVED_SECTION_PROTECTED_CONFIGURATION) as ProtectedConfigurationSection; if (config == null) return new ProtectedConfigurationProviderCollection(); return config.GetAllProviders(); } } public const string RsaProviderName = "RsaProtectedConfigurationProvider"; public const string DataProtectionProviderName = "DataProtectionConfigurationProvider"; public const string ProtectedDataSectionName = BaseConfigurationRecord.RESERVED_SECTION_PROTECTED_CONFIGURATION; public static string DefaultProvider { get { ProtectedConfigurationSection config = PrivilegedConfigurationManager.GetSection(BaseConfigurationRecord.RESERVED_SECTION_PROTECTED_CONFIGURATION) as ProtectedConfigurationSection; if (config != null) return config.DefaultProvider; return ""; } } /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// #if CACHE_PROVIDERS_IN_STATIC private static void InstantiateProviders() { if (_Providers != null) return; lock (_Lock) { if (_Providers != null) return; ProtectedConfigurationProviderCollection providers = new ProtectedConfigurationProviderCollection(); ProtectedConfigurationSection config = PrivilegedConfigurationManager.GetSection(BaseConfigurationRecord.RESERVED_SECTION_PROTECTED_CONFIGURATION) as ProtectedConfigurationSection; if (config != null) { foreach (DictionaryEntry de in config.ProviderNodes) { ProviderNode pn = de.Value as ProviderNode; if (pn == null) continue; providers.Add(pn.Provider); } } _Providers = providers; } } private static object _Lock = new object(); private static ProtectedConfigurationProviderCollection _Providers = null; #endif } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Configuration { using System.Collections; using System.Collections.Specialized; using System.Runtime.Serialization; using System.Configuration.Provider; using System.Xml; using System.Security.Permissions; [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")] public static class ProtectedConfiguration { public static ProtectedConfigurationProviderCollection Providers { get { ProtectedConfigurationSection config = PrivilegedConfigurationManager.GetSection(BaseConfigurationRecord.RESERVED_SECTION_PROTECTED_CONFIGURATION) as ProtectedConfigurationSection; if (config == null) return new ProtectedConfigurationProviderCollection(); return config.GetAllProviders(); } } public const string RsaProviderName = "RsaProtectedConfigurationProvider"; public const string DataProtectionProviderName = "DataProtectionConfigurationProvider"; public const string ProtectedDataSectionName = BaseConfigurationRecord.RESERVED_SECTION_PROTECTED_CONFIGURATION; public static string DefaultProvider { get { ProtectedConfigurationSection config = PrivilegedConfigurationManager.GetSection(BaseConfigurationRecord.RESERVED_SECTION_PROTECTED_CONFIGURATION) as ProtectedConfigurationSection; if (config != null) return config.DefaultProvider; return ""; } } /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// #if CACHE_PROVIDERS_IN_STATIC private static void InstantiateProviders() { if (_Providers != null) return; lock (_Lock) { if (_Providers != null) return; ProtectedConfigurationProviderCollection providers = new ProtectedConfigurationProviderCollection(); ProtectedConfigurationSection config = PrivilegedConfigurationManager.GetSection(BaseConfigurationRecord.RESERVED_SECTION_PROTECTED_CONFIGURATION) as ProtectedConfigurationSection; if (config != null) { foreach (DictionaryEntry de in config.ProviderNodes) { ProviderNode pn = de.Value as ProviderNode; if (pn == null) continue; providers.Add(pn.Provider); } } _Providers = providers; } } private static object _Lock = new object(); private static ProtectedConfigurationProviderCollection _Providers = null; #endif } } // 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
- TypeProvider.cs
- XmlDataDocument.cs
- ListViewPagedDataSource.cs
- XmlAnyElementAttribute.cs
- ObjectReaderCompiler.cs
- ExpressionBuilderCollection.cs
- DocumentGridPage.cs
- ToolStripContentPanel.cs
- TraceData.cs
- _NegoStream.cs
- ContentPropertyAttribute.cs
- ToolStripDropDownItem.cs
- bidPrivateBase.cs
- PagePropertiesChangingEventArgs.cs
- ComboBoxItem.cs
- DeploymentSection.cs
- PerformanceCounterScope.cs
- DoubleConverter.cs
- DbParameterHelper.cs
- VScrollProperties.cs
- DBSqlParserColumn.cs
- HttpVersion.cs
- BooleanConverter.cs
- DeadCharTextComposition.cs
- TextServicesContext.cs
- RoleService.cs
- Merger.cs
- IdentifierService.cs
- SmiXetterAccessMap.cs
- SessionParameter.cs
- MethodToken.cs
- XamlWrapperReaders.cs
- ValidatorCompatibilityHelper.cs
- ObjectDataSourceMethodEventArgs.cs
- AutoResizedEvent.cs
- PersonalizationStateInfoCollection.cs
- IIS7UserPrincipal.cs
- NoResizeHandleGlyph.cs
- ConvertEvent.cs
- AssemblyInfo.cs
- ReachBasicContext.cs
- QilUnary.cs
- SignedXml.cs
- XhtmlTextWriter.cs
- AndAlso.cs
- AnnotationService.cs
- ExpressionContext.cs
- DeleteCardRequest.cs
- WsdlInspector.cs
- Rect3D.cs
- StylusShape.cs
- IdentityHolder.cs
- RequestTimeoutManager.cs
- DispatcherExceptionEventArgs.cs
- FormCollection.cs
- XmlSchemaFacet.cs
- ProviderException.cs
- DriveInfo.cs
- TakeQueryOptionExpression.cs
- FilterRepeater.cs
- DataView.cs
- MailMessage.cs
- ServiceTimeoutsElement.cs
- FixedElement.cs
- documentsequencetextcontainer.cs
- CustomAttributeBuilder.cs
- FolderBrowserDialog.cs
- XmlSchemaObjectTable.cs
- safex509handles.cs
- CmsUtils.cs
- XmlToDatasetMap.cs
- IEnumerable.cs
- LineServicesCallbacks.cs
- TextBoxAutoCompleteSourceConverter.cs
- XomlCompilerParameters.cs
- Wizard.cs
- SafeEventLogWriteHandle.cs
- EntityCommandDefinition.cs
- GenericAuthenticationEventArgs.cs
- CFGGrammar.cs
- CharacterHit.cs
- ContainerFilterService.cs
- TextEffectResolver.cs
- DataServiceBehavior.cs
- MenuItemBinding.cs
- ZoneLinkButton.cs
- IOException.cs
- CapabilitiesState.cs
- SortFieldComparer.cs
- WinFormsSpinner.cs
- ContentElement.cs
- ExpressionReplacer.cs
- HttpInputStream.cs
- CopyAction.cs
- XmlIlGenerator.cs
- KeyValueConfigurationElement.cs
- XmlFormatExtensionAttribute.cs
- Size.cs
- MemberCollection.cs
- ExternalFile.cs