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
- SourceLineInfo.cs
- MethodBuilderInstantiation.cs
- WorkflowElementDialogWindow.xaml.cs
- CachedFontFamily.cs
- mil_sdk_version.cs
- X509Extension.cs
- DbConnectionClosed.cs
- WebServiceHandlerFactory.cs
- TimeSpanConverter.cs
- SmtpMail.cs
- Task.cs
- HtmlForm.cs
- XmlUtilWriter.cs
- RawTextInputReport.cs
- MailWebEventProvider.cs
- SplayTreeNode.cs
- ObjectListDataBindEventArgs.cs
- LinqDataSourceInsertEventArgs.cs
- FormsIdentity.cs
- ElementHostAutomationPeer.cs
- ExpressionVisitor.cs
- SocketElement.cs
- QuotedPairReader.cs
- JsonSerializer.cs
- SqlGenericUtil.cs
- BlobPersonalizationState.cs
- FragmentQuery.cs
- SequenceQuery.cs
- NumberFormatInfo.cs
- CompModSwitches.cs
- DrawItemEvent.cs
- Point3DCollection.cs
- ContractReference.cs
- TcpTransportElement.cs
- BitVector32.cs
- XPathBuilder.cs
- ColorBlend.cs
- DataObjectCopyingEventArgs.cs
- ReferenceCountedObject.cs
- SystemException.cs
- ProfilePropertyNameValidator.cs
- Base64Encoder.cs
- HtmlImage.cs
- ColorComboBox.cs
- ECDsa.cs
- XPathEmptyIterator.cs
- MemberHolder.cs
- SafeNativeMemoryHandle.cs
- Model3DCollection.cs
- WebPartEditorOkVerb.cs
- DictionaryMarkupSerializer.cs
- OleDbSchemaGuid.cs
- Currency.cs
- BuildResult.cs
- SqlParameter.cs
- XmlNamespaceMappingCollection.cs
- NotifyCollectionChangedEventArgs.cs
- WaitHandleCannotBeOpenedException.cs
- ObjectPropertyMapping.cs
- Button.cs
- Pair.cs
- AnnotationHelper.cs
- ScalarConstant.cs
- PanelStyle.cs
- Permission.cs
- DateTime.cs
- BoundPropertyEntry.cs
- Decimal.cs
- TimeSpanValidator.cs
- HttpListenerPrefixCollection.cs
- InstanceData.cs
- SQLByteStorage.cs
- FlowDocumentReaderAutomationPeer.cs
- WorkflowMarkupSerializationManager.cs
- AgileSafeNativeMemoryHandle.cs
- ObjectComplexPropertyMapping.cs
- FieldTemplateFactory.cs
- BigInt.cs
- ClientSettings.cs
- WebPartsSection.cs
- ToolboxBitmapAttribute.cs
- TextServicesProperty.cs
- COM2FontConverter.cs
- ContextStaticAttribute.cs
- MenuScrollingVisibilityConverter.cs
- WindowsGraphics2.cs
- LayoutUtils.cs
- XmlSchemaInclude.cs
- WindowsTreeView.cs
- PageTheme.cs
- TabControlAutomationPeer.cs
- HttpStreamMessageEncoderFactory.cs
- TcpTransportSecurityElement.cs
- MeshGeometry3D.cs
- SiteIdentityPermission.cs
- SplineKeyFrames.cs
- XmlSchemaObject.cs
- SmtpNegotiateAuthenticationModule.cs
- HeaderCollection.cs
- ZoneMembershipCondition.cs