-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from The-Standard-Organization/users/cjdutoit/…
…exposers-abstraction-providers EXPOSERS: Interface changes to support type restrictions for STRING, BYTE[], STREAM
- Loading branch information
Showing
11 changed files
with
70 additions
and
208 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
19 changes: 19 additions & 0 deletions
19
STX.Serialization.Providers.Abstractions/ISerializationOperations.cs
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,19 @@ | ||
// ---------------------------------------------------------------------------------- | ||
// Copyright (c) The Standard Organization: A coalition of the Good-Hearted Engineers | ||
// ---------------------------------------------------------------------------------- | ||
|
||
using System.IO; | ||
using System.Threading.Tasks; | ||
using STX.Serialization.Providers.Abstractions.Models; | ||
|
||
namespace STX.Serialization.Providers.Abstractions | ||
{ | ||
public interface ISerializationOperations | ||
{ | ||
ValueTask<TOutput> Serialize<TInput, TOutput>(TInput @object) | ||
where TOutput : IDataRepresentation<string>, IDataRepresentation<byte[]>, IDataRepresentation<Stream>; | ||
|
||
ValueTask<TOutput> Deserialize<TInput, TOutput>(TInput json) | ||
where TInput : IDataRepresentation<string>, IDataRepresentation<byte[]>, IDataRepresentation<Stream>; | ||
} | ||
} |
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
11 changes: 11 additions & 0 deletions
11
STX.Serialization.Providers.Abstractions/Models/ByteArrayData.cs
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,11 @@ | ||
// ---------------------------------------------------------------------------------- | ||
// Copyright (c) The Standard Organization: A coalition of the Good-Hearted Engineers | ||
// ---------------------------------------------------------------------------------- | ||
|
||
namespace STX.Serialization.Providers.Abstractions.Models | ||
{ | ||
public class ByteArrayData : IDataRepresentation<byte[]> | ||
{ | ||
public byte[] Value { get; set; } | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
STX.Serialization.Providers.Abstractions/Models/IDataRepresentation.cs
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,11 @@ | ||
// ---------------------------------------------------------------------------------- | ||
// Copyright (c) The Standard Organization: A coalition of the Good-Hearted Engineers | ||
// ---------------------------------------------------------------------------------- | ||
|
||
namespace STX.Serialization.Providers.Abstractions.Models | ||
{ | ||
public interface IDataRepresentation<T> | ||
{ | ||
T Value { get; set; } | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
STX.Serialization.Providers.Abstractions/Models/StreamData.cs
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,13 @@ | ||
// ---------------------------------------------------------------------------------- | ||
// Copyright (c) The Standard Organization: A coalition of the Good-Hearted Engineers | ||
// ---------------------------------------------------------------------------------- | ||
|
||
using System.IO; | ||
|
||
namespace STX.Serialization.Providers.Abstractions.Models | ||
{ | ||
public class StreamData : IDataRepresentation<Stream> | ||
{ | ||
public Stream Value { get; set; } | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
STX.Serialization.Providers.Abstractions/Models/StringData.cs
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,11 @@ | ||
// ---------------------------------------------------------------------------------- | ||
// Copyright (c) The Standard Organization: A coalition of the Good-Hearted Engineers | ||
// ---------------------------------------------------------------------------------- | ||
|
||
namespace STX.Serialization.Providers.Abstractions.Models | ||
{ | ||
public class StringData : IDataRepresentation<string> | ||
{ | ||
public string Value { get; set; } | ||
} | ||
} |
99 changes: 0 additions & 99 deletions
99
STX.Serialization.Providers.Abstractions/SerializationAbstractionProvider.Exceptions.cs
This file was deleted.
Oops, something went wrong.
52 changes: 0 additions & 52 deletions
52
STX.Serialization.Providers.Abstractions/SerializationAbstractionProvider.Validations.cs
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
STX.Serialization.Providers.Abstractions/SerializationAbstractionProvider.cs
This file was deleted.
Oops, something went wrong.