.NET Fiddle

CSharp · Console

/Program.cs

using System;
using Mapster;
					
public class Program
{
	public static void Main()
	{
		
		TypeAdapterConfig<(Source1, Source2), Dest>.NewConfig()
                .Map(dest => dest, src => src.Item1)
                .Map(dest => dest, src => src.Item2);
		
		var src1 = new Source1{MyInt = 1};
		var src2 = new Source2{MyString = "Hello"};
		
		//Doesnt work
		var destTuple = Tuple.Create(src1, src2).Adapt<Dest>();
		
		//Works
		var destSrc1 = src1.Adapt<Dest>();
		var destSrc2 = src2.Adapt<Dest>();
		
		Console.WriteLine($"Tuple Mapping {destTuple.MyInt} {destTuple.MyString}");
		Console.WriteLine($"Regular Mapping src1 {destSrc1.MyInt} {destSrc1.MyString}");
		Console.WriteLine($"Regular Mapping src2 {destSrc2.MyInt} {destSrc2.MyString}");
	}
}

internal sealed class Source1 {
	public int MyInt {get; init;}
}

public class Source2 {
	public string MyString {get; init;}
}

public record Dest {
	public int MyInt {get; init;} 
	public string MyString {get; init;}
}
;