Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/SerializationTokenBase.cs @ 2657

Last change on this file since 2657 was 1615, checked in by epitzer, 16 years ago

Improve debugability to investigate failing tests. (#593)

File size: 687 bytes
Line 
1using HeuristicLab.Persistence.Interfaces;
2using System.Reflection;
3using System.Text;
4
5namespace HeuristicLab.Persistence.Core.Tokens {
6
7  public abstract class SerializationTokenBase : ISerializationToken {
8    public readonly string Name;
9    public SerializationTokenBase(string name) {
10      Name = name;
11    }
12    public override string ToString() {
13      StringBuilder sb = new StringBuilder();
14      sb.Append(this.GetType().Name).Append('(');
15      foreach (FieldInfo fi in this.GetType().GetFields()) {
16        sb.Append(fi.Name).Append('=').Append(fi.GetValue(this)).Append(", ");
17      }
18      sb.Append(')');
19      return sb.ToString();
20    }
21  }
22
23}
Note: See TracBrowser for help on using the repository browser.