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
- DataControlFieldCell.cs
- _KerberosClient.cs
- BinaryObjectReader.cs
- Content.cs
- EnumValidator.cs
- EmptyWorkItem.cs
- SmiConnection.cs
- Transform3D.cs
- AnonymousIdentificationSection.cs
- MobileTextWriter.cs
- VisualBasicReference.cs
- SimpleWebHandlerParser.cs
- EntitySetRetriever.cs
- XmlSchemaComplexContentRestriction.cs
- GeometryGroup.cs
- PolicyException.cs
- SRef.cs
- Decorator.cs
- SqlTrackingQuery.cs
- DisplayInformation.cs
- Application.cs
- TypeInfo.cs
- BypassElementCollection.cs
- WorkerRequest.cs
- PrimarySelectionGlyph.cs
- RecognizedWordUnit.cs
- ExpressionBinding.cs
- InfiniteIntConverter.cs
- HtmlInputImage.cs
- Wizard.cs
- ContainerFilterService.cs
- ClientTarget.cs
- XamlFrame.cs
- AssemblyLoader.cs
- CollectionAdapters.cs
- HotCommands.cs
- WebPartsPersonalizationAuthorization.cs
- DynamicEntity.cs
- ItemsPanelTemplate.cs
- MsmqReceiveParameters.cs
- Margins.cs
- CellConstant.cs
- VarRemapper.cs
- SqlConnectionStringBuilder.cs
- HttpAsyncResult.cs
- HttpMethodAttribute.cs
- BitmapEffect.cs
- CommandPlan.cs
- UpdateTranslator.cs
- JsonReaderDelegator.cs
- EndpointAddressMessageFilterTable.cs
- ContainerUtilities.cs
- DbConnectionPoolOptions.cs
- SafeNativeMethods.cs
- SqlUtils.cs
- IndexOutOfRangeException.cs
- EdmTypeAttribute.cs
- HtmlInputReset.cs
- HybridDictionary.cs
- ZipFileInfoCollection.cs
- Opcode.cs
- MethodSet.cs
- SafeArrayTypeMismatchException.cs
- SmtpNetworkElement.cs
- DesignerGeometryHelper.cs
- InstanceKey.cs
- CheckBoxField.cs
- StorageMappingFragment.cs
- LockRecursionException.cs
- DataTableTypeConverter.cs
- DropShadowBitmapEffect.cs
- DatePickerAutomationPeer.cs
- ObjectSet.cs
- NameGenerator.cs
- SingletonInstanceContextProvider.cs
- XslCompiledTransform.cs
- AttachedAnnotation.cs
- WinInet.cs
- PropertyStore.cs
- WindowsNonControl.cs
- AttributeEmitter.cs
- LowerCaseStringConverter.cs
- CapabilitiesSection.cs
- HiddenFieldPageStatePersister.cs
- TabPage.cs
- SpotLight.cs
- _UncName.cs
- CodeDomConfigurationHandler.cs
- QueryComponents.cs
- ChannelFactoryBase.cs
- TextTreeFixupNode.cs
- HostedHttpTransportManager.cs
- ContentControl.cs
- ToolStripSettings.cs
- ExtendedPropertyDescriptor.cs
- CompilationLock.cs
- XmlSchemaSearchPattern.cs
- UrlMappingCollection.cs
- XamlToRtfParser.cs
- HwndSubclass.cs