Пример #1
0
 public override string ToString()
 {
     return
         (@"#{0}.{1} {2} {3} at ""{4}"" {5} {6} {7} {8}".Args(
              Code,
              From.MessageCodeToString(Code),
              Type,
              From.GetType().Name,
              SourceCodeReference,
              (Token == null) ? Position.ToString() : string.Empty,
              (Token != null) ? "\"" + Token.ToString() + "\"" : string.Empty,
              (!string.IsNullOrWhiteSpace(Text)) ? "\"" + Text + "\"" : string.Empty,
              (AssociatedException != null) ? AssociatedException.ToMessageWithType() : string.Empty
              ));
 }
Пример #2
0
 public void CanBeStringFormatted()
 {
     Assert.AreEqual(subject.ToString(), "42:18");
 }