コード例 #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");
            SingletonSegment otherSingleton = other as SingletonSegment;

            return(otherSingleton != null && otherSingleton.singleton == this.Singleton);
        }
コード例 #2
0
 /// <summary>
 /// Translate an SingletonSegment
 /// </summary>
 /// <param name="segment">the segment to Translate</param>
 /// <returns>Defined by the implementer.</returns>
 public override string Translate(SingletonSegment segment)
 {
     Debug.Assert(segment != null, "segment != null");
     return("/" + segment.Singleton.Name);
 }
コード例 #3
0
 /// <summary>
 /// Handle an SingletonSegment
 /// </summary>
 /// <param name="segment">the segment to Handle</param>
 public virtual void Handle(SingletonSegment segment)
 {
     throw new NotImplementedException();
 }
コード例 #4
0
 /// <summary>
 /// Handle an SingletonSegment
 /// </summary>
 /// <param name="segment">the segment to Handle</param>
 public override void Handle(SingletonSegment segment)
 {
     CommonHandler(segment);
 }
コード例 #5
0
 /// <summary>
 /// Translate an SingletonSegment
 /// </summary>
 /// <param name="segment">the segment to Translate</param>
 /// <returns>Defined by the implementer.</returns>
 public virtual T Translate(SingletonSegment segment)
 {
     throw new NotImplementedException();
 }
コード例 #6
0
 /// <summary>
 /// Determine the NavigationSource of a SingletonSegment
 /// </summary>
 /// <param name="segment">The SingletonSegment to look in.</param>
 /// <returns>The IEdmNavigationSource of this SingletonSegment</returns>
 /// <exception cref="System.ArgumentNullException">Throws if the input segment is null.</exception>
 public override IEdmNavigationSource Translate(SingletonSegment segment)
 {
     ExceptionUtils.CheckArgumentNotNull(segment, "segment");
     return(segment.Singleton);
 }