Rev | Line | |
---|
[1454] | 1 | using System;
|
---|
| 2 |
|
---|
| 3 | namespace HeuristicLab.Persistence.Interfaces {
|
---|
| 4 |
|
---|
[1564] | 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>
|
---|
[1454] | 10 | public interface IFormatter {
|
---|
[1564] | 11 | Type SerialDataType { get; }
|
---|
| 12 | Type SourceType { get; }
|
---|
| 13 | ISerialData Format(object o);
|
---|
[1566] | 14 | object Parse(ISerialData o);
|
---|
[1454] | 15 | }
|
---|
| 16 |
|
---|
[1564] | 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);
|
---|
[1566] | 25 | }
|
---|
| 26 |
|
---|
[1454] | 27 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.