コード例 #1
0
        /// <summary>
        /// Check if this segment is equal to another.
        /// </summary>
        /// <param name="other">The other segment to check.</param>
        /// <returns>True if the other segment is equal.</returns>
        /// <exception cref="System.ArgumentNullException">Throws if the input other is null.</exception>
        internal override bool Equals(ODataPathSegment other)
        {
            ExceptionUtils.CheckArgumentNotNull(other, "other");
            NavigationPropertyLinkSegment otherLinkSegment = other as NavigationPropertyLinkSegment;

            return(otherLinkSegment != null && otherLinkSegment.NavigationProperty == this.navigationProperty);
        }
コード例 #2
0
 /// <summary>
 /// Visit a NavigationPropertyLinkSegment
 /// </summary>
 /// <param name="segment">the segment to Translate</param>
 /// <returns>Defined by the implementer.</returns>
 public override string Translate(NavigationPropertyLinkSegment segment)
 {
     return(string.Empty);
 }
コード例 #3
0
 /// <summary>
 /// Translate a NavigationPropertyLinkSegment
 /// </summary>
 /// <param name="segment">the segment to Translate</param>
 /// <returns>UserDefinedValue</returns>
 /// <exception cref="System.ArgumentNullException">Throws if the input segment is null.</exception>
 public override bool Translate(NavigationPropertyLinkSegment segment)
 {
     ExceptionUtils.CheckArgumentNotNull(segment, "segment");
     return(false);
 }
コード例 #4
0
 /// <summary>
 /// Handle a LinksSegment
 /// </summary>
 /// <param name="segment">the segment to Handle</param>
 public virtual void Handle(NavigationPropertyLinkSegment segment)
 {
     throw new NotImplementedException();
 }
コード例 #5
0
 /// <summary>
 /// Handle a LinksSegment
 /// </summary>
 /// <param name="segment">the segment to Handle</param>
 public override void Handle(NavigationPropertyLinkSegment segment)
 {
     CommonHandler(segment);
 }
コード例 #6
0
 /// <summary>
 /// Visit a NavigationPropertyLinkSegment
 /// </summary>
 /// <param name="segment">the segment to Translate</param>
 /// <returns>Defined by the implementer.</returns>
 public virtual T Translate(NavigationPropertyLinkSegment segment)
 {
     throw new NotImplementedException();
 }
コード例 #7
0
 /// <summary>
 /// Determine the NavigationSource of a NavigationPropertyLinkSegment
 /// </summary>
 /// <param name="segment">The NavigationPropertyLinkSegment to look in.</param>
 /// <returns>The IEdmNavigationSource of this NavigationPropertyLinkSegment</returns>
 /// <exception cref="System.ArgumentNullException">Throws if the input segment is null.</exception>
 public override IEdmNavigationSource Translate(NavigationPropertyLinkSegment segment)
 {
     ExceptionUtils.CheckArgumentNotNull(segment, "segment");
     return(segment.NavigationSource);
 }
コード例 #8
0
 /// <summary>
 /// Visit a NavigationPropertyLinkSegment
 /// </summary>
 /// <param name="segment">the segment to Translate</param>
 /// <returns>Defined by the implementer.</returns>
 public override string Translate(NavigationPropertyLinkSegment segment)
 {
     Debug.Assert(segment != null, "segment != null");
     return(String.Concat("/", segment.NavigationProperty.Name, "/", UriQueryConstants.RefSegment));
 }