From 0ae00aa049f3ce36272c239521c70e441ef49b06 Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Sat, 29 Feb 2020 04:39:38 -0600 Subject: [PATCH] Enable nullable annotations for Utf8String. (#32967) Clean up unnecessary things in the .csproj files. --- .../ref/System.Utf8String.Experimental.csproj | 1 - .../src/System.Utf8String.Experimental.csproj | 2 +- .../src/System/Net/Http/Utf8StringContent.cs | 4 ++-- .../tests/System.Utf8String.Experimental.Tests.csproj | 1 - 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/libraries/System.Utf8String.Experimental/ref/System.Utf8String.Experimental.csproj b/src/libraries/System.Utf8String.Experimental/ref/System.Utf8String.Experimental.csproj index d4b2ac75b6c11..8356230578e6c 100644 --- a/src/libraries/System.Utf8String.Experimental/ref/System.Utf8String.Experimental.csproj +++ b/src/libraries/System.Utf8String.Experimental/ref/System.Utf8String.Experimental.csproj @@ -1,7 +1,6 @@ true - {7AF57E6B-2CED-45C9-8BCA-5BBA60D018E0} $(NoWarn);0809;0618 $(NetCoreAppCurrent) diff --git a/src/libraries/System.Utf8String.Experimental/src/System.Utf8String.Experimental.csproj b/src/libraries/System.Utf8String.Experimental/src/System.Utf8String.Experimental.csproj index 32aa714b5815f..fb6e385f0988b 100644 --- a/src/libraries/System.Utf8String.Experimental/src/System.Utf8String.Experimental.csproj +++ b/src/libraries/System.Utf8String.Experimental/src/System.Utf8String.Experimental.csproj @@ -3,7 +3,7 @@ true true $(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix - System + enable diff --git a/src/libraries/System.Utf8String.Experimental/src/System/Net/Http/Utf8StringContent.cs b/src/libraries/System.Utf8String.Experimental/src/System/Net/Http/Utf8StringContent.cs index 18b36eed9f0e4..8fa7c7992c0de 100644 --- a/src/libraries/System.Utf8String.Experimental/src/System/Net/Http/Utf8StringContent.cs +++ b/src/libraries/System.Utf8String.Experimental/src/System/Net/Http/Utf8StringContent.cs @@ -19,7 +19,7 @@ public Utf8StringContent(Utf8String content) { } - public Utf8StringContent(Utf8String content, string mediaType) + public Utf8StringContent(Utf8String content, string? mediaType) { if (content is null) { @@ -41,7 +41,7 @@ protected override Task CreateContentReadStreamAsync() return Task.FromResult(new Utf8StringStream(_content)); } - protected override Task SerializeToStreamAsync(Stream stream, TransportContext context) + protected override Task SerializeToStreamAsync(Stream stream, TransportContext? context) { return stream.WriteAsync(_content.AsMemoryBytes()).AsTask(); } diff --git a/src/libraries/System.Utf8String.Experimental/tests/System.Utf8String.Experimental.Tests.csproj b/src/libraries/System.Utf8String.Experimental/tests/System.Utf8String.Experimental.Tests.csproj index 333b6d1a1e950..669fe610acf22 100644 --- a/src/libraries/System.Utf8String.Experimental/tests/System.Utf8String.Experimental.Tests.csproj +++ b/src/libraries/System.Utf8String.Experimental/tests/System.Utf8String.Experimental.Tests.csproj @@ -5,7 +5,6 @@ $(NetCoreAppCurrent) true true - System