-
Notifications
You must be signed in to change notification settings - Fork 36
M_CodeJam_Code_DisposedIfNull__2
Andrew Koryavchenko edited this page Jul 4, 2017
·
7 revisions
Assertion for object disposal
Namespace: CodeJam
Assembly: CodeJam (in CodeJam.dll) Version: 1.1.0.0 (1.1.0.0)
C#
public static void DisposedIfNull<TResource, TDisposable>(
TResource resource,
TDisposable thisReference
)
where TResource : class
where TDisposable : IDisposable
VB
Public Shared Sub DisposedIfNull(Of TResource As Class, TDisposable As IDisposable) (
resource As TResource,
thisReference As TDisposable
)
F#
static member DisposedIfNull :
resource : 'TResource *
thisReference : 'TDisposable -> unit when 'TResource : not struct when 'TDisposable : IDisposable
- resource
- Type: TResource
The resource. Should be not null if the object is not disposed. - thisReference
- Type: TDisposable
The this reference.
- TResource
- The type of the resource.
- TDisposable
- The type of the disposable.