将DeviceManager中的_imageBuffer、_imageDataAccumulator和_multipartBoundary字段设为只读,解决IDE0044警告

This commit is contained in:
zqm
2025-10-29 17:14:12 +08:00
parent af4cbb5895
commit 6b774ad580

View File

@@ -214,11 +214,11 @@ namespace JoyD.Windows.CS.Toprie
// 停止请求事件
private ManualResetEvent _stopRequested = new ManualResetEvent(false);
// 缓冲区
private byte[] _imageBuffer = new byte[4096];
private readonly byte[] _imageBuffer = new byte[4096];
// 图像数据累积缓冲区
private byte[] _imageDataAccumulator = new byte[0];
private readonly byte[] _imageDataAccumulator = new byte[0];
// 多部分请求边界
private string _multipartBoundary = string.Empty;
private readonly string _multipartBoundary = string.Empty;
// 锁对象
private readonly object _lockObject = new object();
// 是否启用自动重连