-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Serialization provider now always looks at the object type to find th…
…e correct serializer
- Loading branch information
Showing
7 changed files
with
74 additions
and
70 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
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 |
---|---|---|
@@ -1,19 +1,22 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
|
||
namespace Meceqs.Serialization | ||
{ | ||
public interface ISerializationProvider | ||
{ | ||
bool TryGetSerializer(string contentType, out ISerializer serializer); | ||
IReadOnlyList<string> GetSupportedContentTypes(Type objectType = null); | ||
|
||
ISerializer GetSerializer(Type objectType); | ||
|
||
ISerializer GetSerializer(IEnumerable<string> supportedContentTypes); | ||
ISerializer GetSerializer(Type objectType, string supportedContentType); | ||
|
||
IReadOnlyList<string> GetSupportedContentTypes(Type objectType = null); | ||
ISerializer GetSerializer(Type objectType, IEnumerable<string> supportedContentTypes); | ||
|
||
bool TryGetSerializer(Type objectType, out ISerializer serializer); | ||
|
||
bool TryGetSerializer(Type objectType, string supportedContentType, out ISerializer serializer); | ||
|
||
object Deserialize(string contentType, Type objectType, Stream serializedObject); | ||
bool TryGetSerializer(Type objectType, IEnumerable<string> supportedContentTypes, out ISerializer serializer); | ||
} | ||
} |