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
- FormsIdentity.cs
- GeneralTransform3DTo2DTo3D.cs
- wgx_exports.cs
- ViewBase.cs
- ObjectDataSourceEventArgs.cs
- PropertyPathWorker.cs
- CodeExporter.cs
- VirtualDirectoryMappingCollection.cs
- loginstatus.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- RepeatButtonAutomationPeer.cs
- ValueProviderWrapper.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- DelimitedListTraceListener.cs
- EditorPartCollection.cs
- BamlTreeNode.cs
- AssemblyBuilder.cs
- MDIControlStrip.cs
- GACIdentityPermission.cs
- UdpTransportSettings.cs
- ExtractedStateEntry.cs
- ISAPIApplicationHost.cs
- AmbiguousMatchException.cs
- Parser.cs
- FileSystemInfo.cs
- newitemfactory.cs
- SqlNode.cs
- PathGradientBrush.cs
- DecimalKeyFrameCollection.cs
- WsatEtwTraceListener.cs
- WebPartManagerInternals.cs
- DbMetaDataColumnNames.cs
- GACIdentityPermission.cs
- InstancePersistenceContext.cs
- FixedBufferAttribute.cs
- AttributedMetaModel.cs
- MissingSatelliteAssemblyException.cs
- PassportPrincipal.cs
- DispatchChannelSink.cs
- GroupBoxRenderer.cs
- FileUtil.cs
- PermissionListSet.cs
- TraceEventCache.cs
- MouseButtonEventArgs.cs
- DecimalAnimationUsingKeyFrames.cs
- ScaleTransform3D.cs
- MachineKeySection.cs
- TreeView.cs
- WebColorConverter.cs
- SymLanguageType.cs
- AdCreatedEventArgs.cs
- BuildProvider.cs
- Dynamic.cs
- EditorAttribute.cs
- AspNetHostingPermission.cs
- SqlTriggerAttribute.cs
- MailAddress.cs
- MergablePropertyAttribute.cs
- TrustManagerMoreInformation.cs
- KeyGesture.cs
- CompilerScope.cs
- InfoCardRSACryptoProvider.cs
- CompiledELinqQueryState.cs
- WinInetCache.cs
- CallContext.cs
- DynamicMetaObject.cs
- DocumentApplicationJournalEntryEventArgs.cs
- HeaderUtility.cs
- MsmqInputSessionChannelListener.cs
- ConfigurationSectionGroup.cs
- listitem.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- Win32NamedPipes.cs
- ConvertersCollection.cs
- UriSection.cs
- ResXBuildProvider.cs
- ParserOptions.cs
- WizardPanel.cs
- WebPartVerbCollection.cs
- SystemColors.cs
- StateMachineAction.cs
- ToolStripRenderer.cs
- sortedlist.cs
- MimeMultiPart.cs
- VisualTreeUtils.cs
- PeerConnector.cs
- FillErrorEventArgs.cs
- dataSvcMapFileLoader.cs
- ControlDesigner.cs
- BooleanAnimationUsingKeyFrames.cs
- WebServicesSection.cs
- OrderedDictionary.cs
- _SingleItemRequestCache.cs
- SafeNativeMethods.cs
- ContentFilePart.cs
- OleDbStruct.cs
- TemplateXamlTreeBuilder.cs
- SuppressIldasmAttribute.cs
- SchemaNames.cs
- ObjectTypeMapping.cs