using System; namespace JustTrack { /// /// Wraps the application version name and version code that can be forwarded to the justtrack SDK /// when initializing it via the runtime constructor. /// /// Both the version name and version code are always required. When no custom application version /// should be forwarded, pass a null reference instead of /// constructing an instance with empty values. /// /// public sealed class ApplicationVersion { /// /// Initializes a new instance of the class. /// /// The application version name (e.g., "1.0.0"). Must not be null or empty. /// The application version code (e.g., "1"). Must not be null or empty. /// /// Thrown when or is null or empty. /// public ApplicationVersion(string version, string versionCode) { if (string.IsNullOrEmpty(version)) { throw new ArgumentException("ApplicationVersion requires a non-empty version name.", nameof(version)); } if (string.IsNullOrEmpty(versionCode)) { throw new ArgumentException("ApplicationVersion requires a non-empty version code.", nameof(versionCode)); } Version = version; VersionCode = versionCode; } /// /// Gets the application version name (e.g., "1.0.0"). /// public string Version { get; } /// /// Gets the application version code (e.g., "1"). /// public string VersionCode { get; } } }