Esempio n. 1
0
        /// <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);
        }
Esempio n. 2
0
 /// <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));
 }
Esempio n. 3
0
 /// <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);
 }
Esempio n. 4
0
 /// <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);
 }