Skip to content
Open
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
29 changes: 29 additions & 0 deletions PenLink.AspNetCore.Mvc.Razor.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>PenLink.AspNetCore.Mvc.Razor</id>
<version>2.2.8-pl-1</version>
<authors>PenLink</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>ASP.NET Core MVC Razor view engine for CSHTML files.</description>
<releaseNotes>Microsoft.AspNetCore.Mvc.Razor built from the 2.2.8 tag using System.Text.StringBuilder instead of Microsoft.Extensions.Primitives.InplaceStringBuilder.</releaseNotes>
<projectUrl>https://github.com/dotnet/aspnetcore</projectUrl>
<copyright>Copyright 2023</copyright>
<license type="expression">Apache-2.0</license>
<tags>PenLink</tags>
<dependencies>
<group targetFramework=".NETStandard2.0">
<dependency id="Microsoft.AspNetCore.Mvc.ViewFeatures" version="2.2.0" exclude="Build,Analyzers" />
<dependency id="Microsoft.AspNetCore.Mvc.Razor.Extensions" version="2.2.0" exclude="Build,Analyzers" />
<dependency id="Microsoft.AspNetCore.Razor.Runtime" version="2.2.0" exclude="Build,Analyzers" />
<dependency id="Microsoft.CodeAnalysis.CSharp" version="2.8.0" exclude="Build,Analyzers" />
<dependency id="Microsoft.CodeAnalysis.Razor" version="2.2.0" exclude="Build,Analyzers" />
<dependency id="Microsoft.Extensions.Caching.Memory" version="2.2.0" exclude="Build,Analyzers" />
<dependency id="Microsoft.Extensions.FileProviders.Composite" version="2.2.0" exclude="Build,Analyzers" />
</group>
</dependencies>
</metadata>
<files>
<file src="PenLink.AspNetCore.Mvc.Razor\Microsoft.AspNetCore.Mvc.Razor.dll" target="lib\netstandard2.0" />
</files>
</package>
23 changes: 23 additions & 0 deletions PenLink.AspNetCore.Mvc.RazorPages.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>PenLink.AspNetCore.Mvc.RazorPages</id>
<version>2.2.8-pl-1</version>
<authors>PenLink</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>ASP.NET Core MVC Razor Pages.</description>
<releaseNotes>Microsoft.AspNetCore.Mvc.RazorPages built from the 2.2.8 tag using System.Text.StringBuilder instead of Microsoft.Extensions.Primitives.InplaceStringBuilder.</releaseNotes>
<projectUrl>https://github.com/dotnet/aspnetcore</projectUrl>
<copyright>Copyright 2023</copyright>
<license type="expression">Apache-2.0</license>
<tags>PenLink</tags>
<dependencies>
<group targetFramework=".NETStandard2.0">
<dependency id="PenLink.AspNetCore.Mvc.Razor" version="2.2.8-pl-1" exclude="Build,Analyzers" />
</group>
</dependencies>
</metadata>
<files>
<file src="PenLink.AspNetCore.Mvc.RazorPages\Microsoft.AspNetCore.Mvc.RazorPages.dll" target="lib\netstandard2.0" />
</files>
</package>
24 changes: 24 additions & 0 deletions PenLink.Net.Http.Headers.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>PenLink.Net.Http.Headers</id>
<version>2.2.8-pl-1</version>
<authors>PenLink</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>HTTP header parser implementations.</description>
<releaseNotes>Microsoft.Net.Http.Headers built from the 2.2.8 tag using System.Text.StringBuilder instead of Microsoft.Extensions.Primitives.InplaceStringBuilder.</releaseNotes>
<projectUrl>https://github.com/dotnet/aspnetcore</projectUrl>
<copyright>Copyright 2023</copyright>
<license type="expression">Apache-2.0</license>
<tags>PenLink</tags>
<dependencies>
<group targetFramework=".NETStandard2.0">
<dependency id="Microsoft.Extensions.Primitives" version="2.2.0" />
<dependency id="System.Buffers" version="4.5.0" />
</group>
</dependencies>
</metadata>
<files>
<file src="PenLink.Net.Http.Headers\Microsoft.Net.Http.Headers.dll" target="lib\netstandard2.0" />
</files>
</package>
2 changes: 2 additions & 0 deletions build/sources.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
</RestoreSources>
<RestoreSources Condition=" '$(DotNetBuildOffline)' != 'true' AND '$(DisableMyGetRestoreSources)' != 'true' ">
$(RestoreSources);
<!--
https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json;
https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json;
https://dotnet.myget.org/F/aspnetcore-master/api/v3/index.json;
https://dotnet.myget.org/F/roslyn/api/v3/index.json;
-->
https://pkgs.dev.azure.com/azure-public/vside/_packaging/vssdk/nuget/v3/index.json;
https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-impl/nuget/v3/index.json;
</RestoreSources>
Expand Down
2 changes: 1 addition & 1 deletion eng/targets/Npm.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<Target Name="Restore">
<Message Importance="High" Text="Running npm install on $(MSBuildProjectFullPath)" />
<Exec Command="npm ci" Condition="'$(CI)' == 'true'" />
<Exec Command="npm install --no-optional" Condition="'$(CI)' != 'true'" />
<Exec Command="npm install --omit=optional" Condition="'$(CI)' != 'true'" />
</Target>

<Target Name="PrepareForBuild">
Expand Down
11 changes: 6 additions & 5 deletions src/Http/Headers/src/DateTimeFormatter.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Text;
using Microsoft.Extensions.Primitives;

namespace Microsoft.Net.Http.Headers
Expand Down Expand Up @@ -37,7 +38,7 @@ public static string ToRfc1123String(this DateTimeOffset dateTime, bool quoted)
var universal = dateTime.UtcDateTime;

var length = quoted ? QuotedRfc1123DateLength : Rfc1123DateLength;
var target = new InplaceStringBuilder(length);
var target = new StringBuilder(length);

if (quoted)
{
Expand Down Expand Up @@ -66,7 +67,7 @@ public static string ToRfc1123String(this DateTimeOffset dateTime, bool quoted)
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static void AppendYear(ref InplaceStringBuilder target, int year)
private static void AppendYear(ref StringBuilder target, int year)
{
target.Append(GetAsciiChar(year / 1000));
target.Append(GetAsciiChar(year % 1000 / 100));
Expand All @@ -75,7 +76,7 @@ private static void AppendYear(ref InplaceStringBuilder target, int year)
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static void AppendTimeOfDay(ref InplaceStringBuilder target, TimeSpan timeOfDay)
private static void AppendTimeOfDay(ref StringBuilder target, TimeSpan timeOfDay)
{
AppendNumber(ref target, timeOfDay.Hours);
target.Append(Colon);
Expand All @@ -85,7 +86,7 @@ private static void AppendTimeOfDay(ref InplaceStringBuilder target, TimeSpan ti
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static void AppendNumber(ref InplaceStringBuilder target, int number)
private static void AppendNumber(ref StringBuilder target, int number)
{
target.Append(GetAsciiChar(number / 10));
target.Append(GetAsciiChar(number % 10));
Expand Down
7 changes: 4 additions & 3 deletions src/Http/Headers/src/HeaderUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.Globalization;
using System.Text;
using Microsoft.Extensions.Primitives;

namespace Microsoft.Net.Http.Headers
Expand Down Expand Up @@ -616,15 +617,15 @@ public static StringSegment UnescapeAsQuotedString(StringSegment input)
{
input = RemoveQuotes(input);

// First pass to calculate the size of the InplaceStringBuilder
// First pass to calculate the size of the StringBuilder
var backSlashCount = CountBackslashesForDecodingQuotedString(input);

if (backSlashCount == 0)
{
return input;
}

var stringBuilder = new InplaceStringBuilder(input.Length - backSlashCount);
var stringBuilder = new StringBuilder(input.Length - backSlashCount);

for (var i = 0; i < input.Length; i++)
{
Expand Down Expand Up @@ -687,7 +688,7 @@ public static StringSegment EscapeAsQuotedString(StringSegment input)
// By calling this, we know that the string requires quotes around it to be a valid token.
var backSlashCount = CountAndCheckCharactersNeedingBackslashesWhenEncoding(input);

var stringBuilder = new InplaceStringBuilder(input.Length + backSlashCount + 2); // 2 for quotes
var stringBuilder = new StringBuilder(input.Length + backSlashCount + 2); // 2 for quotes
stringBuilder.Append('\"');

for (var i = 0; i < input.Length; i++)
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Headers/src/Microsoft.Net.Http.Headers.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>HTTP header parser implementations.</Description>
Expand Down
4 changes: 2 additions & 2 deletions src/Http/Headers/src/SetCookieHeaderValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public override string ToString()
length += SeparatorToken.Length + HttpOnlyToken.Length;
}

var sb = new InplaceStringBuilder(length);
var sb = new StringBuilder(length);

sb.Append(_name);
sb.Append(EqualsToken);
Expand Down Expand Up @@ -210,7 +210,7 @@ public override string ToString()
return sb.ToString();
}

private static void AppendSegment(ref InplaceStringBuilder builder, StringSegment name, StringSegment value)
private static void AppendSegment(ref StringBuilder builder, StringSegment name, StringSegment value)
{
builder.Append(SeparatorToken);
builder.Append(name);
Expand Down
Loading