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
- ChangeNode.cs
- XPathMessageContext.cs
- ByteStreamGeometryContext.cs
- TransportContext.cs
- AmbientProperties.cs
- SHA384CryptoServiceProvider.cs
- TreeNodeBindingCollection.cs
- HelpInfo.cs
- Serializer.cs
- WpfGeneratedKnownTypes.cs
- TransformConverter.cs
- ImageInfo.cs
- RootProfilePropertySettingsCollection.cs
- BuildResultCache.cs
- DynamicUpdateCommand.cs
- CompressedStack.cs
- CustomErrorsSection.cs
- SequentialOutput.cs
- Action.cs
- SmtpReplyReaderFactory.cs
- TaskFileService.cs
- AsyncDataRequest.cs
- DbReferenceCollection.cs
- InternalReceiveMessage.cs
- GridViewRowPresenterBase.cs
- DynamicQueryStringParameter.cs
- WebPartConnectionsEventArgs.cs
- TypeTypeConverter.cs
- GPRECT.cs
- PropertyDescriptorComparer.cs
- StagingAreaInputItem.cs
- ManagementDateTime.cs
- WebPartEditorOkVerb.cs
- DynamicMethod.cs
- ServicePoint.cs
- CallContext.cs
- XmlMapping.cs
- MetafileHeader.cs
- HiddenFieldPageStatePersister.cs
- WebPartMinimizeVerb.cs
- PageParser.cs
- DataSourceHelper.cs
- CapabilitiesState.cs
- GeometryModel3D.cs
- CustomAttributeFormatException.cs
- DataListItem.cs
- SizeAnimationBase.cs
- RuleProcessor.cs
- SQLMoney.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- _TimerThread.cs
- XmlSchemaComplexContentRestriction.cs
- DurableInstanceContextProvider.cs
- MarshalByRefObject.cs
- ArraySortHelper.cs
- HttpWebResponse.cs
- ProfileInfo.cs
- HttpDebugHandler.cs
- TableRowGroup.cs
- BlobPersonalizationState.cs
- SQLByteStorage.cs
- ControlIdConverter.cs
- TextServicesCompartmentEventSink.cs
- X509InitiatorCertificateServiceElement.cs
- InvalidOleVariantTypeException.cs
- DataGridViewControlCollection.cs
- XamlBrushSerializer.cs
- ToolStripSplitButton.cs
- SelectionRange.cs
- HMACRIPEMD160.cs
- XmlHierarchyData.cs
- AssemblyAssociatedContentFileAttribute.cs
- AutomationElementCollection.cs
- RulePatternOps.cs
- DrawItemEvent.cs
- MouseCaptureWithinProperty.cs
- RadioButton.cs
- StateMachineSubscriptionManager.cs
- CreateUserWizardStep.cs
- ErrorItem.cs
- CaseInsensitiveComparer.cs
- EventLogPermission.cs
- AliasedSlot.cs
- DataTableNewRowEvent.cs
- DBSchemaTable.cs
- TextBlock.cs
- MSHTMLHostUtil.cs
- ColumnPropertiesGroup.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- StorageMappingItemLoader.cs
- ExpandableObjectConverter.cs
- SQLInt64.cs
- AuthenticationSection.cs
- TimeoutException.cs
- DataChangedEventManager.cs
- ResourceCollectionInfo.cs
- WorkflowApplicationUnhandledExceptionEventArgs.cs
- _NativeSSPI.cs
- LazyTextWriterCreator.cs
- CompressEmulationStream.cs