[#1] Remove unnecessary layer

Signed-off-by: Ivan Pchelintsev <i.pchelintsev@yadro.com>
This commit is contained in:
Ivan Pchelintsev 2024-05-16 18:23:40 +03:00
parent b307c2c899
commit 6f24f567c1
11 changed files with 103 additions and 158 deletions

View file

@ -3,7 +3,6 @@ using FrostFS.Container;
using FrostFS.Netmap;
using FrostFS.Object;
using FrostFS.SDK.ClientV2.Interfaces;
using FrostFS.SDK.ClientV2.Mappers.GRPC;
using FrostFS.SDK.Cryptography;
using FrostFS.SDK.ModelsV2;
using FrostFS.Session;
@ -38,13 +37,12 @@ public partial class Client: IFrostFSClient
CheckFrostFsVersionSupport();
}
private void CheckFrostFsVersionSupport()
private async void CheckFrostFsVersionSupport()
{
var localNodeInfo = GetLocalNodeInfoAsync().Result;
var frostFsVersion = localNodeInfo.Body.Version.ToModel();
if (!frostFsVersion.IsSupported(Version))
var localNodeInfo = await GetLocalNodeInfoAsync();
if (!localNodeInfo.Version.IsSupported(Version))
{
var msg = $"FrostFS {frostFsVersion} is not supported.";
var msg = $"FrostFS {localNodeInfo.Version} is not supported.";
Console.WriteLine(msg);
throw new ApplicationException(msg);
}