Ejemplo n.º 1
0
 private string BuildFullDataSourceName()
 {
     // Some odd data sources (i.e. raster functions) can have XML in the various names
     if (DataSourceName != null && DataSourceName.StartsWith("<Xml") &&
         DataSourceName.Contains("FunctionRasterDatasetName"))
     {
         return("XML Raster Function Defintion");
     }
     //Still protect against other fields with illegal paths
     if (DataSourceName == null || DataSourceName.StartsWith("<"))
     {
         return(null);
     }
     if (WorkspacePath == null || WorkspacePath.StartsWith("<"))
     {
         return(DataSourceName);
     }
     if (Container == null || Container.StartsWith("<"))
     {
         return(Path.Combine(WorkspacePath, DataSourceName));
     }
     return(Path.Combine(WorkspacePath, Container, DataSourceName));
 }