Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Configuration / System / Configuration / ConfigurationFileMap.cs / 1305376 / 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; using System.IO; 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) { if (string.IsNullOrEmpty(machineConfigFilename)) throw new ArgumentNullException("machineConfigFilename"); if (!File.Exists(machineConfigFilename)) throw new ArgumentException(SR.GetString(SR.Machine_config_file_not_found, machineConfigFilename), "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
- AssemblyName.cs
- ReferenceCountedObject.cs
- EncoderFallback.cs
- Typeface.cs
- TextElement.cs
- GetCertificateRequest.cs
- BaseCodeDomTreeGenerator.cs
- Substitution.cs
- XmlBoundElement.cs
- TransformDescriptor.cs
- QEncodedStream.cs
- AssertSection.cs
- Timer.cs
- PolyBezierSegmentFigureLogic.cs
- MultiTargetingUtil.cs
- FixedMaxHeap.cs
- CaseCqlBlock.cs
- CompiledRegexRunner.cs
- DebugInfoExpression.cs
- TextSegment.cs
- StringUtil.cs
- NamespaceListProperty.cs
- DataSet.cs
- SchemaComplexType.cs
- DefinitionUpdate.cs
- ProfileService.cs
- TargetParameterCountException.cs
- Panel.cs
- WindowsListViewGroup.cs
- WhiteSpaceTrimStringConverter.cs
- XamlPoint3DCollectionSerializer.cs
- SEHException.cs
- GatewayIPAddressInformationCollection.cs
- DesignerOptions.cs
- TextElementEnumerator.cs
- KeyBinding.cs
- ReferentialConstraintRoleElement.cs
- QueryExecutionOption.cs
- X509UI.cs
- WebAdminConfigurationHelper.cs
- TextTreeExtractElementUndoUnit.cs
- propertytag.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- RSAPKCS1KeyExchangeFormatter.cs
- ApplicationFileParser.cs
- X509SubjectKeyIdentifierClause.cs
- CommandDevice.cs
- MeasurementDCInfo.cs
- XmlNodeList.cs
- MemberCollection.cs
- LoadItemsEventArgs.cs
- RichTextBox.cs
- OverflowException.cs
- ColumnReorderedEventArgs.cs
- RemotingAttributes.cs
- DataGridViewHitTestInfo.cs
- BaseComponentEditor.cs
- XdrBuilder.cs
- SendActivityDesignerTheme.cs
- OpenTypeCommon.cs
- CodeMemberEvent.cs
- HttpContext.cs
- SchemaImporter.cs
- ViewKeyConstraint.cs
- Canvas.cs
- TreeView.cs
- Matrix3DStack.cs
- WCFModelStrings.Designer.cs
- ZoneLinkButton.cs
- VerticalAlignConverter.cs
- SiteMapNode.cs
- UnsafeNativeMethods.cs
- ProfileGroupSettingsCollection.cs
- Double.cs
- X509Certificate.cs
- CodeCommentStatement.cs
- DBDataPermission.cs
- BadImageFormatException.cs
- ScriptIgnoreAttribute.cs
- Size3D.cs
- propertyentry.cs
- Point.cs
- ClientCultureInfo.cs
- BidOverLoads.cs
- VisualCollection.cs
- ChannelServices.cs
- EdmType.cs
- TraceData.cs
- SolidColorBrush.cs
- TextRunCacheImp.cs
- HashHelper.cs
- DtrList.cs
- StringUtil.cs
- PerfCounterSection.cs
- XamlTypeMapperSchemaContext.cs
- Path.cs
- FormatterConverter.cs
- OutKeywords.cs
- StreamGeometry.cs
- BindingsCollection.cs