示例#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>
        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>Defined by the implementer.</returns>
 public override string Translate(ValueSegment segment)
 {
     return(string.Empty);
 }
 /// <summary>
 /// Translate a ValueSegment
 /// </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(ValueSegment segment)
 {
     ExceptionUtils.CheckArgumentNotNull(segment, "segment");
     throw new NotImplementedException(segment.ToString());
 }
示例#4
0
 /// <summary>
 /// Handle a ValueSegment
 /// </summary>
 /// <param name="segment">the segment to Handle</param>
 public virtual void Handle(ValueSegment segment)
 {
     throw new NotImplementedException();
 }
 /// <summary>
 /// Handle a ValueSegment
 /// </summary>
 /// <param name="segment">the segment to Handle</param>
 public override void Handle(ValueSegment segment)
 {
     CommonHandler(segment);
 }
示例#6
0
 /// <summary>
 /// Translate a ValueSegment
 /// </summary>
 /// <param name="segment">the segment to Translate</param>
 /// <returns>Defined by the implementer.</returns>
 public virtual T Translate(ValueSegment segment)
 {
     throw new NotImplementedException();
 }
 /// <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);
 }
示例#8
0
 /// <summary>
 /// Translate a ValueSegment
 /// </summary>
 /// <param name="segment">the segment to Translate</param>
 /// <returns>Defined by the implementer.</returns>
 public override string Translate(ValueSegment segment)
 {
     Debug.Assert(segment != null, "segment != null");
     return("/" + segment.Identifier);
 }