codebude/QRCoder

[Feature] Trimmability

Closed this issue · 0 comments

Type of issue

[ X] Request for new feature/improvement

Expected Behavior

QRCoder should support trimming scenarios (per @Shane32 's suggestion)

Current Behavior

master branch as of today (6b7311b) has 3 trimmer warnings:

\QRCoder\Extensions\StringValueAttribute.cs(46,13): Trim analysis warning IL2075: QRCoder.Exten
sions.CustomExtensions.GetStringValue(Enum): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicFields' in ca
ll to 'System.Type.GetField(String)'. The return value of method 'System.Object.GetType()' does not have matching annotations. Th
e source value must declare at least the same requirements as those declared on the target location it is assigned to.

\QRCoder\PayloadGenerator.cs(2636,17): Trim analysis warning IL2075: QRCoder.PayloadGenerator.R
ussiaPaymentOrder.GetMandatoryFieldsAsList(): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicFields' in c
all to 'System.Type.GetFields()'. The return value of method 'System.Object.GetType()' does not have matching annotations. The so
urce value must declare at least the same requirements as those declared on the target location it is assigned to.

\QRCoder\PayloadGenerator.cs(2608,17): Trim analysis warning IL2075: QRCoder.PayloadGenerator.R
ussiaPaymentOrder.GetOptionalFieldsAsList(): 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicProperties' i
n call to 'System.Type.GetProperties()'. The return value of method 'System.Object.GetType()' does not have matching annotations.
The source value must declare at least the same requirements as those declared on the target location it is assigned to.