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
- TransformGroup.cs
- TextElementCollectionHelper.cs
- ActiveXHost.cs
- PageAdapter.cs
- XmlUrlResolver.cs
- PersonalizationEntry.cs
- DataGridViewColumnCollection.cs
- ColumnWidthChangingEvent.cs
- SqlClientWrapperSmiStreamChars.cs
- TextEffect.cs
- LiteralDesigner.cs
- UrlMappingsModule.cs
- UnauthorizedWebPart.cs
- CodeDOMUtility.cs
- StorageEntityTypeMapping.cs
- QueryAsyncResult.cs
- PipelineComponent.cs
- CompositeDuplexElement.cs
- InternalConfirm.cs
- ImageMetadata.cs
- SqlMethodAttribute.cs
- Int64Converter.cs
- MergeFailedEvent.cs
- FragmentNavigationEventArgs.cs
- NonPrimarySelectionGlyph.cs
- MgmtResManager.cs
- MobileTextWriter.cs
- CrossAppDomainChannel.cs
- CodeLinePragma.cs
- DragCompletedEventArgs.cs
- NativeWindow.cs
- WSFederationHttpBinding.cs
- EncoderExceptionFallback.cs
- DataGridTableCollection.cs
- CryptoStream.cs
- LowerCaseStringConverter.cs
- AnyReturnReader.cs
- Int32Storage.cs
- HtmlLink.cs
- AQNBuilder.cs
- DecoderBestFitFallback.cs
- DetailsViewDeletedEventArgs.cs
- DocumentPageViewAutomationPeer.cs
- ImpersonateTokenRef.cs
- InheritanceAttribute.cs
- RelationshipWrapper.cs
- Shared.cs
- InstanceStoreQueryResult.cs
- XmlSchemaIdentityConstraint.cs
- AnnouncementEndpointElement.cs
- ErrorProvider.cs
- XmlDeclaration.cs
- CompilationUtil.cs
- ProfileModule.cs
- SocketManager.cs
- DbConnectionOptions.cs
- HttpResponseWrapper.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- ObjectQueryExecutionPlan.cs
- ToolStripMenuItem.cs
- IWorkflowDebuggerService.cs
- Section.cs
- ListenUriMode.cs
- TableFieldsEditor.cs
- XmlFormatMapping.cs
- SrgsGrammar.cs
- ColorContext.cs
- PasswordBox.cs
- SqlAliasesReferenced.cs
- CodeSnippetExpression.cs
- SqlError.cs
- InputScope.cs
- QuotaExceededException.cs
- PartialCachingAttribute.cs
- NumericPagerField.cs
- ReceiveContent.cs
- InheritanceRules.cs
- EventLogRecord.cs
- COMException.cs
- GenericEnumConverter.cs
- SimplePropertyEntry.cs
- MiniParameterInfo.cs
- ActivityInstanceMap.cs
- NumberFormatter.cs
- EndOfStreamException.cs
- SoapClientMessage.cs
- HandleCollector.cs
- DesignTable.cs
- DataGridRelationshipRow.cs
- CodeSubDirectory.cs
- SecurityTokenProvider.cs
- FormViewDeletedEventArgs.cs
- Control.cs
- SmiSettersStream.cs
- StrokeSerializer.cs
- ButtonBaseAutomationPeer.cs
- GridEntry.cs
- ElementInit.cs
- ThreadInterruptedException.cs
- CustomGrammar.cs