Changeset 14927 for branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Primitive
- Timestamp:
- 05/04/17 17:19:35 (7 years ago)
- Location:
- branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Primitive
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Char2XmlFormatter.cs
r14185 r14927 37 37 38 38 private static string ToBase64String(char c) { 39 return string.Format("<Base64>{0}</Base64>", Convert.ToBase64String(Encoding.ASCII.GetBytes(new[] { c})));39 return string.Format("<Base64>{0}</Base64>", Convert.ToBase64String(Encoding.ASCII.GetBytes(new[] { c }))); 40 40 } 41 41 -
branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/DateTime2XmlSerializer.cs
r14185 r14927 34 34 try { 35 35 return new DateTime(long.Parse(x.Data)); 36 } 37 catch (Exception e) { 36 } catch (Exception e) { 38 37 throw new PersistenceException("Exception caugth while trying to reconstruct DateTime object.", e); 39 38 } -
branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Guid2XmlSerializer.cs
r14185 r14927 36 36 try { 37 37 return new Guid(t.Data); 38 } 39 catch (FormatException x) { 38 } catch (FormatException x) { 40 39 throw new PersistenceException("Cannot parse Guid string representation.", x); 41 } 42 catch (OverflowException x) { 40 } catch (OverflowException x) { 43 41 throw new PersistenceException("Overflow during Guid parsing.", x); 44 42 } -
branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/SimpleNumber2XmlSerializerBase.cs
r14185 r14927 44 44 try { 45 45 return (T)ParseMethod.Invoke(null, new[] { x.Data }); 46 } 47 catch (Exception e) { 46 } catch (Exception e) { 48 47 throw new PersistenceException("Could not parse simple number.", e); 49 48 } -
branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/System.Drawing/Bitmap2XmlSerializer.cs
r14185 r14927 28 28 internal sealed class Bitmap2XmlSerializer : PrimitiveXmlSerializerBase<Bitmap> { 29 29 30 public override XmlString Format(Bitmap o) { 30 public override XmlString Format(Bitmap o) { 31 31 MemoryStream stream = new MemoryStream(); 32 32 lock (o) -
branches/PersistenceReintegration/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/TimeSpan2XmlSerializer.cs
r14185 r14927 35 35 try { 36 36 return TimeSpan.Parse(t.Data); 37 } 38 catch (FormatException x) { 37 } catch (FormatException x) { 39 38 throw new PersistenceException("Cannot parse TimeSpan string representation.", x); 40 } 41 catch (OverflowException x) { 39 } catch (OverflowException x) { 42 40 throw new PersistenceException("Overflow during TimeSpan parsing.", x); 43 41 }
Note: See TracChangeset
for help on using the changeset viewer.