/// <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"); EachSegment otherSegment = other as EachSegment; return(otherSegment != null && otherSegment.TargetEdmNavigationSource == this.TargetEdmNavigationSource); }
/// <summary> /// Translate an EachSegment /// </summary> /// <param name="segment">the segment to Translate</param> /// <returns>Defined by the implementer.</returns> public override string Translate(EachSegment segment) { return(string.Empty); }
/// <summary> /// Translate an EachSegment /// </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(EachSegment segment) { ExceptionUtils.CheckArgumentNotNull(segment, "segment"); return(false); }
/// <summary> /// Handle an EachSegment /// </summary> /// <param name="segment">the segment to Handle</param> public override void Handle(EachSegment segment) { CommonHandler(segment); }
/// <summary> /// Translate an EachSegment /// </summary> /// <param name="segment">the segment to Translate</param> /// <returns>Defined by the implementer.</returns> public virtual T Translate(EachSegment segment) { throw new NotImplementedException(); }
/// <summary> /// Determine the NavigationSource of a EachSegment /// </summary> /// <param name="segment">The FilterSegment 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(EachSegment segment) { ExceptionUtils.CheckArgumentNotNull(segment, "segment"); return(segment.TargetEdmNavigationSource); }
/// <summary> /// Handle an EachSegment /// </summary> /// <param name="segment">the segment to Handle</param> public virtual void Handle(EachSegment segment) { throw new NotImplementedException(); }
/// <summary> /// Translate an EachSegment /// </summary> /// <param name="segment">the segment to Translate</param> /// <returns>Defined by the implementer.</returns> public override string Translate(EachSegment segment) { Debug.Assert(segment != null, "segment != null"); return(segment.Identifier); }