-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDaprConst.cs
More file actions
50 lines (39 loc) · 2.17 KB
/
DaprConst.cs
File metadata and controls
50 lines (39 loc) · 2.17 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
using System.Collections.Generic;
using System.Runtime.InteropServices;
namespace FluentHttp.SourceGenerator
{
public static class DaprConst
{
public static readonly Dictionary<string, string> HttpMethod = new Dictionary<string, string>
{
{ "HTTP", "FluentHttp.Abstractions.FluentHttpAttribute" },
{ "GET", "FluentHttp.Abstractions.HttpGetAttribute" },
{ "POST", "FluentHttp.Abstractions.HttpPostAttribute" },
{ "DELETE", "FluentHttp.Abstractions.HttpDeleteAttribute" },
{ "PUT", "FluentHttp.Abstractions.HttpPutAttribute" },
{ "PATH", "FluentHttp.Abstractions.PathVariableAttribute" },
{ "FilePath","FluentHttp.Abstractions.FilePathVariableAttribute" },
{ "HttpFileUpload","FluentHttp.Abstractions.HttpFileUploadAttribute" },
{ "HttpFileUploadStream","FluentHttp.Abstractions.HttpFileUploadStreamAttribute" },
{ "Patch","FluentHttp.Abstractions.HttpPatchAttribute" },
{ "HttpResponseMessage","FluentHttp.Abstractions.HttpResponseMessageAttribute" }
};
public static readonly string Dapr = "DAPR";
public static readonly string Get = "GET";
public static readonly string Path = "PATH";
public static readonly string Post = "POST";
public static readonly string Delete = "DELETE";
public static readonly string Header = "Header";
public static readonly string AppId = "AppId";
public static readonly string Url = "Url";
public static readonly string ReturnString = "ReturnString";
public static readonly string Name = "Name";
public static readonly string Auth = "Auth";
public static readonly string UrlPrefix = "/";
public static readonly string MemberHttpMethod = "HttpMethod";
/// <summary>
/// Environment.NewLine 分析器不能用,需要禁止分析器
/// </summary>
public static string NewLine { get; set; } = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "\r\n" : "\n";
}
}