From dbecb6b2db8d0b9dd3bf7459eff973ab3725a4a0 Mon Sep 17 00:00:00 2001 From: alperensert <63921520+alperensert@users.noreply.github.com> Date: Sun, 7 Apr 2024 22:06:30 +0300 Subject: [PATCH] fix: nullability annotation to support code analysis Added MemberNotNullWhen attribute to CloudflareResponse<>.Success property for better code analysis by IDEs --- src/CloudflareDnsync.Models/Responses/CloudflareResponse.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CloudflareDnsync.Models/Responses/CloudflareResponse.cs b/src/CloudflareDnsync.Models/Responses/CloudflareResponse.cs index a430b58..0575bce 100644 --- a/src/CloudflareDnsync.Models/Responses/CloudflareResponse.cs +++ b/src/CloudflareDnsync.Models/Responses/CloudflareResponse.cs @@ -1,9 +1,11 @@ -using Newtonsoft.Json; +using System.Diagnostics.CodeAnalysis; +using Newtonsoft.Json; namespace CloudflareDnsync.Models.Responses; public class CloudflareResponse { + [MemberNotNullWhen(true, nameof(Result))] [JsonProperty("success")] public bool Success { get; init; }