-
Notifications
You must be signed in to change notification settings - Fork 159
Expand file tree
/
Copy pathTypes.cs
More file actions
256 lines (188 loc) · 8.29 KB
/
Copy pathTypes.cs
File metadata and controls
256 lines (188 loc) · 8.29 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.VisualStudio.Threading.Analyzers;
/// <summary>
/// Identifiers used to identify various types so that we can avoid adding dependency only if absolutely needed.
/// <devremarks>For each predefine value here, please update the unit test to detect if values go out of sync with the real types they represent.</devremarks>
/// </summary>
public static class Types
{
private const string VSThreadingNamespace = "Microsoft.VisualStudio.Threading";
public static class BclAsyncDisposable
{
public const string FullName = "System.IAsyncDisposable";
public const string PackageId = "Microsoft.Bcl.AsyncInterfaces";
}
public static class IAsyncDisposable
{
public const string FullName = "Microsoft.VisualStudio.Threading.IAsyncDisposable";
}
public static class AwaitExtensions
{
/// <summary>
/// The full name of the AwaitExtensions type.
/// </summary>
public const string TypeName = "AwaitExtensions";
/// <summary>
/// The name of the ConfigureAwaitRunInline method.
/// </summary>
public const string ConfigureAwaitRunInline = "ConfigureAwaitRunInline";
public static readonly ImmutableArray<string> Namespace = Namespaces.MicrosoftVisualStudioThreading;
}
/// <summary>
/// Contains the names of types and members within TplExtensions.
/// </summary>
public static class TplExtensions
{
/// <summary>
/// The full name of the TplExtensions type.
/// </summary>
public const string TypeName = "TplExtensions";
/// <summary>
/// The name of the InvokeAsync method.
/// </summary>
public const string InvokeAsync = "InvokeAsync";
/// <summary>
/// The name of the CompletedTask field.
/// </summary>
public const string CompletedTask = "CompletedTask";
/// <summary>
/// The name of the CanceledTask field.
/// </summary>
public const string CanceledTask = "CanceledTask";
/// <summary>
/// The name of the TrueTask field.
/// </summary>
public const string TrueTask = "TrueTask";
/// <summary>
/// The name of the FalseTask field.
/// </summary>
public const string FalseTask = "FalseTask";
public static readonly ImmutableArray<string> Namespace = Namespaces.MicrosoftVisualStudioThreading;
}
/// <summary>
/// Contains descriptors for the AsyncEventHandler type.
/// </summary>
public static class AsyncEventHandler
{
/// <summary>
/// The full name of the AsyncEventHandler type.
/// </summary>
public const string TypeName = "AsyncEventHandler";
public static readonly ImmutableArray<string> Namespace = Namespaces.MicrosoftVisualStudioThreading;
}
public static class AsyncMethodBuilderAttribute
{
public const string TypeName = nameof(System.Runtime.CompilerServices.AsyncMethodBuilderAttribute);
public static readonly ImmutableArray<string> Namespace = Namespaces.SystemRuntimeCompilerServices;
}
/// <summary>
/// Contains descriptors for the JoinableTaskFactory type.
/// </summary>
public static class JoinableTaskFactory
{
public const string TypeName = "JoinableTaskFactory";
public const string FullName = "Microsoft.VisualStudio.Threading." + TypeName;
/// <summary>
/// The name of the SwitchToMainThreadAsync method.
/// </summary>
public const string SwitchToMainThreadAsync = "SwitchToMainThreadAsync";
public const string Run = "Run";
public const string RunAsync = "RunAsync";
public static readonly ImmutableArray<string> Namespace = Namespaces.MicrosoftVisualStudioThreading;
}
/// <summary>
/// Contains descriptors for the JoinableTaskCollection type.
/// </summary>
public static class JoinableTaskCollection
{
public const string TypeName = "JoinableTaskCollection";
}
/// <summary>
/// Contains descriptors for the JoinableTaskContext type.
/// </summary>
public static class JoinableTaskContext
{
public const string TypeName = "JoinableTaskContext";
public const string FullName = $"{VSThreadingNamespace}.{TypeName}";
public const string CreateNoOpContext = "CreateNoOpContext";
}
public static class JoinableTask
{
public const string TypeName = "JoinableTask";
public const string Join = "Join";
public const string JoinAsync = "JoinAsync";
}
public static class SynchronizationContext
{
public const string TypeName = nameof(System.Threading.SynchronizationContext);
public const string Post = nameof(System.Threading.SynchronizationContext.Post);
public const string Send = nameof(System.Threading.SynchronizationContext.Send);
}
public static class ThreadHelper
{
public const string TypeName = "ThreadHelper";
public const string Invoke = "Invoke";
public const string InvokeAsync = "InvokeAsync";
public const string BeginInvoke = "BeginInvoke";
public const string CheckAccess = "CheckAccess";
}
public static class Dispatcher
{
public const string TypeName = "Dispatcher";
public const string Invoke = "Invoke";
public const string BeginInvoke = "BeginInvoke";
public const string InvokeAsync = "InvokeAsync";
}
public static class Task
{
public const string TypeName = nameof(System.Threading.Tasks.Task);
public const string FullName = "System.Threading.Tasks." + TypeName;
public const string CompletedTask = nameof(System.Threading.Tasks.Task.CompletedTask);
public const string WhenAll = "WhenAll";
public static readonly ImmutableArray<string> Namespace = Namespaces.SystemThreadingTasks;
}
public static class ConfiguredTaskAwaitable
{
public const string TypeName = nameof(System.Runtime.CompilerServices.ConfiguredTaskAwaitable);
public const string FullName = "System.Runtime.CompilerServices." + TypeName;
public static readonly ImmutableArray<string> Namespace = Namespaces.SystemRuntimeCompilerServices;
}
public static class ValueTask
{
public const string TypeName = nameof(ValueTask);
public const string FullName = "System.Threading.Tasks." + TypeName;
public static readonly ImmutableArray<string> Namespace = Namespaces.SystemThreadingTasks;
}
public static class ConfiguredValueTaskAwaitable
{
public const string TypeName = nameof(System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable);
public const string FullName = "System.Runtime.CompilerServices." + TypeName;
public static readonly ImmutableArray<string> Namespace = Namespaces.SystemRuntimeCompilerServices;
}
public static class CoClassAttribute
{
public const string TypeName = nameof(System.Runtime.InteropServices.CoClassAttribute);
public static readonly ImmutableArray<string> Namespace = Namespaces.SystemRuntimeInteropServices;
}
public static class ComImportAttribute
{
public const string TypeName = nameof(System.Runtime.InteropServices.ComImportAttribute);
public static readonly ImmutableArray<string> Namespace = Namespaces.SystemRuntimeInteropServices;
}
public static class InterfaceTypeAttribute
{
public const string TypeName = nameof(System.Runtime.InteropServices.InterfaceTypeAttribute);
public static readonly ImmutableArray<string> Namespace = Namespaces.SystemRuntimeInteropServices;
}
public static class TypeLibTypeAttribute
{
public const string TypeName = "TypeLibTypeAttribute";
public static readonly ImmutableArray<string> Namespace = Namespaces.SystemRuntimeInteropServices;
}
public static class CompletedTaskAttribute
{
public const string TypeName = "CompletedTaskAttribute";
public static readonly ImmutableArray<string> Namespace = Namespaces.MicrosoftVisualStudioThreading;
}
}