コード例 #1
0
ファイル: Fgdb.cs プロジェクト: AKROGIS/ThemeManager
 /// <summary>
 /// Gets the metadata as an XML string for the dataset.
 /// </summary>
 /// <param name="dataset">Must be a full path name starting with "\"; case insensitive</param>
 /// <returns>null if the dataset is not in the GDB.</returns>
 public async Task <string> GetMetadataAsync(string dataset)
 {
     if (_geodatabase == null)
     {
         return(null);
     }
     return(await Task.Run(() =>
     {
         // Note: _geodatabase.GetDatasetDocumentation(dataset, datatype) throws if there
         // is no dataset with that datatype.  Since excpetions are expensive in C#, do not
         // use this method to test multiple datatypes in try/catch logic
         var datatype = GetDataType(dataset);
         if (datatype == null)
         {
             return null;
         }
         return _geodatabase.GetDatasetDocumentation(dataset, datatype);
     }));
 }