LilyGrpc.cs 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  1. // <auto-generated>
  2. // Generated by the protocol buffer compiler. DO NOT EDIT!
  3. // source: lily.proto
  4. // </auto-generated>
  5. #pragma warning disable 0414, 1591, 8981, 0612
  6. #region Designer generated code
  7. using grpc = global::Grpc.Core;
  8. namespace Palm.Lily.V1 {
  9. public static partial class Excel
  10. {
  11. static readonly string __ServiceName = "palm.lily.v1.Excel";
  12. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  13. static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)
  14. {
  15. #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
  16. if (message is global::Google.Protobuf.IBufferMessage)
  17. {
  18. context.SetPayloadLength(message.CalculateSize());
  19. global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter());
  20. context.Complete();
  21. return;
  22. }
  23. #endif
  24. context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message));
  25. }
  26. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  27. static class __Helper_MessageCache<T>
  28. {
  29. public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
  30. }
  31. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  32. static T __Helper_DeserializeMessage<T>(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser<T> parser) where T : global::Google.Protobuf.IMessage<T>
  33. {
  34. #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
  35. if (__Helper_MessageCache<T>.IsBufferMessage)
  36. {
  37. return parser.ParseFrom(context.PayloadAsReadOnlySequence());
  38. }
  39. #endif
  40. return parser.ParseFrom(context.PayloadAsNewBuffer());
  41. }
  42. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  43. static readonly grpc::Marshaller<global::Palm.Lily.V1.File> __Marshaller_palm_lily_v1_File = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Palm.Lily.V1.File.Parser));
  44. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  45. static readonly grpc::Marshaller<global::Palm.Lily.V1.ExcelModel> __Marshaller_palm_lily_v1_ExcelModel = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Palm.Lily.V1.ExcelModel.Parser));
  46. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  47. static readonly grpc::Method<global::Palm.Lily.V1.File, global::Palm.Lily.V1.ExcelModel> __Method_Parse = new grpc::Method<global::Palm.Lily.V1.File, global::Palm.Lily.V1.ExcelModel>(
  48. grpc::MethodType.Unary,
  49. __ServiceName,
  50. "Parse",
  51. __Marshaller_palm_lily_v1_File,
  52. __Marshaller_palm_lily_v1_ExcelModel);
  53. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  54. static readonly grpc::Method<global::Palm.Lily.V1.ExcelModel, global::Palm.Lily.V1.File> __Method_Generate = new grpc::Method<global::Palm.Lily.V1.ExcelModel, global::Palm.Lily.V1.File>(
  55. grpc::MethodType.Unary,
  56. __ServiceName,
  57. "Generate",
  58. __Marshaller_palm_lily_v1_ExcelModel,
  59. __Marshaller_palm_lily_v1_File);
  60. /// <summary>Service descriptor</summary>
  61. public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
  62. {
  63. get { return global::Palm.Lily.V1.LilyReflection.Descriptor.Services[0]; }
  64. }
  65. /// <summary>Base class for server-side implementations of Excel</summary>
  66. [grpc::BindServiceMethod(typeof(Excel), "BindService")]
  67. public abstract partial class ExcelBase
  68. {
  69. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  70. public virtual global::System.Threading.Tasks.Task<global::Palm.Lily.V1.ExcelModel> Parse(global::Palm.Lily.V1.File request, grpc::ServerCallContext context)
  71. {
  72. throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
  73. }
  74. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  75. public virtual global::System.Threading.Tasks.Task<global::Palm.Lily.V1.File> Generate(global::Palm.Lily.V1.ExcelModel request, grpc::ServerCallContext context)
  76. {
  77. throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
  78. }
  79. }
  80. /// <summary>Client for Excel</summary>
  81. public partial class ExcelClient : grpc::ClientBase<ExcelClient>
  82. {
  83. /// <summary>Creates a new client for Excel</summary>
  84. /// <param name="channel">The channel to use to make remote calls.</param>
  85. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  86. public ExcelClient(grpc::ChannelBase channel) : base(channel)
  87. {
  88. }
  89. /// <summary>Creates a new client for Excel that uses a custom <c>CallInvoker</c>.</summary>
  90. /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
  91. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  92. public ExcelClient(grpc::CallInvoker callInvoker) : base(callInvoker)
  93. {
  94. }
  95. /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
  96. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  97. protected ExcelClient() : base()
  98. {
  99. }
  100. /// <summary>Protected constructor to allow creation of configured clients.</summary>
  101. /// <param name="configuration">The client configuration.</param>
  102. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  103. protected ExcelClient(ClientBaseConfiguration configuration) : base(configuration)
  104. {
  105. }
  106. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  107. public virtual global::Palm.Lily.V1.ExcelModel Parse(global::Palm.Lily.V1.File request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  108. {
  109. return Parse(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  110. }
  111. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  112. public virtual global::Palm.Lily.V1.ExcelModel Parse(global::Palm.Lily.V1.File request, grpc::CallOptions options)
  113. {
  114. return CallInvoker.BlockingUnaryCall(__Method_Parse, null, options, request);
  115. }
  116. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  117. public virtual grpc::AsyncUnaryCall<global::Palm.Lily.V1.ExcelModel> ParseAsync(global::Palm.Lily.V1.File request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  118. {
  119. return ParseAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  120. }
  121. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  122. public virtual grpc::AsyncUnaryCall<global::Palm.Lily.V1.ExcelModel> ParseAsync(global::Palm.Lily.V1.File request, grpc::CallOptions options)
  123. {
  124. return CallInvoker.AsyncUnaryCall(__Method_Parse, null, options, request);
  125. }
  126. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  127. public virtual global::Palm.Lily.V1.File Generate(global::Palm.Lily.V1.ExcelModel request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  128. {
  129. return Generate(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  130. }
  131. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  132. public virtual global::Palm.Lily.V1.File Generate(global::Palm.Lily.V1.ExcelModel request, grpc::CallOptions options)
  133. {
  134. return CallInvoker.BlockingUnaryCall(__Method_Generate, null, options, request);
  135. }
  136. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  137. public virtual grpc::AsyncUnaryCall<global::Palm.Lily.V1.File> GenerateAsync(global::Palm.Lily.V1.ExcelModel request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  138. {
  139. return GenerateAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  140. }
  141. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  142. public virtual grpc::AsyncUnaryCall<global::Palm.Lily.V1.File> GenerateAsync(global::Palm.Lily.V1.ExcelModel request, grpc::CallOptions options)
  143. {
  144. return CallInvoker.AsyncUnaryCall(__Method_Generate, null, options, request);
  145. }
  146. /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
  147. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  148. protected override ExcelClient NewInstance(ClientBaseConfiguration configuration)
  149. {
  150. return new ExcelClient(configuration);
  151. }
  152. }
  153. /// <summary>Creates service definition that can be registered with a server</summary>
  154. /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
  155. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  156. public static grpc::ServerServiceDefinition BindService(ExcelBase serviceImpl)
  157. {
  158. return grpc::ServerServiceDefinition.CreateBuilder()
  159. .AddMethod(__Method_Parse, serviceImpl.Parse)
  160. .AddMethod(__Method_Generate, serviceImpl.Generate).Build();
  161. }
  162. /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic.
  163. /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
  164. /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
  165. /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
  166. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  167. public static void BindService(grpc::ServiceBinderBase serviceBinder, ExcelBase serviceImpl)
  168. {
  169. serviceBinder.AddMethod(__Method_Parse, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Palm.Lily.V1.File, global::Palm.Lily.V1.ExcelModel>(serviceImpl.Parse));
  170. serviceBinder.AddMethod(__Method_Generate, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Palm.Lily.V1.ExcelModel, global::Palm.Lily.V1.File>(serviceImpl.Generate));
  171. }
  172. }
  173. public static partial class Tex
  174. {
  175. static readonly string __ServiceName = "palm.lily.v1.Tex";
  176. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  177. static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)
  178. {
  179. #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
  180. if (message is global::Google.Protobuf.IBufferMessage)
  181. {
  182. context.SetPayloadLength(message.CalculateSize());
  183. global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter());
  184. context.Complete();
  185. return;
  186. }
  187. #endif
  188. context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message));
  189. }
  190. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  191. static class __Helper_MessageCache<T>
  192. {
  193. public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
  194. }
  195. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  196. static T __Helper_DeserializeMessage<T>(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser<T> parser) where T : global::Google.Protobuf.IMessage<T>
  197. {
  198. #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
  199. if (__Helper_MessageCache<T>.IsBufferMessage)
  200. {
  201. return parser.ParseFrom(context.PayloadAsReadOnlySequence());
  202. }
  203. #endif
  204. return parser.ParseFrom(context.PayloadAsNewBuffer());
  205. }
  206. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  207. static readonly grpc::Marshaller<global::Palm.Lily.V1.TexToRequest> __Marshaller_palm_lily_v1_TexToRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Palm.Lily.V1.TexToRequest.Parser));
  208. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  209. static readonly grpc::Marshaller<global::Palm.Lily.V1.File> __Marshaller_palm_lily_v1_File = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Palm.Lily.V1.File.Parser));
  210. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  211. static readonly grpc::Method<global::Palm.Lily.V1.TexToRequest, global::Palm.Lily.V1.File> __Method_ToPdf = new grpc::Method<global::Palm.Lily.V1.TexToRequest, global::Palm.Lily.V1.File>(
  212. grpc::MethodType.Unary,
  213. __ServiceName,
  214. "ToPdf",
  215. __Marshaller_palm_lily_v1_TexToRequest,
  216. __Marshaller_palm_lily_v1_File);
  217. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  218. static readonly grpc::Method<global::Palm.Lily.V1.TexToRequest, global::Palm.Lily.V1.File> __Method_ToWord = new grpc::Method<global::Palm.Lily.V1.TexToRequest, global::Palm.Lily.V1.File>(
  219. grpc::MethodType.Unary,
  220. __ServiceName,
  221. "ToWord",
  222. __Marshaller_palm_lily_v1_TexToRequest,
  223. __Marshaller_palm_lily_v1_File);
  224. /// <summary>Service descriptor</summary>
  225. public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
  226. {
  227. get { return global::Palm.Lily.V1.LilyReflection.Descriptor.Services[1]; }
  228. }
  229. /// <summary>Base class for server-side implementations of Tex</summary>
  230. [grpc::BindServiceMethod(typeof(Tex), "BindService")]
  231. public abstract partial class TexBase
  232. {
  233. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  234. public virtual global::System.Threading.Tasks.Task<global::Palm.Lily.V1.File> ToPdf(global::Palm.Lily.V1.TexToRequest request, grpc::ServerCallContext context)
  235. {
  236. throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
  237. }
  238. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  239. public virtual global::System.Threading.Tasks.Task<global::Palm.Lily.V1.File> ToWord(global::Palm.Lily.V1.TexToRequest request, grpc::ServerCallContext context)
  240. {
  241. throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
  242. }
  243. }
  244. /// <summary>Client for Tex</summary>
  245. public partial class TexClient : grpc::ClientBase<TexClient>
  246. {
  247. /// <summary>Creates a new client for Tex</summary>
  248. /// <param name="channel">The channel to use to make remote calls.</param>
  249. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  250. public TexClient(grpc::ChannelBase channel) : base(channel)
  251. {
  252. }
  253. /// <summary>Creates a new client for Tex that uses a custom <c>CallInvoker</c>.</summary>
  254. /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
  255. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  256. public TexClient(grpc::CallInvoker callInvoker) : base(callInvoker)
  257. {
  258. }
  259. /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
  260. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  261. protected TexClient() : base()
  262. {
  263. }
  264. /// <summary>Protected constructor to allow creation of configured clients.</summary>
  265. /// <param name="configuration">The client configuration.</param>
  266. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  267. protected TexClient(ClientBaseConfiguration configuration) : base(configuration)
  268. {
  269. }
  270. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  271. public virtual global::Palm.Lily.V1.File ToPdf(global::Palm.Lily.V1.TexToRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  272. {
  273. return ToPdf(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  274. }
  275. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  276. public virtual global::Palm.Lily.V1.File ToPdf(global::Palm.Lily.V1.TexToRequest request, grpc::CallOptions options)
  277. {
  278. return CallInvoker.BlockingUnaryCall(__Method_ToPdf, null, options, request);
  279. }
  280. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  281. public virtual grpc::AsyncUnaryCall<global::Palm.Lily.V1.File> ToPdfAsync(global::Palm.Lily.V1.TexToRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  282. {
  283. return ToPdfAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  284. }
  285. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  286. public virtual grpc::AsyncUnaryCall<global::Palm.Lily.V1.File> ToPdfAsync(global::Palm.Lily.V1.TexToRequest request, grpc::CallOptions options)
  287. {
  288. return CallInvoker.AsyncUnaryCall(__Method_ToPdf, null, options, request);
  289. }
  290. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  291. public virtual global::Palm.Lily.V1.File ToWord(global::Palm.Lily.V1.TexToRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  292. {
  293. return ToWord(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  294. }
  295. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  296. public virtual global::Palm.Lily.V1.File ToWord(global::Palm.Lily.V1.TexToRequest request, grpc::CallOptions options)
  297. {
  298. return CallInvoker.BlockingUnaryCall(__Method_ToWord, null, options, request);
  299. }
  300. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  301. public virtual grpc::AsyncUnaryCall<global::Palm.Lily.V1.File> ToWordAsync(global::Palm.Lily.V1.TexToRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  302. {
  303. return ToWordAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  304. }
  305. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  306. public virtual grpc::AsyncUnaryCall<global::Palm.Lily.V1.File> ToWordAsync(global::Palm.Lily.V1.TexToRequest request, grpc::CallOptions options)
  307. {
  308. return CallInvoker.AsyncUnaryCall(__Method_ToWord, null, options, request);
  309. }
  310. /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
  311. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  312. protected override TexClient NewInstance(ClientBaseConfiguration configuration)
  313. {
  314. return new TexClient(configuration);
  315. }
  316. }
  317. /// <summary>Creates service definition that can be registered with a server</summary>
  318. /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
  319. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  320. public static grpc::ServerServiceDefinition BindService(TexBase serviceImpl)
  321. {
  322. return grpc::ServerServiceDefinition.CreateBuilder()
  323. .AddMethod(__Method_ToPdf, serviceImpl.ToPdf)
  324. .AddMethod(__Method_ToWord, serviceImpl.ToWord).Build();
  325. }
  326. /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic.
  327. /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
  328. /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
  329. /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
  330. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  331. public static void BindService(grpc::ServiceBinderBase serviceBinder, TexBase serviceImpl)
  332. {
  333. serviceBinder.AddMethod(__Method_ToPdf, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Palm.Lily.V1.TexToRequest, global::Palm.Lily.V1.File>(serviceImpl.ToPdf));
  334. serviceBinder.AddMethod(__Method_ToWord, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Palm.Lily.V1.TexToRequest, global::Palm.Lily.V1.File>(serviceImpl.ToWord));
  335. }
  336. }
  337. public static partial class Epub
  338. {
  339. static readonly string __ServiceName = "palm.lily.v1.Epub";
  340. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  341. static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)
  342. {
  343. #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
  344. if (message is global::Google.Protobuf.IBufferMessage)
  345. {
  346. context.SetPayloadLength(message.CalculateSize());
  347. global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter());
  348. context.Complete();
  349. return;
  350. }
  351. #endif
  352. context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message));
  353. }
  354. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  355. static class __Helper_MessageCache<T>
  356. {
  357. public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
  358. }
  359. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  360. static T __Helper_DeserializeMessage<T>(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser<T> parser) where T : global::Google.Protobuf.IMessage<T>
  361. {
  362. #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
  363. if (__Helper_MessageCache<T>.IsBufferMessage)
  364. {
  365. return parser.ParseFrom(context.PayloadAsReadOnlySequence());
  366. }
  367. #endif
  368. return parser.ParseFrom(context.PayloadAsNewBuffer());
  369. }
  370. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  371. static readonly grpc::Marshaller<global::Palm.Lily.V1.EpubBuildRequest> __Marshaller_palm_lily_v1_EpubBuildRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Palm.Lily.V1.EpubBuildRequest.Parser));
  372. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  373. static readonly grpc::Marshaller<global::Palm.Lily.V1.File> __Marshaller_palm_lily_v1_File = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Palm.Lily.V1.File.Parser));
  374. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  375. static readonly grpc::Method<global::Palm.Lily.V1.EpubBuildRequest, global::Palm.Lily.V1.File> __Method_Build = new grpc::Method<global::Palm.Lily.V1.EpubBuildRequest, global::Palm.Lily.V1.File>(
  376. grpc::MethodType.Unary,
  377. __ServiceName,
  378. "Build",
  379. __Marshaller_palm_lily_v1_EpubBuildRequest,
  380. __Marshaller_palm_lily_v1_File);
  381. /// <summary>Service descriptor</summary>
  382. public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
  383. {
  384. get { return global::Palm.Lily.V1.LilyReflection.Descriptor.Services[2]; }
  385. }
  386. /// <summary>Base class for server-side implementations of Epub</summary>
  387. [grpc::BindServiceMethod(typeof(Epub), "BindService")]
  388. public abstract partial class EpubBase
  389. {
  390. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  391. public virtual global::System.Threading.Tasks.Task<global::Palm.Lily.V1.File> Build(global::Palm.Lily.V1.EpubBuildRequest request, grpc::ServerCallContext context)
  392. {
  393. throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
  394. }
  395. }
  396. /// <summary>Client for Epub</summary>
  397. public partial class EpubClient : grpc::ClientBase<EpubClient>
  398. {
  399. /// <summary>Creates a new client for Epub</summary>
  400. /// <param name="channel">The channel to use to make remote calls.</param>
  401. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  402. public EpubClient(grpc::ChannelBase channel) : base(channel)
  403. {
  404. }
  405. /// <summary>Creates a new client for Epub that uses a custom <c>CallInvoker</c>.</summary>
  406. /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
  407. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  408. public EpubClient(grpc::CallInvoker callInvoker) : base(callInvoker)
  409. {
  410. }
  411. /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
  412. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  413. protected EpubClient() : base()
  414. {
  415. }
  416. /// <summary>Protected constructor to allow creation of configured clients.</summary>
  417. /// <param name="configuration">The client configuration.</param>
  418. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  419. protected EpubClient(ClientBaseConfiguration configuration) : base(configuration)
  420. {
  421. }
  422. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  423. public virtual global::Palm.Lily.V1.File Build(global::Palm.Lily.V1.EpubBuildRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  424. {
  425. return Build(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  426. }
  427. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  428. public virtual global::Palm.Lily.V1.File Build(global::Palm.Lily.V1.EpubBuildRequest request, grpc::CallOptions options)
  429. {
  430. return CallInvoker.BlockingUnaryCall(__Method_Build, null, options, request);
  431. }
  432. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  433. public virtual grpc::AsyncUnaryCall<global::Palm.Lily.V1.File> BuildAsync(global::Palm.Lily.V1.EpubBuildRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
  434. {
  435. return BuildAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
  436. }
  437. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  438. public virtual grpc::AsyncUnaryCall<global::Palm.Lily.V1.File> BuildAsync(global::Palm.Lily.V1.EpubBuildRequest request, grpc::CallOptions options)
  439. {
  440. return CallInvoker.AsyncUnaryCall(__Method_Build, null, options, request);
  441. }
  442. /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
  443. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  444. protected override EpubClient NewInstance(ClientBaseConfiguration configuration)
  445. {
  446. return new EpubClient(configuration);
  447. }
  448. }
  449. /// <summary>Creates service definition that can be registered with a server</summary>
  450. /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
  451. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  452. public static grpc::ServerServiceDefinition BindService(EpubBase serviceImpl)
  453. {
  454. return grpc::ServerServiceDefinition.CreateBuilder()
  455. .AddMethod(__Method_Build, serviceImpl.Build).Build();
  456. }
  457. /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic.
  458. /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
  459. /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
  460. /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
  461. [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
  462. public static void BindService(grpc::ServiceBinderBase serviceBinder, EpubBase serviceImpl)
  463. {
  464. serviceBinder.AddMethod(__Method_Build, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Palm.Lily.V1.EpubBuildRequest, global::Palm.Lily.V1.File>(serviceImpl.Build));
  465. }
  466. }
  467. }
  468. #endregion