C#은 현대 언어가 가지고 있는 Rust언어의 유니온 형식을 지원하지 않습니다. 이 라이브러리는 유니온 형식을 C#에서 사용할 수 있도록 합니다.
OneOf<string, ColorName, Color> backgroundColor = ...;
Color c = backgroundColor.Match(
str => CssHelper.GetColorFromString(str),
name => new Color(name),
col => col
);
_window.BackgroundColor = c;