Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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.
///
///
///
/// 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.
///
///
internal class ChangeNode
{
#region Constructors
///
/// Constructs a change node containing changes belonging to the specified collection
/// schema definition.
///
/// Sets property.
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 List Inserted { get { return m_inserted; } }
///
/// Gets a list of rows to be deleted.
///
internal List Deleted { 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.
///
///
///
/// 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.
///
///
internal class ChangeNode
{
#region Constructors
///
/// Constructs a change node containing changes belonging to the specified collection
/// schema definition.
///
/// Sets property.
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 List Inserted { get { return m_inserted; } }
///
/// Gets a list of rows to be deleted.
///
internal List Deleted { 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
- PseudoWebRequest.cs
- FloatSumAggregationOperator.cs
- SymmetricCryptoHandle.cs
- WindowsScrollBar.cs
- Pen.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- CaseInsensitiveHashCodeProvider.cs
- AnimatedTypeHelpers.cs
- LinqDataSource.cs
- ApplicationManager.cs
- SubtreeProcessor.cs
- MemoryRecordBuffer.cs
- GroupItemAutomationPeer.cs
- HostExecutionContextManager.cs
- InfoCard.cs
- Hashtable.cs
- ThousandthOfEmRealPoints.cs
- UIElement3D.cs
- UriScheme.cs
- HttpCapabilitiesBase.cs
- TextElementCollectionHelper.cs
- RewritingPass.cs
- ComPlusServiceHost.cs
- DrawingContext.cs
- ScriptMethodAttribute.cs
- RichTextBoxContextMenu.cs
- SqlDataSourceFilteringEventArgs.cs
- ConsumerConnectionPointCollection.cs
- TransportChannelListener.cs
- FormDocumentDesigner.cs
- MemberRelationshipService.cs
- PropertyTabAttribute.cs
- CopyNamespacesAction.cs
- EventListener.cs
- PeerNameRegistration.cs
- SelectionService.cs
- ButtonFieldBase.cs
- AnnotationComponentManager.cs
- UserControlAutomationPeer.cs
- SHA256Managed.cs
- DataGridCaption.cs
- brushes.cs
- DefaultSection.cs
- DbConnectionStringCommon.cs
- TemplateContentLoader.cs
- Base64Stream.cs
- Label.cs
- IsolationInterop.cs
- HopperCache.cs
- TaskHelper.cs
- DSACryptoServiceProvider.cs
- TreeBuilderBamlTranslator.cs
- Size3D.cs
- DataGridViewCheckBoxColumn.cs
- wmiprovider.cs
- EnumConverter.cs
- EncoderExceptionFallback.cs
- QilIterator.cs
- ProvidersHelper.cs
- ArgumentNullException.cs
- XhtmlBasicSelectionListAdapter.cs
- TheQuery.cs
- CookieHandler.cs
- ResourceDescriptionAttribute.cs
- ToolStripMenuItemCodeDomSerializer.cs
- SplineKeyFrames.cs
- ComponentEditorForm.cs
- UnsafeNativeMethodsCLR.cs
- MSG.cs
- HuffmanTree.cs
- StylusPointCollection.cs
- GenericUI.cs
- DetailsViewDeletedEventArgs.cs
- Base64Encoder.cs
- XmlNamespaceDeclarationsAttribute.cs
- IconBitmapDecoder.cs
- VisualStateGroup.cs
- Rijndael.cs
- DbDataAdapter.cs
- CanonicalFormWriter.cs
- Grammar.cs
- SqlDataSourceStatusEventArgs.cs
- CatalogZoneAutoFormat.cs
- SettingsPropertyValue.cs
- LabelAutomationPeer.cs
- ConnectionStringsSection.cs
- WindowsGraphicsCacheManager.cs
- BrowserCapabilitiesFactory.cs
- NetCodeGroup.cs
- CorrelationTokenTypeConvertor.cs
- Context.cs
- BindingsSection.cs
- CatalogZone.cs
- ModuleElement.cs
- DBAsyncResult.cs
- AssemblyBuilder.cs
- XmlAnyElementAttribute.cs
- NavigateEvent.cs
- SelectionItemProviderWrapper.cs
- AppSecurityManager.cs