Replaced IsNullOrEmpty with IsNullOrWhiteSpace

This commit is contained in:
Thorsten Sommer 2025-06-28 23:08:56 +02:00
parent 3835f1db1e
commit 01f2176910
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
3 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -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))

View File

@ -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;