ArcGIS Pro获得一个数据源的路径
private async Task<string> GetDataSource(BasicFeatureLayer theLayer) { try { return await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() => { var inTable = theLayer.Name; var table = theLayer.GetTable(); var dataStore = table.GetDatastore(); var workspaceNameDef = dataStore.GetConnectionString(); var workspaceName = workspaceNameDef.Split('=')[1]; var fullSpec = System.IO.Path.Combine(workspaceName, inTable); return fullSpec; }); } catch (Exception ex) { MessageBox.Show(ex.ToString()); return string.Empty; } }