From d329cca17d3f107b8181213cb95e3a7986dc0bba Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Wed, 13 Mar 2019 07:57:16 -0700 Subject: [PATCH] Change APIs to internal in Diagnostics These types are still used, but we don't want them to be public. --- ...stics.EntityFrameworkCore.netcoreapp3.0.cs | 50 ---------------- ...ft.AspNetCore.Diagnostics.netcoreapp3.0.cs | 60 ------------------- .../WelcomePage/Views/Obsolete/WelcomePage.cs | 7 +-- src/Shared/Diagnostics/AttributeValue.cs | 3 +- src/Shared/Diagnostics/BaseView.cs | 6 +- src/Shared/Diagnostics/HelperResult.cs | 3 +- 6 files changed, 6 insertions(+), 123 deletions(-) diff --git a/src/Middleware/Diagnostics.EntityFrameworkCore/ref/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.netcoreapp3.0.cs b/src/Middleware/Diagnostics.EntityFrameworkCore/ref/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.netcoreapp3.0.cs index 3f1d3a276d..04d8f01552 100644 --- a/src/Middleware/Diagnostics.EntityFrameworkCore/ref/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.netcoreapp3.0.cs +++ b/src/Middleware/Diagnostics.EntityFrameworkCore/ref/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.netcoreapp3.0.cs @@ -46,53 +46,3 @@ namespace Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore public virtual System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) { throw null; } } } -namespace Microsoft.AspNetCore.DiagnosticsViewPage.Views -{ - [System.ObsoleteAttribute("This type is for internal use only and will be removed in a future version.")] - public partial class AttributeValue - { - public AttributeValue(string prefix, object value, bool literal) { } - public bool Literal { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string Prefix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public object Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public static Microsoft.AspNetCore.DiagnosticsViewPage.Views.AttributeValue FromTuple(System.Tuple value) { throw null; } - public static Microsoft.AspNetCore.DiagnosticsViewPage.Views.AttributeValue FromTuple(System.Tuple value) { throw null; } - public static implicit operator Microsoft.AspNetCore.DiagnosticsViewPage.Views.AttributeValue (System.Tuple value) { throw null; } - } - [System.ObsoleteAttribute("This type is for internal use only and will be removed in a future version.")] - public abstract partial class BaseView - { - protected BaseView() { } - protected Microsoft.AspNetCore.Http.HttpContext Context { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - protected System.Text.Encodings.Web.HtmlEncoder HtmlEncoder { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - protected System.Text.Encodings.Web.JavaScriptEncoder JavaScriptEncoder { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - protected System.IO.StreamWriter Output { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - protected Microsoft.AspNetCore.Http.HttpRequest Request { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - protected Microsoft.AspNetCore.Http.HttpResponse Response { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - protected System.Text.Encodings.Web.UrlEncoder UrlEncoder { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - protected void BeginWriteAttribute(string name, string begining, int startPosition, string ending, int endPosition, int thingy) { } - protected void EndWriteAttribute() { } - public abstract System.Threading.Tasks.Task ExecuteAsync(); - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Http.HttpContext context) { throw null; } - protected string HtmlEncodeAndReplaceLineBreaks(string input) { throw null; } - protected void Write(Microsoft.AspNetCore.DiagnosticsViewPage.Views.HelperResult result) { } - protected void Write(object value) { } - protected void Write(string value) { } - protected void WriteAttributeTo(System.IO.TextWriter writer, string name, string leader, string trailer, params Microsoft.AspNetCore.DiagnosticsViewPage.Views.AttributeValue[] values) { } - protected void WriteAttributeValue(string thingy, int startPostion, object value, int endValue, int dealyo, bool yesno) { } - protected void WriteLiteral(object value) { } - protected void WriteLiteral(string value) { } - protected void WriteLiteralTo(System.IO.TextWriter writer, object value) { } - protected void WriteLiteralTo(System.IO.TextWriter writer, string value) { } - protected void WriteTo(System.IO.TextWriter writer, object value) { } - protected void WriteTo(System.IO.TextWriter writer, string value) { } - } - [System.ObsoleteAttribute("This type is for internal use only and will be removed in a future version.")] - public partial class HelperResult - { - public HelperResult(System.Action action) { } - public System.Action WriteAction { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public void WriteTo(System.IO.TextWriter writer) { } - } -} diff --git a/src/Middleware/Diagnostics/ref/Microsoft.AspNetCore.Diagnostics.netcoreapp3.0.cs b/src/Middleware/Diagnostics/ref/Microsoft.AspNetCore.Diagnostics.netcoreapp3.0.cs index bafaf3849c..d0b332177b 100644 --- a/src/Middleware/Diagnostics/ref/Microsoft.AspNetCore.Diagnostics.netcoreapp3.0.cs +++ b/src/Middleware/Diagnostics/ref/Microsoft.AspNetCore.Diagnostics.netcoreapp3.0.cs @@ -106,63 +106,3 @@ namespace Microsoft.AspNetCore.Diagnostics public System.Threading.Tasks.Task Invoke(Microsoft.AspNetCore.Http.HttpContext context) { throw null; } } } -namespace Microsoft.AspNetCore.Diagnostics.Views -{ - [System.ObsoleteAttribute("This type is for internal use only and will be removed in a future version.")] - public partial class WelcomePage : Microsoft.AspNetCore.DiagnosticsViewPage.Views.BaseView - { - public WelcomePage() { } - [System.Diagnostics.DebuggerStepThroughAttribute] - public override System.Threading.Tasks.Task ExecuteAsync() { throw null; } - } -} -namespace Microsoft.AspNetCore.DiagnosticsViewPage.Views -{ - [System.ObsoleteAttribute("This type is for internal use only and will be removed in a future version.")] - public partial class AttributeValue - { - public AttributeValue(string prefix, object value, bool literal) { } - public bool Literal { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string Prefix { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public object Value { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public static Microsoft.AspNetCore.DiagnosticsViewPage.Views.AttributeValue FromTuple(System.Tuple value) { throw null; } - public static Microsoft.AspNetCore.DiagnosticsViewPage.Views.AttributeValue FromTuple(System.Tuple value) { throw null; } - public static implicit operator Microsoft.AspNetCore.DiagnosticsViewPage.Views.AttributeValue (System.Tuple value) { throw null; } - } - [System.ObsoleteAttribute("This type is for internal use only and will be removed in a future version.")] - public abstract partial class BaseView - { - protected BaseView() { } - protected Microsoft.AspNetCore.Http.HttpContext Context { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - protected System.Text.Encodings.Web.HtmlEncoder HtmlEncoder { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - protected System.Text.Encodings.Web.JavaScriptEncoder JavaScriptEncoder { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - protected System.IO.StreamWriter Output { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - protected Microsoft.AspNetCore.Http.HttpRequest Request { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - protected Microsoft.AspNetCore.Http.HttpResponse Response { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - protected System.Text.Encodings.Web.UrlEncoder UrlEncoder { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - protected void BeginWriteAttribute(string name, string begining, int startPosition, string ending, int endPosition, int thingy) { } - protected void EndWriteAttribute() { } - public abstract System.Threading.Tasks.Task ExecuteAsync(); - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Http.HttpContext context) { throw null; } - protected string HtmlEncodeAndReplaceLineBreaks(string input) { throw null; } - protected void Write(Microsoft.AspNetCore.DiagnosticsViewPage.Views.HelperResult result) { } - protected void Write(object value) { } - protected void Write(string value) { } - protected void WriteAttributeTo(System.IO.TextWriter writer, string name, string leader, string trailer, params Microsoft.AspNetCore.DiagnosticsViewPage.Views.AttributeValue[] values) { } - protected void WriteAttributeValue(string thingy, int startPostion, object value, int endValue, int dealyo, bool yesno) { } - protected void WriteLiteral(object value) { } - protected void WriteLiteral(string value) { } - protected void WriteLiteralTo(System.IO.TextWriter writer, object value) { } - protected void WriteLiteralTo(System.IO.TextWriter writer, string value) { } - protected void WriteTo(System.IO.TextWriter writer, object value) { } - protected void WriteTo(System.IO.TextWriter writer, string value) { } - } - [System.ObsoleteAttribute("This type is for internal use only and will be removed in a future version.")] - public partial class HelperResult - { - public HelperResult(System.Action action) { } - public System.Action WriteAction { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public void WriteTo(System.IO.TextWriter writer) { } - } -} diff --git a/src/Middleware/Diagnostics/src/WelcomePage/Views/Obsolete/WelcomePage.cs b/src/Middleware/Diagnostics/src/WelcomePage/Views/Obsolete/WelcomePage.cs index 991c601bb6..d60ef48f3a 100644 --- a/src/Middleware/Diagnostics/src/WelcomePage/Views/Obsolete/WelcomePage.cs +++ b/src/Middleware/Diagnostics/src/WelcomePage/Views/Obsolete/WelcomePage.cs @@ -13,9 +13,8 @@ using Microsoft.AspNetCore.Diagnostics #line hidden ; using System.Threading.Tasks; - - [Obsolete("This type is for internal use only and will be removed in a future version.")] - public class WelcomePage : Microsoft.AspNetCore.DiagnosticsViewPage.Views.BaseView + + internal class WelcomePage : Microsoft.AspNetCore.DiagnosticsViewPage.Views.BaseView { #line hidden public WelcomePage() @@ -26,7 +25,7 @@ using Microsoft.AspNetCore.Diagnostics public override async Task ExecuteAsync() { #line 3 "WelcomePage.cshtml" - + Response.ContentType = "text/html"; #line default diff --git a/src/Shared/Diagnostics/AttributeValue.cs b/src/Shared/Diagnostics/AttributeValue.cs index 2be902b6ae..addbd12e6d 100644 --- a/src/Shared/Diagnostics/AttributeValue.cs +++ b/src/Shared/Diagnostics/AttributeValue.cs @@ -5,8 +5,7 @@ using System; namespace Microsoft.AspNetCore.DiagnosticsViewPage.Views { - [Obsolete("This type is for internal use only and will be removed in a future version.")] - public class AttributeValue + internal class AttributeValue { public AttributeValue(string prefix, object value, bool literal) { diff --git a/src/Shared/Diagnostics/BaseView.cs b/src/Shared/Diagnostics/BaseView.cs index 76f324df60..64b40242e0 100644 --- a/src/Shared/Diagnostics/BaseView.cs +++ b/src/Shared/Diagnostics/BaseView.cs @@ -14,11 +14,7 @@ using Microsoft.AspNetCore.Http; namespace Microsoft.AspNetCore.DiagnosticsViewPage.Views { - /// - /// Infrastructure - /// - [Obsolete("This type is for internal use only and will be removed in a future version.")] - public abstract class BaseView + internal abstract class BaseView { /// /// The request context diff --git a/src/Shared/Diagnostics/HelperResult.cs b/src/Shared/Diagnostics/HelperResult.cs index 10a3d1603d..35de337a84 100644 --- a/src/Shared/Diagnostics/HelperResult.cs +++ b/src/Shared/Diagnostics/HelperResult.cs @@ -9,8 +9,7 @@ namespace Microsoft.AspNetCore.DiagnosticsViewPage.Views /// /// Represents a deferred write operation in a . /// - [Obsolete("This type is for internal use only and will be removed in a future version.")] - public class HelperResult + internal class HelperResult { /// /// Creates a new instance of .