Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlString.cs @ 3036

Last change on this file since 3036 was 3036, checked in by epitzer, 15 years ago

make most serializers internal and complete API documentation (#548)

File size: 1.3 KB
Line 
1using HeuristicLab.Persistence.Interfaces;
2using HeuristicLab.Persistence.Core;
3using System.Text;
4using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
5
6namespace HeuristicLab.Persistence.Default.Xml {
7
8  /// <summary>
9  /// XML friendly encapsulation of string data.
10  /// </summary>
11  [StorableClass] 
12  public class XmlString : ISerialData {
13
14    /// <summary>
15    /// Gets the XML string data. Essentially marks the string as
16    /// XML compatible string.
17    /// </summary>
18    /// <value>The XML string data.</value>
19    [Storable]
20    public string Data { get; private set; }
21
22    private XmlString() { }
23
24    /// <summary>
25    /// Initializes a new instance of the <see cref="XmlString"/> class.
26    /// </summary>
27    /// <param name="data">The xml data.</param>
28    public XmlString(string data) {
29      Data = data;
30    }
31
32    /// <summary>
33    /// Returns a <see cref="System.String"/> that represents this instance.
34    /// </summary>
35    /// <returns>
36    /// A <see cref="System.String"/> that represents this instance.
37    /// </returns>
38    public override string ToString() {
39      StringBuilder sb = new StringBuilder();
40      sb.Append("XmlString(").Append(Data).Append(')');
41      return sb.ToString();
42    }
43  }
44}
Note: See TracBrowser for help on using the repository browser.