public struct Dest
{
public string Name { get; set; }
public string? NullableString { get; set; }
}
public struct Source
{
public string Name { get; set; }
}
public class Mapping : IRegister
{
public void Register(TypeAdapterConfig config)
{
config.NewConfig<Source, Dest>()
.Ignore(d => d.NullableString); // this string a got a warning message CS8603: Possible null reference return
}
}
I think that signature of Ignore method need to be
public TypeAdapterSetter<TSource, TDestination> Ignore(params Expression<Func<TDestination, object?>>[] members);
.Net 7.0 with nullable enabled
I think that signature of Ignore method need to be
public TypeAdapterSetter<TSource, TDestination> Ignore(params Expression<Func<TDestination, object?>>[] members);