/// <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> /// Translate a BatchReferenceSegment /// </summary> /// <param name="segment">the segment to Translate</param> /// <returns>Defined by the implementer.</returns> public override string Translate(BatchReferenceSegment segment) { return(string.Empty); }
/// <summary> /// Translate a BatchReferenceSegment /// </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(BatchReferenceSegment segment) { ExceptionUtils.CheckArgumentNotNull(segment, "segment"); return(false); }
/// <summary> /// Handle a BatchReferenceSegment /// </summary> /// <param name="segment">the segment to Handle</param> public virtual void Handle(BatchReferenceSegment segment) { throw new NotImplementedException(); }
/// <summary> /// Handle a BatchReferenceSegment /// </summary> /// <param name="segment">the segment to Handle</param> public override void Handle(BatchReferenceSegment segment) { CommonHandler(segment); }
/// <summary> /// Translate a BatchReferenceSegment /// </summary> /// <param name="segment">the segment to Translate</param> /// <returns>Defined by the implementer.</returns> public virtual T Translate(BatchReferenceSegment segment) { throw new NotImplementedException(); }
/// <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); }
/// <summary> /// Translate a BatchReferenceSegment /// </summary> /// <param name="segment">the segment to Translate</param> /// <returns>Defined by the implementer.</returns> public override string Translate(BatchReferenceSegment segment) { Debug.Assert(segment != null, "segment != null"); return("/" + segment.ContentId); }