oclockvn
2/24/2018 - 4:36 PM

type converter new

type converter new

public class FooToBarConverter : ITypeConverter<Foo, Bar>
{
    public Bar Convert(ResolutionContext context)
    {
        if (context.IsSourceValueNull) return null;
        var p = context.SourceValue as Foo;

        return new Bar
        {
            // ...
        };
    }
}