/// <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> internal override bool Equals(ODataPathSegment other) { ValueSegment otherValueSegment = other as ValueSegment; return(otherValueSegment != null && otherValueSegment.EdmType == this.edmType); }
/// <summary> /// Translate a ValueSegment /// </summary> /// <param name="segment">the segment to Translate</param> /// <returns>Translated WebApi path segment.</returns> public override IEnumerable <ODataPathSegment> Translate(Semantic.ValueSegment segment) { yield return(new ValuePathSegment()); }
/// <summary> /// Determine the NavigationSource of a ValueSegment /// </summary> /// <param name="segment">The ValueSegment to look in.</param> /// <returns>null, since $value doesn't have an navigation source</returns> /// <exception cref="System.ArgumentNullException">Throws if the input segment is null.</exception> public override IEdmNavigationSource Translate(ValueSegment segment) { ExceptionUtils.CheckArgumentNotNull(segment, "segment"); return(null); }