Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / Map / Update / Internal / ChangeNode.cs / 1 / ChangeNode.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System.Data.Metadata.Edm; using System.Collections.Generic; using System.Text; using System.Globalization; namespace System.Data.Mapping.Update.Internal { ////// This class encapsulates changes propagated to a node in an update mapping view. /// It contains lists of deleted and inserted rows. Key intersections betweens rows /// in the two sets are treated as updates in the store. /// ////// internal class ChangeNode { #region Constructors ////// Additional tags indicating the roles of particular values (e.g., concurrency, undefined, /// etc.) are stored within each row: where appropriate, constants appearing /// within a row are associated with a ///through the . /// /// The 'leaves' of an update mapping view (UMV) are extent expressions. A change node /// associated with an extent expression is simply the list of changes to the C-Space /// requested by a caller. As changes propagate 'up' the UMV expression tree, we recursively /// apply transformations such that the change node associated with the root of the UMV /// represents changes to apply in the S-Space. /// ////// Constructs a change node containing changes belonging to the specified collection /// schema definition. /// /// Setsproperty. internal ChangeNode(TypeUsage elementType) { m_elementType = elementType; } #endregion #region Fields private TypeUsage m_elementType; private List m_inserted = new List (); private List m_deleted = new List (); private PropagatorResult m_placeholder; #endregion #region Properties /// /// Gets the type of the rows contained in this node. This type corresponds (not coincidentally) /// to the type of an expression in an update mapping view. /// internal TypeUsage ElementType { get { return m_elementType; } } ////// Gets a list of rows to be inserted. /// internal ListInserted { get { return m_inserted; } } /// /// Gets a list of rows to be deleted. /// internal ListDeleted { get { return m_deleted; } } /// /// Gets or sets a version of a record at this node with default record. The record has the type /// of the node we are visiting. /// internal PropagatorResult Placeholder { get { return m_placeholder; } set { m_placeholder = value; } } #endregion #if DEBUG public override string ToString() { StringBuilder builder = new StringBuilder(); builder.AppendLine("{"); builder.AppendFormat(CultureInfo.InvariantCulture, " ElementType = {0}", ElementType).AppendLine(); builder.AppendLine(" Inserted = {"); foreach (PropagatorResult insert in Inserted) { builder.Append(" ").AppendLine(insert.ToString()); } builder.AppendLine(" }"); builder.AppendLine(" Deleted = {"); foreach (PropagatorResult delete in Deleted) { builder.Append(" ").AppendLine(delete.ToString()); } builder.AppendLine(" }"); builder.AppendFormat(CultureInfo.InvariantCulture, " PlaceHolder = {0}", Placeholder).AppendLine(); builder.Append("}"); return builder.ToString(); } #endif } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System.Data.Metadata.Edm; using System.Collections.Generic; using System.Text; using System.Globalization; namespace System.Data.Mapping.Update.Internal { ////// This class encapsulates changes propagated to a node in an update mapping view. /// It contains lists of deleted and inserted rows. Key intersections betweens rows /// in the two sets are treated as updates in the store. /// ////// internal class ChangeNode { #region Constructors ////// Additional tags indicating the roles of particular values (e.g., concurrency, undefined, /// etc.) are stored within each row: where appropriate, constants appearing /// within a row are associated with a ///through the . /// /// The 'leaves' of an update mapping view (UMV) are extent expressions. A change node /// associated with an extent expression is simply the list of changes to the C-Space /// requested by a caller. As changes propagate 'up' the UMV expression tree, we recursively /// apply transformations such that the change node associated with the root of the UMV /// represents changes to apply in the S-Space. /// ////// Constructs a change node containing changes belonging to the specified collection /// schema definition. /// /// Setsproperty. internal ChangeNode(TypeUsage elementType) { m_elementType = elementType; } #endregion #region Fields private TypeUsage m_elementType; private List m_inserted = new List (); private List m_deleted = new List (); private PropagatorResult m_placeholder; #endregion #region Properties /// /// Gets the type of the rows contained in this node. This type corresponds (not coincidentally) /// to the type of an expression in an update mapping view. /// internal TypeUsage ElementType { get { return m_elementType; } } ////// Gets a list of rows to be inserted. /// internal ListInserted { get { return m_inserted; } } /// /// Gets a list of rows to be deleted. /// internal ListDeleted { get { return m_deleted; } } /// /// Gets or sets a version of a record at this node with default record. The record has the type /// of the node we are visiting. /// internal PropagatorResult Placeholder { get { return m_placeholder; } set { m_placeholder = value; } } #endregion #if DEBUG public override string ToString() { StringBuilder builder = new StringBuilder(); builder.AppendLine("{"); builder.AppendFormat(CultureInfo.InvariantCulture, " ElementType = {0}", ElementType).AppendLine(); builder.AppendLine(" Inserted = {"); foreach (PropagatorResult insert in Inserted) { builder.Append(" ").AppendLine(insert.ToString()); } builder.AppendLine(" }"); builder.AppendLine(" Deleted = {"); foreach (PropagatorResult delete in Deleted) { builder.Append(" ").AppendLine(delete.ToString()); } builder.AppendLine(" }"); builder.AppendFormat(CultureInfo.InvariantCulture, " PlaceHolder = {0}", Placeholder).AppendLine(); builder.Append("}"); return builder.ToString(); } #endif } } // 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
- InternalMappingException.cs
- XMLUtil.cs
- Brush.cs
- Triplet.cs
- MessageSmuggler.cs
- CodeAttributeDeclaration.cs
- WebPartPersonalization.cs
- BlurBitmapEffect.cs
- ThreadInterruptedException.cs
- ApplicationFileParser.cs
- TableDetailsRow.cs
- ServiceObjectContainer.cs
- NetTcpSecurity.cs
- OutputCacheProviderCollection.cs
- HierarchicalDataBoundControl.cs
- SingleStorage.cs
- GlyphShapingProperties.cs
- DateTimeOffsetConverter.cs
- ListViewGroup.cs
- AssemblyHash.cs
- StylusCaptureWithinProperty.cs
- AnimationLayer.cs
- OleDbCommandBuilder.cs
- SafeHandles.cs
- OdbcConnection.cs
- AsyncCompletedEventArgs.cs
- EncoderNLS.cs
- ResourceReferenceExpressionConverter.cs
- TailPinnedEventArgs.cs
- CodeIdentifiers.cs
- log.cs
- RelationshipEndCollection.cs
- ReaderWriterLockWrapper.cs
- HttpAsyncResult.cs
- EntityDataSourceStatementEditor.cs
- XmlLinkedNode.cs
- StringReader.cs
- TextServicesManager.cs
- Transform3DCollection.cs
- DictionaryBase.cs
- PersonalizationProvider.cs
- GridViewRow.cs
- DynamicUpdateCommand.cs
- ToolStripItemTextRenderEventArgs.cs
- TransformGroup.cs
- DBNull.cs
- DelegatingConfigHost.cs
- TreeViewHitTestInfo.cs
- EntitySetBaseCollection.cs
- mongolianshape.cs
- SplayTreeNode.cs
- UIElementParagraph.cs
- PassportIdentity.cs
- DataAccessException.cs
- XmlSerializerAssemblyAttribute.cs
- MetadataStore.cs
- _TransmitFileOverlappedAsyncResult.cs
- PropertyToken.cs
- JsonUriDataContract.cs
- WebPartsSection.cs
- validation.cs
- DummyDataSource.cs
- IxmlLineInfo.cs
- TreeNodeEventArgs.cs
- AutomationPropertyInfo.cs
- HandledEventArgs.cs
- CodeObjectCreateExpression.cs
- ConfigXmlSignificantWhitespace.cs
- BuildManager.cs
- DiagnosticSection.cs
- ClientUrlResolverWrapper.cs
- DSASignatureDeformatter.cs
- VersionedStreamOwner.cs
- BinaryConverter.cs
- WindowsStatusBar.cs
- webbrowsersite.cs
- RowToParametersTransformer.cs
- ListViewItemSelectionChangedEvent.cs
- DXD.cs
- DoubleAnimationClockResource.cs
- ContextBase.cs
- FilteredSchemaElementLookUpTable.cs
- ReadOnlyDataSource.cs
- SoapObjectReader.cs
- HashHelper.cs
- DynamicQueryStringParameter.cs
- RTLAwareMessageBox.cs
- FrameworkElementFactoryMarkupObject.cs
- WebPartTracker.cs
- GraphicsContext.cs
- ReversePositionQuery.cs
- SymbolEqualComparer.cs
- HealthMonitoringSectionHelper.cs
- TextContainerChangedEventArgs.cs
- FormatException.cs
- Column.cs
- CustomAttributeBuilder.cs
- iisPickupDirectory.cs
- FieldNameLookup.cs
- SmiGettersStream.cs