mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 18:21:10 +00:00
Adds plugin upload from the web client
This commit is contained in:
1 parent
d84823f6d2
commit
b3ffb5dfab
57 files changed
+2774
-16
No files matched your search
@@ -127,6 +127,16 @@ public class StubApiHttpClient : IApiHttpClient
|
||||
_getResponseFactories[endpoint] = () => throw exception;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registers the exception thrown when the specified PUT endpoint is called.
|
||||
/// </summary>
|
||||
/// <param name="endpoint">The API endpoint for which to register the exception.</param>
|
||||
/// <param name="exception">The exception to throw.</param>
|
||||
public void RegisterPutException(string endpoint, ApiException exception)
|
||||
{
|
||||
_putResponseFactories[endpoint] = _ => throw exception;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registers the response returned when the specified PUT endpoint is called.
|
||||
/// </summary>
|
||||
@@ -138,6 +148,16 @@ public class StubApiHttpClient : IApiHttpClient
|
||||
_putResponseFactories[endpoint] = _ => response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registers the response factory invoked when the specified PUT endpoint is called.
|
||||
/// </summary>
|
||||
/// <param name="endpoint">The API endpoint for which to register the response factory.</param>
|
||||
/// <param name="responseFactory">The factory that produces the response from the request payload.</param>
|
||||
public void RegisterPutResponseFactory(string endpoint, Func<object, object> responseFactory)
|
||||
{
|
||||
_putResponseFactories[endpoint] = responseFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registers the specified DELETE endpoint as succeeding.
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user