From 01f2176910c2aec97746897ec7aa8e12336c4241 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sat, 28 Jun 2025 23:08:56 +0200 Subject: [PATCH] Replaced IsNullOrEmpty with IsNullOrWhiteSpace --- app/MindWork AI Studio/Tools/EnterpriseEnvironment.cs | 2 +- app/MindWork AI Studio/Tools/Services/RustService.Retrieval.cs | 3 +-- app/MindWork AI Studio/Tools/SseHandler.cs | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/MindWork AI Studio/Tools/EnterpriseEnvironment.cs b/app/MindWork AI Studio/Tools/EnterpriseEnvironment.cs index fd7e3fbe..952ec3b2 100644 --- a/app/MindWork AI Studio/Tools/EnterpriseEnvironment.cs +++ b/app/MindWork AI Studio/Tools/EnterpriseEnvironment.cs @@ -4,5 +4,5 @@ namespace AIStudio.Tools; public readonly record struct EnterpriseEnvironment(string ConfigurationServerUrl, Guid ConfigurationId, EntityTagHeaderValue? ETag) { - public bool IsActive => !string.IsNullOrEmpty(this.ConfigurationServerUrl) && this.ConfigurationId != Guid.Empty; + public bool IsActive => !string.IsNullOrWhiteSpace(this.ConfigurationServerUrl) && this.ConfigurationId != Guid.Empty; } \ No newline at end of file diff --git a/app/MindWork AI Studio/Tools/Services/RustService.Retrieval.cs b/app/MindWork AI Studio/Tools/Services/RustService.Retrieval.cs index 84833e0c..0270baa9 100644 --- a/app/MindWork AI Studio/Tools/Services/RustService.Retrieval.cs +++ b/app/MindWork AI Studio/Tools/Services/RustService.Retrieval.cs @@ -23,8 +23,7 @@ public sealed partial class RustService while (!reader.EndOfStream && chunkCount < maxChunks) { var line = await reader.ReadLineAsync(); - - if (string.IsNullOrEmpty(line)) + if (string.IsNullOrWhiteSpace(line)) continue; if (!line.StartsWith("data:", StringComparison.InvariantCulture)) diff --git a/app/MindWork AI Studio/Tools/SseHandler.cs b/app/MindWork AI Studio/Tools/SseHandler.cs index 4892673b..8b014824 100644 --- a/app/MindWork AI Studio/Tools/SseHandler.cs +++ b/app/MindWork AI Studio/Tools/SseHandler.cs @@ -77,7 +77,8 @@ public static class SseHandler private static bool ProcessImageSegment(PptxImageData pptxImageData) { - if (string.IsNullOrEmpty(pptxImageData.Id)) { return false; } + if (string.IsNullOrWhiteSpace(pptxImageData.Id)) + return false; var id = pptxImageData.Id; var segment = pptxImageData.Segment ?? 0;