Skip to content

Commit

Permalink
Adjust NuGet readme to include new Command generation code
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasclaudiushuber committed Dec 12, 2023
1 parent 528fd15 commit 6876399
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 6876399

Please sign in to comment.