Skip to content

Commit

Permalink
Allow own implementation of json serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
AyronK committed Jul 19, 2023
1 parent 901a82d commit 95e9086
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Forte.React.AspNetCore/Forte.React.AspNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<Packable>true</Packable>
<VersionPrefix>0.3.0.0</VersionPrefix>
<VersionPrefix>0.3.1.0</VersionPrefix>
</PropertyGroup>

<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Forte.React.AspNetCore/JsonSerializationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Forte.React.AspNetCore;

internal interface IJsonSerializationService : IJsonService
public interface IJsonSerializationService : IJsonService
{
string Serialize<TValue>(TValue value);
}
Expand Down
7 changes: 7 additions & 0 deletions Forte.React.AspNetCore/React/ReactService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ public ReactService(INodeJSService nodeJsService, ReactConfiguration config)
_config = config;
_jsonService = new JsonSerializationService(new ReactJsonSerializerOptions().Options);
}

public ReactService(INodeJSService nodeJsService, IJsonSerializationService jsonService, ReactConfiguration config)
{
_nodeJsService = nodeJsService;
_config = config;
_jsonService = jsonService;
}
#endif

private async Task<T> InvokeRenderTo<T>(Component component, object? props = null, params object[] args)
Expand Down

0 comments on commit 95e9086

Please sign in to comment.