Skip to content

Commit

Permalink
add corelib helper (dotnet#31739)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoRossignoli authored and jkotas committed Aug 13, 2018
1 parent 9301706 commit e62a4bd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/System.ComponentModel.TypeConverter/src/ILLinkTrim.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<linker>
<assembly fullname="System.ComponentModel.TypeConverter">
<type fullname="System.ComponentModel.TypeDescriptor">
<!-- called through reflection by System.ComponentModel.DefaultValueAttribute -->
<method name="ConvertFromInvariantString" />
</type>
</assembly>
</linker>
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,12 @@ public static TypeConverter GetConverter(Type type)
return GetDescriptor(type, nameof(type)).GetConverter();
}

// This is called by System.ComponentModel.DefaultValueAttribute via reflection.
private static object ConvertFromInvariantString(Type type, string stringValue)
{
return GetConverter(type).ConvertFromInvariantString(stringValue);
}

/// <summary>
/// Gets the default event for the specified type of component.
/// </summary>
Expand Down

0 comments on commit e62a4bd

Please sign in to comment.