Changeset 1564 for trunk/sources/HeuristicLab.Persistence/3.3/Interfaces
- Timestamp:
- 04/16/09 12:40:41 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Persistence/3.3/Interfaces
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/3.3/Interfaces/IFormat.cs
r1542 r1564 3 3 namespace HeuristicLab.Persistence.Interfaces { 4 4 5 /// <summary> 6 /// Interface of a new serialization output format. Instead of implementing this 7 /// interface, derive from FormatBase. 8 /// </summary> 5 9 public interface IFormat { 6 10 string Name { get; } 11 Type SerialDataType { get; } 12 } 13 14 /// <summary> 15 /// Marker interface for new serialization output format. Instead of implementing this 16 /// interface, derive from FormatBase. 17 /// </summary> 18 public interface IFormat<SerialDataFormat> : IFormat where SerialDataFormat : ISerialData { 7 19 } 8 20 -
trunk/sources/HeuristicLab.Persistence/3.3/Interfaces/IFormatter.cs
r1542 r1564 3 3 namespace HeuristicLab.Persistence.Interfaces { 4 4 5 /// <summary> 6 /// Marker interface of serial data formatters. Transform data of type SourceType 7 /// into the serialization format SerialDataType. Derive from FormatterBase instead 8 /// of implementing this interface. 9 /// </summary> 5 10 public interface IFormatter { 6 Type Type { get; }7 IFormat Format{ get; }8 object DoFormat(object o);9 object Parse( object o);11 Type SerialDataType { get; } 12 Type SourceType { get; } 13 ISerialData Format(object o); 14 object Parse(ISerialData o); 10 15 } 11 16 17 /// <summary> 18 /// Marker interface of serial data formatters. Transform data of type Source 19 /// into the serialization format SerialData. Derive from FormatterBase instead 20 /// of implementing this interface. 21 /// </summary> 22 public interface IFormatter<Source, SerialData> : IFormatter where SerialData : ISerialData { 23 SerialData Format(Source o); 24 Source Parse(SerialData t); 25 } 26 12 27 }
Note: See TracChangeset
for help on using the changeset viewer.