Skip to content

M_CodeJam_Code_DisposedIf__1_2

andrewvk edited this page Mar 30, 2016 · 7 revisions

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

[This is preliminary documentation and is subject to change.]

Assertion for object disposal

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

Syntax

C#

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

VB

<AssertionMethodAttribute>
<StringFormatMethodAttribute("messageFormat")>
Public Shared Sub DisposedIf(Of TDisposable As IDisposable) ( 
	disposed As Boolean,
	<NotNullAttribute> thisReference As TDisposable,
	<NotNullAttribute> messageFormat As String,
	<CanBeNullAttribute> ParamArray args As Object()
)

F#

[<AssertionMethodAttribute>]
[<StringFormatMethodAttribute("messageFormat")>]
static member DisposedIf : 
        disposed : bool * 
        [<NotNullAttribute>] thisReference : 'TDisposable * 
        [<NotNullAttribute>] messageFormat : string * 
        [<CanBeNullAttribute>] args : Object[] -> unit  when 'TDisposable : IDisposable

Parameters

 

disposed
Type: System.Boolean
[Missing documentation for "M:CodeJam.Code.DisposedIf1(System.Boolean,0,System.String,System.Object[])"]
thisReference
Type: TDisposable
[Missing documentation for "M:CodeJam.Code.DisposedIf1(System.Boolean,0,System.String,System.Object[])"]
messageFormat
Type: System.String
[Missing documentation for "M:CodeJam.Code.DisposedIf1(System.Boolean,0,System.String,System.Object[])"]
args
Type: System.Object[]
[Missing documentation for "M:CodeJam.Code.DisposedIf1(System.Boolean,0,System.String,System.Object[])"]

Type Parameters

 

TDisposable

See Also

Reference

Code Class
DisposedIf Overload
CodeJam Namespace

Clone this wiki locally