#pragma warning disable ...

#pragma warning restore ...
This commit is contained in:
2022-02-15 09:56:12 -07:00
parent b97d7ebdb3
commit b1ca4d2f83
43 changed files with 596 additions and 465 deletions

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Text.Json;
@ -9,6 +10,8 @@ namespace Adaptation.Shared.Metrology;
public partial class WS
{
#pragma warning disable CA1847
public static Tuple<string, Results> SendData(string url, object payload, int timeoutSeconds = 120)
{
Results results = new();
@ -16,7 +19,7 @@ public partial class WS
try
{
string json = JsonSerializer.Serialize(payload, payload.GetType());
if (string.IsNullOrEmpty(url) || !url.Contains(":") || !url.Contains("."))
if (string.IsNullOrEmpty(url) || !url.Contains(':') || !url.Contains('.'))
throw new Exception("Invalid URL");
using (HttpClient httpClient = new())
{