/// <summary> /// Computes whether or not the ODataPath targets at an individual property. /// </summary> /// <param name="path">Path to perform the computation on.</param> /// <returns>True if the the ODataPath targets at an individual property. False otherwise.</returns> public static bool IsIndividualProperty(this ODataPath path) { ODataPathSegment lastSegmentWithTypeCast = path.TrimEndingTypeSegment().LastSegment; return(lastSegmentWithTypeCast is PropertySegment || lastSegmentWithTypeCast is OpenPropertySegment); }
/// <summary> /// Check if this segment is equal to another segment. /// </summary> /// <param name="other">the other segment to check</param> /// <returns>true if the segments are equal.</returns> internal virtual bool Equals(ODataPathSegment other) { return(ReferenceEquals(this, other)); }
/// <summary> /// Creates a new Segment and copies values from another Segment. /// </summary> /// <param name="other">Segment to copy values from.</param> internal ODataPathSegment(ODataPathSegment other) { this.CopyValuesFrom(other); }
/// <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"); return(other is CountSegment); }