Skip to content

Commit bc1b863

Browse files
authored
Cleanup code (#45)
1 parent 339fe1b commit bc1b863

File tree

214 files changed

+1270
-1276
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

214 files changed

+1270
-1276
lines changed

src/Nager.Country/CountryInfos/BhutanCountryInfo.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ public sealed class BhutanCountryInfo : ICountryInfo
4242
];
4343

4444
/// <inheritdoc/>
45-
public ICurrency[] Currencies => [new BtnCurrency(), new InrCurrency()];
45+
public ICurrency[] Currencies =>
46+
[
47+
new BtnCurrency(),
48+
new InrCurrency(),
49+
];
4650

4751
/// <inheritdoc/>
4852
public string[] CallingCodes => ["975"];

src/Nager.Country/CountryInfos/CambodiaCountryInfo.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public sealed class CambodiaCountryInfo : ICountryInfo
2626
public int NumericCode => 116;
2727

2828
/// <inheritdoc/>
29-
public string[] TLD => new [] { ".kh" };
29+
public string[] TLD => [".kh"];
3030

3131
/// <inheritdoc/>
3232
public Region Region => Region.Asia;
@@ -35,17 +35,17 @@ public sealed class CambodiaCountryInfo : ICountryInfo
3535
public SubRegion SubRegion => SubRegion.SouthEasternAsia;
3636

3737
/// <inheritdoc/>
38-
public Alpha2Code[] BorderCountries => new Alpha2Code[]
39-
{
38+
public Alpha2Code[] BorderCountries =>
39+
[
4040
Alpha2Code.LA,
4141
Alpha2Code.TH,
4242
Alpha2Code.VN,
43-
};
43+
];
4444

4545
/// <inheritdoc/>
46-
public ICurrency[] Currencies => new [] { new KhrCurrency() };
46+
public ICurrency[] Currencies => [new KhrCurrency()];
4747

4848
/// <inheritdoc/>
49-
public string[] CallingCodes => new [] { "855" };
49+
public string[] CallingCodes => ["855"];
5050
}
5151
}

src/Nager.Country/CountryInfos/CameroonCountryInfo.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public sealed class CameroonCountryInfo : ICountryInfo
2626
public int NumericCode => 120;
2727

2828
/// <inheritdoc/>
29-
public string[] TLD => new [] { ".cm" };
29+
public string[] TLD => [".cm"];
3030

3131
/// <inheritdoc/>
3232
public Region Region => Region.Africa;
@@ -35,20 +35,20 @@ public sealed class CameroonCountryInfo : ICountryInfo
3535
public SubRegion SubRegion => SubRegion.MiddleAfrica;
3636

3737
/// <inheritdoc/>
38-
public Alpha2Code[] BorderCountries => new Alpha2Code[]
39-
{
38+
public Alpha2Code[] BorderCountries =>
39+
[
4040
Alpha2Code.CF,
4141
Alpha2Code.TD,
4242
Alpha2Code.CG,
4343
Alpha2Code.GQ,
4444
Alpha2Code.GA,
4545
Alpha2Code.NG,
46-
};
46+
];
4747

4848
/// <inheritdoc/>
49-
public ICurrency[] Currencies => new [] { new XafCurrency() };
49+
public ICurrency[] Currencies => [new XafCurrency()];
5050

5151
/// <inheritdoc/>
52-
public string[] CallingCodes => new [] { "237" };
52+
public string[] CallingCodes => ["237"];
5353
}
5454
}

src/Nager.Country/CountryInfos/CanadaCountryInfo.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public sealed class CanadaCountryInfo : ICountryInfo
2626
public int NumericCode => 124;
2727

2828
/// <inheritdoc/>
29-
public string[] TLD => new [] { ".ca" };
29+
public string[] TLD => [".ca"];
3030

3131
/// <inheritdoc/>
3232
public Region Region => Region.Americas;
@@ -35,15 +35,15 @@ public sealed class CanadaCountryInfo : ICountryInfo
3535
public SubRegion SubRegion => SubRegion.NorthAmerica;
3636

3737
/// <inheritdoc/>
38-
public Alpha2Code[] BorderCountries => new Alpha2Code[]
39-
{
38+
public Alpha2Code[] BorderCountries =>
39+
[
4040
Alpha2Code.US,
41-
};
41+
];
4242

4343
/// <inheritdoc/>
44-
public ICurrency[] Currencies => new [] { new CadCurrency() };
44+
public ICurrency[] Currencies => [new CadCurrency()];
4545

4646
/// <inheritdoc/>
47-
public string[] CallingCodes => new [] { "1" };
47+
public string[] CallingCodes => ["1"];
4848
}
4949
}

src/Nager.Country/CountryInfos/CapeVerdeCountryInfo.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public sealed class CapeVerdeCountryInfo : ICountryInfo
2626
public int NumericCode => 132;
2727

2828
/// <inheritdoc/>
29-
public string[] TLD => new [] { ".cv" };
29+
public string[] TLD => [".cv"];
3030

3131
/// <inheritdoc/>
3232
public Region Region => Region.Africa;
@@ -35,14 +35,12 @@ public sealed class CapeVerdeCountryInfo : ICountryInfo
3535
public SubRegion SubRegion => SubRegion.WesternAfrica;
3636

3737
/// <inheritdoc/>
38-
public Alpha2Code[] BorderCountries => new Alpha2Code[]
39-
{
40-
};
38+
public Alpha2Code[] BorderCountries => [];
4139

4240
/// <inheritdoc/>
43-
public ICurrency[] Currencies => new [] { new CveCurrency() };
41+
public ICurrency[] Currencies => [new CveCurrency()];
4442

4543
/// <inheritdoc/>
46-
public string[] CallingCodes => new [] { "238" };
44+
public string[] CallingCodes => ["238"];
4745
}
4846
}

src/Nager.Country/CountryInfos/CaribbeanNetherlandsCountryInfo.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public sealed class CaribbeanNetherlandsCountryInfo : ICountryInfo
2626
public int NumericCode => 535;
2727

2828
/// <inheritdoc/>
29-
public string[] TLD => new[] { ".bq", ".nl" };
29+
public string[] TLD => [".bq", ".nl"];
3030

3131
/// <inheritdoc/>
3232
public Region Region => Region.Americas;
@@ -35,12 +35,12 @@ public sealed class CaribbeanNetherlandsCountryInfo : ICountryInfo
3535
public SubRegion SubRegion => SubRegion.Caribbean;
3636

3737
/// <inheritdoc/>
38-
public Alpha2Code[] BorderCountries => new Alpha2Code[0];
38+
public Alpha2Code[] BorderCountries => [];
3939

4040
/// <inheritdoc/>
41-
public ICurrency[] Currencies => new[] { new UsdCurrency() };
41+
public ICurrency[] Currencies => [new UsdCurrency()];
4242

4343
/// <inheritdoc/>
44-
public string[] CallingCodes => new[] { "599" };
44+
public string[] CallingCodes => ["599"];
4545
}
4646
}

src/Nager.Country/CountryInfos/CaymanIslandsCountryInfo.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public sealed class CaymanIslandsCountryInfo : ICountryInfo
2626
public int NumericCode => 136;
2727

2828
/// <inheritdoc/>
29-
public string[] TLD => new [] { ".ky" };
29+
public string[] TLD => [".ky"];
3030

3131
/// <inheritdoc/>
3232
public Region Region => Region.Americas;
@@ -35,14 +35,12 @@ public sealed class CaymanIslandsCountryInfo : ICountryInfo
3535
public SubRegion SubRegion => SubRegion.Caribbean;
3636

3737
/// <inheritdoc/>
38-
public Alpha2Code[] BorderCountries => new Alpha2Code[]
39-
{
40-
};
38+
public Alpha2Code[] BorderCountries => [];
4139

4240
/// <inheritdoc/>
43-
public ICurrency[] Currencies => new [] { new KydCurrency() };
41+
public ICurrency[] Currencies => [new KydCurrency()];
4442

4543
/// <inheritdoc/>
46-
public string[] CallingCodes => new [] { "1345" };
44+
public string[] CallingCodes => ["1345"];
4745
}
4846
}

src/Nager.Country/CountryInfos/CentralAfricanRepublicCountryInfo.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public sealed class CentralAfricanRepublicCountryInfo : ICountryInfo
2626
public int NumericCode => 140;
2727

2828
/// <inheritdoc/>
29-
public string[] TLD => new [] { ".cf" };
29+
public string[] TLD => [".cf"];
3030

3131
/// <inheritdoc/>
3232
public Region Region => Region.Africa;
@@ -35,20 +35,20 @@ public sealed class CentralAfricanRepublicCountryInfo : ICountryInfo
3535
public SubRegion SubRegion => SubRegion.MiddleAfrica;
3636

3737
/// <inheritdoc/>
38-
public Alpha2Code[] BorderCountries => new Alpha2Code[]
39-
{
38+
public Alpha2Code[] BorderCountries =>
39+
[
4040
Alpha2Code.CM,
4141
Alpha2Code.TD,
4242
Alpha2Code.CD,
4343
Alpha2Code.CG,
4444
Alpha2Code.SS,
4545
Alpha2Code.SD,
46-
};
46+
];
4747

4848
/// <inheritdoc/>
49-
public ICurrency[] Currencies => new [] { new XafCurrency() };
49+
public ICurrency[] Currencies => [new XafCurrency()];
5050

5151
/// <inheritdoc/>
52-
public string[] CallingCodes => new [] { "236" };
52+
public string[] CallingCodes => ["236"];
5353
}
5454
}

src/Nager.Country/CountryInfos/ChadCountryInfo.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public sealed class ChadCountryInfo : ICountryInfo
2626
public int NumericCode => 148;
2727

2828
/// <inheritdoc/>
29-
public string[] TLD => new [] { ".td" };
29+
public string[] TLD => [".td"];
3030

3131
/// <inheritdoc/>
3232
public Region Region => Region.Africa;
@@ -35,20 +35,20 @@ public sealed class ChadCountryInfo : ICountryInfo
3535
public SubRegion SubRegion => SubRegion.MiddleAfrica;
3636

3737
/// <inheritdoc/>
38-
public Alpha2Code[] BorderCountries => new Alpha2Code[]
39-
{
38+
public Alpha2Code[] BorderCountries =>
39+
[
4040
Alpha2Code.CM,
4141
Alpha2Code.CF,
4242
Alpha2Code.LY,
4343
Alpha2Code.NE,
4444
Alpha2Code.NG,
4545
Alpha2Code.SS,
46-
};
46+
];
4747

4848
/// <inheritdoc/>
49-
public ICurrency[] Currencies => new [] { new XafCurrency() };
49+
public ICurrency[] Currencies => [new XafCurrency()];
5050

5151
/// <inheritdoc/>
52-
public string[] CallingCodes => new [] { "235" };
52+
public string[] CallingCodes => ["235"];
5353
}
5454
}

src/Nager.Country/CountryInfos/ChileCountryInfo.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public sealed class ChileCountryInfo : ICountryInfo
2626
public int NumericCode => 152;
2727

2828
/// <inheritdoc/>
29-
public string[] TLD => new [] { ".cl" };
29+
public string[] TLD => [".cl"];
3030

3131
/// <inheritdoc/>
3232
public Region Region => Region.Americas;
@@ -35,17 +35,17 @@ public sealed class ChileCountryInfo : ICountryInfo
3535
public SubRegion SubRegion => SubRegion.SouthAmerica;
3636

3737
/// <inheritdoc/>
38-
public Alpha2Code[] BorderCountries => new Alpha2Code[]
39-
{
38+
public Alpha2Code[] BorderCountries =>
39+
[
4040
Alpha2Code.AR,
4141
Alpha2Code.BO,
4242
Alpha2Code.PE,
43-
};
43+
];
4444

4545
/// <inheritdoc/>
46-
public ICurrency[] Currencies => new [] { new ClpCurrency() };
46+
public ICurrency[] Currencies => [new ClpCurrency()];
4747

4848
/// <inheritdoc/>
49-
public string[] CallingCodes => new [] { "56" };
49+
public string[] CallingCodes => ["56"];
5050
}
5151
}

0 commit comments

Comments
 (0)