public enum VersionBaseType : System.Enum, System.IComparable, System.IConvertible, System.IFormattable
Public Enum VersionBaseType Inherits System.Enum Implements System.IComparable, System.IConvertible, System.IFormattable
public enum VersionBaseType : System.Enum, System.IComparable, System.IConvertible, System.IFormattable
Public Enum VersionBaseType Inherits System.Enum Implements System.IComparable, System.IConvertible, System.IFormattable
Member | Description |
---|---|
HistoricalVersion | Historical version. |
Version | Version. |
public void ChangeVersions(Geodatabase geodatabase, string toVersionName) { using (VersionManager versionManager = geodatabase.GetVersionManager()) { VersionBaseType versionBaseType = versionManager.GetCurrentVersionBaseType(); if (versionBaseType == VersionBaseType.Version) { Version fromVersion = versionManager.GetCurrentVersion(); Version toVersion = versionManager.GetVersion(toVersionName); // Switch between versions MapView.Active.Map.ChangeVersion(fromVersion, toVersion); } if (versionBaseType == VersionBaseType.HistoricalVersion) { HistoricalVersion fromHistoricalVersion = versionManager.GetCurrentHistoricalVersion(); HistoricalVersion toHistoricalVersion = versionManager.GetHistoricalVersion(toVersionName); // Switch between historical versions MapView.Active.Map.ChangeVersion(fromHistoricalVersion, toHistoricalVersion); } // Switch from HistoricalVersion to Version and vice-versa // MapView.Active.Map.ChangeVersion(fromHistoricalVersion, toVersion); // MapView.Active.Map.ChangeVersion(fromVersion, toHistoricalVersion); } }
System.Object
System.ValueType
System.Enum
ArcGIS.Core.Data.VersionBaseType
Target Platforms: Windows 11, Windows 10