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

◆ Inject< TClient, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument >()

static void Sisus.Init.Reflection.InjectionUtility.Inject< TClient, TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument > ( [DisallowNull] TClient client,
[DisallowNull] string memberName,
[AllowNull] object value )
static

Assigns an argument received during initialization of client to an instance field or property by given name found on the client.

Init only fields and properties are supported, however properties that are not auto-implemented and do not have a set accessor are not supported.

Parameters
clientThe client that contains the field or property.
memberNameName of the field or property to which to assign the value.
valueThe value to assign to the field or property.
Exceptions
ArgumentNullExceptionThrown if client or memberName is null.
MissingMemberExceptionThrown if no field or property by the provided name is found on the client or if property by given name is not auto-implemented and does not have a set accessor.
Type Constraints
TClient :IArgs 
TClient :TFirstArgument 
TClient :TSecondArgument 
TClient :TThirdArgument 
TClient :TFourthArgument 
TClient :TFifthArgument 
TClient :TSixthArgument 
TClient :TSeventhArgument 
TClient :TEighthArgument