Skip to content

M_CodeJam_Code_DisposedIf__1_2

Andrew Koryavchenko edited this page Jun 17, 2018 · 7 revisions

Code.DisposedIf(TDisposable) Method (Boolean, TDisposable, String, Object[])

Assertion for object disposal

Namespace: CodeJam
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0

Syntax

C#

public static void DisposedIf<TDisposable>(
	bool disposed,
	TDisposable thisReference,
	string messageFormat,
	params Object[] args
)
where TDisposable : IDisposable

VB

Public Shared Sub DisposedIf(Of TDisposable As IDisposable) ( 
	disposed As Boolean,
	thisReference As TDisposable,
	messageFormat As String,
	ParamArray args As Object()
)

F#

static member DisposedIf : 
        disposed : bool * 
        thisReference : 'TDisposable * 
        messageFormat : string * 
        args : Object[] -> unit  when 'TDisposable : IDisposable

Parameters

 

disposed
Type: System.Boolean
Dispose condition.
thisReference
Type: TDisposable
The this reference.
messageFormat
Type: System.String
The message format.
args
Type: System.Object[]
The arguments.

Type Parameters

 

TDisposable
The type of the disposable.

See Also

Reference

Code Class
DisposedIf Overload
CodeJam Namespace

Clone this wiki locally