Skip to content

Commit 6c73372

Browse files
authored
Added VB version from DotNetAnalyzers#218 (comment).
1 parent a95b842 commit 6c73372

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Namespace IDisposableAnalyzers
2+
Imports System
3+
4+
''' <summary>
5+
''' The return value must be disposed by the caller.
6+
''' </summary>
7+
<AttributeUsage(AttributeTargets.ReturnValue Or AttributeTargets.Parameter, AllowMultiple:=False, Inherited:=True)>
8+
Friend NotInheritable Class GivesOwnershipAttribute
9+
Inherits Attribute
10+
End Class
11+
12+
''' <summary>
13+
''' The return value must not be disposed by the caller.
14+
''' </summary>
15+
<AttributeUsage(AttributeTargets.ReturnValue Or AttributeTargets.Parameter, AllowMultiple:=False, Inherited:=True)>
16+
Friend NotInheritable Class KeepsOwnershipAttribute
17+
Inherits Attribute
18+
End Class
19+
20+
''' <summary>
21+
''' The ownership of instance is transferred and the receiver is responsible for disposing.
22+
''' </summary>
23+
<AttributeUsage(AttributeTargets.Parameter, AllowMultiple:=False, Inherited:=True)>
24+
Friend NotInheritable Class TakesOwnershipAttribute
25+
Inherits Attribute
26+
End Class
27+
End Namespace

0 commit comments

Comments
 (0)