Confused about how to use Microsoft.AspNetCore.SystemWebAdapters while trying to port from old asp.net website to new asp.net core webapp

I followed following things,

Created a new .NET 8 ASP Core Webapp.
Added Microsoft.AspNetCore.SystemWebAdapters dependency to it.

Program.cs

using OldHandlers;

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddRazorPages();
builder.Services.AddSystemWebAdapters(); // Register SystemWebAdapters

var app = builder.Build();

// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
    app.UseExceptionHandler("/Error");
    app.UseHsts();
}

app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();

// Register SystemWebAdapters middleware
app.UseSystemWebAdapters();

// Define endpoints
app.UseEndpoints(endpoints =>
{
    endpoints.MapGet("/myhandler", async context =>
    {
        var adapter = new AspNetCoreHttpContextAdapter(context);
        var handler = new MyHandler();
        handler.ProcessRequest(adapter);
    });


});

app.UseAuthorization();
app.MapRazorPages();

app.Run();

AND,

using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.SystemWebAdapters;
using System.Threading.Tasks;
using OldHandlers;

public class AspNetCoreHttpContextAdapter : IHttpContextAdapter
{
    private readonly HttpContext _context;

    public AspNetCoreHttpContextAdapter(HttpContext context)
    {
        _context = context;
    }

    public string ResponseContentType
    {
        get => _context.Response.ContentType;
        set => _context.Response.ContentType = value;
    }

    public void WriteResponse(string content)
    {
        _context.Response.WriteAsync(content);
    }

    public async Task<string> ReadRequestBodyAsync()
    {
        using (StreamReader reader = new StreamReader(_context.Request.Body))
        {
            return await reader.ReadToEndAsync();
        }
    }

    public void SetStatusCode(int statusCode)
    {
        _context.Response.StatusCode = statusCode;
    }

    public object GetRouteData(string key)
    {
        return _context.Items[key];
    }
}

In my Old website, created a new handler,

 public class MyHttpHandler : IHttpHandler, IRequiresSessionState
 {
     public void ProcessRequest(HttpContext context)
     {
         var adapter = new SystemWebHttpContextAdapter(new HttpContextWrapper(context));
         var handler = new MyHandler();
         handler.ProcessRequest(adapter);
     }

     public bool IsReusable => false;
 }

AND,

using System.IO;
using System.Threading.Tasks;
using System.Web;
using OldHandlers;

public class SystemWebHttpContextAdapter : IHttpContextAdapter
{
    private readonly HttpContextBase _context;

    public SystemWebHttpContextAdapter(HttpContextBase context)
    {
        _context = context;
    }

    public string ResponseContentType
    {
        get => _context.Response.ContentType;
        set => _context.Response.ContentType = value;
    }

    public void WriteResponse(string content)
    {
        _context.Response.Write(content);
    }

    public async Task<string> ReadRequestBodyAsync()
    {
        using (StreamReader reader = new StreamReader(_context.Request.InputStream))
        {
            return await reader.ReadToEndAsync();
        }
    }

    public void SetStatusCode(int statusCode)
    {
        _context.Response.StatusCode = statusCode;
    }

    public object GetRouteData(string key)
    {
        return _context.Items[key];
    }
}

AND created a .NET Standard 2.0 library to have the concrete handler implementation,

namespace OldHandlers
{

    public class MyHandler
    {
        public void ProcessRequest(IHttpContextAdapter context)
        {
            context.ResponseContentType = "text/plain";
            context.WriteResponse("Hello, World!");
        }
    }
}
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace OldHandlers
{
    public interface IHttpContextAdapter
    {
        string ResponseContentType { get; set; }
        void WriteResponse(string content);
        Task<string> ReadRequestBodyAsync();
        void SetStatusCode(int statusCode);
        object GetRouteData(string key);
    }

}

What I don’t understand is that, if I use Microsoft.AspNetCore.SystemWebAdapters https://www.nuget.org/packages/Microsoft.AspNetCore.SystemWebAdapters then do I need to create my adapter classes, AspNetCoreHttpContextAdapter and SystemWebHttpContextAdapter?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật