Example #1
0
        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}");
            }
        }
Example #2
0
 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));
 }
Example #3
0
 public CastedModelUpdater(ModelUpdater <TFrom> generator)
     : base(typeof(TFrom))
 {
     Generator = generator;
 }