Skip to content

Commit 7a163b1

Browse files
committed
remove field bind double up
1 parent 4920f43 commit 7a163b1

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
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.3" />
19+
<PackageReference Include="SimpleViewModel" Version="0.9.4" />
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.3</Version>
12+
<Version>0.9.4</Version>
1313
<Authors>Derek Gooding</Authors>
1414
<Company>Derek Gooding</Company>
1515
<Description>

ViewModelGenerator/ViewModelGenerator.cs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,8 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
6161
namespace {namespaceName}
6262
{{
6363
public partial class {className} : BaseViewModel
64-
{{");
65-
66-
foreach (var field in bindFields)
67-
{
68-
viewModelBuilder.AppendLine($" public {field.Type} {ToPascal(field.Name)} {{ get; set; }}");
69-
}
70-
71-
viewModelBuilder.AppendLine();
72-
64+
{{
65+
");
7366
foreach (var field in bindFields)
7467
{
7568
var fieldType = field.Type.ToDisplayString();

0 commit comments

Comments
 (0)