示例#1
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");
            FilterSegment otherSegment = other as FilterSegment;

            return(otherSegment != null &&
                   otherSegment.TargetEdmNavigationSource == this.TargetEdmNavigationSource &&
                   otherSegment.Expression == this.Expression &&
                   otherSegment.ItemType == this.ItemType &&
                   otherSegment.RangeVariable == this.RangeVariable);
        }
 /// <summary>
 /// Translate a FilterSegment
 /// </summary>
 /// <param name="segment">the segment to Translate</param>
 /// <returns>Defined by the implementer.</returns>
 public override string Translate(FilterSegment segment)
 {
     return(string.Empty);
 }
 /// <summary>
 /// Translate a FilterSegment
 /// </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(FilterSegment segment)
 {
     ExceptionUtils.CheckArgumentNotNull(segment, "segment");
     return(true);
 }
 /// <summary>
 /// Handle a FilterSegment
 /// </summary>
 /// <param name="segment">the segment to Handle</param>
 public override void Handle(FilterSegment segment)
 {
     CommonHandler(segment);
 }
示例#5
0
 /// <summary>
 /// Translate a FilterSegment
 /// </summary>
 /// <param name="segment">the segment to Translate</param>
 /// <returns>Defined by the implementer.</returns>
 public virtual T Translate(FilterSegment segment)
 {
     throw new NotImplementedException();
 }
 /// <summary>
 /// Determine the NavigationSource of a FilterSegment
 /// </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(FilterSegment segment)
 {
     ExceptionUtils.CheckArgumentNotNull(segment, "segment");
     return(segment.TargetEdmNavigationSource);
 }
示例#7
0
 /// <summary>
 /// Handle a FilterSegment
 /// </summary>
 /// <param name="segment">the segment to Handle</param>
 public virtual void Handle(FilterSegment segment)
 {
     throw new NotImplementedException();
 }
示例#8
0
 /// <summary>
 /// Translate a FilterSegment
 /// </summary>
 /// <param name="segment">the segment to Translate</param>
 /// <returns>Defined by the implementer.</returns>
 public override string Translate(FilterSegment segment)
 {
     Debug.Assert(segment != null, "segment != null");
     return(segment.LiteralText);
 }