Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- MemoryRecordBuffer.cs
- WebServiceData.cs
- Int32Animation.cs
- DefaultPropertyAttribute.cs
- BuildManager.cs
- XsltCompileContext.cs
- OletxDependentTransaction.cs
- RequestQueryProcessor.cs
- PathSegment.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- ConstructorArgumentAttribute.cs
- ReliabilityContractAttribute.cs
- webeventbuffer.cs
- FileDialog_Vista.cs
- FileUtil.cs
- Pointer.cs
- LayoutManager.cs
- safePerfProviderHandle.cs
- RoutedPropertyChangedEventArgs.cs
- XmlDocument.cs
- NavigationPropertyAccessor.cs
- ObjectStateEntry.cs
- BuildManager.cs
- ObjectListCommandsPage.cs
- CacheDict.cs
- UrlAuthFailedErrorFormatter.cs
- CopyCodeAction.cs
- _ListenerRequestStream.cs
- PlanCompilerUtil.cs
- TextBoxAutomationPeer.cs
- InternalTransaction.cs
- ControlSerializer.cs
- TransformDescriptor.cs
- BaseWebProxyFinder.cs
- ExpressionPrinter.cs
- NaturalLanguageHyphenator.cs
- SafeEventLogWriteHandle.cs
- MSAAEventDispatcher.cs
- Util.cs
- GeometryConverter.cs
- DesignerCapabilities.cs
- PropertyRef.cs
- OutArgument.cs
- NumericExpr.cs
- KerberosRequestorSecurityTokenAuthenticator.cs
- EasingKeyFrames.cs
- ObjectTag.cs
- StreamingContext.cs
- NavigationWindow.cs
- Column.cs
- XmlComment.cs
- MessageSecurityVersion.cs
- OleDbErrorCollection.cs
- SQLSingle.cs
- SqlRetyper.cs
- TogglePattern.cs
- PixelShader.cs
- ReadOnlyPermissionSet.cs
- PrtTicket_Public_Simple.cs
- ProcessHostMapPath.cs
- PointLightBase.cs
- SafeJobHandle.cs
- ArgIterator.cs
- SettingsPropertyNotFoundException.cs
- ValidatingReaderNodeData.cs
- ProcessProtocolHandler.cs
- SettingsAttributeDictionary.cs
- WmfPlaceableFileHeader.cs
- BuildProviderCollection.cs
- KeyValueSerializer.cs
- ListControlBuilder.cs
- ListBoxDesigner.cs
- WorkflowControlEndpoint.cs
- VisualBasicDesignerHelper.cs
- Setter.cs
- TextBounds.cs
- BindingExpressionBase.cs
- dsa.cs
- EventRecordWrittenEventArgs.cs
- LinkedList.cs
- MSG.cs
- StringValidatorAttribute.cs
- PrintPreviewControl.cs
- GlyphRunDrawing.cs
- HtmlHead.cs
- ObjectItemAttributeAssemblyLoader.cs
- WebPartTransformer.cs
- FacetValues.cs
- UncommonField.cs
- PrintEvent.cs
- FormattedText.cs
- FontUnit.cs
- Error.cs
- InstancePersistenceEvent.cs
- OperandQuery.cs
- MemberAssignmentAnalysis.cs
- HttpResponseHeader.cs
- Menu.cs
- WebPartConnectVerb.cs
- WmlCalendarAdapter.cs