public static byte[] WriteSDP(SDP value) { var pipe = new Pipe(); WriteSDP(pipe.Writer, value); pipe.Writer.Complete(); var serialized = pipe.Reader.ReadAsync().Result.Buffer.ToArray(); return(serialized); }
public static void WriteSDP(PipeWriter writer, SDP value) { Serializer.Instance.WriteValue(writer, value); }