ListInfoResult

Undocumented in source.

Members

Functions

add
void add(string key, string value)
Undocumented in source. Be warned that the author may not have intended to support it.
add
void add(string singular, string plural, string[] valueList)
Undocumented in source. Be warned that the author may not have intended to support it.
print
void print(ResultPrinter printer)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From IResult

toString
string toString()
Undocumented in source.
print
void print(ResultPrinter )
Undocumented in source.

Examples

convert to string the added data to ListInfoResult

 auto result = new ListInfoResult();

 result.add("a", "1");
 result.add("ab", "2");
 result.add("abc", "3");

 result.toString.should.equal(`
  a:1
 ab:2
abc:3`);

print the added data to ListInfoResult

  auto printer = new MockPrinter();
  auto result = new ListInfoResult();

  result.add("a", "1");
  result.add("ab", "2");
  result.add("abc", "3");

  result.print(printer);

  printer.buffer.should.equal(`[primary:
][primary:   a:][primary:][info:1][primary:
][primary:  ab:][primary:][info:2][primary:
][primary: abc:][primary:][info:3]`);

convert to string the added data lists to ListInfoResult

 auto result = new ListInfoResult();

 result.add("a", "as", ["1", "2","3"]);
 result.add("ab", "abs", ["2", "3"]);
 result.add("abc", "abcs", ["3"]);
 result.add("abcd", "abcds", []);

 result.toString.should.equal(`
 as:1,2,3
abs:2,3
abc:3`);

Meta