private DiscoveredMethod ConvertToProto(IDiscoveredMethod method) { var proto = DiscoveredMethod.Rent(); proto.MethodType = ConvertToProto(method.MethodType); proto.InputMessageId = method.InputMessageId.ConvertToProtoStrict(); proto.OutputMessageId = method.OutputMessageId.ConvertToProtoStrict(); proto.MethodTitle = method.MethodTitle.ConvertToProto(); proto.ProvidedMethod = ConvertToProtoStrict(method.ProvidedMethod); return(proto); }
private static DiscoveredMethod Convert(IDiscoveredMethod method) { return(new DiscoveredMethod( new ProvidedMethodReference( new ProvidedServiceReference( method.ProvidedMethod.ProvidedService.ServiceId, method.ProvidedMethod.ProvidedService.ServiceAlias, method.ProvidedMethod.ProvidedService.ApplicationId, method.ProvidedMethod.ProvidedService.ConnectionId), method.ProvidedMethod.MethodId), method.MethodTitle, method.InputMessageId, method.OutputMessageId, Convert(method.MethodType))); }
private static DiscoveredMethod Convert(IDiscoveredMethod method) { return(new DiscoveredMethod( new ProvidedMethodReference( new ProvidedServiceReference( method.ProvidedMethod.ProvidedService.ServiceId, method.ProvidedMethod.ProvidedService.ServiceAlias, method.ProvidedMethod.ProvidedService.ApplicationId, method.ProvidedMethod.ProvidedService.ConnectionId, method.ProvidedMethod.ProvidedService.ApplicationInstanceId), method.ProvidedMethod.MethodId), method.MethodTitle, method.InputMessageId, method.OutputMessageId, Convert(method.MethodType), method.Options.Select(x => new Option(x.Id, x.Value)).ToList())); }