Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/16/09 16:10:39 (16 years ago)
Author:
epitzer
Message:

Streamline XML generation with StringBuilders (#548)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/String2XmlFormatter.cs

    r1566 r1570  
    11using System;
    2 using System.Text;
    32using HeuristicLab.Persistence.Core;
    43using HeuristicLab.Persistence.Interfaces;
    5 using System.Xml;
     4using System.Text;
     5
    66
    77namespace HeuristicLab.Persistence.Default.Xml.Primitive {
     
    1010  public class String2XmlFormatter : FormatterBase<string, XmlString> {
    1111
    12     public override XmlString Format(string s) {
     12    public override XmlString Format(string s) {     
    1313      StringBuilder sb = new StringBuilder();
    1414      sb.Append("<![CDATA[");
     
    2020    private static readonly string[] separators = new string[] { "<![CDATA[", "]]>" };
    2121
    22     public override string Parse(XmlString x) {
     22    public override string Parse(XmlString x) {     
    2323      StringBuilder sb = new StringBuilder();
    2424      foreach (string s in x.Data.Split(separators,
Note: See TracChangeset for help on using the changeset viewer.