Skip to content

Commit aecd4bb

Browse files
committed
Add Latin1
1 parent 24fd220 commit aecd4bb

24 files changed

+245
-4781
lines changed

TestResults/ApiBuilderTests-windows-net11.0-report.html

Lines changed: 0 additions & 1593 deletions
This file was deleted.

TestResults/Tests-windows-net10.0-report.html

Lines changed: 0 additions & 1593 deletions
This file was deleted.

TestResults/Tests-windows-net48-report.html

Lines changed: 0 additions & 1593 deletions
This file was deleted.

apiCount.include.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
**API count: 749**
1+
**API count: 750**

api_list.include.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@
208208
* `string GetString(ReadOnlySpan<byte>)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding.getstring?view=net-11.0#system-text-encoding-getstring(system-readonlyspan((system-byte))))
209209
* `bool TryGetBytes(ReadOnlySpan<char>, Span<byte>, int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding.trygetbytes?view=net-11.0)
210210
* `bool TryGetChars(ReadOnlySpan<byte>, Span<char>, int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding.trygetchars?view=net-11.0)
211+
* `Latin1` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding.latin1?view=net-11.0)
211212

212213

213214
#### Enum

readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The package targets `netstandard2.0` and is designed to support the following ru
1313
* `uap10`
1414

1515

16-
**API count: 749**<!-- singleLineInclude: apiCount. path: /apiCount.include.md -->
16+
**API count: 750**<!-- singleLineInclude: apiCount. path: /apiCount.include.md -->
1717

1818

1919
**See [Milestones](../../milestones?state=closed) for release notes.**
@@ -711,6 +711,7 @@ The class `Polyfill` includes the following extension methods:
711711
* `string GetString(ReadOnlySpan<byte>)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding.getstring?view=net-11.0#system-text-encoding-getstring(system-readonlyspan((system-byte))))
712712
* `bool TryGetBytes(ReadOnlySpan<char>, Span<byte>, int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding.trygetbytes?view=net-11.0)
713713
* `bool TryGetChars(ReadOnlySpan<byte>, Span<char>, int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding.trygetchars?view=net-11.0)
714+
* `Latin1` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding.latin1?view=net-11.0)
714715

715716

716717
#### Enum

src/Consume/Consume.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,11 @@ void Enum_Methods()
551551
values = Enum.GetValuesAsUnderlyingType<DayOfWeek>();
552552
}
553553

554+
void Encoding_Methods()
555+
{
556+
var latin1 = Encoding.Latin1;
557+
}
558+
554559
void Environment_Methods()
555560
{
556561
var processPath = Environment.ProcessPath;

src/Polyfill/EncodingPolyfill.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#if !NET5_0_OR_GREATER
2+
3+
namespace Polyfills;
4+
5+
using System.Text;
6+
7+
static partial class Polyfill
8+
{
9+
extension(Encoding)
10+
{
11+
/// <summary>
12+
/// Gets an encoding for the Latin1 character set (ISO-8859-1).
13+
/// </summary>
14+
//Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding.latin1?view=net-11.0
15+
public static Encoding Latin1 => Encoding.GetEncoding(28591);
16+
}
17+
}
18+
#endif
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// <auto-generated />
2+
#pragma warning disable
3+
namespace Polyfills;
4+
using System.Text;
5+
static partial class Polyfill
6+
{
7+
extension(Encoding)
8+
{
9+
/// <summary>
10+
/// Gets an encoding for the Latin1 character set (ISO-8859-1).
11+
/// </summary>
12+
public static Encoding Latin1 => Encoding.GetEncoding(28591);
13+
}
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// <auto-generated />
2+
#pragma warning disable
3+
namespace Polyfills;
4+
using System.Text;
5+
static partial class Polyfill
6+
{
7+
extension(Encoding)
8+
{
9+
/// <summary>
10+
/// Gets an encoding for the Latin1 character set (ISO-8859-1).
11+
/// </summary>
12+
public static Encoding Latin1 => Encoding.GetEncoding(28591);
13+
}
14+
}

0 commit comments

Comments
 (0)