Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop/dotnet80 #573

Closed
wants to merge 13 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"name": "C# (.NET)",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/dotnet:7.0",
"image": "mcr.microsoft.com/devcontainers/dotnet:8.0",

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
Expand Down
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ dotnet_diagnostic.CA1305.severity = error
# CA1310: Specify StringComparison for correctness
dotnet_diagnostic.CA1310.severity = error

# CA1510: Use ArgumentNullException throw helper
dotnet_diagnostic.CA1510.severity = none

# SA1101: Prefix local calls with this
dotnet_diagnostic.SA1101.severity = none

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name : dotnet restore
run: dotnet restore
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Set release version
if: github.ref_type == 'tag'
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static CountryInfo CountryName { get; } = new()
Continent = Africa/Asia/Europe/Oceania/NorthAmerica/SouthAmerica, // as appropriate
Iso3166Code = "ZZ",
Name = "CountryName",
NsnLengths = new ReadOnlyCollection<int>(new[] { N }),
NsnLengths = new ReadOnlyCollection<int>([N]),
};
```

Expand Down
2 changes: 1 addition & 1 deletion NuGet.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ phoneNumber.ToString("RFC3966"); // tel:+44-114-272-644 (RFC3966 format)

Builds for:

- .NET 7.0
- .NET 8.0
- .NET Standard 2.1 - _supports .NET Core 3.0 or newer and .NET 5.0 or newer_
- .NET Standard 2.0 - _supports .NET Framework 4.6.2 or newer, however projects will need to be built with a minimum C# language version of 9.0 due to use of init only properties_
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ The library adheres to [Semantic Versioning](https://semver.org) and [release no

Specific builds are included in the nuget package for:

- .NET 7.0
- .NET 8.0
- .NET Standard 2.1 - _supports .NET Core 3.0 or newer and .NET 5.0 or newer_
- .NET Standard 2.0 - _supports .NET Framework 4.6.2 or newer, however projects will need to be built with a minimum C# language version of 9.0 due to use of init only properties_

Expand Down
6 changes: 3 additions & 3 deletions src/PhoneNumbers/CountryInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ public sealed partial class CountryInfo
internal const string Oceania = "Oceania";
internal const string SouthAmerica = "South America";
private static readonly ReadOnlyCollection<int> s_emptyIntArray = new(Array.Empty<int>());
private static readonly ReadOnlyCollection<PhoneNumberFormatter> s_formatters = new(new[]
{
private static readonly ReadOnlyCollection<PhoneNumberFormatter> s_formatters = new(
[
E164PhoneNumberFormatter.Instance,
E123PhoneNumberFormatter.Instance,
NationalPhoneNumberFormatter.Instance,
Rfc3966PhoneNumberFormatter.Instance,
});
]);

/// <summary>
/// Initialises a new instance of the <see cref="CountryInfo"/> class.
Expand Down
16 changes: 8 additions & 8 deletions src/PhoneNumbers/CountryInfo_Africa.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public partial class CountryInfo
Continent = Africa,
Iso3166Code = "EG",
Name = "Egypt",
NdcLengths = new ReadOnlyCollection<int>(new[] { 3, 2, 1 }),
NsnLengths = new ReadOnlyCollection<int>(new[] { 8, 9, 10, 11 }),
NdcLengths = new ReadOnlyCollection<int>([3, 2, 1]),
NsnLengths = new ReadOnlyCollection<int>([8, 9, 10, 11]),
TrunkPrefix = "0",
};

Expand All @@ -29,8 +29,8 @@ public partial class CountryInfo
FormatProvider = SimplePhoneNumberFormatProvider.Default,
Iso3166Code = "KE",
Name = "Kenya",
NdcLengths = new ReadOnlyCollection<int>(new[] { 3, 2 }),
NsnLengths = new ReadOnlyCollection<int>(new[] { 7, 8, 9, 12 }),
NdcLengths = new ReadOnlyCollection<int>([3, 2]),
NsnLengths = new ReadOnlyCollection<int>([7, 8, 9, 12]),
TrunkPrefix = "0",
};

Expand All @@ -44,8 +44,8 @@ public partial class CountryInfo
Continent = Africa,
Iso3166Code = "NG",
Name = "Nigeria",
NdcLengths = new ReadOnlyCollection<int>(new[] { 3, 2, 1 }),
NsnLengths = new ReadOnlyCollection<int>(new[] { 8, 10 }),
NdcLengths = new ReadOnlyCollection<int>([3, 2, 1]),
NsnLengths = new ReadOnlyCollection<int>([8, 10]),
TrunkPrefix = "0",
};

Expand All @@ -58,8 +58,8 @@ public partial class CountryInfo
Continent = Africa,
Iso3166Code = "ZA",
Name = "South Africa",
NdcLengths = new ReadOnlyCollection<int>(new[] { 2 }),
NsnLengths = new ReadOnlyCollection<int>(new[] { 9, 13 }),
NdcLengths = new ReadOnlyCollection<int>([2]),
NsnLengths = new ReadOnlyCollection<int>([9, 13]),
TrunkPrefix = "0",
};
}
6 changes: 3 additions & 3 deletions src/PhoneNumbers/CountryInfo_Asia.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public partial class CountryInfo
Continent = Asia,
Iso3166Code = "HK",
Name = "Hong Kong",
NsnLengths = new ReadOnlyCollection<int>(new[] { 8, 9, 12 }),
NsnLengths = new ReadOnlyCollection<int>([8, 9, 12]),
};

/// <summary>
Expand All @@ -25,7 +25,7 @@ public partial class CountryInfo
Continent = Asia,
Iso3166Code = "MO",
Name = "Macau",
NsnLengths = new ReadOnlyCollection<int>(new[] { 8 }),
NsnLengths = new ReadOnlyCollection<int>([8]),
};

/// <summary>
Expand All @@ -37,6 +37,6 @@ public partial class CountryInfo
Continent = Asia,
Iso3166Code = "SG",
Name = "Singapore",
NsnLengths = new ReadOnlyCollection<int>(new[] { 8, 10, 11 }),
NsnLengths = new ReadOnlyCollection<int>([8, 10, 11]),
};
}
Loading