From 171241e228819f23f9c146333d200d9cb4a10c68 Mon Sep 17 00:00:00 2001 From: Maggiekimani1 Date: Mon, 25 Nov 2024 17:32:53 +0300 Subject: [PATCH] make property and method static --- src/Microsoft.OpenApi.Workbench/MainModel.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.OpenApi.Workbench/MainModel.cs b/src/Microsoft.OpenApi.Workbench/MainModel.cs index 96d40e472..356e42fc2 100644 --- a/src/Microsoft.OpenApi.Workbench/MainModel.cs +++ b/src/Microsoft.OpenApi.Workbench/MainModel.cs @@ -49,7 +49,7 @@ public class MainModel : INotifyPropertyChanged /// private OpenApiSpecVersion _version = OpenApiSpecVersion.OpenApi3_0; - private HttpClient _httpClient = new(); + private static readonly HttpClient _httpClient = new(); public string Input { @@ -331,7 +331,7 @@ private string WriteContents(OpenApiDocument document) return new StreamReader(outputStream).ReadToEnd(); } - private MemoryStream CreateStream(string text) + private static MemoryStream CreateStream(string text) { var stream = new MemoryStream(); var writer = new StreamWriter(stream);