-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Leonardo Porro
committed
Jan 29, 2024
1 parent
455c689
commit a9f4ce9
Showing
17 changed files
with
98 additions
and
184 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
65 changes: 0 additions & 65 deletions
65
src/Detached.Mappers.EntityFramework/TypeMappers/KeyToEntityTypeMapper.cs
This file was deleted.
Oops, something went wrong.
41 changes: 0 additions & 41 deletions
41
src/Detached.Mappers.EntityFramework/TypeMappers/KeyToEntityTypeMapperFactory.cs
This file was deleted.
Oops, something went wrong.
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
28 changes: 0 additions & 28 deletions
28
src/Detached.Mappers.Json/TypeOptions/JsonTypeOptionsFactory.cs
This file was deleted.
Oops, something went wrong.
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,28 @@ | ||
using Detached.Mappers.Types; | ||
using System; | ||
using System.Text.Json.Nodes; | ||
|
||
namespace Detached.Mappers.Json.TypeOptions | ||
{ | ||
public class JsonTypeFactory : ITypeFactory | ||
{ | ||
readonly IType _nodeOptions = new JsonNodeType(); | ||
readonly IType _arrayOptions = new JsonArrayType(); | ||
readonly IType _objectOptions = new JsonObjectType(); | ||
readonly IType _valueOptions = new JsonValueType(); | ||
|
||
public IType Create(MapperOptions options, Type clrType) | ||
{ | ||
if (typeof(JsonArray).IsAssignableFrom(clrType)) | ||
return _arrayOptions; | ||
else if (typeof(JsonObject).IsAssignableFrom(clrType)) | ||
return _objectOptions; | ||
else if (typeof(JsonValue).IsAssignableFrom(clrType)) | ||
return _valueOptions; | ||
else if (typeof(JsonNode).IsAssignableFrom(clrType)) | ||
return _nodeOptions; | ||
else | ||
return null; | ||
} | ||
} | ||
} |
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
Oops, something went wrong.