コード例 #1
0
        public NamingLookupResponse Decode(byte[] data)
        {
            AvroNamingLookupResponse response    = AvroUtils.AvroDeserialize <AvroNamingLookupResponse>(data);
            List <NameAssignment>    assignments =
                response.tuples.Select(x => new NameAssignment(x.id, x.host, x.port)).ToList();

            return(new NamingLookupResponse(assignments));
        }
コード例 #2
0
        public NamingRegisterRequest Decode(byte[] data)
        {
            AvroNamingRegisterRequest request = AvroUtils.AvroDeserialize <AvroNamingRegisterRequest>(data);

            return(new NamingRegisterRequest(new NameAssignment(request.id, request.host, request.port)));
        }
コード例 #3
0
        public NamingUnregisterRequest Decode(byte[] data)
        {
            AvroNamingUnRegisterRequest request = AvroUtils.AvroDeserialize <AvroNamingUnRegisterRequest>(data);

            return(new NamingUnregisterRequest(request.id));
        }
コード例 #4
0
        public NamingLookupRequest Decode(byte[] data)
        {
            AvroNamingLookupRequest request = AvroUtils.AvroDeserialize <AvroNamingLookupRequest>(data);

            return(new NamingLookupRequest(request.ids));
        }