Init(args)
Scripting Reference
Loading...
Searching...
No Matches

◆ ValidateArguments()

virtual void Sisus.Init.StateMachineBehaviour< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument >.ValidateArguments ( TFirstArgument firstArgument,
TSecondArgument secondArgument,
TThirdArgument thirdArgument,
TFourthArgument fourthArgument,
TFifthArgument fifthArgument,
TSixthArgument sixthArgument )
protectedvirtual

Method that can be overridden and used to validate the initialization argument that was received by this object.

You can use the ThrowIfNull method to throw an ArgumentNullException if the argument is null.

protected override void ValidateArguments(IInputManager inputManager, Camera camera)
{
ThrowIfNull(inputManager);
ThrowIfNull(camera);
}
virtual void ValidateArguments(TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument, TSixthArgument sixthArgument)
Method that can be overridden and used to validate the initialization argument that was received by t...
Definition StateMachineBehaviourT6.cs:216

You can use the AssertNotNull method to log an assertion to the Console if the argument is null.

protected override void ValidateArguments(IInputManager inputManager, Camera camera)
{
AssertNotNull(inputManager);
AssertNotNull(camera);
}

Calls to this method are ignored in non-development builds.

Parameters
firstArgumentThe first received argument to validate.
secondArgumentThe second received argument to validate.
thirdArgumentThe third received argument to validate.
fourthArgumentThe fourth received argument to validate.
fifthArgumentThe fifth received argument to validate.
sixthArgumentThe sixth received argument to validate.