var protocol = new TBinaryProtocol(new TStreamTransport(stream, stream)); await protocol.ReadMapEndAsync(CancellationToken.None);This code creates a new instance of a binary protocol with a stream transport, and then reads the end of a map structure using the ReadMapEndAsync method. Package library: Apache Thrift C# library.