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)); }
public NamingRegisterRequest Decode(byte[] data) { AvroNamingRegisterRequest request = AvroUtils.AvroDeserialize <AvroNamingRegisterRequest>(data); return(new NamingRegisterRequest(new NameAssignment(request.id, request.host, request.port))); }
public NamingUnregisterRequest Decode(byte[] data) { AvroNamingUnRegisterRequest request = AvroUtils.AvroDeserialize <AvroNamingUnRegisterRequest>(data); return(new NamingUnregisterRequest(request.id)); }
public NamingLookupRequest Decode(byte[] data) { AvroNamingLookupRequest request = AvroUtils.AvroDeserialize <AvroNamingLookupRequest>(data); return(new NamingLookupRequest(request.ids)); }