-
Notifications
You must be signed in to change notification settings - Fork 470
/
Copy pathDisposeMethodKind.cs
47 lines (40 loc) · 1.45 KB
/
DisposeMethodKind.cs
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
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information.
namespace Analyzer.Utilities
{
/// <summary>
/// Describes different kinds of Dispose-like methods.
/// </summary>
internal enum DisposeMethodKind
{
/// <summary>
/// Not a dispose-like method.
/// </summary>
None,
/// <summary>
/// An override of <see cref="System.IDisposable.Dispose"/>.
/// </summary>
Dispose,
/// <summary>
/// A virtual method named Dispose that takes a single Boolean parameter, as
/// is used when implementing the standard Dispose pattern.
/// </summary>
DisposeBool,
/// <summary>
/// A method named DisposeAsync that has no parameters and returns Task.
/// </summary>
DisposeAsync,
/// <summary>
/// An overridden method named DisposeCoreAsync that takes a single Boolean parameter and returns Task, as
/// is used when implementing the standard DisposeAsync pattern.
/// </summary>
DisposeCoreAsync,
/// <summary>
/// A method named Close on a type that implements <see cref="System.IDisposable"/>.
/// </summary>
Close,
/// <summary>
/// A method named CloseAsync that has no parameters and returns Task.
/// </summary>
CloseAsync,
}
}