-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathSinksExternal.cs
More file actions
61 lines (50 loc) · 2.3 KB
/
Copy pathSinksExternal.cs
File metadata and controls
61 lines (50 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
using System.Collections.Generic;
using System.Linq;
using ServiceStack;
using System.Threading.Tasks;
using System;
using Microsoft.Extensions.ObjectPool;
using System.IO;
namespace ServiceStackTest
{
public class ResponseDto { }
public class ReqDto1 : IReturn<ResponseDto> { }
public class ReqDto2 : IReturnVoid { }
public class C
{
public async Task M()
{
var client = new JsonServiceClient("");
client.DeserializeFromStream<object>(new MemoryStream()); // not a sink
client.Get(new ReqDto1());
client.Get(new ReqDto2());
client.Get<ResponseDto>("relativeOrAbsoluteUrl"); // not a sink
client.Get<ResponseDto>(new object());
client.Get("relativeOrAbsoluteUrl"); // not a sink
client.Get(new object());
await client.GetAsync<ResponseDto>("relativeOrAbsoluteUrl"); // not a sink
await client.GetAsync<ResponseDto>(new object());
await client.GetAsync(new ReqDto1());
await client.GetAsync(new ReqDto2());
client.CustomMethod("GET", new ReqDto2());
client.CustomMethod<ResponseDto>("GET", "relativeOrAbsoluteUrl", new ReqDto1());
client.CustomMethod<ResponseDto>("GET", new ReqDto1());
client.CustomMethod<ResponseDto>("GET", new object());
client.CustomMethod("GET", "relativeOrAbsoluteUrl", new object());
client.CustomMethod("GET", (IReturnVoid)null);
await client.CustomMethodAsync("GET", new ReqDto2());
await client.CustomMethodAsync<ResponseDto>("GET", "relativeOrAbsoluteUrl", new ReqDto1());
await client.CustomMethodAsync<ResponseDto>("GET", new ReqDto1());
await client.CustomMethodAsync<ResponseDto>("GET", new object());
client.DownloadBytes("GET", "requestUri", new object());
await client.DownloadBytesAsync("GET", "relativeOrAbsoluteUrl", new object());
client.Head(new object());
client.Patch(new object());
client.Post(new object());
client.Put(new object());
client.Send<ResponseDto>(new object());
client.Publish(new ReqDto1());
client.SendOneWay(new object());
}
}
}