Initial SDK structure #1

Merged
i.pchelintsev merged 18 commits from i.pchelintsev/frostfs-sdk-csharp:master into master 2024-09-04 19:51:24 +00:00
5 changed files with 5 additions and 6 deletions
Showing only changes of commit 9b5b2eb5dc - Show all commits

View file

@ -1,11 +1,12 @@
using FrostFS.Netmap;
using FrostFS.SDK.ModelsV2.Enums; using FrostFS.SDK.ModelsV2.Enums;
using FrostFS.SDK.ModelsV2.Netmap; using NodeInfo = FrostFS.SDK.ModelsV2.Netmap.NodeInfo;
namespace FrostFS.SDK.ClientV2.Mappers.GRPC.Netmap; namespace FrostFS.SDK.ClientV2.Mappers.GRPC.Netmap;
public static class NodeInfoMapper public static class NodeInfoMapper
{ {
public static NodeInfo ToModel(this FrostFS.Netmap.LocalNodeInfoResponse.Types.Body nodeInfo) public static NodeInfo ToModel(this LocalNodeInfoResponse.Types.Body nodeInfo)
{ {
var nodeStateName = Enum.GetName(typeof(NodeState), nodeInfo.NodeInfo.State); var nodeStateName = Enum.GetName(typeof(NodeState), nodeInfo.NodeInfo.State);
if (nodeStateName is null) if (nodeStateName is null)

View file

@ -1,5 +1,4 @@
using FrostFS.Netmap; using FrostFS.Netmap;
using Replica = FrostFS.SDK.ModelsV2.Netmap.Replica;
namespace FrostFS.SDK.ClientV2.Mappers.GRPC.Netmap; namespace FrostFS.SDK.ClientV2.Mappers.GRPC.Netmap;

View file

@ -3,7 +3,6 @@ using FrostFS.Refs;
using FrostFS.SDK.ClientV2.Mappers.GRPC; using FrostFS.SDK.ClientV2.Mappers.GRPC;
using FrostFS.SDK.ModelsV2; using FrostFS.SDK.ModelsV2;
using FrostFS.Session; using FrostFS.Session;
using Version = FrostFS.SDK.ModelsV2.Version;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.ClientV2;

View file

@ -1,5 +1,4 @@
using FrostFS.Container; using FrostFS.Container;
using FrostFS.Refs;
using FrostFS.SDK.ClientV2.Mappers.GRPC; using FrostFS.SDK.ClientV2.Mappers.GRPC;
using FrostFS.SDK.ModelsV2; using FrostFS.SDK.ModelsV2;

View file

@ -1,11 +1,12 @@
using FrostFS.Netmap; using FrostFS.Netmap;
using FrostFS.SDK.ClientV2.Mappers.GRPC.Netmap; using FrostFS.SDK.ClientV2.Mappers.GRPC.Netmap;
using NodeInfo = FrostFS.SDK.ModelsV2.Netmap.NodeInfo;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.ClientV2;
public partial class Client public partial class Client
{ {
public async Task<ModelsV2.Netmap.NodeInfo> GetLocalNodeInfoAsync() public async Task<NodeInfo> GetLocalNodeInfoAsync()
{ {
var request = new LocalNodeInfoRequest var request = new LocalNodeInfoRequest
{ {