Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Configuration / System / Configuration / ConfigurationFileMap.cs / 1 / ConfigurationFileMap.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.Collections; using System.Collections.Specialized; using System.Security; using System.Security.Permissions; namespace System.Configuration { // // Holds the configuration file mapping for // machine.config. It is the base class for // ExeConfigurationFileMap and WebConfigurationFileMap. // public class ConfigurationFileMap : ICloneable { string _machineConfigFilename; bool _requirePathDiscovery; public ConfigurationFileMap() { _machineConfigFilename = ClientConfigurationHost.MachineConfigFilePath; _requirePathDiscovery = true; } public ConfigurationFileMap(string machineConfigFilename) { _machineConfigFilename = machineConfigFilename; } public virtual object Clone() { return new ConfigurationFileMap(_machineConfigFilename); } // // The name of machine.config. // public string MachineConfigFilename { get { // // Ensure that we use the same string to issue the demand that we use to // return to the caller. // string filename = _machineConfigFilename; if (_requirePathDiscovery) { new FileIOPermission(FileIOPermissionAccess.PathDiscovery, filename).Demand(); } return filename; } set { _requirePathDiscovery = false; _machineConfigFilename = value; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.Collections; using System.Collections.Specialized; using System.Security; using System.Security.Permissions; namespace System.Configuration { // // Holds the configuration file mapping for // machine.config. It is the base class for // ExeConfigurationFileMap and WebConfigurationFileMap. // public class ConfigurationFileMap : ICloneable { string _machineConfigFilename; bool _requirePathDiscovery; public ConfigurationFileMap() { _machineConfigFilename = ClientConfigurationHost.MachineConfigFilePath; _requirePathDiscovery = true; } public ConfigurationFileMap(string machineConfigFilename) { _machineConfigFilename = machineConfigFilename; } public virtual object Clone() { return new ConfigurationFileMap(_machineConfigFilename); } // // The name of machine.config. // public string MachineConfigFilename { get { // // Ensure that we use the same string to issue the demand that we use to // return to the caller. // string filename = _machineConfigFilename; if (_requirePathDiscovery) { new FileIOPermission(FileIOPermissionAccess.PathDiscovery, filename).Demand(); } return filename; } set { _requirePathDiscovery = false; _machineConfigFilename = value; } } } } // 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
- SafeEventHandle.cs
- SchemaImporterExtensionElement.cs
- InputManager.cs
- NestedContainer.cs
- CompilerGlobalScopeAttribute.cs
- SemaphoreSecurity.cs
- OptimizedTemplateContent.cs
- Connector.cs
- ViewStateModeByIdAttribute.cs
- ResourcePermissionBaseEntry.cs
- DrawingContextWalker.cs
- NextPreviousPagerField.cs
- OutputCacheSettings.cs
- PathStreamGeometryContext.cs
- StrongNameMembershipCondition.cs
- Membership.cs
- PolyLineSegment.cs
- SafeMarshalContext.cs
- NamedPermissionSet.cs
- UrlParameterWriter.cs
- SchemaElementDecl.cs
- ClassGenerator.cs
- MimeMapping.cs
- EntityAdapter.cs
- SchemaImporterExtension.cs
- Utils.cs
- XhtmlBasicCommandAdapter.cs
- WebPartCatalogCloseVerb.cs
- AuthenticationModuleElementCollection.cs
- ImmutablePropertyDescriptorGridEntry.cs
- NotifyCollectionChangedEventArgs.cs
- PropertyValueUIItem.cs
- SchemaImporterExtensionElement.cs
- TextEditorThreadLocalStore.cs
- Win32.cs
- IntSecurity.cs
- ConnectionStringSettingsCollection.cs
- Evidence.cs
- ConfigXmlDocument.cs
- Timeline.cs
- TabItemAutomationPeer.cs
- XNodeSchemaApplier.cs
- TraceContextRecord.cs
- WorkerRequest.cs
- InstanceCreationEditor.cs
- FontDriver.cs
- RemotingAttributes.cs
- FlowLayoutPanel.cs
- ImageBrush.cs
- HwndSourceKeyboardInputSite.cs
- Int16.cs
- ApplicationBuildProvider.cs
- WebPartEditorOkVerb.cs
- CompositeKey.cs
- PageAsyncTaskManager.cs
- TrackBarRenderer.cs
- SignedInfo.cs
- SqlParameter.cs
- EntityDesignerBuildProvider.cs
- ReaderContextStackData.cs
- GridViewColumnCollection.cs
- ButtonFieldBase.cs
- SByte.cs
- DataSourceExpression.cs
- ParseNumbers.cs
- DataTableClearEvent.cs
- HwndSource.cs
- BrowserCapabilitiesCodeGenerator.cs
- GeometryModel3D.cs
- PkcsUtils.cs
- ConsoleKeyInfo.cs
- Trace.cs
- EntityConnection.cs
- TransformGroup.cs
- WindowShowOrOpenTracker.cs
- ResourceDescriptionAttribute.cs
- UnauthorizedAccessException.cs
- OutputCacheModule.cs
- RequestResizeEvent.cs
- XmlSchemaObject.cs
- CancellationTokenSource.cs
- XPathSelectionIterator.cs
- WhitespaceRuleReader.cs
- IgnorePropertiesAttribute.cs
- ChangeInterceptorAttribute.cs
- VisualTreeHelper.cs
- RemoveStoryboard.cs
- ManipulationInertiaStartingEventArgs.cs
- selecteditemcollection.cs
- SerialPinChanges.cs
- SubMenuStyle.cs
- ProcessThreadCollection.cs
- SpotLight.cs
- FixedDocumentPaginator.cs
- TreeNodeStyleCollectionEditor.cs
- StackOverflowException.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- SqlCacheDependencyDatabaseCollection.cs
- DataBoundLiteralControl.cs
- CustomCategoryAttribute.cs