MetalamaAPI documentationAspect APIMetalama.​Framework.​Code.​InvokersIIndexer­InvokerSet­Value
Open sandboxFocus

IIndexerInvoker.SetValue Method

SetValue(Object, Object[])

Generates run-time code that sets the value of the current indexer with specified arguments. By default, the target instance of the indexer is this unless the indexer is static, and the base implementation of the indexer is invoked, i.e. the implementation before the current aspect layer. To change the default values, or to use the ?. null-conditional operator, use the With(InvokerOptions) method.

Declaration
dynamic SetValue(dynamic value, params dynamic[] args)
Parameters
Type Name Description
System.Object value
System.Object[] args
Returns
Type Description
System.Object
Remarks

Note: the order of parameters is different than in C# code: e.g. instance[args] = value is indexer.SetIndexerValue(instance, value, args).