From 0e6621cf24a04644696c0a84cd23ee4f57f02efc Mon Sep 17 00:00:00 2001 From: Rune Nielsen Date: Sat, 24 Aug 2024 05:40:01 +0200 Subject: [PATCH] mark methods as static that does not access instance variables (#240) --- src/Typesense/TypesenseClient.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Typesense/TypesenseClient.cs b/src/Typesense/TypesenseClient.cs index 103e4c6..113209c 100644 --- a/src/Typesense/TypesenseClient.cs +++ b/src/Typesense/TypesenseClient.cs @@ -729,10 +729,10 @@ private static TypesenseApiException GetException(HttpStatusCode statusCode, str _ => throw new TypesenseApiException($"Received an unspecified status-code: '{Enum.GetName(statusCode)}' from Typesense, with message: '{message}'.") }; - private StringContent GetApplicationJsonStringContent(string jsonString) + private static StringContent GetApplicationJsonStringContent(string jsonString) => new(jsonString, Encoding.UTF8, MediaTypeNames.Application.Json); - private StringContent GetTextPlainStringContent(string jsonString) + private static StringContent GetTextPlainStringContent(string jsonString) => new(jsonString, Encoding.UTF8, "text/plain"); private MultiSearchResult HandleDeserializeMultiSearch(JsonElement jsonElement)