-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Example of code diagnostic:
[GenerateMapper(options: MappingOptions.AllowIConvertable)]
public partial class MapperClass
{
[UseFormatProvider]
private static IFormatProvider Default => CultureInfo.CurrentCulture;
[UseFormatProvider]
private static IFormatProvider SecondDefault => CultureInfo.InvariantCulture;
[UseFormatProvider<int, string>]
[UseFormatProvider<int, string>]
private static IFormatProvider IntStringFormat => CultureInfo.InvariantCulture;
}2 Defaults or 2 with the same type declarations will cause a generator exception, only one should be allowed but the following is ok.
[GenerateMapper(options: MappingOptions.AllowIConvertable)]
public partial class MapperClass
{
[UseFormatProvider]
private static IFormatProvider Default => CultureInfo.CurrentCulture;
[UseFormatProvider<int, string>]
[UseFormatProvider<string, int>]
private static IFormatProvider IntStringFormat => CultureInfo.InvariantCulture;
}Reactions are currently unavailable