ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Data Namespace / UnknownDatastore Class
Members Example

In This Topic
    UnknownDatastore Class
    In This Topic
    Represents an unknown or currently not supported data repository.
    Object Model
    UnknownDatastore ClassConnector ClassDatastoreProperties ClassSQLSyntax Class
    Syntax
    public sealed class UnknownDatastore : Datastore, System.IDisposable  
    Public NotInheritable Class UnknownDatastore 
       Inherits Datastore
       Implements System.IDisposable 
    Example
    Obtaining Geodatabase from Project Item
    public async Task ObtainingGeodatabaseFromProjectItem()
    {
      IEnumerable<GDBProjectItem> gdbProjectItems = Project.Current.GetItems<GDBProjectItem>();
    
      await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
      {
        foreach (GDBProjectItem gdbProjectItem in gdbProjectItems)
        {
          using (Datastore datastore = gdbProjectItem.GetDatastore())
          {
            //Unsupported datastores (non File GDB and non Enterprise GDB) will be of type UnknownDatastore
            if (datastore is UnknownDatastore)
              continue;
    
            Geodatabase geodatabase = datastore as Geodatabase;
            // Use the geodatabase.
          }
        }
      });
    }
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.CoreObjectsBase
          ArcGIS.Core.Data.Datastore
             ArcGIS.Core.Data.UnknownDatastore

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also