/// <summary> /// Add an Locale. /// </summary> /// <param name="locale">Locale to Add.</param> public void AddLocale(Locale locale) { // Verify Parameters not null ApiDataValidator.NotNull(locale); // If Locales are null instantiate. if (this.Locales == null) { this.Locales = new Locales(); } this.Locales.Add(locale); }
/// <summary> /// Add an Installer. /// </summary> /// <param name="installer">Installer to Add.</param> public void AddInstaller(Installer installer) { // Verify Parameters not null ApiDataValidator.NotNull(installer); // If Installers are null instantiate. if (this.Installers == null) { this.Installers = new Installers(); } this.Installers.Add(installer); }
/// <summary> /// Add an Locale. /// </summary> /// <param name="locale">Installer to Update.</param> /// <param name="packageVersion">Package Version to update in.</param> public void AddLocale(Locale locale, string packageVersion) { // Verify Parameters not null ApiDataValidator.NotNull(locale); ApiDataValidator.NotNull(packageVersion); // Instantiate if null if (this.Versions == null) { this.Versions = new VersionsExtended(); } this.Versions.AddLocale(locale, packageVersion); }
/// <summary> /// Add an Installer. /// </summary> /// <param name="installer">Installer to Update.</param> /// <param name="packageVersion">Package Version to update in.</param> public void AddInstaller(Installer installer, string packageVersion) { // Verify Parameters not null ApiDataValidator.NotNull(installer); ApiDataValidator.NotNull(packageVersion); // Instantiate if null if (this.Versions == null) { this.Versions = new VersionsExtended(); } this.Versions.AddInstaller(installer, packageVersion); }
/// <summary> /// Remove a Version. /// </summary> /// <param name="packageVersion">Version to Remove.</param> public void RemoveVersion(string packageVersion) { // Verify Parameters not null ApiDataValidator.NotNull(packageVersion); // Assert Versions not null this.AssertVersionsNotNull(); this.Versions.Remove(packageVersion); if (this.Versions.Count == 0) { this.Versions = null; } }
/// <summary> /// Remove Locale. /// </summary> /// <param name="packageLocale">Installer Identifier.</param> public void RemoveLocale(string packageLocale) { // Verify Parameters not null ApiDataValidator.NotNull(packageLocale); // Verify Locale is not null. this.AssertLocalesNotNull(); this.Locales.Remove(packageLocale); if (this.Locales.Count == 0) { this.Locales = null; } }
/// <summary> /// Remove Installer. /// </summary> /// <param name="installerIdentifier">Installer Identifier.</param> public void RemoveInstaller(string installerIdentifier) { // Verify Parameters not null ApiDataValidator.NotNull(installerIdentifier); // Verify Installers is not null. this.AssertInstallersNotNull(); this.Installers.Remove(installerIdentifier); if (this.Installers.Count == 0) { this.Installers = null; } }