Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Configuration / System / Configuration / ConfigDefinitionUpdates.cs / 4 / ConfigDefinitionUpdates.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Configuration { using System.Collections; // // Contains all the updates to section definitions across all location sections. // internal class ConfigDefinitionUpdates { private ArrayList _locationUpdatesList; private bool _requireLocationWritten; internal ConfigDefinitionUpdates() { _locationUpdatesList = new ArrayList(); } // // Find the location update with a certain set of location attributes. // internal LocationUpdates FindLocationUpdates(OverrideModeSetting overrideMode, bool inheritInChildApps) { foreach (LocationUpdates locationUpdates in _locationUpdatesList) { if ( OverrideModeSetting.CanUseSameLocationTag(locationUpdates.OverrideMode, overrideMode) && locationUpdates.InheritInChildApps == inheritInChildApps) { return locationUpdates; } } return null; } // // Add a section definition update to the correct location update. // internal DefinitionUpdate AddUpdate(OverrideModeSetting overrideMode, bool inheritInChildApps, bool moved, string updatedXml, SectionRecord sectionRecord) { LocationUpdates locationUpdates = FindLocationUpdates(overrideMode, inheritInChildApps); if (locationUpdates == null) { locationUpdates = new LocationUpdates(overrideMode, inheritInChildApps); _locationUpdatesList.Add(locationUpdates); } DefinitionUpdate definitionUpdate = new DefinitionUpdate(sectionRecord.ConfigKey, moved, updatedXml, sectionRecord); locationUpdates.SectionUpdates.AddSection(definitionUpdate); return definitionUpdate; } // // Determine which section definition updates are new. // internal void CompleteUpdates() { foreach (LocationUpdates locationUpdates in _locationUpdatesList) { locationUpdates.CompleteUpdates(); } } internal ArrayList LocationUpdatesList { get {return _locationUpdatesList;} } internal bool RequireLocation { get { return _requireLocationWritten; } set { _requireLocationWritten = value; } } internal void FlagLocationWritten() { _requireLocationWritten = false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Configuration { using System.Collections; // // Contains all the updates to section definitions across all location sections. // internal class ConfigDefinitionUpdates { private ArrayList _locationUpdatesList; private bool _requireLocationWritten; internal ConfigDefinitionUpdates() { _locationUpdatesList = new ArrayList(); } // // Find the location update with a certain set of location attributes. // internal LocationUpdates FindLocationUpdates(OverrideModeSetting overrideMode, bool inheritInChildApps) { foreach (LocationUpdates locationUpdates in _locationUpdatesList) { if ( OverrideModeSetting.CanUseSameLocationTag(locationUpdates.OverrideMode, overrideMode) && locationUpdates.InheritInChildApps == inheritInChildApps) { return locationUpdates; } } return null; } // // Add a section definition update to the correct location update. // internal DefinitionUpdate AddUpdate(OverrideModeSetting overrideMode, bool inheritInChildApps, bool moved, string updatedXml, SectionRecord sectionRecord) { LocationUpdates locationUpdates = FindLocationUpdates(overrideMode, inheritInChildApps); if (locationUpdates == null) { locationUpdates = new LocationUpdates(overrideMode, inheritInChildApps); _locationUpdatesList.Add(locationUpdates); } DefinitionUpdate definitionUpdate = new DefinitionUpdate(sectionRecord.ConfigKey, moved, updatedXml, sectionRecord); locationUpdates.SectionUpdates.AddSection(definitionUpdate); return definitionUpdate; } // // Determine which section definition updates are new. // internal void CompleteUpdates() { foreach (LocationUpdates locationUpdates in _locationUpdatesList) { locationUpdates.CompleteUpdates(); } } internal ArrayList LocationUpdatesList { get {return _locationUpdatesList;} } internal bool RequireLocation { get { return _requireLocationWritten; } set { _requireLocationWritten = value; } } internal void FlagLocationWritten() { _requireLocationWritten = false; } } } // 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
- ObjectNotFoundException.cs
- Byte.cs
- EmptyCollection.cs
- AsnEncodedData.cs
- StateMachineWorkflow.cs
- IIS7UserPrincipal.cs
- Misc.cs
- BuildTopDownAttribute.cs
- WebPartsSection.cs
- OdbcInfoMessageEvent.cs
- ProviderMetadataCachedInformation.cs
- BindToObject.cs
- DataViewListener.cs
- StreamSecurityUpgradeInitiatorAsyncResult.cs
- Identifier.cs
- _ContextAwareResult.cs
- Attributes.cs
- PrintDialogDesigner.cs
- PersistenceTypeAttribute.cs
- Models.cs
- OracleDataAdapter.cs
- NativeConfigurationLoader.cs
- DataGridViewDataConnection.cs
- FixedPage.cs
- HtmlProps.cs
- TransformPatternIdentifiers.cs
- XmlReaderSettings.cs
- WindowsFont.cs
- RefType.cs
- OrthographicCamera.cs
- FrameworkElement.cs
- PopOutPanel.cs
- MouseEvent.cs
- ViewGenerator.cs
- ResourceIDHelper.cs
- CompoundFileStorageReference.cs
- StorageMappingItemCollection.cs
- Paragraph.cs
- ListCommandEventArgs.cs
- PreProcessInputEventArgs.cs
- _HTTPDateParse.cs
- RSAOAEPKeyExchangeDeformatter.cs
- EntitySetDataBindingList.cs
- EventProviderBase.cs
- Random.cs
- formatter.cs
- SizeConverter.cs
- FlowDocumentPageViewerAutomationPeer.cs
- UpDownEvent.cs
- EndPoint.cs
- XmlDownloadManager.cs
- DbConnectionFactory.cs
- WindowsTooltip.cs
- COM2Enum.cs
- PropertyPushdownHelper.cs
- UnknownBitmapEncoder.cs
- ClientConvert.cs
- Directory.cs
- XmlWriter.cs
- FixedDocument.cs
- TrackingMemoryStream.cs
- EntityProxyFactory.cs
- ApplicationActivator.cs
- SharedDp.cs
- Effect.cs
- MachineKey.cs
- UInt64Converter.cs
- Win32Exception.cs
- PageParser.cs
- PrivilegedConfigurationManager.cs
- PageOutputQuality.cs
- XamlSerializerUtil.cs
- Property.cs
- ApplicationException.cs
- WebBrowserContainer.cs
- Compress.cs
- InternalsVisibleToAttribute.cs
- DocumentPageHost.cs
- Subtree.cs
- TextFormatterImp.cs
- DiscoveryVersion.cs
- XmlNode.cs
- LoadMessageLogger.cs
- _OSSOCK.cs
- FontStretch.cs
- Cursors.cs
- MultipleCopiesCollection.cs
- DeviceContexts.cs
- DataTableNameHandler.cs
- OperationParameterInfoCollection.cs
- WebControlsSection.cs
- SoapSchemaMember.cs
- UnsafeNativeMethods.cs
- FeatureSupport.cs
- WindowsMenu.cs
- CommandLibraryHelper.cs
- FixedPosition.cs
- ThemeDirectoryCompiler.cs
- MailWebEventProvider.cs
- FixedBufferAttribute.cs