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
- Parameter.cs
- Base64Decoder.cs
- __ComObject.cs
- GridEntry.cs
- ContainsSearchOperator.cs
- HandlerFactoryWrapper.cs
- FutureFactory.cs
- GroupByExpressionRewriter.cs
- String.cs
- cookieexception.cs
- AttributeUsageAttribute.cs
- XPathQilFactory.cs
- DynamicUpdateCommand.cs
- ISAPIWorkerRequest.cs
- BitStream.cs
- XhtmlBasicListAdapter.cs
- AuthenticodeSignatureInformation.cs
- SamlAuthenticationClaimResource.cs
- BufferedWebEventProvider.cs
- ContainerFilterService.cs
- BamlBinaryReader.cs
- DataDesignUtil.cs
- WebBrowser.cs
- FlowDocumentFormatter.cs
- StorageAssociationTypeMapping.cs
- SymbolPair.cs
- DiagnosticsConfigurationHandler.cs
- CommandHelper.cs
- ConstantCheck.cs
- DependencyObjectType.cs
- LogicalTreeHelper.cs
- Timer.cs
- MsmqIntegrationBindingElement.cs
- TypographyProperties.cs
- CodeRemoveEventStatement.cs
- WebProxyScriptElement.cs
- ApplicationServicesHostFactory.cs
- _NTAuthentication.cs
- DataBindingExpressionBuilder.cs
- SrgsItemList.cs
- FilteredReadOnlyMetadataCollection.cs
- SignedXml.cs
- SafeSecurityHandles.cs
- ThicknessKeyFrameCollection.cs
- TraceHandlerErrorFormatter.cs
- _FtpControlStream.cs
- MissingFieldException.cs
- ConditionalWeakTable.cs
- OpenFileDialog.cs
- CheckBoxAutomationPeer.cs
- XmlQualifiedNameTest.cs
- XmlAnyElementAttribute.cs
- References.cs
- MutexSecurity.cs
- CorrelationHandle.cs
- CaseExpr.cs
- SchemaContext.cs
- TypeInfo.cs
- CookieParameter.cs
- CopyOnWriteList.cs
- SqlNodeAnnotations.cs
- TextBoxRenderer.cs
- SearchForVirtualItemEventArgs.cs
- OleDbErrorCollection.cs
- ToolStripTemplateNode.cs
- ServiceDocumentFormatter.cs
- OdbcStatementHandle.cs
- WorkflowInstanceExtensionCollection.cs
- ApplicationActivator.cs
- LambdaValue.cs
- ContextBase.cs
- TableItemStyle.cs
- Message.cs
- BooleanToVisibilityConverter.cs
- DataList.cs
- XhtmlBasicSelectionListAdapter.cs
- ScrollChrome.cs
- SystemBrushes.cs
- MetaModel.cs
- AsyncOperationContext.cs
- CmsInterop.cs
- AssemblyNameProxy.cs
- ListenerPerfCounters.cs
- SqlConnectionFactory.cs
- RayHitTestParameters.cs
- TableRow.cs
- RectangleHotSpot.cs
- OdbcConnectionPoolProviderInfo.cs
- RangeValuePatternIdentifiers.cs
- LineProperties.cs
- GeometryGroup.cs
- ConfigXmlSignificantWhitespace.cs
- XmlCDATASection.cs
- ConnectionString.cs
- SystemMulticastIPAddressInformation.cs
- RenderingBiasValidation.cs
- CodeBinaryOperatorExpression.cs
- RightsManagementInformation.cs
- ZoneMembershipCondition.cs
- MachineKeyConverter.cs