You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
void Main()
{
var sourceOptions = new SourceOptions();
// RuntimeBinderException thrown here ("Cannot invoke a non-delegate type")
sourceOptions.Adapt<DestinationOptions>();
}
internal class SourceOptions
{
public string Value { get; set; }
}
internal class DestinationOptions
{
public string Value { get; set; }
}
Alternative 1:
void Main()
{
var sourceOptions = new SourceOptions();
sourceOptions.Adapt<DestinationOptions>();
}
public class SourceOptions
{
public string Value { get; set; }
}
internal class DestinationOptions
{
public string Value { get; set; }
}
Alternative 2:
void Main()
{
var sourceOptions = new SourceOptions();
sourceOptions.Adapt<SourceOptions, DestinationOptions>(new DestinationOptions());
}
internal class SourceOptions
{
public string Value { get; set; }
}
internal class DestinationOptions
{
public string Value { get; set; }
}
The text was updated successfully, but these errors were encountered:
Hi,
FYI this use case is not supported:
Alternative 1:
Alternative 2:
The text was updated successfully, but these errors were encountered: