Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWeb / Client / System / Data / Services / Client / ProjectionPath.cs / 1305376 / ProjectionPath.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // //// Provides a class to represent an annotated path of segments // (each of which is a step in the parsed tree). // //--------------------------------------------------------------------- namespace System.Data.Services.Client { #region Namespaces. using System.Collections.Generic; using System.Diagnostics; using System.Linq.Expressions; using System.Text; #endregion Namespaces. ///Use this class to represent an annotated list of path segments. [DebuggerDisplay("{ToString()}")] internal class ProjectionPath : List{ #region Constructors. /// Initializes a new internal ProjectionPath() : base() { } ///instance. Initializes a new /// Root parameter for this path. /// Expression to get the expected root type in the target tree. /// Expression for the root entry. internal ProjectionPath(ParameterExpression root, Expression expectedRootType, Expression rootEntry) : base() { this.Root = root; this.RootEntry = rootEntry; this.ExpectedRootType = expectedRootType; } ///instance. Initializes a new /// Root parameter for this path. /// Expression to get the expected root type in the target tree. /// Expression for the root entry. /// Member to initialize the path with. internal ProjectionPath(ParameterExpression root, Expression expectedRootType, Expression rootEntry, IEnumerableinstance. members) : this(root, expectedRootType, rootEntry) { Debug.Assert(members != null, "members != null"); foreach (Expression member in members) { this.Add(new ProjectionPathSegment(this, ((MemberExpression)member).Member.Name, member.Type)); } } #endregion Constructors. #region Internal properties. /// Parameter expression in the source tree. internal ParameterExpression Root { get; private set; } ///Expression to get the entry for internal Expression RootEntry { get; private set; } ///in the target tree. Expression to get the expected root type in the target tree. internal Expression ExpectedRootType { get; private set; } #endregion Internal properties. #region Methods. ///Provides a string representation of this object. ///A string representation of this object, suitable for debugging. public override string ToString() { StringBuilder builder = new StringBuilder(); builder.Append(this.Root.ToString()); builder.Append("->"); for (int i = 0; i < this.Count; i++) { if (i > 0) { builder.Append('.'); } builder.Append(this[i].Member == null ? "*" : this[i].Member); } return builder.ToString(); } #endregion Methods. } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // //// Provides a class to represent an annotated path of segments // (each of which is a step in the parsed tree). // //--------------------------------------------------------------------- namespace System.Data.Services.Client { #region Namespaces. using System.Collections.Generic; using System.Diagnostics; using System.Linq.Expressions; using System.Text; #endregion Namespaces. ///Use this class to represent an annotated list of path segments. [DebuggerDisplay("{ToString()}")] internal class ProjectionPath : List{ #region Constructors. /// Initializes a new internal ProjectionPath() : base() { } ///instance. Initializes a new /// Root parameter for this path. /// Expression to get the expected root type in the target tree. /// Expression for the root entry. internal ProjectionPath(ParameterExpression root, Expression expectedRootType, Expression rootEntry) : base() { this.Root = root; this.RootEntry = rootEntry; this.ExpectedRootType = expectedRootType; } ///instance. Initializes a new /// Root parameter for this path. /// Expression to get the expected root type in the target tree. /// Expression for the root entry. /// Member to initialize the path with. internal ProjectionPath(ParameterExpression root, Expression expectedRootType, Expression rootEntry, IEnumerableinstance. members) : this(root, expectedRootType, rootEntry) { Debug.Assert(members != null, "members != null"); foreach (Expression member in members) { this.Add(new ProjectionPathSegment(this, ((MemberExpression)member).Member.Name, member.Type)); } } #endregion Constructors. #region Internal properties. /// Parameter expression in the source tree. internal ParameterExpression Root { get; private set; } ///Expression to get the entry for internal Expression RootEntry { get; private set; } ///in the target tree. Expression to get the expected root type in the target tree. internal Expression ExpectedRootType { get; private set; } #endregion Internal properties. #region Methods. ///Provides a string representation of this object. ///A string representation of this object, suitable for debugging. public override string ToString() { StringBuilder builder = new StringBuilder(); builder.Append(this.Root.ToString()); builder.Append("->"); for (int i = 0; i < this.Count; i++) { if (i > 0) { builder.Append('.'); } builder.Append(this[i].Member == null ? "*" : this[i].Member); } return builder.ToString(); } #endregion Methods. } } // 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
- InternalPermissions.cs
- MenuItem.cs
- ReadOnlyAttribute.cs
- ListArgumentProvider.cs
- FixUp.cs
- MimeMultiPart.cs
- DiscoveryMessageSequence11.cs
- TextLineBreak.cs
- SafeEventLogWriteHandle.cs
- Page.cs
- UnknownBitmapDecoder.cs
- WsdlBuildProvider.cs
- DictionarySectionHandler.cs
- LayoutTableCell.cs
- DataGridViewElement.cs
- BamlRecords.cs
- SQLMembershipProvider.cs
- PointConverter.cs
- XmlMtomReader.cs
- TransformConverter.cs
- WindowsAuthenticationEventArgs.cs
- Baml2006Reader.cs
- EmptyQuery.cs
- PropertyDescriptorGridEntry.cs
- ToolStripButton.cs
- RelationshipEndCollection.cs
- WpfXamlType.cs
- InternalBufferOverflowException.cs
- DataServiceExpressionVisitor.cs
- StaticSiteMapProvider.cs
- MatrixCamera.cs
- XmlDataSourceDesigner.cs
- Transform3DGroup.cs
- QilReplaceVisitor.cs
- XhtmlBasicSelectionListAdapter.cs
- HtmlSelect.cs
- BinaryObjectWriter.cs
- SqlLiftIndependentRowExpressions.cs
- XmlException.cs
- SpecialTypeDataContract.cs
- XslCompiledTransform.cs
- Misc.cs
- FormView.cs
- WeakRefEnumerator.cs
- SHA384.cs
- ConnectionStringsSection.cs
- ChangePasswordAutoFormat.cs
- EpmSourcePathSegment.cs
- InfoCardRSACryptoProvider.cs
- XslNumber.cs
- ProcessHost.cs
- DocumentPageHost.cs
- CompoundFileReference.cs
- UserControlParser.cs
- SudsCommon.cs
- COM2ICategorizePropertiesHandler.cs
- WebPartDisplayModeCollection.cs
- XmlSignificantWhitespace.cs
- DisplayNameAttribute.cs
- IndentedWriter.cs
- FloaterBaseParagraph.cs
- ComboBoxAutomationPeer.cs
- FontStyle.cs
- SelectionRangeConverter.cs
- InputProviderSite.cs
- SoapReflector.cs
- TraceHelpers.cs
- XPathCompileException.cs
- Logging.cs
- X509Extension.cs
- COSERVERINFO.cs
- PriorityChain.cs
- EventProviderWriter.cs
- ConfigXmlDocument.cs
- PathFigureCollectionValueSerializer.cs
- Control.cs
- TextRangeBase.cs
- FileDetails.cs
- ServiceManagerHandle.cs
- documentsequencetextcontainer.cs
- ControlEvent.cs
- basemetadatamappingvisitor.cs
- MultilineStringConverter.cs
- FilteredDataSetHelper.cs
- GlobalizationSection.cs
- SqlDataSourceFilteringEventArgs.cs
- AppSettingsSection.cs
- MappableObjectManager.cs
- VBCodeProvider.cs
- BaseResourcesBuildProvider.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- GlobalProxySelection.cs
- FormViewDeleteEventArgs.cs
- SingleBodyParameterMessageFormatter.cs
- RelatedImageListAttribute.cs
- RoleManagerModule.cs
- EventMap.cs
- DataContractSerializerElement.cs
- CategoryNameCollection.cs
- PopOutPanel.cs