protected void DoTest(TMemberInfo info) { var data = codec.EncodeSingle(info); var decoded = codec.DecodeSingle(data); Assert.That(decoded, Is.EqualTo(info)); }
public static bool TryDecodeSingle <T>(this IManualCodec <T> codec, byte[] data, out T value) { try { value = codec.DecodeSingle(data); return(true); } catch { value = default(T); return(false); } }