public GrpcBroker(QueryEnvelope queryEnvelope) { var registeredTypeDefinitions = JsonConvert.DeserializeObject <PortableTypeDefinition[]>(queryEnvelope.RegisteredTypes); RegisteredTypes = new PortableTypeBuilder().BuildTypes(registeredTypeDefinitions); SourceType = RegisteredTypes.Single(t => t.FullName == queryEnvelope.SourceTypeName); _subject = new Subject <object>(); var queryExpression = SerializationHelper.DeserializeLinqExpression(queryEnvelope.Payload, RegisteredTypes); Observable = new ServerQueryObservable <object>(SourceType, _subject.AsQbservable(), queryExpression); }
public void Setup() { _sutAlice = new PortableTypeDefiner(); _sutBob = new PortableTypeBuilder(); }