You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From JJ.Framework.Reflection. Might split up in multiple tasks in the future. Some things may already be done.
Added a sort of disclaimer to the README.MD of JJ.Framework.Reflection for Accessor's missing features.
Adding InvokeMethod overloads with type arguments?
~ Base type parameter matching:
~ ReflectionCache.GetMethod_MatchingArgumentBaseTypes + using it in Accessor.InvokeMethod? Possibly by iterating through base types.
~ Are the ByRef parameter-related Accessor methods uniform in interfacing to the other methods?
~ Adding InvokeMethods overloads (with ByRef's) without type arguments?
Not sure. Perhaps ByRef also requires a specific type, not object.
~ Is there an option to invoke methods with ByRef arguments for more than 4 arguments? Would such an option be created, by having overloads that take Type[] next to already present the overloads that take a set of type arguments?
~ May any member be callable now using Accessor?
~ Might methods with type arguments and ref parameters not be supported yet now?
publicclassAccessor{// Try something with tuples.publicobjectInvokeMethod(stringname,params(Typetype,objectvalue)[]parameterTypesAndValues){if(parameterTypesAndValues==null)thrownewArgumentNullException(nameof(parameterTypesAndValues));Type[]parameterTypes=parameterTypesAndValues.Select(x =>x.type).ToArray();object[]parameterValues=parameterTypesAndValues.Select(x =>x.value).ToArray();MethodInfomethod=StaticReflectionCache.GetMethod(_objectType,name,parameterTypes);}}
~ Are non-public constructors usable?
~ Overload that takes constructor parameters, only takes string typeName, not Type.
~ Those might be related. Assumed internal classes with constructors, not public classes with internal constructors.
~ Accessor.InvokeMethod could be improved:
~ The nameExpression seems less relevant now that there is the nameof operator.
~ The nameExpression might be replaced by just an expression, from which the parameter values are read out using ExpressionHelper.GetMethodCallInfo.
The text was updated successfully, but these errors were encountered:
2021-05-31
From JJ.Framework.Reflection. Might split up in multiple tasks in the future. Some things may already be done.
The text was updated successfully, but these errors were encountered: