Debian Codegraph @

lib/netstd/Tests/Thrift.Compile.Tests/Thrift.Compile.netstd2/Impl/Thrift5253/MyService.cs

raw
1 // Licensed to the Apache Software Foundation(ASF) under one
2 // or more contributor license agreements.See the NOTICE file
3 // distributed with this work for additional information
4 // regarding copyright ownership.The ASF licenses this file
5 // to you under the Apache License, Version 2.0 (the
6 // "License"); you may not use this file except in compliance
7 // with the License. You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing,
12 // software distributed under the License is distributed on an
13 // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 // KIND, either express or implied. See the License for the
15 // specific language governing permissions and limitations
16 // under the License.
17
18 using System;
19 using System.Collections.Generic;
20 using System.Text;
21 using System.Threading;
22 using System.Threading.Tasks;
23 using Thrift5253;
24
25 namespace Thrift.Compile.netstd2.Impl.Thrift5253
26 {
27 class MyServiceImpl : MyService.IAsync
28 {
29 public Task<AsyncProcessor> AsyncProcessor_(AsyncProcessor input, CancellationToken cancellationToken = default)
30 {
31 return Task.FromResult(new AsyncProcessor() { Foo = input?.Foo ?? 0 });
32 }
33
34 public Task<BrokenResult> Broken(BrokenArgs input, CancellationToken cancellationToken = default)
35 {
36 return Task.FromResult(new BrokenResult() { Foo = input?.Foo ?? 0 });
37 }
38
39 public Task<Client> Client_(Client input, CancellationToken cancellationToken = default)
40 {
41 _ = cancellationToken;
42 return Task.FromResult(new Client() { Foo = input?.Foo ?? 0 });
43 }
44
45 public Task<IAsync> IAsync_(IAsync input, CancellationToken cancellationToken = default)
46 {
47 return Task.FromResult(new IAsync() { Foo = input?.Foo ?? 0 });
48 }
49
50 public Task<InternalStructs> InternalStructs_(InternalStructs input, CancellationToken cancellationToken = default)
51 {
52 return Task.FromResult(new InternalStructs() { Foo = input?.Foo ?? 0 });
53 }
54
55 public Task TestAsync(CancellationToken cancellationToken = default)
56 {
57 return Task.CompletedTask;
58 }
59
60 public Task TestXsync(CancellationToken cancellationToken = default)
61 {
62 return Task.CompletedTask;
63 }
64
65 public Task<WorksRslt> Works(WorksArrrgs input, CancellationToken cancellationToken = default)
66 {
67 return Task.FromResult(new WorksRslt() { Foo = input?.Foo ?? 0 });
68 }
69 }
70 }