Skip to content

Commit

Permalink
Merge pull request #101 from thomasclaudiushuber/issue/98
Browse files Browse the repository at this point in the history
Adjust NuGet readme to include new Command generation code
  • Loading branch information
thomasclaudiushuber authored Dec 12, 2023
2 parents 528fd15 + 6876399 commit 0e46c38
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/MvvmGen/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,20 +195,16 @@ namespace MyWpfApp.ViewModel
{
partial class EmployeeViewModel : global::MvvmGen.ViewModels.ViewModelBase
{
private IDelegateCommand? _saveCommand;
public EmployeeViewModel()
{
this.InitializeCommands();
this.OnInitialize();
}
partial void OnInitialize();
private void InitializeCommands()
{
SaveCommand = new DelegateCommand(_ => Save(), _ => CanSave());
}
public DelegateCommand SaveCommand { get; private set; }
public IDelegateCommand SaveCommand => _saveCommand ??= new DelegateCommand(_ => Save(), _ => CanSave());
public string FirstName { ... }
Expand Down Expand Up @@ -276,10 +272,11 @@ namespace MyWpfApp.ViewModel
{
partial class EmployeeViewModel : global::MvvmGen.ViewModels.ViewModelBase
{
private IDelegateCommand? _saveCommand;
public EmployeeViewModel(MvvmGen.Events.IEventAggregator eventAggregator)
{
this.EventAggregator = eventAggregator;
this.InitializeCommands();
this.OnInitialize();
}
Expand Down

0 comments on commit 0e46c38

Please sign in to comment.