public void SetUp() { this.log = new List<string>(); this.converter = new DebugConverter(); this.converter.Logger = (msg, name) => log.Add(msg); }
static DebugConverter() { // Have to set this from within a static constructor, as it's run after the field initializers // Otherwise it gets called before the DependencyProperties have been created, and that causes the (normal) constructor to fall over Instance = new DebugConverter(); }