LinkToolAddin/client/CallArcGISPro.cs

17 lines
562 B
C#

using System.Collections.Generic;
using LinkToolAddin.server;
using Newtonsoft.Json;
namespace LinkToolAddin.client;
public class CallArcGISPro
{
public static string CallArcGISProTool(Dictionary<string,string> parameters)
{
// Call the ArcGIS Pro method and get the result
var result = server.CallArcGISPro.CallArcGISProTool(parameters["toolName"], JsonConvert.DeserializeObject<List<string>>(parameters["toolParams"]));
// Serialize the result back to a JSON string
return JsonConvert.SerializeObject(result);
}
}