示例#1
0
 public void Visit(Service service)
 {
     if (!string.IsNullOrEmpty(GenServiceTweak) && _config.ContainsTweak(GenServiceTweak))
     {
         EnsureCheckHealthAvail(service);
         var serviceContext = _contextGenerator.ServiceFromIdl(service);
         Render(serviceContext, "service");
     }
     if (!string.IsNullOrEmpty(GenClientTweak) && _config.ContainsTweak(GenClientTweak))
     {
         var clientContext = _contextGenerator.ClientFromIdl(service);
         Render(clientContext, "client");
     }
 }
示例#2
0
 public void Visit(Service service)
 {
     if (!string.IsNullOrEmpty(GenClientTweak) && _config.ContainsTweak(GenClientTweak))
     {
         var clientContext = _contextGenerator.ClientFromIdl(service);
         foreach (var method in service.Methods)
         {
             var methodContext = _contextGenerator.MethodFromIdl(method);
             clientContext.AddMethod(methodContext);
         }
         Render(clientContext, "client");
     }
     if (!string.IsNullOrEmpty(GenServiceTweak) && _config.ContainsTweak(GenServiceTweak))
     {
         var serviceContext = _contextGenerator.ServiceFromIdl(service);
         foreach (var method in service.Methods)
         {
             var methodContext = _contextGenerator.MethodFromIdl(method);
             serviceContext.AddMethod(methodContext);
         }
         Render(serviceContext, "service");
     }
 }