mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-24 20:52:11 +00:00
Suppressed unused property warning
This commit is contained in:
parent
b45fb83cb0
commit
351ee046b6
@ -1,3 +1,4 @@
|
|||||||
|
// ReSharper disable NotAccessedPositionalProperty.Local
|
||||||
namespace AIStudio.Tools.Services;
|
namespace AIStudio.Tools.Services;
|
||||||
|
|
||||||
public sealed partial class RustService
|
public sealed partial class RustService
|
||||||
@ -6,10 +7,7 @@ public sealed partial class RustService
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using var response = await this.http.PostAsJsonAsync(
|
using var response = await this.http.PostAsJsonAsync("/share/file", new ShareFileRequest(filePath), this.jsonRustSerializerOptions);
|
||||||
"/share/file",
|
|
||||||
new ShareFileRequest(filePath),
|
|
||||||
this.jsonRustSerializerOptions);
|
|
||||||
if (!response.IsSuccessStatusCode)
|
if (!response.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
this.logger?.LogError($"The Rust runtime rejected the share request: {response.StatusCode}.");
|
this.logger?.LogError($"The Rust runtime rejected the share request: {response.StatusCode}.");
|
||||||
@ -41,5 +39,6 @@ public sealed partial class RustService
|
|||||||
}
|
}
|
||||||
|
|
||||||
private sealed record ShareFileRequest(string FilePath);
|
private sealed record ShareFileRequest(string FilePath);
|
||||||
|
|
||||||
private sealed record ShareFileResponse(bool Success, string Issue);
|
private sealed record ShareFileResponse(bool Success, string Issue);
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user