=== Summary: 675 files | 7 generated | 484 fresh | 4605 untracked | 4268 adopted | 355 marked | 466 validated-ok | 2+0 stale (sig+body) | 0 skipped | 0 failed | elapsed 11:08:11.442 (40091.44s) ===

This commit is contained in:
julian
2026-06-28 02:50:05 -07:00
parent a19fb90902
commit 586f02a2ca
654 changed files with 5260 additions and 0 deletions
@@ -6,6 +6,7 @@ namespace adas_core.module.ProxyDevices.Devices;
/// <summary>
/// Device that can be used to get content via http with digest auth
/// </summary>
/// <!-- aidoc:v1 sig=6b29da8 -->
public class HttpDevice : IProxyDevice
{
/// <summary>
@@ -46,6 +47,7 @@ public class HttpDevice : IProxyDevice
/// <param name="deviceParameters">A dictionary containing the parameters required to initialize the device.</param>
/// <exception cref="InvalidOperationException">Thrown when the device is already initialized.</exception>
/// <exception cref="ArgumentNullException">Thrown when a required parameter is missing or invalid.</exception>
/// <!-- aidoc:v1 sig=cc2f188 body=492cad9 -->
public void Initialize(Dictionary<string, object?> deviceParameters)
{
if (_isInitialized) throw new InvalidOperationException("Device already initialized");
@@ -68,6 +70,7 @@ public class HttpDevice : IProxyDevice
/// </summary>
/// <returns>An HttpResponseMessage representing the response from the HTTP request.</returns>
/// <exception cref="TimeoutException">Thrown when the request times out.</exception>
/// <!-- aidoc:v1 sig=0a36db0 body=b4557da -->
public async Task<HttpResponseMessage> Process()
{
try
@@ -89,6 +92,7 @@ public class HttpDevice : IProxyDevice
/// </summary>
/// <returns>An HttpResponseMessage representing the response from the HTTP request.</returns>
/// <exception cref="TimeoutException">Thrown when the request times out.</exception>
/// <!-- aidoc:v1 sig=457d0fb body=be43e89 -->
public async Task<HttpResponseMessage> Stream()
{
try
@@ -110,6 +114,7 @@ public class HttpDevice : IProxyDevice
/// </summary>
/// <returns>An HttpClient instance configured with the appropriate credentials.</returns>
/// <exception cref="InvalidOperationException">Thrown when the device is not initialized.</exception>
/// <!-- aidoc:v1 sig=f389022 body=9ab96aa -->
private HttpClient GetHttpClient()
{
if (!_isInitialized) throw new InvalidOperationException("Device not initialized");
@@ -124,6 +129,7 @@ public class HttpDevice : IProxyDevice
/// Returns a string representation of the HttpDevice instance, including its name, URI, username, password, and domain. This can be useful for logging or debugging purposes to quickly identify the configuration of the device.
/// </summary>
/// <returns>A string representation of the HttpDevice instance.</returns>
/// <!-- aidoc:v1 sig=d27f326 body=ba2b91d -->
public override string ToString()
{
return $"[HttpDevice] ({_name} {_uri} {_username} {_password} {_domain})";