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