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);
        }
Ejemplo n.º 2
0
 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)));
 }
Ejemplo n.º 3
0
 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()));
 }