IPluginApiInvoke Method |
Namespace: Casewhere.Runtime.DSL.Api
PluginMethodResult Invoke( string pluginName, string methodName, IDictionary<string, Object> parameters )
// Construct plugin parameters var parameters = new Dictionary<string, object>(); parameters.Add("$skip", 10); parameters.Add("$take", 10); parameters.Add("$sortBy", "Gender"); parameters.Add("$asc", true); // Invoke plugin method var pluginApi = ctx.Use<IPluginApi>>(); var pluginResult = pluginApi.Invoke("ExamplePlugin", "SearchCandidates", parameters); // Retrieve data from plugin results var total = pluginResult.Get<int>("Total"); var candidates = pluginResult.GetArray("ActualData");