Ejemplo n.º 1
0
 /// <summary>
 /// Translate an <see cref="ExternalLine"/> object into a tuple used by intake suppliers and output consumers in case of a single source or target.
 /// </summary>
 /// <param name="line">An <see cref="ExternalLine"/> object.</param>
 /// <returns>A tuple consisting of an <see cref="ExternalLine"/> object and a source or target number of 1.</returns>
 public static Tuple <ExternalLine, int> ToTuple(this ExternalLine line)
 {
     return(line.ToTuple(1));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Translate a line of text into an <see cref="ExternalLine"/> object.
 /// </summary>
 /// <param name="line">A line of text.</param>
 /// <returns>An <see cref="ExternalLine"/> object of <see cref="Xtext"/> type.</returns>
 public static ExternalLine ToExternalLine(this string line)
 {
     return(ExternalLine.CreateXtext(line));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Translate an <see cref="ExternalLine"/> object into a tuple used by intake suppliers and output consumers.
 /// </summary>
 /// <param name="line">An <see cref="ExternalLine"/> object.</param>
 /// <param name="indexNo">Either source or target number to assign.</param>
 /// <returns>A tuple consisting of an <see cref="ExternalLine"/> object and a source or target number.</returns>
 public static Tuple <ExternalLine, int> ToTuple(this ExternalLine line, int indexNo)
 {
     return(line == null ? null : Tuple.Create(line, indexNo));
 }