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