Polymorphic deserialization with YamlDotNet

Suppose you have a Shape class and derived classes Rectangle , Circle , and Triangle : public abstract class Shape ; public sealed class Rectangle : Shape { [YamlMember(Alias = 'width')] public int? Width { get ; set ; } [YamlMember(Alias = 'height')] public int? Height { get ; set ; } } public sealed class Circle : Shape { [YamlMember(Alias = 'radius')] public int? Radius { get ; set ; } } public…