Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
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
6 changes: 6 additions & 0 deletions pkg/Microsoft.Private.PackageBaseline/packageIndex.json
Original file line number Diff line number Diff line change
Expand Up @@ -5307,6 +5307,12 @@
"uap10.0.16299": "4.0.1.0"
}
},
"System.Utf8String.Experimental": {
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.6.0"
}
},
"System.ValueTuple": {
"StableVersions": [
"4.3.0",
Expand Down
8 changes: 8 additions & 0 deletions pkg/descriptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2131,6 +2131,14 @@
"System.Transactions.TransactionScope"
]
},
{
"Name": "System.Utf8String.Experimental",
"Description": "Provides types for representation of UTF-8 string data.",
"CommonTypes": [
"System.Char8",
"System.Utf8String"
]
},
{
"Name": "System.ValueTuple",
"Description": "Provides the System.ValueTuple structs, which implement the underlying types for tuples in C# and Visual Basic.",
Expand Down
9 changes: 9 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,13 @@
<CoverageProbePath Include="shared\Microsoft.NETCore.App\9.9.9\il" />
<CoverageProbePath Include="shared\Microsoft.NETCore.App\9.9.9" />
</ItemGroup>

<!--
The Utf8String package is experimental. We don't want tests to inadvertently take a dependency on this
feature unless they explicitly opt in to it. (Source projects explicitly reference their dependencies,
so they can't inadvertently take a dependency on it.)
-->
<ItemGroup Condition="'$(IsTestProject)' == 'true' AND '$(IncludeUtf8StringAsmRef)' != 'true'">
<DefaultReferenceExclusions Include="System.Utf8String.Experimental" />
</ItemGroup>
</Project>
11 changes: 11 additions & 0 deletions src/System.Utf8String.Experimental/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<!-- System.Memory uses the Open key, so we will also. -->
<StrongNameKeyId>Open</StrongNameKeyId>
<!-- This is a preview package. Do not ship as stable. -->
<BlockStable>true</BlockStable>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27213.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Utf8String.Experimental.Tests", "tests\System.Utf8String.Experimental.Tests.csproj", "{72E9FB32-4692-4692-A10B-9F053F8F1A88}"
ProjectSection(ProjectDependencies) = postProject
{D4266847-6692-481B-9459-6141DB7DA339} = {D4266847-6692-481B-9459-6141DB7DA339}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Utf8String.Experimental", "src\System.Utf8String.Experimental.csproj", "{D4266847-6692-481B-9459-6141DB7DA339}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Utf8String.Experimental", "ref\System.Utf8String.Experimental.csproj", "{7AF57E6B-2CED-45C9-8BCA-5BBA60D018E0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7EC8921F-E96F-445B-AA33-453515641D93}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{8691446A-CA54-49FD-87B9-57A0C6B48095}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{FEB087F5-EF72-429D-8A0E-7636B84A1537}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D4266847-6692-481B-9459-6141DB7DA339}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU
{D4266847-6692-481B-9459-6141DB7DA339}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU
{D4266847-6692-481B-9459-6141DB7DA339}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU
{D4266847-6692-481B-9459-6141DB7DA339}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU
{7AF57E6B-2CED-45C9-8BCA-5BBA60D018E0}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU
{7AF57E6B-2CED-45C9-8BCA-5BBA60D018E0}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU
{7AF57E6B-2CED-45C9-8BCA-5BBA60D018E0}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU
{7AF57E6B-2CED-45C9-8BCA-5BBA60D018E0}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU
{72E9FB32-4692-4692-A10B-9F053F8F1A88}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU
{72E9FB32-4692-4692-A10B-9F053F8F1A88}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU
{72E9FB32-4692-4692-A10B-9F053F8F1A88}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU
{72E9FB32-4692-4692-A10B-9F053F8F1A88}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{D4266847-6692-481B-9459-6141DB7DA339} = {7EC8921F-E96F-445B-AA33-453515641D93}
{7AF57E6B-2CED-45C9-8BCA-5BBA60D018E0} = {8691446A-CA54-49FD-87B9-57A0C6B48095}
{72E9FB32-4692-4692-A10B-9F053F8F1A88} = {FEB087F5-EF72-429D-8A0E-7636B84A1537}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7196F6AB-8F22-4E4D-B6D1-3C2CFF86229C}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
<ItemGroup>
<ProjectReference Include="..\ref\System.Utf8String.Experimental.csproj">
<SupportedFramework>netcoreapp3.0;</SupportedFramework>
</ProjectReference>
<ProjectReference Include="..\src\System.Utf8String.Experimental.csproj" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
</Project>
8 changes: 8 additions & 0 deletions src/System.Utf8String.Experimental/ref/Configurations.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ProjectGuid>{7AF57E6B-2CED-45C9-8BCA-5BBA60D018E0}</ProjectGuid>
<Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Utf8String.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\System.Net.Http\ref\System.Net.Http.csproj" />
<ProjectReference Include="..\..\System.Net.Primitives\ref\System.Net.Primitives.csproj" />
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
<ProjectReference Include="..\..\System.Runtime.InteropServices\ref\System.Runtime.InteropServices.csproj" />
</ItemGroup>
</Project>
125 changes: 125 additions & 0 deletions src/System.Utf8String.Experimental/ref/System.Utf8String.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------

namespace System
{
public readonly partial struct Char8 : IComparable<Char8>, IEquatable<Char8>
{
private readonly int _dummy;
public static bool operator ==(Char8 left, Char8 right) => throw null;
public static bool operator !=(Char8 left, Char8 right) => throw null;
public static bool operator <(Char8 left, Char8 right) => throw null;
public static bool operator <=(Char8 left, Char8 right) => throw null;
public static bool operator >(Char8 left, Char8 right) => throw null;
public static bool operator >=(Char8 left, Char8 right) => throw null;
public static implicit operator byte(Char8 value) => throw null;
[CLSCompliant(false)]
public static explicit operator sbyte(Char8 value) => throw null;
public static explicit operator char(Char8 value) => throw null;
public static implicit operator short(Char8 value) => throw null;
[CLSCompliant(false)]
public static implicit operator ushort(Char8 value) => throw null;
public static implicit operator int(Char8 value) => throw null;
[CLSCompliant(false)]
public static implicit operator uint(Char8 value) => throw null;
public static implicit operator long(Char8 value) => throw null;
[CLSCompliant(false)]
public static implicit operator ulong(Char8 value) => throw null;
public static implicit operator Char8(byte value) => throw null;
[CLSCompliant(false)]
public static explicit operator Char8(sbyte value) => throw null;
public static explicit operator Char8(char value) => throw null;
public static explicit operator Char8(short value) => throw null;
[CLSCompliant(false)]
public static explicit operator Char8(ushort value) => throw null;
public static explicit operator Char8(int value) => throw null;
[CLSCompliant(false)]
public static explicit operator Char8(uint value) => throw null;
public static explicit operator Char8(long value) => throw null;
[CLSCompliant(false)]
public static explicit operator Char8(ulong value) => throw null;
public int CompareTo(Char8 other) => throw null;
public override bool Equals(object obj) => throw null;
public bool Equals(Char8 other) => throw null;
public override int GetHashCode() => throw null;
public override string ToString() => throw null;
}
public static partial class Utf8Extensions
{
public static ReadOnlySpan<byte> AsBytes(this ReadOnlySpan<Char8> text) => throw null;
public static ReadOnlySpan<byte> AsBytes(this Utf8String text) => throw null;
public static ReadOnlySpan<byte> AsBytes(this Utf8String text, int start) => throw null;
public static ReadOnlySpan<byte> AsBytes(this Utf8String text, int start, int length) => throw null;
public static ReadOnlySpan<Char8> AsSpan(this Utf8String text) => throw null;
public static ReadOnlySpan<Char8> AsSpan(this Utf8String text, int start) => throw null;
public static ReadOnlySpan<Char8> AsSpan(this Utf8String text, int start, int length) => throw null;
public static ReadOnlyMemory<Char8> AsMemory(this Utf8String text) => throw null;
public static ReadOnlyMemory<Char8> AsMemory(this Utf8String text, int start) => throw null;
public static ReadOnlyMemory<Char8> AsMemory(this Utf8String text, Index startIndex) => throw null;
public static ReadOnlyMemory<Char8> AsMemory(this Utf8String text, int start, int length) => throw null;
public static ReadOnlyMemory<Char8> AsMemory(this Utf8String text, Range range) => throw null;
public static ReadOnlyMemory<byte> AsMemoryBytes(this Utf8String text) => throw null;
public static ReadOnlyMemory<byte> AsMemoryBytes(this Utf8String text, int start) => throw null;
public static ReadOnlyMemory<byte> AsMemoryBytes(this Utf8String text, Index startIndex) => throw null;
public static ReadOnlyMemory<byte> AsMemoryBytes(this Utf8String text, int start, int length) => throw null;
public static ReadOnlyMemory<byte> AsMemoryBytes(this Utf8String text, Range range) => throw null;
}
public sealed partial class Utf8String : IEquatable<Utf8String>
{
public static readonly Utf8String Empty;
public Utf8String(ReadOnlySpan<byte> value) { }
public Utf8String(byte[] value, int startIndex, int length) { }
[CLSCompliant(false)]
public unsafe Utf8String(byte* value) { }
public Utf8String(ReadOnlySpan<char> value) { }
public Utf8String(char[] value, int startIndex, int length) { }
[CLSCompliant(false)]
public unsafe Utf8String(char* value) { }
public Utf8String(string value) { }
public static explicit operator ReadOnlySpan<byte>(Utf8String value) => throw null;
public static implicit operator ReadOnlySpan<Char8>(Utf8String value) => throw null;
public static bool operator ==(Utf8String left, Utf8String right) => throw null;
public static bool operator !=(Utf8String left, Utf8String right) => throw null;
public Char8 this[Index index] => throw null;
public Char8 this[int index] => throw null;
public Utf8String this[Range range] => throw null;
public int Length => throw null;
public bool Contains(char value) => throw null;
public bool Contains(System.Text.Rune value) => throw null;
public bool EndsWith(char value) => throw null;
public bool EndsWith(System.Text.Rune value) => throw null;
public override bool Equals(object obj) => throw null;
public bool Equals(Utf8String value) => throw null;
public static bool Equals(Utf8String left, Utf8String right) => throw null;
public override int GetHashCode() => throw null;
[ComponentModel.EditorBrowsable(ComponentModel.EditorBrowsableState.Never)] // for compiler use only
public ref readonly byte GetPinnableReference() => throw null;
public int IndexOf(char value) => throw null;
public int IndexOf(System.Text.Rune value) => throw null;
public static bool IsNullOrEmpty(Utf8String value) => throw null;
public bool StartsWith(char value) => throw null;
public bool StartsWith(System.Text.Rune value) => throw null;
public Utf8String Substring(Index startIndex) => throw null;
public Utf8String Substring(int startIndex) => throw null;
public Utf8String Substring(int startIndex, int length) => throw null;
public Utf8String Substring(Range range) => throw null;
public byte[] ToByteArray() => throw null;
public byte[] ToByteArray(int startIndex, int length) => throw null;
public override string ToString() => throw null;
}
}
namespace System.Net.Http
{
public sealed partial class Utf8StringContent : System.Net.Http.HttpContent
{
public Utf8StringContent(Utf8String content) { }
public Utf8StringContent(Utf8String content, string mediaType) { }
protected override System.Threading.Tasks.Task<System.IO.Stream> CreateContentReadStreamAsync() => throw null;
protected override System.Threading.Tasks.Task SerializeToStreamAsync(System.IO.Stream stream, System.Net.TransportContext context) => throw null;
protected override bool TryComputeLength(out long length) => throw null;
}
}
9 changes: 9 additions & 0 deletions src/System.Utf8String.Experimental/src/Configurations.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
</PropertyGroup>
</Project>
Loading