Skip to content

Commit

Permalink
ilist instead of array in resourcetranslations
Browse files Browse the repository at this point in the history
  • Loading branch information
bdongus committed Apr 19, 2024
1 parent 06ee4d9 commit 1f7fcf8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion idee5.Globalization.Test/WebApiTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ public async Task CanReadResourceTranslations() {
// Assert
Assert.IsNotNull(response);
Assert.AreEqual("CommonTerms", response.ResourceSet);
Assert.AreEqual(3, response.Translations.Length);
Assert.AreEqual(3, response.Translations.Count);
}
}
7 changes: 4 additions & 3 deletions idee5.Globalization/Models/ResourceTranslations.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;

namespace idee5.Globalization.Models;
/// <summary>
Expand All @@ -8,20 +9,20 @@ public record ResourceTranslations : ResourceKey {
public ResourceTranslations() {
Translations = [];
}
public ResourceTranslations(string resourceSet, string id, string? industry, string? customer, Translation[] translations) {
public ResourceTranslations(string resourceSet, string id, string? industry, string? customer, IList<Translation> translations) {
ResourceSet = resourceSet;
Id = id;
Industry = industry;
Customer = customer;
Translations = translations;
}

public ResourceTranslations(ResourceKey original, Translation[] translations) : base(original) {
public ResourceTranslations(ResourceKey original, IList<Translation> translations) : base(original) {
Translations = translations ?? throw new ArgumentNullException(nameof(translations));
}

/// <summary>
/// Translations of the <see cref="ResourceKey">.
/// </summary>

Check warning on line 26 in idee5.Globalization/Models/ResourceTranslations.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has badly formed XML -- 'End tag 'summary' does not match the start tag 'see'.'
public Translation[] Translations { get; set; }
public IList<Translation> Translations { get; set; }

Check warning on line 27 in idee5.Globalization/Models/ResourceTranslations.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has badly formed XML -- 'Expected an end tag for element 'summary'.'
}
2 changes: 1 addition & 1 deletion idee5.Globalization/idee5.Globalization.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<Description>Globalization extensions. Enables database support for localization resources and parlances for industries and customers..</Description>
<Company>idee5</Company>
<Copyright>© idee5 2016 - 2024</Copyright>
<Version>3.5.4</Version>
<Version>3.5.5</Version>
<PackageTags>idee5, Globalization, Localization</PackageTags>
<PackageReleaseNotes>Improved serialization support</PackageReleaseNotes>
<Nullable>enable</Nullable>
Expand Down

0 comments on commit 1f7fcf8

Please sign in to comment.