/// <summary>
 /// Translate a BatchReferenceSegment
 /// </summary>
 /// <param name="segment">the segment to Translate</param>
 /// <returns>Translated WebApi path segment.</returns>
 public override IEnumerable <ODataPathSegment> Translate(Semantic.BatchReferenceSegment segment)
 {
     throw new ODataException(Error.Format(
                                  SRResources.TargetKindNotImplemented,
                                  typeof(ODataPathSegment).Name,
                                  typeof(Semantic.BatchReferenceSegment).Name));
 }
        /// <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)
        {
            BatchReferenceSegment otherBatchReferenceSegment = other as BatchReferenceSegment;

            return(otherBatchReferenceSegment != null &&
                   otherBatchReferenceSegment.EdmType == this.edmType &&
                   otherBatchReferenceSegment.EntitySet == this.entitySet &&
                   otherBatchReferenceSegment.ContentId == this.contentId);
        }
 /// <summary>
 /// Determine the NavigationSource of a BatchReferenceSegment
 /// </summary>
 /// <param name="segment">The BatchReferenceSegment to look in.</param>
 /// <returns>The IEdmNavigationSource of this BatchReferenceSegment</returns>
 /// <exception cref="System.ArgumentNullException">Throws if the input segment is null.</exception>
 public override IEdmNavigationSource Translate(BatchReferenceSegment segment)
 {
     ExceptionUtils.CheckArgumentNotNull(segment, "segment");
     return(segment.EntitySet);
 }