public GameBoardObservable(CommandContainer container) { CommandContainer = container; //decided to use plain command here. MethodInfo method = this.GetPrivateMethod(nameof(ClickProcessAsync)); //hopefully protected is fine (?) MethodInfo fun = this.GetPrivateMethod(nameof(CanExecute)); ObjectCommand = new PlainCommand(this, method, fun, CommandContainer); CommandContainer.AddControl(this); //i think it should be here instead. }
//decided to let it invoke via di. hopefully that works. //this should not care about the main view model anyways. //especially since its being splitted apart now. public SimpleControlObservable(CommandContainer container) { CommandContainer = container; CommandContainer.AddControl(this); //i think it should be here instead. }