Removed PdfViewController, HtmlViewRenderer and FakeView to be replaced with ViewEngineResult Render method
Added HttpException class for missing HttpException for net8 Wrapped HttpContext.Session, GetJsonResult, IsAjaxRequest and GetUserIdentityName in controllers for net8 Added AuthenticationService to test Fab2ApprovalMKLink code for net8 Compile conditionally flags to debug in dotnet core
This commit is contained in:
@ -20,6 +20,7 @@ using System.Configuration;
|
||||
namespace Fab2ApprovalSystem.Utilities;
|
||||
|
||||
#if !NET8
|
||||
|
||||
public class FileUtilities<T> : Controller // <T> => System.Web.Mvc.FileContentResult
|
||||
{
|
||||
|
||||
@ -28,14 +29,22 @@ public class FileUtilities<T> : Controller // <T> => System.Web.Mvc.FileContentR
|
||||
var result = File(fileBytes, System.Net.Mime.MediaTypeNames.Application.Octet, pathToFile);
|
||||
return (T)Convert.ChangeType(result, typeof(T));
|
||||
}
|
||||
#else
|
||||
|
||||
#endif
|
||||
|
||||
#if NET8
|
||||
|
||||
public class FileUtilities<T> {
|
||||
|
||||
#endif
|
||||
|
||||
public byte[] GetFile(string s) {
|
||||
|
||||
#if !NET8
|
||||
FileStream fs = System.IO.File.OpenRead(s);
|
||||
#else
|
||||
#endif
|
||||
|
||||
#if NET8
|
||||
FileStream fs = File.OpenRead(s);
|
||||
#endif
|
||||
byte[] data = new byte[fs.Length];
|
||||
|
Reference in New Issue
Block a user