internal void ApplyChange(Ffb.Dto.ModelChange change) { ModelUpdater <Ffb.Dto.ModelChange> updater = ModelChangeFactory.GetReflectedInstance(change.GetType()); if (updater != null) { updater.Apply(change); } else { LogManager.Info($"Missing handler for ModelChange {change.GetType().Name}"); } }
public static ModelUpdater <TTo> CastGenerator <TFrom, TTo>(this ModelUpdater <TFrom> generator) where TTo : Ffb.Dto.ModelChange where TFrom : Ffb.Dto.ModelChange { return(new CastedModelUpdater <TTo, TFrom>(generator)); }
public CastedModelUpdater(ModelUpdater <TFrom> generator) : base(typeof(TFrom)) { Generator = generator; }