=== 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})";
@@ -11,17 +11,21 @@ public interface IProxyDevice
/// The parameters can include any necessary configuration settings for the device, such as connection details, authentication information, or other relevant data.
/// </summary>
/// <param name="deviceParameters">A dictionary containing the parameters required to initialize the device.</param>
/// <!-- aidoc:v1 sig=f89923c -->
void Initialize(Dictionary<string, object?> deviceParameters);
/// <summary>
/// Processes the data received by the proxy device. This method should contain the logic for handling incoming data, performing any necessary transformations or computations, and preparing the data for further use.
/// </summary>
/// <returns>A task that represents the asynchronous operation. The task result contains the HttpResponseMessage returned by the device's Process method.</returns>
/// <!-- aidoc:v1 sig=6f73799 -->
Task<HttpResponseMessage> Process();
/// <summary>
/// Streams data from the proxy device. This method should contain the logic for handling outgoing data, performing any necessary transformations or computations, and preparing the data for further use.
/// </summary>
/// <returns>A task that represents the asynchronous operation. The task result contains the HttpResponseMessage returned by the device's Stream method.</returns>
/// <!-- aidoc-review:v1 severity=high kind=stale_summary
/// "The second sentence ('This method should contain the logic for handling outgoing data, performing any necessary transformations or computations, and preparing the data for further use.') is template/placeholder text describing what an implementation should contain, not what the method actually does. The code is just a method signature with no body, and there is no evidence it specifically handles 'outgoing data' or performs 'transformations or computations'." -->
Task<HttpResponseMessage> Stream();
}