Skip to content

Commit

Permalink
SettingsSerializerFactory interface
Browse files Browse the repository at this point in the history
  • Loading branch information
marcwittke committed Dec 13, 2017
1 parent 1e8480c commit 4f12abe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ namespace Backend.Fx.ConfigurationSettings
using System.Reflection;
using JetBrains.Annotations;

public class SettingSerializerFactory
public interface ISettingSerializerFactory
{
ISettingSerializer<T> GetSerializer<T>();
}

public class SettingSerializerFactory : ISettingSerializerFactory
{
protected Dictionary<Type, ISettingSerializer> Serializers { get; }

Expand Down
4 changes: 2 additions & 2 deletions src/Backend.Fx/ConfigurationSettings/SettingsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ public abstract class SettingsService
private readonly string category;
private readonly IEntityIdGenerator idGenerator;
private readonly IRepository<Setting> settingRepository;
private readonly SettingSerializerFactory settingSerializerFactory;
private readonly ISettingSerializerFactory settingSerializerFactory;

protected SettingsService(string category, IEntityIdGenerator idGenerator, IRepository<Setting> settingRepository, SettingSerializerFactory settingSerializerFactory)
protected SettingsService(string category, IEntityIdGenerator idGenerator, IRepository<Setting> settingRepository, ISettingSerializerFactory settingSerializerFactory)
{
this.category = category;
this.idGenerator = idGenerator;
Expand Down

0 comments on commit 4f12abe

Please sign in to comment.