/// <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); }
/// <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); }
/// <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); }
/// <summary> /// Handle a LinksSegment /// </summary> /// <param name="segment">the segment to Handle</param> public virtual void Handle(NavigationPropertyLinkSegment segment) { throw new NotImplementedException(); }
/// <summary> /// Handle a LinksSegment /// </summary> /// <param name="segment">the segment to Handle</param> public override void Handle(NavigationPropertyLinkSegment segment) { CommonHandler(segment); }
/// <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(); }
/// <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); }
/// <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)); }