ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Data Namespace / VersionState Enumeration
Example Example

In This Topic
    VersionState Enumeration
    In This Topic
    An enumeration indicating the versioned state of datasets within a datastore. See DatastoreConfiguration.
    Syntax
    Members
    MemberDescription
    NonApplicable The versioned state is not applicable.
    NonVersioned Non Versioned.
    Versioned Versioned.
    Example
    Start a Single workspace edit session via a DatastoreConfiguration
    {
      // ApplicationOptions.EditingOptions.EnableEditingFromEditTab is true
      // ApplicationOptions.EditingOptions.IsSingleWorkspaceEditSession is true
    
      Geodatabase egdb = new Geodatabase(new DatabaseConnectionFile(new Uri("path\\to\\sde\\file\\sdefile.sde")));
    
      // setup the configuration to edit the data registered as versioned in the egdb
      var datastoreConfig = new DatastoreConfiguration(egdb, VersionState.Versioned);
    
      // start the edit session on the workspace
      var project = Project.Current;
      var v_success = await project.SetSingleEditWorkspaceAsync(datastoreConfig);
    
      // OR 
    
      // setup the configuration to edit the data that is not registered as versioned
      var nonVersionedDatastoreConfig = new DatastoreConfiguration(egdb, VersionState.NonVersioned);
      // start the edit session on the workspace
      var nv_success = await project.SetSingleEditWorkspaceAsync(nonVersionedDatastoreConfig);
    }
    Inheritance Hierarchy

    System.Object
       System.ValueType
          System.Enum
             ArcGIS.Core.Data.VersionState

    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.6 or higher.
    See Also