AngleSharp by AngleSharp

<PackageReference Include="AngleSharp" Version="0.9.10" />

 ObjectRequestProcessor

using AngleSharp.Dom; using AngleSharp.Services; using AngleSharp.Services.Media; using System.Threading; using System.Threading.Tasks; namespace AngleSharp.Network.RequestProcessors { internal sealed class ObjectRequestProcessor : ResourceRequestProcessor<IObjectInfo> { public int Width => base.Resource?.Width ?? 0; public int Height => base.Resource?.Height ?? 0; private ObjectRequestProcessor(IConfiguration options, IResourceLoader loader) : base(options, loader) { } internal static ObjectRequestProcessor Create(Element element) { Document owner = element.Owner; IConfiguration options = owner.Options; IResourceLoader loader = owner.Loader; if (options == null || loader == null) return null; return new ObjectRequestProcessor(options, loader); } protected override async Task ProcessResponseAsync(IResponse response) { IResourceService<IObjectInfo> service = GetService(response); if (service != null) { CancellationToken none = CancellationToken.None; IObjectInfo objectInfo2 = Resource = await service.CreateAsync(response, none).ConfigureAwait(false); } } } }