public static void VA_Invoke1(dynamic vaProxy) { IFSUIPCInterface fsuipcInterface = vaProxy.SessionState[SESSIONSTATE.KEY_FSUIPCINTERFACE]; string context = vaProxy.Context; FunctionParser parser = new FunctionParser(); if (!parser.parseFunction(context)) { vaProxy.WriteToLog("VA:P3D Error: Failed to parse function: " + context, "red"); return; } MethodInfo callMethod = fsuipcInterface.GetType().GetMethod(parser.Function); callMethod.Invoke(fsuipcInterface, BindingFlags.Default, null, parser.Arguments.ToArray(), null); }
public static void VA_Init1(dynamic vaProxy) { IFSUIPCFactory factory = null; if (!vaProxy.SessionState.ContainsKey(SESSIONSTATE.KEY_FSUIPCFACTORY)) { factory = new DefaultFSUIPCFactory(); vaProxy.SessionState.Add(SESSIONSTATE.KEY_FSUIPCFACTORY, factory); } else { factory = vaProxy.SessionState[SESSIONSTATE.KEY_FSUIPCFACTORY]; } IFSUIPCInterface fsuipcInterface = factory.createFSUIPCInterface( new FSUIPCImpl(), new DefaultOffsetFactory()); fsuipcInterface.initialise(vaProxy); vaProxy.SessionState.Add(SESSIONSTATE.KEY_FSUIPCINTERFACE, fsuipcInterface); }
public static void VA_Exit1(dynamic vaProxy) { IFSUIPCInterface fsuipcInterface = vaProxy.SessionState[SESSIONSTATE.KEY_FSUIPCINTERFACE]; fsuipcInterface.shutdown(); }