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
- IgnoreFlushAndCloseStream.cs
- IDReferencePropertyAttribute.cs
- WebPartCancelEventArgs.cs
- ExpressionBuilderCollection.cs
- TrackingProfile.cs
- CursorConverter.cs
- ServiceObjectContainer.cs
- Formatter.cs
- ValueType.cs
- DataGridViewCheckBoxColumn.cs
- ScrollChrome.cs
- AVElementHelper.cs
- InvalidateEvent.cs
- AdornerHitTestResult.cs
- HtmlInputReset.cs
- OutputCacheSection.cs
- InvalidComObjectException.cs
- WebPartCancelEventArgs.cs
- DbMetaDataCollectionNames.cs
- TreeViewCancelEvent.cs
- SspiSecurityToken.cs
- DrawingImage.cs
- Stopwatch.cs
- DBAsyncResult.cs
- MultipartIdentifier.cs
- XmlAttributeOverrides.cs
- MessageHeader.cs
- DesigntimeLicenseContextSerializer.cs
- ProcessModelInfo.cs
- returneventsaver.cs
- KeyValueSerializer.cs
- CodeGotoStatement.cs
- StylusTip.cs
- AddingNewEventArgs.cs
- FixedSOMLineRanges.cs
- ApplicationInfo.cs
- SamlConditions.cs
- EpmSourceTree.cs
- Rectangle.cs
- MatrixAnimationBase.cs
- NamedObjectList.cs
- QilLoop.cs
- BindingMemberInfo.cs
- ValidatingReaderNodeData.cs
- WindowsStartMenu.cs
- DragStartedEventArgs.cs
- VBIdentifierName.cs
- QueryExpression.cs
- LoopExpression.cs
- HtmlHistory.cs
- StylusButton.cs
- ThreadExceptionDialog.cs
- QueryStringParameter.cs
- DesignColumn.cs
- BaseCodeDomTreeGenerator.cs
- TransformProviderWrapper.cs
- TemplateXamlParser.cs
- FontCacheUtil.cs
- DelegateOutArgument.cs
- ConfigurationLocationCollection.cs
- SQLSingleStorage.cs
- JsonReaderWriterFactory.cs
- SafeNativeMemoryHandle.cs
- EventWaitHandle.cs
- Int32Collection.cs
- StringConcat.cs
- DiagnosticSection.cs
- ColumnPropertiesGroup.cs
- EmptyCollection.cs
- RsaKeyIdentifierClause.cs
- StrongNameKeyPair.cs
- ProjectionPlan.cs
- TableDesigner.cs
- GZipStream.cs
- UITypeEditors.cs
- SqlCommandBuilder.cs
- EventManager.cs
- BoundField.cs
- UnSafeCharBuffer.cs
- Operand.cs
- ObjectStateEntry.cs
- RequiredFieldValidator.cs
- QueryableDataSource.cs
- ExpressionBuilderCollection.cs
- SvcMapFileLoader.cs
- BindingExpression.cs
- ContextInformation.cs
- AccessControlList.cs
- Command.cs
- ObjectConverter.cs
- StringFormat.cs
- FileNotFoundException.cs
- SectionInformation.cs
- GeneralTransform3D.cs
- Win32Exception.cs
- PersistenceProvider.cs
- DirectoryObjectSecurity.cs
- ColorPalette.cs
- IteratorFilter.cs
- CultureSpecificCharacterBufferRange.cs