diff --git a/src/Umbraco.Web/Mvc/JsonNetResult.cs b/src/Umbraco.Web/Mvc/JsonNetResult.cs deleted file mode 100644 index c086b5f375..0000000000 --- a/src/Umbraco.Web/Mvc/JsonNetResult.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Web; -using System.Web.Mvc; -using Newtonsoft.Json; - -namespace Umbraco.Web.Mvc -{ - - /// - /// Custom json result using newtonsoft json.net - /// - /// Migrated already to .Net Core - public class JsonNetResult : ActionResult - { - public Encoding ContentEncoding { get; set; } - public string ContentType { get; set; } - public object Data { get; set; } - - public JsonSerializerSettings SerializerSettings { get; set; } - public Formatting Formatting { get; set; } - - public JsonNetResult() - { - SerializerSettings = new JsonSerializerSettings(); - } - - public override void ExecuteResult(ControllerContext context) - { - if (context == null) - throw new ArgumentNullException("context"); - - HttpResponseBase response = context.HttpContext.Response; - - response.ContentType = string.IsNullOrEmpty(ContentType) == false - ? ContentType - : "application/json"; - - if (ContentEncoding != null) - response.ContentEncoding = ContentEncoding; - - if (Data != null) - { - var writer = new JsonTextWriter(response.Output) { Formatting = Formatting }; - - var serializer = JsonSerializer.Create(SerializerSettings); - serializer.Serialize(writer, Data); - - writer.Flush(); - } - } - } - -} diff --git a/src/Umbraco.Web/Mvc/MinifyJavaScriptResultAttribute.cs b/src/Umbraco.Web/Mvc/MinifyJavaScriptResultAttribute.cs deleted file mode 100644 index 635a7314c5..0000000000 --- a/src/Umbraco.Web/Mvc/MinifyJavaScriptResultAttribute.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System.Web.Mvc; -using Umbraco.Web.Composing; -using Umbraco.Core.Hosting; -using Umbraco.Core.Runtime; -using Umbraco.Core.WebAssets; - -namespace Umbraco.Web.Mvc -{ - /// - /// Minifies the result for the JavaScriptResult - /// - /// - /// Only minifies in release mode - /// - /// Migrated already to .Net Core - public class MinifyJavaScriptResultAttribute : ActionFilterAttribute - { - private readonly IHostingEnvironment _hostingEnvironment; - private readonly IRuntimeMinifier _runtimeMinifier; - - public MinifyJavaScriptResultAttribute() - { - _hostingEnvironment = Current.HostingEnvironment; - _runtimeMinifier = Current.RuntimeMinifier; - } - - public MinifyJavaScriptResultAttribute(IHostingEnvironment hostingEnvironment, IRuntimeMinifier runtimeMinifier) - { - _hostingEnvironment = hostingEnvironment; - _runtimeMinifier = runtimeMinifier; - } - - /// - /// Minify the result if in release mode - /// - /// - public override void OnResultExecuting(ResultExecutingContext filterContext) - { - base.OnResultExecuting(filterContext); - - if (filterContext.Result == null) return; - var jsResult = filterContext.Result as JavaScriptResult; - if (jsResult == null) return; - if (_hostingEnvironment.IsDebugMode) return; - - //minify the result - var result = jsResult.Script; - var minified = _runtimeMinifier.MinifyAsync(result, AssetType.Javascript).GetAwaiter().GetResult(); - jsResult.Script = minified; - } - } -} diff --git a/src/Umbraco.Web/Mvc/UmbracoViewPage.cs b/src/Umbraco.Web/Mvc/UmbracoViewPage.cs deleted file mode 100644 index a41d692b86..0000000000 --- a/src/Umbraco.Web/Mvc/UmbracoViewPage.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Web.WebPages; -using Umbraco.Core.Models.PublishedContent; - -namespace Umbraco.Web.Mvc -{ - public abstract class UmbracoViewPage : UmbracoViewPage - { - - } -} diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 07eaf1729a..9190a5fa1c 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -268,10 +268,7 @@ - - -