/// <summary> /// Check if this segment is equal to another segment. /// </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"); ReferenceSegment otherSegment = other as ReferenceSegment; return(otherSegment != null && otherSegment.TargetEdmNavigationSource == this.TargetEdmNavigationSource); }
/// <summary> /// Translate a ReferenceSegment /// </summary> /// <param name="segment">the segment to Translate</param> /// <returns>Defined by the implementer.</returns> public override string Translate(ReferenceSegment segment) { // How a ReferenceSegment should be addressed in the context URI is still a pending decision. // https://github.com/OData/odata.net/issues/1292 return(string.Empty); }
/// <summary> /// Translate a ReferenceSegment /// </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(ReferenceSegment segment) { ExceptionUtils.CheckArgumentNotNull(segment, "segment"); return(!segment.SingleResult); }
/// <summary> /// Handle a ReferenceSegment /// </summary> /// <param name="segment">the segment to Handle</param> public override void Handle(ReferenceSegment segment) { CommonHandler(segment); }
/// <summary> /// Translate a ReferenceSegment /// </summary> /// <param name="segment">the segment to Translate</param> /// <returns>Defined by the implementer.</returns> public virtual T Translate(ReferenceSegment segment) { throw new NotImplementedException(); }
/// <summary> /// Determine the NavigationSource of a ReferenceSegment /// </summary> /// <param name="segment">The ReferenceSegment to look in.</param> /// <returns>null, since $filter doesn't have an navigation source</returns> /// <exception cref="System.ArgumentNullException">Throws if the input segment is null.</exception> public override IEdmNavigationSource Translate(ReferenceSegment segment) { ExceptionUtils.CheckArgumentNotNull(segment, "segment"); return(segment.TargetEdmNavigationSource); }
/// <summary> /// Handle a ReferenceSegment /// </summary> /// <param name="segment">the segment to Handle</param> public virtual void Handle(ReferenceSegment segment) { throw new NotImplementedException(); }
/// <summary> /// Translate a ReferenceSegment /// </summary> /// <param name="segment">the segment to Translate</param> /// <returns>Defined by the implementer.</returns> public override string Translate(ReferenceSegment segment) { Debug.Assert(segment != null, "segment != null"); return(segment.Identifier); }