public void Execute() { if (!CanExecute()) { throw new OperationCanceledException($"{GetType().Name} cannot be excuted"); } var codeFactory = new CodeFactory(repository); codeFactory.BuildAssembly(); }