public IFeatureDataset this[string name] { get { if (name.ToLower() == _directoryName.ToLower() || name.ToLower() == "esri shapefile") { ShapeDataset dataset = new ShapeDataset(); dataset.ConnectionString = _directoryName; dataset.Open(); return(dataset); } else { ShapeDataset dataset = new ShapeDataset(); dataset.ConnectionString = name; dataset.Open(); return(dataset); } return(null); } }
async public Task <IFeatureDataset> GetDataset(string name) { if (name.ToLower() == _directoryName.ToLower() || name.ToLower() == "esri shapefile") { ShapeDataset dataset = new ShapeDataset(); await dataset.SetConnectionString(_directoryName); await dataset.Open(); return(dataset); } else { ShapeDataset dataset = new ShapeDataset(); await dataset.SetConnectionString(name); await dataset.Open(); return(dataset); } }