Skip to content

Commit

Permalink
Move setserializer
Browse files Browse the repository at this point in the history
  • Loading branch information
aritchie committed Oct 19, 2024
1 parent ff830b9 commit e61e404
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/Shiny.Mediator.AppSupport/AppSupportExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ namespace Shiny.Mediator;

public static class AppSupportExtensions
{
public static ShinyConfigurator SetSerializer<TSerializer>(this ShinyConfigurator cfg) where TSerializer : class, ISerializerService
{
cfg.Services.AddSingleton<ISerializerService, TSerializer>();
return cfg;
}


/// <summary>
/// Adds standard app support middleware - offline, replay stream, & user notification
/// </summary>
Expand Down
7 changes: 7 additions & 0 deletions src/Shiny.Mediator/ShinyConfigurator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ public sealed class ShinyConfigurator(IServiceCollection services)

public bool ExcludeDefaultMiddleware { get; set; }


public ShinyConfigurator SetSerializer<TSerializer>() where TSerializer : class, ISerializerService
{
this.Services.AddSingleton<ISerializerService, TSerializer>();
return this;
}


public ShinyConfigurator AddHttpClient()
{
this.Services.Add(new ServiceDescriptor(
Expand Down

0 comments on commit e61e404

Please sign in to comment.