Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWeb / Client / System / Data / Services / Client / ProjectionPathSegment.cs / 1305376 / ProjectionPathSegment.cs
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Provides a class that represents a single step in a path of segments
// over a parsed tree used during projection-driven materialization.
//
//---------------------------------------------------------------------
namespace System.Data.Services.Client
{
#region Namespaces.
using System;
using System.Diagnostics;
using System.Linq.Expressions;
#endregion Namespaces.
///
/// Use this class to represent a step in a path of segments
/// over a parsed tree used during projection-driven materialization.
///
[DebuggerDisplay("Segment {ProjectionType} {Member}")]
internal class ProjectionPathSegment
{
#region Constructors.
/// Initializes a new instance.
/// Path on which this segment is located.
/// Name of member to access when traversing a property; possibly null.
///
/// Type that we expect to project out; typically the same as , but may be adjusted.
///
internal ProjectionPathSegment(ProjectionPath startPath, string member, Type projectionType)
{
Debug.Assert(startPath != null, "startPath != null");
this.Member = member;
this.StartPath = startPath;
this.ProjectionType = projectionType;
}
#endregion Constructors.
#region Internal properties.
/// Name of member to access when traversing a property; possibly null.
internal string Member
{
get;
private set;
}
///
/// Type that we expect to project out; typically the same as , but may be adjusted.
///
///
/// In particular, this type will be adjusted for nested narrowing entity types.
///
/// For example:
/// from c in ctx.Customers select new NarrowCustomer() {
/// ID = c.ID,
/// BestFriend = new NarrowCustomer() { ID = c.BestFriend.ID }
/// }
///
/// In this case, ID will match types on both sides, but BestFriend
/// will be of type Customer in the member access of the source tree
/// and we want to project out a member-initialized NarrowCustomer
/// in the target tree.
///
internal Type ProjectionType
{
get;
set;
}
/// Path on which this segment is located.
internal ProjectionPath StartPath
{
get;
private set;
}
#endregion Internal properties.
}
}
// 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
- BoolLiteral.cs
- SByte.cs
- PropertyDescriptorCollection.cs
- selecteditemcollection.cs
- LocalizationParserHooks.cs
- HttpRawResponse.cs
- IfAction.cs
- CodeExpressionStatement.cs
- Opcode.cs
- RayHitTestParameters.cs
- Utils.cs
- SqlCacheDependency.cs
- ContainerCodeDomSerializer.cs
- ConstNode.cs
- PieceNameHelper.cs
- AsyncResult.cs
- Lock.cs
- TypeLibConverter.cs
- ModelItemExtensions.cs
- StringCollectionMarkupSerializer.cs
- ZoneMembershipCondition.cs
- AuthenticationManager.cs
- MergeLocalizationDirectives.cs
- EventProvider.cs
- cookiecontainer.cs
- CharEntityEncoderFallback.cs
- ListBindingHelper.cs
- AttributeCollection.cs
- Stream.cs
- ServiceTimeoutsElement.cs
- TransactionContext.cs
- SystemIPInterfaceProperties.cs
- Gdiplus.cs
- JapaneseCalendar.cs
- ThumbButtonInfoCollection.cs
- EpmContentDeSerializer.cs
- SimpleRecyclingCache.cs
- DataServiceQuery.cs
- ProbeDuplex11AsyncResult.cs
- UpDownBaseDesigner.cs
- EDesignUtil.cs
- PeoplePickerWrapper.cs
- FullTrustAssembly.cs
- OuterGlowBitmapEffect.cs
- UniqueIdentifierService.cs
- ThreadStartException.cs
- RuleInfoComparer.cs
- ExpandedWrapper.cs
- ClientSideQueueItem.cs
- X509Utils.cs
- CultureTableRecord.cs
- ILGenerator.cs
- Animatable.cs
- TextElementAutomationPeer.cs
- WindowsListViewGroup.cs
- ApplyImportsAction.cs
- MouseActionConverter.cs
- XmlLangPropertyAttribute.cs
- EventMetadata.cs
- EntityTransaction.cs
- UrlPath.cs
- QueryResponse.cs
- SafeRightsManagementHandle.cs
- OutputCacheSection.cs
- ErrorFormatter.cs
- CompoundFileStorageReference.cs
- InputQueue.cs
- HtmlElementCollection.cs
- StreamUpdate.cs
- ConstantSlot.cs
- ObjRef.cs
- CheckBoxRenderer.cs
- EntityTypeBase.cs
- ElapsedEventArgs.cs
- DataGridState.cs
- FixedSOMSemanticBox.cs
- DesignerObject.cs
- LiteralControl.cs
- DoubleAnimationClockResource.cs
- TempEnvironment.cs
- TypedReference.cs
- AssemblyNameEqualityComparer.cs
- AppDomain.cs
- BackEase.cs
- TakeOrSkipWhileQueryOperator.cs
- DataGridLength.cs
- CurrentChangingEventArgs.cs
- DataExpression.cs
- ToolStripSplitButton.cs
- IApplicationTrustManager.cs
- _IPv4Address.cs
- DbConvert.cs
- LinkConverter.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- LocationSectionRecord.cs
- VirtualPath.cs
- SamlAttributeStatement.cs
- AuthenticationModuleElement.cs
- WindowsRichEditRange.cs
- ConnectionManagementElementCollection.cs