From a5c85e480f314b3f138cba96184b4a082a656608 Mon Sep 17 00:00:00 2001 From: Christian Helle Date: Tue, 21 Jan 2025 16:30:26 +0100 Subject: [PATCH] Fix non-editable HTTP header grid due to missing contructor on CustomHeaders class --- .../Windows/AddCustomHeaderDialog.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/VSIX/ApiClientCodeGen.VSIX.Shared/Windows/AddCustomHeaderDialog.cs b/src/VSIX/ApiClientCodeGen.VSIX.Shared/Windows/AddCustomHeaderDialog.cs index 86cac01158..c9d0a50089 100644 --- a/src/VSIX/ApiClientCodeGen.VSIX.Shared/Windows/AddCustomHeaderDialog.cs +++ b/src/VSIX/ApiClientCodeGen.VSIX.Shared/Windows/AddCustomHeaderDialog.cs @@ -23,7 +23,11 @@ public AddCustomHeaderDialog( foreach (var keyValuePair in existingHeaders) bindingList.Add( - new CustomHeader(keyValuePair.Key,keyValuePair.Value)); + new CustomHeader + { + Key = keyValuePair.Key, + Value = keyValuePair.Value + }); } public IReadOnlyDictionary CustomHeaders @@ -31,10 +35,10 @@ public IReadOnlyDictionary CustomHeaders .Where(c => !string.IsNullOrWhiteSpace(c.Key) && !string.IsNullOrWhiteSpace(c.Value)) .ToDictionary(k => k.Key, v => v.Value); - private sealed record CustomHeader(string Key, string Value) + private sealed class CustomHeader { - public string Key { get; } = Key; - public string Value { get; } = Value; + public string Key { get; set; } + public string Value { get; set; } } } }