Skip to content

Commit 1f5e912

Browse files
Issues with getter and setter values
1 parent ff60306 commit 1f5e912

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

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

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

219-
// Helper to convert AccessorAccessibility to C# keyword for accessor (empty if matches property)
220-
static string ToAccessorAccessibilityString(string accessor, string property)
219+
// Helper to get the accessor modifier (empty if matches property)
220+
static string ToAccessorModifier(string accessor, string property)
221221
{
222222
if (string.Equals(accessor, property, System.StringComparison.OrdinalIgnoreCase) || accessor == null)
223223
return "";
@@ -289,8 +289,8 @@ static string GetWidestAccessibility(object getter, object setter)
289289
string setterValue = (setter ?? "Public").ToString();
290290
string propertyAccess = GetWidestAccessibility(getterValue, setterValue);
291291
string propertyAccessibilityStr = ToPropertyAccessibilityString(propertyAccess);
292-
string getterStr = ToAccessorAccessibilityString(getterValue, propertyAccess);
293-
string setterStr = ToAccessorAccessibilityString(setterValue, propertyAccess);
292+
string getterStr = ToAccessorModifier(getterValue, propertyAccess);
293+
string setterStr = ToAccessorModifier(setterValue, propertyAccess);
294294

295295
var lockerArg = threadSafe ? "_Locker" : "null";
296296
var notifyArg = notify ? "true" : "false";
@@ -362,8 +362,8 @@ static string GetWidestAccessibility(object getter, object setter)
362362
string setterValue = (setter ?? "Public").ToString();
363363
string propertyAccess = GetWidestAccessibility(getterValue, setterValue);
364364
string propertyAccessibilityStr = ToPropertyAccessibilityString(propertyAccess);
365-
string getterStr = ToAccessorAccessibilityString(getterValue, propertyAccess);
366-
string setterStr = ToAccessorAccessibilityString(setterValue, propertyAccess);
365+
string getterStr = ToAccessorModifier(getterValue, propertyAccess);
366+
string setterStr = ToAccessorModifier(setterValue, propertyAccess);
367367

368368
var lockerArg = threadSafe ? "_Locker" : "null";
369369
if (readOnly)

0 commit comments

Comments
 (0)