static Mediator CreateMediator(IMediatorTarget target, Type targetType) { Mediator m = (Mediator)Activator.CreateInstance(ClassMediatorMappings [targetType], target); DIUtil.InjectProps(m as IInjectingTarget); MediatorAssignments [target] = m; m.Register(); return(m); }
public void Invoke(InvokerArgs args = null) { foreach (Type command in CommandTypes) { Command c = (Command)Activator.CreateInstance(command); DIUtil.InjectProps(c); c.Execute(args); } Invoked(this, new InvokedEventArgs(args)); }
public virtual void Invoke(InvokerArgs args = null) { foreach (Type command in CommandTypes) { Command c = (Command)Activator.CreateInstance(command); DIUtil.InjectProps(c); if (c.Detained) { c.Released += HandleCommandRelease; detainedCommands.Add(c); } c.Execute(args); } Invoked(this, new InvokedEventArgs(args)); }
void InjectPropsFromDI() { DIUtil.InjectProps(this); }