Ejemplo n.º 1
0
 public IEnumerable <T> WalkWith <T>(PathSegmentTranslator <T> translator)
 {
     return(this.segments.Select(segment => segment.TranslateWith(translator)));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Translate a <see cref="PropertySegment"/> using an instance of <see cref="PathSegmentTranslator{T}"/>/>.
 /// </summary>
 /// <typeparam name="T">Type that the translator will return after visiting this token.</typeparam>
 /// <param name="translator">An implementation of the translator interface.</param>
 /// <returns>An object whose type is determined by the type parameter of the translator.</returns>
 /// <exception cref="System.ArgumentNullException">Throws if the input translator is null.</exception>
 public override T TranslateWith <T>(PathSegmentTranslator <T> translator)
 {
     ExceptionUtils.CheckArgumentNotNull(translator, "translator");
     return(translator.Translate(this));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Translate a <see cref="ODataPathSegment"/> using an implementation of<see cref="PathSegmentTranslator{T}"/>.
 /// </summary>
 /// <typeparam name="T">Type that the translator will return after visiting this token.</typeparam>
 /// <param name="translator">An implementation of the translator interface.</param>
 /// <returns>An object whose type is determined by the type parameter of the translator.</returns>
 public abstract T TranslateWith <T>(PathSegmentTranslator <T> translator);