To continue what I was saying earlier, I really (really) don't want to have to make anybody reference anything, and *I* only want to reference the bare minimum of things I need to reference with VA. Again, to get around the shared interface references, I would like to pass the VA proxy class as, 'dynamic'. That means the plugins must be .net framework 4.0+. I don't think that's much of a hardship here in almost 2017. It also means late binding... which is really not that much of a concern in this context I'm sure. What it does buy is not having to update SDKs each time something is added.
So, question for you all. Right now, Invoke1 looks like this:
public static void VA_Invoke1(String context, ref Dictionary<string, object> state, ref Dictionary<string, Int16?> shortIntValues, ref Dictionary<string, string> textValues, ref Dictionary<string, int?> intValues, ref Dictionary<string, decimal?> decimalValues, ref Dictionary<string, Boolean?> booleanValues, ref Dictionary<string, DateTime?> dateValues, ref Dictionary<string, object> extendedValues)
Init1 is almost exactly the same (just missing the context).
This monstrosity is the product of iterations of something that was never intended to talk directly to VA, and attempt to keep things somewhat isolated and transactional (mostly so variable access was controlled and user-visible). What I *could* do is stuff the vaProxy in there as another parameter. No big deal, as it makes it consistent with every other iteration of the interface. It would be redundant, as every parameter would be contained in the proxy class.
=OR=
I can go this route:
public static void VA_Invoke1(dynamic vaProxy)
To get the context: vaProxy.Context
To get an integer: vaProxy.GetInteger("someVarName")
To set an integer: vaProxy.SetInteger("someVarName", 55)
and so on
I like the second option, as it cuts down on the ever-growing parameter list and is certainly cleaner and easier to read. I don't like it because everything is now hidden behind one mysterious class, and it will make it where the plugin devs will have to rewrite their code somewhat.
The third option is to have both... where there would be an Invoke2(dynamic vaProxy). If VA sees that Invoke2 is being used on init, it will use it instead of Invoke1.