![]() |
VOOZH | about |
dotnet add package DoenaSoft.AbstractionLayer.Web --version 3.0.0
NuGet\Install-Package DoenaSoft.AbstractionLayer.Web -Version 3.0.0
<PackageReference Include="DoenaSoft.AbstractionLayer.Web" Version="3.0.0" />
<PackageVersion Include="DoenaSoft.AbstractionLayer.Web" Version="3.0.0" />Directory.Packages.props
<PackageReference Include="DoenaSoft.AbstractionLayer.Web" />Project file
paket add DoenaSoft.AbstractionLayer.Web --version 3.0.0
#r "nuget: DoenaSoft.AbstractionLayer.Web, 3.0.0"
#:package DoenaSoft.AbstractionLayer.Web@3.0.0
#addin nuget:?package=DoenaSoft.AbstractionLayer.Web&version=3.0.0Install as a Cake Addin
#tool nuget:?package=DoenaSoft.AbstractionLayer.Web&version=3.0.0Install as a Cake Tool
Web and HTTP interface contracts for abstraction layer. This project contains interface definitions only and targets .NET Standard 2.0, .NET Framework 4.7.2, and .NET 10 to be usable from multiple framework versions.
Package Id: DoenaSoft.AbstractionLayer.Web
Targets: netstandard2.0, net472, net10.0
This package contains only the interface contracts for web and HTTP abstractions. For production use, you'll also need the default implementations package: DoenaSoft.AbstractionLayer.Web.Default which contains System.Net-based implementations of these interfaces.
License: MIT
The project provides the following interfaces for web operations:
IWebServices - The main entry point for creating web clients and requests. Provides factory methods:
CreateWebRequest(string targetUrl, IWebProxy proxy, CultureInfo ci) - Creates a web requestCreateWebClient(IWebProxy proxy) - Creates a web clientIWebClient - Abstraction for System.Net.WebClient. Provides methods for downloading data, strings, and files.IWebRequest - Abstraction for System.Net.WebRequest. Provides methods for creating and configuring HTTP requests.IWebResponse - Abstraction for System.Net.WebResponse. Provides methods for reading HTTP responses.Program against these interfaces and inject implementations at runtime. For the default System.Net-based implementations, reference the DoenaSoft.AbstractionLayer.Web.Default package:
using DoenaSoft.AbstractionLayer.WebServices;
public class ApiClient
{
private readonly IWebServices _webServices;
public ApiClient(IWebServices webServices)
{
_webServices = webServices;
}
public string GetData(string url)
{
using var client = _webServices.CreateWebClient();
return client.DownloadString(url);
}
}
// In your application startup (using DoenaSoft.AbstractionLayer.Web.Default):
var webServices = new WebServices();
var apiClient = new ApiClient(webServices);
Reference only this contracts package and provide test doubles to avoid network I/O:
class FakeWebClient : IWebClient
{
public string DownloadString(string url) => "{\"result\":\"test data\"}";
// ... implement other members as needed
}
class FakeWebServices : IWebServices
{
public IWebRequest CreateWebRequest(string targetUrl, IWebProxy proxy = null, CultureInfo ci = null)
=> throw new NotImplementedException();
public IWebClient CreateWebClient(IWebProxy proxy = null)
=> new FakeWebClient();
}
// In your test
var fake = new FakeWebServices();
var apiClient = new ApiClient(fake);
var data = apiClient.GetData("https://api.example.com/data");
Assert.AreEqual("{\"result\":\"test data\"}", data);
DoenaSoft.AbstractionLayer.Web (this package) - Interface contracts onlyDoenaSoft.AbstractionLayer.Web.Default - Default System.Net-based implementations (depends on this package)For production use, reference DoenaSoft.AbstractionLayer.Web.Default. For unit tests, reference only this contracts package.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 is compatible. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 1 NuGet packages that depend on DoenaSoft.AbstractionLayer.Web:
| Package | Downloads |
|---|---|
|
DoenaSoft.AbstractionLayer.Web.Default
Default System.Net-based implementations of web abstraction interfaces from DoenaSoft.AbstractionLayer.Web. Provides WebServices, WebClient, WebRequest, and WebResponse wrappers, plus HttpGetQueryBuilder for building URL-encoded query strings with proper handling of special characters (umlauts, ampersands, etc.). |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0 | 208 | 3/28/2026 |
| 2.0.1 | 157 | 3/28/2026 |
| 2.0.0 | 157 | 3/28/2026 |
| 1.0.10 | 487 | 12/5/2023 |
| 1.0.9 | 253 | 12/3/2023 |
| 1.0.8 | 252 | 12/3/2023 |
| 1.0.7 | 238 | 12/3/2023 |
| 1.0.6 | 281 | 9/12/2023 |
| 1.0.5 | 252 | 9/12/2023 |
| 1.0.4 | 293 | 8/28/2023 |
| 1.0.3 | 283 | 8/28/2023 |
| 1.0.2 | 313 | 8/28/2023 |
| 1.0.1 | 291 | 8/28/2023 |
| 1.0.0 | 313 | 8/28/2023 |