Skip to content

Commit

Permalink
Added VB version from DotNetAnalyzers#218 (comment).
Browse files Browse the repository at this point in the history
  • Loading branch information
AraHaan committed Feb 14, 2021
1 parent a95b842 commit 6c73372
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions IDisposableAnalyzers/build/OwnershipAttributes.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Namespace IDisposableAnalyzers
Imports System

''' <summary>
''' The return value must be disposed by the caller.
''' </summary>
<AttributeUsage(AttributeTargets.ReturnValue Or AttributeTargets.Parameter, AllowMultiple:=False, Inherited:=True)>
Friend NotInheritable Class GivesOwnershipAttribute
Inherits Attribute
End Class

''' <summary>
''' The return value must not be disposed by the caller.
''' </summary>
<AttributeUsage(AttributeTargets.ReturnValue Or AttributeTargets.Parameter, AllowMultiple:=False, Inherited:=True)>
Friend NotInheritable Class KeepsOwnershipAttribute
Inherits Attribute
End Class

''' <summary>
''' The ownership of instance is transferred and the receiver is responsible for disposing.
''' </summary>
<AttributeUsage(AttributeTargets.Parameter, AllowMultiple:=False, Inherited:=True)>
Friend NotInheritable Class TakesOwnershipAttribute
Inherits Attribute
End Class
End Namespace

0 comments on commit 6c73372

Please sign in to comment.