Skip to content

Commit f516ed6

Browse files
committed
remove redundant instantiation in generator
1 parent 7a163b1 commit f516ed6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ A lightweight WPF ViewModel framework with automatic source generation that elim
1616
### Installation
1717

1818
```xml
19-
<PackageReference Include="SimpleViewModel" Version="0.9.4" />
19+
<PackageReference Include="SimpleViewModel" Version="0.9.5" />
2020
```
2121

2222
### Basic Usage

SimpleViewModel/SimpleViewModel.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1111
<PackageId>SimpleViewModel</PackageId>
12-
<Version>0.9.4</Version>
12+
<Version>0.9.5</Version>
1313
<Authors>Derek Gooding</Authors>
1414
<Company>Derek Gooding</Company>
1515
<Description>

ViewModelGenerator/ViewModelGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public partial class {className} : BaseViewModel
7575
{
7676
var commandClassName = $"Command_{method.Name}";
7777
var commandFieldName = $"{ToPascal(method.Name)}Command";
78-
viewModelBuilder.AppendLine($" private {commandClassName} _{commandFieldName} {{ get; }} = new {commandClassName}(this);");
78+
viewModelBuilder.AppendLine($" private {commandClassName} _{commandFieldName} {{ get; }}");
7979
viewModelBuilder.AppendLine($" public {commandClassName} {commandFieldName} => _{commandFieldName} ??= new(this);");
8080

8181
// Generate command class per method

0 commit comments

Comments
 (0)