Skip to content

Commit 761d849

Browse files
Still fixing getter and setter
1 parent 46db30c commit 761d849

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/ThunderDesign.Net-PCL.SourceGenerators/UnifiedPropertyGenerator.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ static string ToPropertyAccessibilityString(string access)
216216
};
217217
}
218218

219-
// Helper: Only emit accessor modifier if it differs from property (compare raw, not formatted)
219+
// Helper: Only emit accessor modifier if it differs from property
220220
static string ToAccessorModifier(string accessor, string propertyAccess)
221221
{
222222
if (string.IsNullOrEmpty(accessor)) accessor = "Public";
@@ -322,14 +322,15 @@ static string GetWidestAccessibility(string getter, string setter)
322322
}
323323
else
324324
{
325-
setAccessor = $"{setterStr}set {{ this.SetProperty(ref {fieldName}, value, {lockerArg}, {notifyArg}); }}";
325+
setAccessor = $@"
326+
{setterStr}set {{ this.SetProperty(ref {fieldName}, value, {lockerArg}, {notifyArg}); }}";
326327
}
327328

328329
source.AppendLine($@"
329330
{propertyAccessibilityStr}{typeName} {propertyName}
330331
{{
331332
{getterStr}get {{ return this.GetProperty(ref {fieldName}, {lockerArg}); }}
332-
{setAccessor}
333+
{setAccessor}
333334
}}");
334335
}
335336
}

0 commit comments

Comments
 (0)