Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Configuration / System / Configuration / ConfigDefinitionUpdates.cs / 1305376 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TextBoxBase.cs
- PenThreadWorker.cs
- InputScopeManager.cs
- SignedXml.cs
- GetPageNumberCompletedEventArgs.cs
- WindowsAuthenticationEventArgs.cs
- errorpatternmatcher.cs
- WebPartCatalogCloseVerb.cs
- ItemCollection.cs
- PackageRelationship.cs
- PlainXmlDeserializer.cs
- WinEventHandler.cs
- DataControlButton.cs
- VBIdentifierTrimConverter.cs
- ListenerConfig.cs
- selecteditemcollection.cs
- PeerContact.cs
- Oci.cs
- EntityProviderServices.cs
- ListBoxChrome.cs
- ToolStripDropDownButton.cs
- HttpDictionary.cs
- PointLight.cs
- EdmSchemaError.cs
- DefaultPropertyAttribute.cs
- RectAnimationUsingKeyFrames.cs
- FlowLayout.cs
- CatalogPart.cs
- XmlSchemaCollection.cs
- GridViewCommandEventArgs.cs
- SmtpDateTime.cs
- Camera.cs
- InkCanvasAutomationPeer.cs
- SubqueryRules.cs
- ErrorHandler.cs
- DataView.cs
- TableRow.cs
- DetailsViewInsertEventArgs.cs
- _RequestCacheProtocol.cs
- ImageDrawing.cs
- SendingRequestEventArgs.cs
- VirtualPathData.cs
- DbParameterCollectionHelper.cs
- CurrentTimeZone.cs
- ValidationSummary.cs
- Publisher.cs
- ListItemConverter.cs
- AutomationPropertyInfo.cs
- FlowDocument.cs
- GZipStream.cs
- StylusPlugin.cs
- Transform.cs
- cache.cs
- XmlNodeReader.cs
- VectorConverter.cs
- DirectionalLight.cs
- RolePrincipal.cs
- EdmToObjectNamespaceMap.cs
- InertiaTranslationBehavior.cs
- AsymmetricKeyExchangeFormatter.cs
- BitmapCodecInfoInternal.cs
- ExtendedPropertyCollection.cs
- MbpInfo.cs
- DataServiceConfiguration.cs
- ExtendedPropertyInfo.cs
- FakeModelPropertyImpl.cs
- PropertyMetadata.cs
- DataBoundControlAdapter.cs
- CaseInsensitiveHashCodeProvider.cs
- ThreadExceptionEvent.cs
- EmptyQuery.cs
- ProtocolsConfigurationEntry.cs
- MouseButtonEventArgs.cs
- HostingEnvironmentException.cs
- TemplateContainer.cs
- InheritanceRules.cs
- ViewEvent.cs
- XmlMapping.cs
- Win32Native.cs
- QueryResponse.cs
- KeyFrames.cs
- XmlSchemaAttribute.cs
- RuleCache.cs
- MergeEnumerator.cs
- ValueProviderWrapper.cs
- BoundPropertyEntry.cs
- BulletedList.cs
- PermissionToken.cs
- ButtonFieldBase.cs
- Inline.cs
- EntryWrittenEventArgs.cs
- DependencyPropertyValueSerializer.cs
- BufferModesCollection.cs
- SelectionChangedEventArgs.cs
- SystemIcons.cs
- WebResponse.cs
- RtType.cs
- HostingPreferredMapPath.cs
- AsyncCompletedEventArgs.cs
- DataSourceListEditor.cs