Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip the ILLinkTrim.xml file from the System.ComponentModel.TypeConverter assembly #37402

Merged
merged 5 commits into from
Jun 5, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
Expand Down Expand Up @@ -601,6 +602,7 @@ internal sealed class LicenseInteropProxy
// LicenseContext
private readonly MethodInfo _setSavedLicenseKey;

[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.DefaultConstructor)]
private readonly Type _licInfoHelper;
private readonly MethodInfo _licInfoHelperContains;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2320,7 +2320,7 @@ public static void Refresh(Assembly assembly)
public static Type ComObjectType
{
[PreserveDependency(".ctor", "System.ComponentModel.TypeDescriptor/TypeDescriptorComObject")]
[PreserveDependency(".ctor", "System.ComponentModel.TypeDescriptor/ComNativeDescriptorProxy")] // TODO: https://github.com/mono/linker/issues/801
[PreserveDependency(".ctor", "System.ComponentModel.TypeDescriptor/ComNativeDescriptorProxy")]
layomia marked this conversation as resolved.
Show resolved Hide resolved
get => typeof(TypeDescriptorComObject);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Diagnostics.CodeAnalysis;

namespace System.ComponentModel
{
[AttributeUsage(AttributeTargets.Class, Inherited = true)]
Expand All @@ -10,7 +12,7 @@ public sealed class TypeDescriptionProviderAttribute : Attribute
/// <summary>
/// Creates a new TypeDescriptionProviderAttribute object.
/// </summary>
public TypeDescriptionProviderAttribute(string typeName)
public TypeDescriptionProviderAttribute([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.DefaultConstructor)] string typeName)
{
if (typeName == null)
{
Expand All @@ -23,7 +25,7 @@ public TypeDescriptionProviderAttribute(string typeName)
/// <summary>
/// Creates a new TypeDescriptionProviderAttribute object.
/// </summary>
public TypeDescriptionProviderAttribute(Type type)
public TypeDescriptionProviderAttribute([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.DefaultConstructor)] Type type)
{
if (type == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

using System.Globalization;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Threading;

namespace System.ComponentModel
Expand All @@ -27,6 +28,7 @@ public class DefaultValueAttribute : Attribute
/// class, converting the specified value to the specified type, and using the U.S. English
/// culture as the translation context.
/// </summary>
[PreserveDependency("ConvertFromInvariantString", "System.ComponentModel.TypeConverter", "System.ComponentModel.TypeConverter")]
layomia marked this conversation as resolved.
Show resolved Hide resolved
public DefaultValueAttribute(Type type, string? value)
{
// The null check and try/catch here are because attributes should never throw exceptions.
Expand Down