You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix LocalizableString to work with internal ResourceType (#111130)
* Fix LocalizableString to work with internal ResourceType
Removed check for Resource Type to be public.
Added test for DisplayAttribute to ensure it works with with internal Resource Type.
* remove the line numbers from the DisplayAttributeTests.cs file
Copy file name to clipboardExpand all lines: src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/LocalizableString.cs
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -128,9 +128,8 @@ private void ClearCache()
128
128
// We need to detect bad configurations so that we can throw exceptions accordingly
129
129
varbadlyConfigured=false;
130
130
131
-
// Make sure we found the property and it's the correct type, and that the type itself is public
132
-
if(!_resourceType.IsVisible||property==null||
133
-
property.PropertyType!=typeof(string))
131
+
// Make sure we found the property and it's the correct type
Copy file name to clipboardExpand all lines: src/libraries/System.ComponentModel.Annotations/tests/System/ComponentModel/DataAnnotations/DisplayAttributeTests.cs
+15Lines changed: 15 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -191,5 +191,20 @@ public void Order_Get_Set(int value)
0 commit comments