Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWeb / Server / System / Data / Services / Epm / EpmTargetPathSegment.cs / 1305376 / EpmTargetPathSegment.cs
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Type describing each node in the EpmTargetTree generated using
// EntityPropertyMappingAttributes for a ResourceType.
//
//
// @owner [....]
//---------------------------------------------------------------------
namespace System.Data.Services.Common
{
using System.Diagnostics;
using System.Collections.Generic;
///
/// Representation of each node in the
///
[DebuggerDisplay("EpmTargetPathSegment {SegmentName} HasContent={HasContent}")]
internal class EpmTargetPathSegment
{
#region Private fields.
/// Name of the xml element/attribute
private String segmentName;
/// URI of the namespace to which the belongs
private String segmentNamespaceUri;
/// Prefix to be used in xml document for
private String segmentNamespacePrefix;
/// If this is a non-leaf element, the child elements/attributes collection
private List subSegments;
/// Parent element of this element/attribute
private EpmTargetPathSegment parentSegment;
#endregion Private fields.
///
/// Constructor initializes the list of sub-nodes to be empty, used for creating root nodes
/// in the
///
internal EpmTargetPathSegment()
{
this.subSegments = new List();
}
/// Used for creating non-root nodes in the syndication/custom trees
/// Name of xml element/attribute
/// URI of the namespace for
/// Namespace prefix to be used for
/// Reference to the parent node if this is a sub-node, useful for traversals in visitors
internal EpmTargetPathSegment(String segmentName, String segmentNamespaceUri, String segmentNamespacePrefix, EpmTargetPathSegment parentSegment)
: this()
{
this.segmentName = segmentName;
this.segmentNamespaceUri = segmentNamespaceUri;
this.segmentNamespacePrefix = segmentNamespacePrefix;
this.parentSegment = parentSegment;
}
/// Name of the xml element/attribute
internal String SegmentName
{
get
{
return this.segmentName;
}
}
/// URI of the namespace to which the belongs
internal String SegmentNamespaceUri
{
get
{
return this.segmentNamespaceUri;
}
}
/// Prefix to be used in xml document for
internal String SegmentNamespacePrefix
{
get
{
return this.segmentNamespacePrefix;
}
}
/// EntityPropertyMappingInfo corresponding to current segement
internal EntityPropertyMappingInfo EpmInfo
{
get;
set;
}
/// Whether this node corresponds to ResourceType or ClientType property values
internal bool HasContent
{
get
{
return this.EpmInfo != null;
}
}
/// Does this node correspond to xml attribute
internal bool IsAttribute
{
get
{
return this.SegmentName[0] == '@';
}
}
/// Parent node in the tree (always an element if present)
internal EpmTargetPathSegment ParentSegment
{
get
{
return this.parentSegment;
}
}
/// Sub-nodes of this node. Only exist if current node is an element node
internal List SubSegments
{
get
{
return this.subSegments;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Type describing each node in the EpmTargetTree generated using
// EntityPropertyMappingAttributes for a ResourceType.
//
//
// @owner [....]
//---------------------------------------------------------------------
namespace System.Data.Services.Common
{
using System.Diagnostics;
using System.Collections.Generic;
///
/// Representation of each node in the
///
[DebuggerDisplay("EpmTargetPathSegment {SegmentName} HasContent={HasContent}")]
internal class EpmTargetPathSegment
{
#region Private fields.
/// Name of the xml element/attribute
private String segmentName;
/// URI of the namespace to which the belongs
private String segmentNamespaceUri;
/// Prefix to be used in xml document for
private String segmentNamespacePrefix;
/// If this is a non-leaf element, the child elements/attributes collection
private List subSegments;
/// Parent element of this element/attribute
private EpmTargetPathSegment parentSegment;
#endregion Private fields.
///
/// Constructor initializes the list of sub-nodes to be empty, used for creating root nodes
/// in the
///
internal EpmTargetPathSegment()
{
this.subSegments = new List();
}
/// Used for creating non-root nodes in the syndication/custom trees
/// Name of xml element/attribute
/// URI of the namespace for
/// Namespace prefix to be used for
/// Reference to the parent node if this is a sub-node, useful for traversals in visitors
internal EpmTargetPathSegment(String segmentName, String segmentNamespaceUri, String segmentNamespacePrefix, EpmTargetPathSegment parentSegment)
: this()
{
this.segmentName = segmentName;
this.segmentNamespaceUri = segmentNamespaceUri;
this.segmentNamespacePrefix = segmentNamespacePrefix;
this.parentSegment = parentSegment;
}
/// Name of the xml element/attribute
internal String SegmentName
{
get
{
return this.segmentName;
}
}
/// URI of the namespace to which the belongs
internal String SegmentNamespaceUri
{
get
{
return this.segmentNamespaceUri;
}
}
/// Prefix to be used in xml document for
internal String SegmentNamespacePrefix
{
get
{
return this.segmentNamespacePrefix;
}
}
/// EntityPropertyMappingInfo corresponding to current segement
internal EntityPropertyMappingInfo EpmInfo
{
get;
set;
}
/// Whether this node corresponds to ResourceType or ClientType property values
internal bool HasContent
{
get
{
return this.EpmInfo != null;
}
}
/// Does this node correspond to xml attribute
internal bool IsAttribute
{
get
{
return this.SegmentName[0] == '@';
}
}
/// Parent node in the tree (always an element if present)
internal EpmTargetPathSegment ParentSegment
{
get
{
return this.parentSegment;
}
}
/// Sub-nodes of this node. Only exist if current node is an element node
internal List SubSegments
{
get
{
return this.subSegments;
}
}
}
}
// 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
- ChtmlImageAdapter.cs
- panel.cs
- AttributeCollection.cs
- ViewBox.cs
- GridViewEditEventArgs.cs
- RegexGroup.cs
- CodeCompileUnit.cs
- FeatureManager.cs
- SamlConditions.cs
- SamlAction.cs
- DbExpressionVisitor_TResultType.cs
- _TransmitFileOverlappedAsyncResult.cs
- MorphHelpers.cs
- METAHEADER.cs
- MetadataWorkspace.cs
- PageThemeParser.cs
- CheckBox.cs
- ObjectIDGenerator.cs
- RadioButton.cs
- DocumentPageHost.cs
- BitmapEffectCollection.cs
- AdjustableArrowCap.cs
- XsdDataContractImporter.cs
- FormConverter.cs
- FontSizeConverter.cs
- EmptyStringExpandableObjectConverter.cs
- CompositeDataBoundControl.cs
- WebResponse.cs
- SecurityKeyType.cs
- InternalBufferManager.cs
- SchemaImporter.cs
- DataTableClearEvent.cs
- ProtocolsConfiguration.cs
- DbConnectionPoolGroup.cs
- dsa.cs
- SQLDouble.cs
- SafeNativeMethodsMilCoreApi.cs
- XmlTextReaderImplHelpers.cs
- PropertyEntry.cs
- PathSegment.cs
- DataGridViewRowContextMenuStripNeededEventArgs.cs
- ShellProvider.cs
- NotFiniteNumberException.cs
- ProfileModule.cs
- TypeUsageBuilder.cs
- HttpProfileGroupBase.cs
- ControllableStoryboardAction.cs
- StorageConditionPropertyMapping.cs
- CollectionViewGroup.cs
- DbConnectionOptions.cs
- DifferencingCollection.cs
- _SslStream.cs
- SqlWorkflowInstanceStore.cs
- ApplyTemplatesAction.cs
- WebRequestModuleElementCollection.cs
- PathFigureCollection.cs
- ExpressionBuilder.cs
- DrawingCollection.cs
- ReadOnlyDataSourceView.cs
- OleDbError.cs
- ExtensionQuery.cs
- TreeView.cs
- DiscoveryMessageSequence.cs
- WebInvokeAttribute.cs
- ClientScriptManager.cs
- XmlSchemaSimpleTypeList.cs
- ObjectViewFactory.cs
- ToolStripPanelRenderEventArgs.cs
- CodeMemberProperty.cs
- QilList.cs
- ObjectAssociationEndMapping.cs
- GenericWebPart.cs
- BaseCodeDomTreeGenerator.cs
- GreenMethods.cs
- BasicViewGenerator.cs
- Regex.cs
- UnsafeNativeMethods.cs
- UdpChannelListener.cs
- BaseDataBoundControlDesigner.cs
- TagMapInfo.cs
- XmlEnumAttribute.cs
- PropertyGridCommands.cs
- TrackingLocation.cs
- InternalBufferOverflowException.cs
- FrameworkElementFactoryMarkupObject.cs
- CustomErrorsSection.cs
- VerificationAttribute.cs
- ComponentDispatcherThread.cs
- RegexCharClass.cs
- WebPartCatalogCloseVerb.cs
- IProvider.cs
- CodeArgumentReferenceExpression.cs
- BinaryWriter.cs
- CategoryState.cs
- FloatUtil.cs
- HttpCookieCollection.cs
- MachineKey.cs
- SymLanguageVendor.cs
- AssignDesigner.xaml.cs
- CollectionViewGroup.cs