public override byte[] ToBinary(object obj) { if (obj == null) return null; if (obj is byte[]) return (byte[]) obj; throw new NotSupportedException(); }