public static void TypeValidator(object value) { var type = (Type)value; if (!typeof(IMinerFactory).IsAssignableFrom(type)) throw new ArgumentException("Type of miner factory must extend BitMaker.Miner.IMinerFactory."); }