-
-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'add-interfaces' of https://github.com/grofit/YamlDotNet …
…into grofit-add-interfaces
- Loading branch information
Showing
8 changed files
with
80 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using System.IO; | ||
using YamlDotNet.Core; | ||
|
||
namespace YamlDotNet.Serialization | ||
{ | ||
public interface IDeserializer | ||
{ | ||
T Deserialize<T>(string input); | ||
T Deserialize<T>(TextReader input); | ||
object Deserialize(TextReader input); | ||
object Deserialize(string input, Type type); | ||
object Deserialize(TextReader input, Type type); | ||
T Deserialize<T>(IParser parser); | ||
object Deserialize(IParser parser); | ||
|
||
/// <summary> | ||
/// Deserializes an object of the specified type. | ||
/// </summary> | ||
/// <param name="parser">The <see cref="IParser" /> from where to deserialize the object.</param> | ||
/// <param name="type">The static type of the object to deserialize.</param> | ||
/// <returns>Returns the deserialized object.</returns> | ||
object Deserialize(IParser parser, Type type); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using System; | ||
using System.IO; | ||
using YamlDotNet.Core; | ||
|
||
namespace YamlDotNet.Serialization | ||
{ | ||
public interface ISerializer | ||
{ | ||
/// <summary> | ||
/// Serializes the specified object. | ||
/// </summary> | ||
/// <param name="writer">The <see cref="TextWriter" /> where to serialize the object.</param> | ||
/// <param name="graph">The object to serialize.</param> | ||
void Serialize(TextWriter writer, object graph); | ||
|
||
/// <summary> | ||
/// Serializes the specified object into a string. | ||
/// </summary> | ||
/// <param name="graph">The object to serialize.</param> | ||
string Serialize(object graph); | ||
|
||
/// <summary> | ||
/// Serializes the specified object. | ||
/// </summary> | ||
/// <param name="writer">The <see cref="TextWriter" /> where to serialize the object.</param> | ||
/// <param name="graph">The object to serialize.</param> | ||
/// <param name="type">The static type of the object to serialize.</param> | ||
void Serialize(TextWriter writer, object graph, Type type); | ||
|
||
/// <summary> | ||
/// Serializes the specified object. | ||
/// </summary> | ||
/// <param name="emitter">The <see cref="IEmitter" /> where to serialize the object.</param> | ||
/// <param name="graph">The object to serialize.</param> | ||
void Serialize(IEmitter emitter, object graph); | ||
|
||
/// <summary> | ||
/// Serializes the specified object. | ||
/// </summary> | ||
/// <param name="emitter">The <see cref="IEmitter" /> where to serialize the object.</param> | ||
/// <param name="graph">The object to serialize.</param> | ||
/// <param name="type">The static type of the object to serialize.</param> | ||
void Serialize(IEmitter emitter, object graph, Type type); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters