-
Notifications
You must be signed in to change notification settings - Fork 35
M_CodeJam_Code_DisposedIfNull__2_2
Andrew Koryavchenko edited this page Jun 17, 2018
·
7 revisions
Assertion for object disposal
Namespace: CodeJam
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0
C#
public static void DisposedIfNull<TResource, TDisposable>(
TResource resource,
TDisposable thisReference,
string messageFormat,
params Object[] args
)
where TResource : class
where TDisposable : IDisposable
VB
Public Shared Sub DisposedIfNull(Of TResource As Class, TDisposable As IDisposable) (
resource As TResource,
thisReference As TDisposable,
messageFormat As String,
ParamArray args As Object()
)
F#
static member DisposedIfNull :
resource : 'TResource *
thisReference : 'TDisposable *
messageFormat : string *
args : Object[] -> 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. - messageFormat
- Type: System.String
The message format. - args
- Type: System.Object[]
The arguments.
- TResource
- The type of the resource.
- TDisposable
- The type of the disposable.