Cuemon .NET Framework
ThrowIf<TValue,T1,T2,T3,T4,T5>(TValue,Doer<TValue,T1,T2,T3,T4,T5,Boolean>,T1,T2,T3,T4,T5,Doer<String,String,Exception>,String,String) Method

The type of the value to evaluate.
The type of the first parameter of the function delegate condition.
The type of the second parameter of the function delegate condition.
The type of the third parameter of the function delegate condition.
The type of the fourth parameter of the function delegate condition.
The type of the fifth parameter of the function delegate condition.
The value that will be evaluated by condition.
The function delegate that determines if an exception is thrown.
The first parameter of the function delegate condition.
The second parameter of the function delegate condition.
The third parameter of the function delegate condition.
The fourth parameter of the function delegate condition.
The fifth parameter of the function delegate condition.
The function delegate that resolves the System.Exception to be thrown.
The name of the parameter that caused the exception.
A message that describes the error.
Validates the specified value from the provided condition. An exception is resolved and thrown if the condition evaluates true.
Syntax
'Declaration
 
Public Overloads Shared Sub ThrowIf
    (Of TValue,T1,T2,T3,T4,T5)( _
   ByVal value As TValue, _
   ByVal condition As Cuemon.Doer(Of TValue,T1,T2,T3,T4,T5,Boolean), _
   ByVal arg1 As T1, _
   ByVal arg2 As T2, _
   ByVal arg3 As T3, _
   ByVal arg4 As T4, _
   ByVal arg5 As T5, _
   ByVal exception As Cuemon.Doer(Of String,String,Exception), _
   ByVal paramName As String, _
   ByVal message As String _
) 
public static void ThrowIf<TValue,T1,T2,T3,T4,T5>( 
   TValue value,
   Cuemon.Doer<TValue,T1,T2,T3,T4,T5,bool> condition,
   T1 arg1,
   T2 arg2,
   T3 arg3,
   T4 arg4,
   T5 arg5,
   Cuemon.Doer<string,string,Exception> exception,
   string paramName,
   string message
)

Parameters

value
The value that will be evaluated by condition.
condition
The function delegate that determines if an exception is thrown.
arg1
The first parameter of the function delegate condition.
arg2
The second parameter of the function delegate condition.
arg3
The third parameter of the function delegate condition.
arg4
The fourth parameter of the function delegate condition.
arg5
The fifth parameter of the function delegate condition.
exception
The function delegate that resolves the System.Exception to be thrown.
paramName
The name of the parameter that caused the exception.
message
A message that describes the error.

Type Parameters

TValue
The type of the value to evaluate.
T1
The type of the first parameter of the function delegate condition.
T2
The type of the second parameter of the function delegate condition.
T3
The type of the third parameter of the function delegate condition.
T4
The type of the fourth parameter of the function delegate condition.
T5
The type of the fifth parameter of the function delegate condition.
Exceptions
ExceptionDescription
System.ArgumentNullExceptioncondition is null -or- exception is null.
Requirements

Target Platforms: Windows 8, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Validator Class
Validator Members
Overload List

 

 


| Cuemon is licensed under a The MIT License (MIT)



© 2009-2015 Weubphoria. All Rights Reserved.

Documentation made easy with Document! X by Innovasys

Send Feedback