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 / ConfigDefinitionUpdates.cs / 1 / 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
- DateTimeSerializationSection.cs
- TextRenderer.cs
- TraceEventCache.cs
- PageVisual.cs
- BlurEffect.cs
- __Filters.cs
- CounterCreationDataCollection.cs
- FixedSOMTableCell.cs
- CornerRadiusConverter.cs
- XmlNotation.cs
- Separator.cs
- ActivityInterfaces.cs
- StatusBarItem.cs
- SchemaHelper.cs
- RenderingEventArgs.cs
- HttpContextBase.cs
- UdpMessageProperty.cs
- RSAOAEPKeyExchangeFormatter.cs
- ServiceInfoCollection.cs
- PasswordRecovery.cs
- DataGridViewHitTestInfo.cs
- RelatedImageListAttribute.cs
- MenuItemStyle.cs
- HostedHttpRequestAsyncResult.cs
- DashStyle.cs
- Cloud.cs
- ListViewContainer.cs
- XmlHierarchicalDataSourceView.cs
- TextServicesCompartment.cs
- ObjectSet.cs
- BitmapCodecInfoInternal.cs
- Single.cs
- FontWeight.cs
- HasCopySemanticsAttribute.cs
- MenuStrip.cs
- CompositionCommandSet.cs
- TreeNodeClickEventArgs.cs
- Keyboard.cs
- RegexStringValidator.cs
- SafeThreadHandle.cs
- ToolStripItemEventArgs.cs
- ToolBarOverflowPanel.cs
- XPathAncestorIterator.cs
- HyperLink.cs
- SqlDependencyUtils.cs
- PrinterResolution.cs
- InsufficientExecutionStackException.cs
- BitmapEffectInput.cs
- EventMappingSettingsCollection.cs
- WindowsPen.cs
- SqlPersistenceProviderFactory.cs
- HtmlTernaryTree.cs
- TypeSystemProvider.cs
- TransportSecurityProtocolFactory.cs
- RectangleConverter.cs
- Odbc32.cs
- CommonGetThemePartSize.cs
- PageSetupDialog.cs
- addressfiltermode.cs
- TypeLibraryHelper.cs
- ProfileSettings.cs
- TableLayoutSettingsTypeConverter.cs
- OrderByExpression.cs
- DataBinding.cs
- XPathScanner.cs
- ToolStripStatusLabel.cs
- HostProtectionPermission.cs
- ListViewGroup.cs
- ConnectionManagementSection.cs
- TypeBuilder.cs
- DependencyPropertyConverter.cs
- GridItemPatternIdentifiers.cs
- ISAPIApplicationHost.cs
- IUnknownConstantAttribute.cs
- SqlConnection.cs
- TemplateControlParser.cs
- ClientSettingsStore.cs
- MatrixCamera.cs
- ChangeTracker.cs
- SQLInt64Storage.cs
- SwitchLevelAttribute.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- HttpCachePolicy.cs
- Monitor.cs
- TableDetailsCollection.cs
- NamespaceList.cs
- GlobalProxySelection.cs
- WebPartDescriptionCollection.cs
- TextComposition.cs
- RegisterResponseInfo.cs
- XmlILStorageConverter.cs
- ProgressChangedEventArgs.cs
- ScriptMethodAttribute.cs
- AQNBuilder.cs
- MaterializeFromAtom.cs
- HttpListenerRequest.cs
- Stroke.cs
- DBSchemaRow.cs
- GACIdentityPermission.cs
- AspNetSynchronizationContext.cs