From 88c356f645e438ba0518d488182cde6a61fd0e21 Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Fri, 13 Nov 2015 15:12:11 -0800 Subject: [PATCH] Add HtmlContentBuilder and HtmlTextWriter Remove BufferedHtmlContent --- HttpAbstractions.sln | 32 +---- .../HtmlContentBuilder.cs} | 117 ++++++++++-------- .../HtmlContentBuilderExtensions.cs | 27 ---- .../HtmlEncodedString.cs | 49 ++++++++ .../HtmlTextWriter.cs | 49 ++++++++ .../Properties/AssemblyInfo.cs | 4 +- .../project.json | 1 + ...tensions.BufferedHtmlContent.Sources.xproj | 19 --- .../Properties/AssemblyInfo.cs | 8 -- .../project.json | 18 --- .../HtmlContentBuilderTest.cs} | 16 +-- .../project.json | 4 + ....Extensions.BufferedHtmlContent.Test.xproj | 21 ---- .../project.json | 21 ---- 14 files changed, 179 insertions(+), 207 deletions(-) rename src/{Microsoft.Extensions.BufferedHtmlContent.Sources/BufferedHtmlContent.cs => Microsoft.AspNet.Html.Abstractions/HtmlContentBuilder.cs} (52%) create mode 100644 src/Microsoft.AspNet.Html.Abstractions/HtmlEncodedString.cs create mode 100644 src/Microsoft.AspNet.Html.Abstractions/HtmlTextWriter.cs delete mode 100644 src/Microsoft.Extensions.BufferedHtmlContent.Sources/Microsoft.Extensions.BufferedHtmlContent.Sources.xproj delete mode 100644 src/Microsoft.Extensions.BufferedHtmlContent.Sources/Properties/AssemblyInfo.cs delete mode 100644 src/Microsoft.Extensions.BufferedHtmlContent.Sources/project.json rename test/{Microsoft.Extensions.BufferedHtmlContent.Test/BufferedHtmlContentTest.cs => Microsoft.AspNet.Html.Abstractions.Test/HtmlContentBuilderTest.cs} (90%) delete mode 100644 test/Microsoft.Extensions.BufferedHtmlContent.Test/Microsoft.Extensions.BufferedHtmlContent.Test.xproj delete mode 100644 test/Microsoft.Extensions.BufferedHtmlContent.Test/project.json diff --git a/HttpAbstractions.sln b/HttpAbstractions.sln index 289cdf8dcb..b2884f66ab 100644 --- a/HttpAbstractions.sln +++ b/HttpAbstractions.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 +VisualStudioVersion = 14.0.24711.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A5A15F1C-885A-452A-A731-B0173DDBD913}" EndProject @@ -46,10 +46,6 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "SampleApp", "samples\Sample EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Html.Abstractions.Test", "test\Microsoft.AspNet.Html.Abstractions.Test\Microsoft.AspNet.Html.Abstractions.Test.xproj", "{2D187B88-94BD-4A39-AC97-F8F8B9363301}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Extensions.BufferedHtmlContent.Sources", "src\Microsoft.Extensions.BufferedHtmlContent.Sources\Microsoft.Extensions.BufferedHtmlContent.Sources.xproj", "{B1B2B906-24AE-4C57-AAC5-19B734014504}" -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.Extensions.BufferedHtmlContent.Test", "test\Microsoft.Extensions.BufferedHtmlContent.Test\Microsoft.Extensions.BufferedHtmlContent.Test.xproj", "{3E5311E2-A73E-40CC-A58C-5A62CEAD43AE}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -264,30 +260,6 @@ Global {2D187B88-94BD-4A39-AC97-F8F8B9363301}.Release|Mixed Platforms.Build.0 = Release|Any CPU {2D187B88-94BD-4A39-AC97-F8F8B9363301}.Release|x86.ActiveCfg = Release|Any CPU {2D187B88-94BD-4A39-AC97-F8F8B9363301}.Release|x86.Build.0 = Release|Any CPU - {B1B2B906-24AE-4C57-AAC5-19B734014504}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B1B2B906-24AE-4C57-AAC5-19B734014504}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B1B2B906-24AE-4C57-AAC5-19B734014504}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {B1B2B906-24AE-4C57-AAC5-19B734014504}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {B1B2B906-24AE-4C57-AAC5-19B734014504}.Debug|x86.ActiveCfg = Debug|Any CPU - {B1B2B906-24AE-4C57-AAC5-19B734014504}.Debug|x86.Build.0 = Debug|Any CPU - {B1B2B906-24AE-4C57-AAC5-19B734014504}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B1B2B906-24AE-4C57-AAC5-19B734014504}.Release|Any CPU.Build.0 = Release|Any CPU - {B1B2B906-24AE-4C57-AAC5-19B734014504}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {B1B2B906-24AE-4C57-AAC5-19B734014504}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {B1B2B906-24AE-4C57-AAC5-19B734014504}.Release|x86.ActiveCfg = Release|Any CPU - {B1B2B906-24AE-4C57-AAC5-19B734014504}.Release|x86.Build.0 = Release|Any CPU - {3E5311E2-A73E-40CC-A58C-5A62CEAD43AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3E5311E2-A73E-40CC-A58C-5A62CEAD43AE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3E5311E2-A73E-40CC-A58C-5A62CEAD43AE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {3E5311E2-A73E-40CC-A58C-5A62CEAD43AE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {3E5311E2-A73E-40CC-A58C-5A62CEAD43AE}.Debug|x86.ActiveCfg = Debug|Any CPU - {3E5311E2-A73E-40CC-A58C-5A62CEAD43AE}.Debug|x86.Build.0 = Debug|Any CPU - {3E5311E2-A73E-40CC-A58C-5A62CEAD43AE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3E5311E2-A73E-40CC-A58C-5A62CEAD43AE}.Release|Any CPU.Build.0 = Release|Any CPU - {3E5311E2-A73E-40CC-A58C-5A62CEAD43AE}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {3E5311E2-A73E-40CC-A58C-5A62CEAD43AE}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {3E5311E2-A73E-40CC-A58C-5A62CEAD43AE}.Release|x86.ActiveCfg = Release|Any CPU - {3E5311E2-A73E-40CC-A58C-5A62CEAD43AE}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -312,7 +284,5 @@ Global {68A28E4A-3ADE-4187-9625-4FF185887CB3} = {A5A15F1C-885A-452A-A731-B0173DDBD913} {1D0764B4-1DEB-4232-A714-D4B7E846918A} = {982F09D8-621E-4872-BA7B-BBDEA47D1EFD} {2D187B88-94BD-4A39-AC97-F8F8B9363301} = {F31FF137-390C-49BF-A3BD-7C6ED3597C21} - {B1B2B906-24AE-4C57-AAC5-19B734014504} = {A5A15F1C-885A-452A-A731-B0173DDBD913} - {3E5311E2-A73E-40CC-A58C-5A62CEAD43AE} = {F31FF137-390C-49BF-A3BD-7C6ED3597C21} EndGlobalSection EndGlobal diff --git a/src/Microsoft.Extensions.BufferedHtmlContent.Sources/BufferedHtmlContent.cs b/src/Microsoft.AspNet.Html.Abstractions/HtmlContentBuilder.cs similarity index 52% rename from src/Microsoft.Extensions.BufferedHtmlContent.Sources/BufferedHtmlContent.cs rename to src/Microsoft.AspNet.Html.Abstractions/HtmlContentBuilder.cs index 4ca8ba7be8..0f6fbabc4c 100644 --- a/src/Microsoft.Extensions.BufferedHtmlContent.Sources/BufferedHtmlContent.cs +++ b/src/Microsoft.AspNet.Html.Abstractions/HtmlContentBuilder.cs @@ -1,62 +1,95 @@ -// 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.Collections.Generic; -using System.Diagnostics; using System.IO; using System.Text.Encodings.Web; -using Microsoft.AspNet.Html.Abstractions; -namespace Microsoft.Extensions.Internal +namespace Microsoft.AspNet.Html.Abstractions { /// - /// Enumerable object collection which knows how to write itself. + /// An implementation using an in memory list. /// - [DebuggerDisplay("{DebuggerToString()}")] - internal class BufferedHtmlContent : IHtmlContentBuilder + public class HtmlContentBuilder : IHtmlContentBuilder { - // This is not List because that would lead to wrapping all strings to IHtmlContent - // which is not space performant. - // internal for testing. - internal List Entries { get; } = new List(); - /// - /// Appends the to the collection. + /// Creates a new . /// - /// The string to be appended. - /// A reference to this instance after the Append operation has completed. - public IHtmlContentBuilder Append(string unencoded) + public HtmlContentBuilder() + : this(new List()) { - Entries.Add(unencoded); - return this; } /// - /// Appends a to the collection. + /// Creates a new with the given initial capacity. /// - /// The to be appended. - /// A reference to this instance after the Append operation has completed. + /// The initial capacity of the backing store. + public HtmlContentBuilder(int capacity) + : this(new List(capacity)) + { + } + + /// + /// Creates a new with the given list of entries. + /// + /// + /// The list of entries. The will use this list without making a copy. + /// + public HtmlContentBuilder(List entries) + { + if (entries == null) + { + throw new ArgumentNullException(nameof(entries)); + } + + Entries = entries; + } + + // This is not List because that would lead to wrapping all strings to IHtmlContent + // which is not space performant. + // + // In general unencoded strings are added here. We're optimizing for that case, and allocating + // a wrapper when encoded strings are used. + // + // internal for testing. + internal List Entries { get; } + + /// + public IHtmlContentBuilder Append(string unencoded) + { + if (!string.IsNullOrEmpty(unencoded)) + { + Entries.Add(unencoded); + } + + return this; + } + + /// public IHtmlContentBuilder Append(IHtmlContent htmlContent) { + if (htmlContent == null) + { + return this; + } + Entries.Add(htmlContent); return this; } - /// - /// Appends the HTML encoded to the collection. - /// - /// The HTML encoded string to be appended. - /// A reference to this instance after the Append operation has completed. + /// public IHtmlContentBuilder AppendHtml(string encoded) { - Entries.Add(new HtmlEncodedString(encoded)); + if (!string.IsNullOrEmpty(encoded)) + { + Entries.Add(new HtmlEncodedString(encoded)); + } + return this; } - /// - /// Removes all the entries from the collection. - /// - /// A reference to this instance after the Clear operation has completed. + + /// public IHtmlContentBuilder Clear() { Entries.Clear(); @@ -78,11 +111,6 @@ namespace Microsoft.Extensions.Internal foreach (var entry in Entries) { - if (entry == null) - { - continue; - } - var entryAsString = entry as string; if (entryAsString != null) { @@ -104,22 +132,5 @@ namespace Microsoft.Extensions.Internal return writer.ToString(); } } - - private class HtmlEncodedString : IHtmlContent - { - public static readonly IHtmlContent NewLine = new HtmlEncodedString(Environment.NewLine); - - private readonly string _value; - - public HtmlEncodedString(string value) - { - _value = value; - } - - public void WriteTo(TextWriter writer, HtmlEncoder encoder) - { - writer.Write(_value); - } - } } } diff --git a/src/Microsoft.AspNet.Html.Abstractions/HtmlContentBuilderExtensions.cs b/src/Microsoft.AspNet.Html.Abstractions/HtmlContentBuilderExtensions.cs index 5b1164b438..63c311c6e0 100644 --- a/src/Microsoft.AspNet.Html.Abstractions/HtmlContentBuilderExtensions.cs +++ b/src/Microsoft.AspNet.Html.Abstractions/HtmlContentBuilderExtensions.cs @@ -185,33 +185,6 @@ namespace Microsoft.AspNet.Html.Abstractions return builder; } - [DebuggerDisplay("{DebuggerToString()}")] - private class HtmlEncodedString : IHtmlContent - { - public static readonly IHtmlContent NewLine = new HtmlEncodedString(Environment.NewLine); - - private readonly string _value; - - public HtmlEncodedString(string value) - { - _value = value; - } - - public void WriteTo(TextWriter writer, HtmlEncoder encoder) - { - writer.Write(_value); - } - - private string DebuggerToString() - { - using (var writer = new StringWriter()) - { - WriteTo(writer, HtmlEncoder.Default); - return writer.ToString(); - } - } - } - [DebuggerDisplay("{DebuggerToString()}")] private class HtmlFormatString : IHtmlContent { diff --git a/src/Microsoft.AspNet.Html.Abstractions/HtmlEncodedString.cs b/src/Microsoft.AspNet.Html.Abstractions/HtmlEncodedString.cs new file mode 100644 index 0000000000..ccf417054e --- /dev/null +++ b/src/Microsoft.AspNet.Html.Abstractions/HtmlEncodedString.cs @@ -0,0 +1,49 @@ +// 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.Diagnostics; +using System.IO; +using System.Text.Encodings.Web; + +namespace Microsoft.AspNet.Html.Abstractions +{ + /// + /// An impelementation that wraps an HTML encoded . + /// + [DebuggerDisplay("{DebuggerToString()}")] + public class HtmlEncodedString : IHtmlContent + { + /// + /// An instance for . + /// + public static readonly IHtmlContent NewLine = new HtmlEncodedString(Environment.NewLine); + + private readonly string _value; + + /// + /// Creates a new . + /// + /// The HTML encoded value. + public HtmlEncodedString(string value) + { + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + + _value = value; + } + + /// + public void WriteTo(TextWriter writer, HtmlEncoder encoder) + { + writer.Write(_value); + } + + private string DebuggerToString() + { + return _value; + } + } +} diff --git a/src/Microsoft.AspNet.Html.Abstractions/HtmlTextWriter.cs b/src/Microsoft.AspNet.Html.Abstractions/HtmlTextWriter.cs new file mode 100644 index 0000000000..143d97f206 --- /dev/null +++ b/src/Microsoft.AspNet.Html.Abstractions/HtmlTextWriter.cs @@ -0,0 +1,49 @@ +// 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.IO; + +namespace Microsoft.AspNet.Html.Abstractions +{ + /// + /// A which supports special processing of . + /// + public abstract class HtmlTextWriter : TextWriter + { + /// + /// Writes an value. + /// + /// The value. + public abstract void Write(IHtmlContent value); + + /// + public override void Write(object value) + { + var htmlContent = value as IHtmlContent; + if (htmlContent == null) + { + base.Write(value); + } + else + { + Write(htmlContent); + } + } + + /// + public override void WriteLine(object value) + { + var htmlContent = value as IHtmlContent; + if (htmlContent == null) + { + base.Write(value); + } + else + { + Write(htmlContent); + } + + base.WriteLine(); + } + } +} diff --git a/src/Microsoft.AspNet.Html.Abstractions/Properties/AssemblyInfo.cs b/src/Microsoft.AspNet.Html.Abstractions/Properties/AssemblyInfo.cs index b2437d9ad6..d310306c25 100644 --- a/src/Microsoft.AspNet.Html.Abstractions/Properties/AssemblyInfo.cs +++ b/src/Microsoft.AspNet.Html.Abstractions/Properties/AssemblyInfo.cs @@ -3,6 +3,8 @@ using System.Reflection; using System.Resources; +using System.Runtime.CompilerServices; [assembly: AssemblyMetadata("Serviceable", "True")] -[assembly: NeutralResourcesLanguage("en-us")] \ No newline at end of file +[assembly: NeutralResourcesLanguage("en-us")] +[assembly: InternalsVisibleTo("Microsoft.AspNet.Html.Abstractions.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] \ No newline at end of file diff --git a/src/Microsoft.AspNet.Html.Abstractions/project.json b/src/Microsoft.AspNet.Html.Abstractions/project.json index cc263ffbe0..c654bcde77 100644 --- a/src/Microsoft.AspNet.Html.Abstractions/project.json +++ b/src/Microsoft.AspNet.Html.Abstractions/project.json @@ -21,6 +21,7 @@ }, "dotnet5.4": { "dependencies": { + "System.Collections": "4.0.11-*", "System.Resources.ResourceManager": "4.0.1-*" } } diff --git a/src/Microsoft.Extensions.BufferedHtmlContent.Sources/Microsoft.Extensions.BufferedHtmlContent.Sources.xproj b/src/Microsoft.Extensions.BufferedHtmlContent.Sources/Microsoft.Extensions.BufferedHtmlContent.Sources.xproj deleted file mode 100644 index 6d93971523..0000000000 --- a/src/Microsoft.Extensions.BufferedHtmlContent.Sources/Microsoft.Extensions.BufferedHtmlContent.Sources.xproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - b1b2b906-24ae-4c57-aac5-19b734014504 - Microsoft.Extensions.BufferedHtmlContent.Sources - ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\bin\$(MSBuildProjectName)\ - - - - 2.0 - - - \ No newline at end of file diff --git a/src/Microsoft.Extensions.BufferedHtmlContent.Sources/Properties/AssemblyInfo.cs b/src/Microsoft.Extensions.BufferedHtmlContent.Sources/Properties/AssemblyInfo.cs deleted file mode 100644 index b2437d9ad6..0000000000 --- a/src/Microsoft.Extensions.BufferedHtmlContent.Sources/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,8 +0,0 @@ -// 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.Reflection; -using System.Resources; - -[assembly: AssemblyMetadata("Serviceable", "True")] -[assembly: NeutralResourcesLanguage("en-us")] \ No newline at end of file diff --git a/src/Microsoft.Extensions.BufferedHtmlContent.Sources/project.json b/src/Microsoft.Extensions.BufferedHtmlContent.Sources/project.json deleted file mode 100644 index 273702a80e..0000000000 --- a/src/Microsoft.Extensions.BufferedHtmlContent.Sources/project.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "version": "1.0.0-*", - "compilationOptions": { - "warningsAsErrors": true, - "keyFile": "../../tools/Key.snk" - }, - "shared": "*.cs", - "dependencies": {}, - "frameworks": { - "net451": {}, - "dotnet5.4": { - "dependencies": { - "System.Resources.ResourceManager": "4.0.1-*", - "System.Runtime": "4.0.21-*" - } - } - } -} diff --git a/test/Microsoft.Extensions.BufferedHtmlContent.Test/BufferedHtmlContentTest.cs b/test/Microsoft.AspNet.Html.Abstractions.Test/HtmlContentBuilderTest.cs similarity index 90% rename from test/Microsoft.Extensions.BufferedHtmlContent.Test/BufferedHtmlContentTest.cs rename to test/Microsoft.AspNet.Html.Abstractions.Test/HtmlContentBuilderTest.cs index f65cb4eaaf..4c2c3177cb 100644 --- a/test/Microsoft.Extensions.BufferedHtmlContent.Test/BufferedHtmlContentTest.cs +++ b/test/Microsoft.AspNet.Html.Abstractions.Test/HtmlContentBuilderTest.cs @@ -9,13 +9,13 @@ using Xunit; namespace Microsoft.Extensions.Internal { - public class BufferedHtmlContentTest + public class HtmlContentBuilderTest { [Fact] public void AppendString_AppendsAString() { // Arrange - var content = new BufferedHtmlContent(); + var content = new HtmlContentBuilder(); // Act content.Append("Hello"); @@ -29,7 +29,7 @@ namespace Microsoft.Extensions.Internal public void AppendString_WrittenAsEncoded() { // Arrange - var content = new BufferedHtmlContent(); + var content = new HtmlContentBuilder(); content.Append("Hello"); var writer = new StringWriter(); @@ -45,7 +45,7 @@ namespace Microsoft.Extensions.Internal public void AppendHtml_DoesNotGetWrittenAsEncoded() { // Arrange - var content = new BufferedHtmlContent(); + var content = new HtmlContentBuilder(); content.AppendHtml("Hello"); var writer = new StringWriter(); @@ -61,7 +61,7 @@ namespace Microsoft.Extensions.Internal public void AppendIHtmlContent_AppendsAsIs() { // Arrange - var content = new BufferedHtmlContent(); + var content = new HtmlContentBuilder(); var writer = new StringWriter(); // Act @@ -78,7 +78,7 @@ namespace Microsoft.Extensions.Internal public void CanAppendMultipleItems() { // Arrange - var content = new BufferedHtmlContent(); + var content = new HtmlContentBuilder(); // Act content.Append(new TestHtmlContent("hello")); @@ -94,7 +94,7 @@ namespace Microsoft.Extensions.Internal public void Clear_DeletesAllItems() { // Arrange - var content = new BufferedHtmlContent(); + var content = new HtmlContentBuilder(); content.Append(new TestHtmlContent("hello")); content.Append("Test"); @@ -109,7 +109,7 @@ namespace Microsoft.Extensions.Internal public void WriteTo_WritesAllItems() { // Arrange - var content = new BufferedHtmlContent(); + var content = new HtmlContentBuilder(); var writer = new StringWriter(); content.Append(new TestHtmlContent("Hello")); content.Append("Test"); diff --git a/test/Microsoft.AspNet.Html.Abstractions.Test/project.json b/test/Microsoft.AspNet.Html.Abstractions.Test/project.json index 06a8d06a2c..b8e9656f15 100644 --- a/test/Microsoft.AspNet.Html.Abstractions.Test/project.json +++ b/test/Microsoft.AspNet.Html.Abstractions.Test/project.json @@ -1,4 +1,8 @@ { + "compilationOptions": { + "warningsAsErrors": true, + "keyFile": "../../tools/Key.snk" + }, "dependencies": { "Microsoft.AspNet.Html.Abstractions": "1.0.0-*", "Microsoft.AspNet.Testing": "1.0.0-*", diff --git a/test/Microsoft.Extensions.BufferedHtmlContent.Test/Microsoft.Extensions.BufferedHtmlContent.Test.xproj b/test/Microsoft.Extensions.BufferedHtmlContent.Test/Microsoft.Extensions.BufferedHtmlContent.Test.xproj deleted file mode 100644 index f0c4c7f35a..0000000000 --- a/test/Microsoft.Extensions.BufferedHtmlContent.Test/Microsoft.Extensions.BufferedHtmlContent.Test.xproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 3e5311e2-a73e-40cc-a58c-5a62cead43ae - Microsoft.Extensions.BufferedHtmlContent.Test - ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\bin\$(MSBuildProjectName)\ - - - 2.0 - - - - - - \ No newline at end of file diff --git a/test/Microsoft.Extensions.BufferedHtmlContent.Test/project.json b/test/Microsoft.Extensions.BufferedHtmlContent.Test/project.json deleted file mode 100644 index 8ed950043b..0000000000 --- a/test/Microsoft.Extensions.BufferedHtmlContent.Test/project.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "compilationOptions": { - "warningsAsErrors": true - }, - "dependencies": { - "Microsoft.AspNet.Html.Abstractions": "1.0.0-*", - "Microsoft.Extensions.BufferedHtmlContent.Sources": { - "type": "build", - "version": "1.0.0-*" - }, - "Microsoft.Extensions.WebEncoders.Tests" : "1.0.0-*", - "xunit.runner.aspnet": "2.0.0-aspnet-*" - }, - "commands": { - "test": "xunit.runner.aspnet" - }, - "frameworks": { - "dnx451": { }, - "dnxcore50": { } - } -}