Skip to content

Commit d21d6ad

Browse files
Updated BindablePropertyAttributes
1 parent e4d0484 commit d21d6ad

1 file changed

Lines changed: 29 additions & 19 deletions

File tree

src/ThunderDesign.Net-PCL.Threading.Shared/Attributes/BindablePropertyAttribute.cs

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,42 +19,52 @@ public BindablePropertyAttribute(
1919
bool readOnly = false,
2020
bool threadSafe = true,
2121
bool notify = true,
22-
string[] alsoNotify = null,
2322
AccessorAccessibility getter = AccessorAccessibility.Public,
2423
AccessorAccessibility setter = AccessorAccessibility.Public)
2524
{
26-
ApplyBindablePropertyAttribute(readOnly, threadSafe, notify, alsoNotify ?? new string[0], getter, setter);
25+
ApplyBindablePropertyAttribute(readOnly, threadSafe, notify, new string[0], getter, setter);
2726
}
2827

2928
public BindablePropertyAttribute(
30-
bool readOnly,
31-
bool threadSafe,
32-
bool notify,
33-
IEnumerable<string> alsoNotify,
29+
bool readOnly = false,
30+
bool threadSafe = true,
31+
bool notify = true,
32+
string alsoNotify = null,
3433
AccessorAccessibility getter = AccessorAccessibility.Public,
3534
AccessorAccessibility setter = AccessorAccessibility.Public)
3635
{
37-
ApplyBindablePropertyAttribute(readOnly, threadSafe, notify, alsoNotify?.ToArray() ?? new string[0], getter, setter);
36+
ApplyBindablePropertyAttribute(readOnly, threadSafe, notify, string.IsNullOrEmpty(alsoNotify) ? new string[0] : new string[] { alsoNotify }, getter, setter);
3837
}
39-
38+
4039
public BindablePropertyAttribute(
41-
bool readOnly,
42-
bool threadSafe,
43-
bool notify,
44-
string alsoNotify,
40+
string[] alsoNotify = null,
41+
bool readOnly = false,
42+
bool threadSafe = true,
43+
bool notify = true,
4544
AccessorAccessibility getter = AccessorAccessibility.Public,
4645
AccessorAccessibility setter = AccessorAccessibility.Public)
4746
{
48-
ApplyBindablePropertyAttribute(readOnly, threadSafe, notify, string.IsNullOrEmpty(alsoNotify) ? new string[0] : new string[] { alsoNotify }, getter, setter);
47+
ApplyBindablePropertyAttribute(readOnly, threadSafe, notify, alsoNotify ?? new string[0], getter, setter);
4948
}
5049

50+
public BindablePropertyAttribute(
51+
bool readOnly = false,
52+
bool threadSafe = true,
53+
IEnumerable<string> alsoNotify = null,
54+
AccessorAccessibility getter = AccessorAccessibility.Public,
55+
AccessorAccessibility setter = AccessorAccessibility.Public,
56+
bool notify = true)
57+
{
58+
ApplyBindablePropertyAttribute(readOnly, threadSafe, notify, alsoNotify?.ToArray() ?? new string[0], getter, setter);
59+
}
60+
5161
public void ApplyBindablePropertyAttribute(
52-
bool readOnly,
53-
bool threadSafe,
54-
bool notify,
55-
string[] alsoNotify,
56-
AccessorAccessibility getter,
57-
AccessorAccessibility setter)
62+
bool readOnly = false,
63+
bool threadSafe = true,
64+
bool notify = true,
65+
string[] alsoNotify = null,
66+
AccessorAccessibility getter = AccessorAccessibility.Public,
67+
AccessorAccessibility setter = AccessorAccessibility.Public)
5868
{
5969
ReadOnly = readOnly;
6070
ThreadSafe = threadSafe;

0 commit comments

Comments
 (0)