[#26] All: Remove V2 from naming #34

Merged
PavelGrossSpb merged 1 commit from PavelGrossSpb/frostfs-sdk-csharp:misc/remove_V2 into master 2024-11-18 09:42:22 +00:00
219 changed files with 219 additions and 974 deletions

View file

@ -3,11 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.5.002.0 VisualStudioVersion = 17.5.002.0
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FrostFS.SDK.ClientV2", "src\FrostFS.SDK.ClientV2\FrostFS.SDK.ClientV2.csproj", "{50D8F61F-C302-4AC9-8D8A-AB0B8C0988C3}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FrostFS.SDK.Client", "src\FrostFS.SDK.Client\FrostFS.SDK.Client.csproj", "{50D8F61F-C302-4AC9-8D8A-AB0B8C0988C3}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FrostFS.SDK.Cryptography", "src\FrostFS.SDK.Cryptography\FrostFS.SDK.Cryptography.csproj", "{3D804F4A-B0B2-47A5-B006-BE447BE64B50}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FrostFS.SDK.Cryptography", "src\FrostFS.SDK.Cryptography\FrostFS.SDK.Cryptography.csproj", "{3D804F4A-B0B2-47A5-B006-BE447BE64B50}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FrostFS.SDK.ProtosV2", "src\FrostFS.SDK.ProtosV2\FrostFS.SDK.ProtosV2.csproj", "{5012EF96-9C9E-4E77-BC78-B4111EE54107}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FrostFS.SDK.Protos", "src\FrostFS.SDK.Protos\FrostFS.SDK.Protos.csproj", "{5012EF96-9C9E-4E77-BC78-B4111EE54107}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FrostFS.SDK.Tests", "src\FrostFS.SDK.Tests\FrostFS.SDK.Tests.csproj", "{8FDA7E0D-9C75-4874-988E-6592CD28F76C}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FrostFS.SDK.Tests", "src\FrostFS.SDK.Tests\FrostFS.SDK.Tests.csproj", "{8FDA7E0D-9C75-4874-988E-6592CD28F76C}"
EndProject EndProject

View file

@ -1,6 +1,6 @@
using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Caching.Memory;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
internal static class Caches internal static class Caches
{ {

View file

@ -4,7 +4,7 @@ using FrostFS.SDK.Cryptography;
using Google.Protobuf; using Google.Protobuf;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public class ClientKey(ECDsa key) public class ClientKey(ECDsa key)
{ {

View file

@ -1,6 +1,6 @@
using System; using System;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public class FrostFsException : Exception public class FrostFsException : Exception
{ {

View file

@ -1,6 +1,6 @@
using System; using System;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public class FrostFsInvalidObjectException : FrostFsException public class FrostFsInvalidObjectException : FrostFsException
{ {

View file

@ -1,6 +1,6 @@
using System; using System;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public class FrostFsResponseException : FrostFsException public class FrostFsResponseException : FrostFsException
{ {

View file

@ -1,6 +1,6 @@
using System; using System;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public class FrostFsStreamException : FrostFsException public class FrostFsStreamException : FrostFsException
{ {

View file

@ -1,6 +1,6 @@
using System; using System;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public class SessionExpiredException : FrostFsException public class SessionExpiredException : FrostFsException
{ {

View file

@ -1,6 +1,6 @@
using System; using System;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public class SessionNotFoundException : FrostFsException public class SessionNotFoundException : FrostFsException
{ {

View file

@ -8,11 +8,11 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<EnableNETAnalyzers>true</EnableNETAnalyzers> <EnableNETAnalyzers>true</EnableNETAnalyzers>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors> <CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -30,7 +30,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\FrostFS.SDK.Cryptography\FrostFS.SDK.Cryptography.csproj" /> <ProjectReference Include="..\FrostFS.SDK.Cryptography\FrostFS.SDK.Cryptography.csproj" />
<ProjectReference Include="..\FrostFS.SDK.ProtosV2\FrostFS.SDK.ProtosV2.csproj" /> <ProjectReference Include="..\FrostFS.SDK.Protos\FrostFS.SDK.Protos.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View file

@ -10,8 +10,8 @@ using FrostFS.Accounting;
using FrostFS.Container; using FrostFS.Container;
using FrostFS.Netmap; using FrostFS.Netmap;
using FrostFS.Object; using FrostFS.Object;
using FrostFS.SDK.ClientV2.Interfaces; using FrostFS.SDK.Client.Interfaces;
using FrostFS.SDK.ClientV2.Services; using FrostFS.SDK.Client.Services;
using FrostFS.SDK.Cryptography; using FrostFS.SDK.Cryptography;
using FrostFS.Session; using FrostFS.Session;
@ -21,7 +21,7 @@ using Grpc.Net.Client;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public class FrostFSClient : IFrostFSClient public class FrostFSClient : IFrostFSClient
{ {

View file

@ -5,4 +5,4 @@
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Security", "CA5394:Do not use insecure randomness", Justification = "<Pending>", Scope = "member", Target = "~M:FrostFS.SDK.ClientV2.Sampler.Next~System.Int32")] [assembly: SuppressMessage("Security", "CA5394:Do not use insecure randomness", Justification = "<Pending>", Scope = "member", Target = "~M:FrostFS.SDK.Client.Sampler.Next~System.Int32")]

View file

@ -4,7 +4,7 @@ using System.Threading.Tasks;
using Grpc.Core; using Grpc.Core;
using Grpc.Core.Interceptors; using Grpc.Core.Interceptors;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1062:Validate arguments of public methods", [System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1062:Validate arguments of public methods",
Justification = "parameters are provided by GRPC infrastructure")] Justification = "parameters are provided by GRPC infrastructure")]

View file

@ -5,7 +5,7 @@ using System.Threading.Tasks;
using Grpc.Core; using Grpc.Core;
using Grpc.Core.Interceptors; using Grpc.Core.Interceptors;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1062:Validate arguments of public methods", [System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1062:Validate arguments of public methods",
Justification = "parameters are provided by GRPC infrastructure")] Justification = "parameters are provided by GRPC infrastructure")]

View file

@ -3,7 +3,8 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Frostfs.V2.Ape; using Frostfs.V2.Ape;
namespace FrostFS.SDK.ClientV2.Interfaces;
namespace FrostFS.SDK.Client.Interfaces;
public interface IFrostFSClient : IDisposable public interface IFrostFSClient : IDisposable
{ {

View file

@ -1,6 +1,6 @@
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
internal static partial class FrostFsMessages internal static partial class FrostFsMessages
{ {

View file

@ -3,7 +3,7 @@ using System.Linq;
using FrostFS.SDK.Cryptography; using FrostFS.SDK.Cryptography;
namespace FrostFS.SDK.ClientV2.Mappers.GRPC; namespace FrostFS.SDK.Client.Mappers.GRPC;
public static class ContainerMapper public static class ContainerMapper
{ {

View file

@ -7,7 +7,7 @@ using Google.Protobuf;
using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Caching.Memory;
namespace FrostFS.SDK.ClientV2.Mappers.GRPC; namespace FrostFS.SDK.Client.Mappers.GRPC;
public static class ContainerIdMapper public static class ContainerIdMapper
{ {

View file

@ -2,7 +2,7 @@ using System;
using FrostFS.Session; using FrostFS.Session;
namespace FrostFS.SDK.ClientV2.Mappers.GRPC; namespace FrostFS.SDK.Client.Mappers.GRPC;
public static class MetaHeaderMapper public static class MetaHeaderMapper
{ {

View file

@ -3,7 +3,7 @@ using System.Linq;
using FrostFS.Netmap; using FrostFS.Netmap;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public static class NetmapMapper public static class NetmapMapper
{ {

View file

@ -2,9 +2,9 @@ using System;
using System.Linq; using System.Linq;
using FrostFS.Netmap; using FrostFS.Netmap;
using FrostFS.SDK.ClientV2.Mappers.GRPC; using FrostFS.SDK.Client.Mappers.GRPC;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public static class NodeInfoMapper public static class NodeInfoMapper
{ {

View file

@ -3,7 +3,7 @@ using System.Linq;
using FrostFS.Netmap; using FrostFS.Netmap;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public static class PlacementPolicyMapper public static class PlacementPolicyMapper
{ {

View file

@ -2,7 +2,7 @@ using System;
using FrostFS.Netmap; using FrostFS.Netmap;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public static class ReplicaMapper public static class ReplicaMapper
{ {

View file

@ -1,4 +1,4 @@
namespace FrostFS.SDK.ClientV2.Mappers.GRPC; namespace FrostFS.SDK.Client.Mappers.GRPC;
internal static class ObjectMapper internal static class ObjectMapper
{ {

View file

@ -2,7 +2,7 @@ using System;
using FrostFS.Object; using FrostFS.Object;
namespace FrostFS.SDK.ClientV2.Mappers.GRPC; namespace FrostFS.SDK.Client.Mappers.GRPC;
public static class ObjectAttributeMapper public static class ObjectAttributeMapper
{ {

View file

@ -2,7 +2,7 @@ using System;
using FrostFS.Object; using FrostFS.Object;
namespace FrostFS.SDK.ClientV2.Mappers.GRPC; namespace FrostFS.SDK.Client.Mappers.GRPC;
public static class ObjectFilterMapper public static class ObjectFilterMapper
{ {

View file

@ -5,7 +5,7 @@ using System.Linq;
using FrostFS.Object; using FrostFS.Object;
using FrostFS.SDK.Cryptography; using FrostFS.SDK.Cryptography;
namespace FrostFS.SDK.ClientV2.Mappers.GRPC; namespace FrostFS.SDK.Client.Mappers.GRPC;
public static class ObjectHeaderMapper public static class ObjectHeaderMapper
{ {

View file

@ -4,7 +4,7 @@ using FrostFS.Refs;
using Google.Protobuf; using Google.Protobuf;
namespace FrostFS.SDK.ClientV2.Mappers.GRPC; namespace FrostFS.SDK.Client.Mappers.GRPC;
public static class ObjectIdMapper public static class ObjectIdMapper
{ {

View file

@ -7,7 +7,7 @@ using Google.Protobuf;
using Microsoft.Extensions.Caching.Memory; using Microsoft.Extensions.Caching.Memory;
namespace FrostFS.SDK.ClientV2.Mappers.GRPC; namespace FrostFS.SDK.Client.Mappers.GRPC;
public static class OwnerIdMapper public static class OwnerIdMapper
{ {

View file

@ -2,7 +2,7 @@ using System;
using Google.Protobuf; using Google.Protobuf;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public static class SessionMapper public static class SessionMapper
{ {

View file

@ -2,7 +2,7 @@ using System;
using Google.Protobuf; using Google.Protobuf;
namespace FrostFS.SDK.ClientV2.Mappers.GRPC; namespace FrostFS.SDK.Client.Mappers.GRPC;
public static class SignatureMapper public static class SignatureMapper
{ {

View file

@ -1,6 +1,6 @@
using System; using System;
namespace FrostFS.SDK.ClientV2.Mappers.GRPC; namespace FrostFS.SDK.Client.Mappers.GRPC;
public static class StatusMapper public static class StatusMapper
{ {

View file

@ -3,7 +3,7 @@ using System.Threading;
using FrostFS.Refs; using FrostFS.Refs;
namespace FrostFS.SDK.ClientV2.Mappers.GRPC; namespace FrostFS.SDK.Client.Mappers.GRPC;
public static class VersionMapper public static class VersionMapper
{ {

View file

@ -2,7 +2,7 @@
using Frostfs.V2.Ape; using Frostfs.V2.Ape;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public struct FrostFsChainTarget(FrostFsTargetType type, string name) : IEquatable<FrostFsChainTarget> public struct FrostFsChainTarget(FrostFsTargetType type, string name) : IEquatable<FrostFsChainTarget>
{ {

View file

@ -1,6 +1,6 @@
using Google.Protobuf; using Google.Protobuf;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public struct FrostFsChain(byte[] raw) : System.IEquatable<FrostFsChain> public struct FrostFsChain(byte[] raw) : System.IEquatable<FrostFsChain>
{ {

View file

@ -1,4 +1,4 @@
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public enum FrostFsTargetType public enum FrostFsTargetType
{ {

View file

@ -1,6 +1,6 @@
using FrostFS.Refs; using FrostFS.Refs;
using FrostFS.SDK.ClientV2; using FrostFS.SDK.Client;
using FrostFS.SDK.ClientV2.Mappers.GRPC; using FrostFS.SDK.Client.Mappers.GRPC;
using FrostFS.SDK.Cryptography; using FrostFS.SDK.Cryptography;
namespace FrostFS.SDK; namespace FrostFS.SDK;

View file

@ -2,8 +2,8 @@ using System;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Linq; using System.Linq;
using FrostFS.SDK.ClientV2; using FrostFS.SDK.Client;
using FrostFS.SDK.ClientV2.Mappers.GRPC; using FrostFS.SDK.Client.Mappers.GRPC;
using FrostFS.SDK.Cryptography; using FrostFS.SDK.Cryptography;
using Google.Protobuf; using Google.Protobuf;

View file

@ -3,7 +3,7 @@ using System;
using System.Linq; using System.Linq;
using FrostFS.Netmap; using FrostFS.Netmap;
using FrostFS.SDK.ClientV2; using FrostFS.SDK.Client;
namespace FrostFS.SDK; namespace FrostFS.SDK;

View file

@ -1,5 +1,5 @@
using FrostFS.Refs; using FrostFS.Refs;
using FrostFS.SDK.ClientV2.Mappers.GRPC; using FrostFS.SDK.Client.Mappers.GRPC;
namespace FrostFS.SDK; namespace FrostFS.SDK;

View file

@ -1,5 +1,5 @@
using FrostFS.Refs; using FrostFS.Refs;
using FrostFS.SDK.ClientV2.Mappers.GRPC; using FrostFS.SDK.Client.Mappers.GRPC;
namespace FrostFS.SDK; namespace FrostFS.SDK;

View file

@ -4,7 +4,7 @@ using System.Linq;
using FrostFS.Object; using FrostFS.Object;
using FrostFS.SDK.ClientV2.Mappers.GRPC; using FrostFS.SDK.Client.Mappers.GRPC;
namespace FrostFS.SDK; namespace FrostFS.SDK;

View file

@ -1,7 +1,7 @@
using System.Security.Cryptography; using System.Security.Cryptography;
using FrostFS.Refs; using FrostFS.Refs;
using FrostFS.SDK.ClientV2.Mappers.GRPC; using FrostFS.SDK.Client.Mappers.GRPC;
using FrostFS.SDK.Cryptography; using FrostFS.SDK.Cryptography;
namespace FrostFS.SDK; namespace FrostFS.SDK;

View file

@ -9,7 +9,7 @@ using Google.Protobuf;
using Grpc.Core.Interceptors; using Grpc.Core.Interceptors;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public class CallContext() public class CallContext()
{ {

View file

@ -1,6 +1,6 @@
using System.Security.Cryptography; using System.Security.Cryptography;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public class Credentials(ECDsa key, FrostFsOwner ownerId) public class Credentials(ECDsa key, FrostFsOwner ownerId)
{ {

View file

@ -1,4 +1,4 @@
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public interface IContext public interface IContext
{ {

View file

@ -1,4 +1,4 @@
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public interface ISessionToken public interface ISessionToken
{ {

View file

@ -1,4 +1,4 @@
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public sealed class PrmApeChainList(FrostFsChainTarget target, CallContext? ctx = null) : PrmBase(ctx) public sealed class PrmApeChainList(FrostFsChainTarget target, CallContext? ctx = null) : PrmBase(ctx)
{ {

View file

@ -1,4 +1,4 @@
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public sealed class PrmApeChainRemove(FrostFsChainTarget target, FrostFsChain chain, CallContext? ctx = null) : PrmBase(ctx) public sealed class PrmApeChainRemove(FrostFsChainTarget target, FrostFsChain chain, CallContext? ctx = null) : PrmBase(ctx)
{ {

View file

@ -1,4 +1,4 @@
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public sealed class PrmApeChainAdd(FrostFsChainTarget target, FrostFsChain chain, CallContext? ctx = null) : PrmBase(ctx) public sealed class PrmApeChainAdd(FrostFsChainTarget target, FrostFsChain chain, CallContext? ctx = null) : PrmBase(ctx)
{ {

View file

@ -1,4 +1,4 @@
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public sealed class PrmBalance(CallContext? ctx = null) : PrmBase(ctx) public sealed class PrmBalance(CallContext? ctx = null) : PrmBase(ctx)
{ {

View file

@ -1,6 +1,6 @@
using System.Collections.Specialized; using System.Collections.Specialized;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public class PrmBase(CallContext? ctx, NameValueCollection? xheaders = null) : IContext public class PrmBase(CallContext? ctx, NameValueCollection? xheaders = null) : IContext
{ {

View file

@ -1,4 +1,4 @@
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public sealed class PrmContainerCreate(FrostFsContainerInfo container, CallContext? ctx = null) : PrmBase(ctx), ISessionToken public sealed class PrmContainerCreate(FrostFsContainerInfo container, CallContext? ctx = null) : PrmBase(ctx), ISessionToken
{ {

View file

@ -1,4 +1,4 @@
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public sealed class PrmContainerDelete(FrostFsContainerId containerId, CallContext? ctx = null) : PrmBase(ctx), ISessionToken public sealed class PrmContainerDelete(FrostFsContainerId containerId, CallContext? ctx = null) : PrmBase(ctx), ISessionToken
{ {

View file

@ -1,4 +1,4 @@
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public sealed class PrmContainerGet(FrostFsContainerId container, CallContext? ctx = null) : PrmBase(ctx) public sealed class PrmContainerGet(FrostFsContainerId container, CallContext? ctx = null) : PrmBase(ctx)
{ {

View file

@ -1,4 +1,4 @@
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public sealed class PrmContainerGetAll(CallContext? ctx = null) : PrmBase(ctx) public sealed class PrmContainerGetAll(CallContext? ctx = null) : PrmBase(ctx)
{ {

View file

@ -1,4 +1,4 @@
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public sealed class PrmNetmapSnapshot(CallContext? ctx = null) : PrmBase(ctx) public sealed class PrmNetmapSnapshot(CallContext? ctx = null) : PrmBase(ctx)
{ {

View file

@ -1,4 +1,4 @@
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public sealed class PrmNetworkSettings(CallContext? ctx = null) : PrmBase(ctx) public sealed class PrmNetworkSettings(CallContext? ctx = null) : PrmBase(ctx)
{ {

View file

@ -1,4 +1,4 @@
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public sealed class PrmNodeInfo(CallContext? ctx = null) : PrmBase(ctx) public sealed class PrmNodeInfo(CallContext? ctx = null) : PrmBase(ctx)
{ {

View file

@ -1,4 +1,4 @@
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public sealed class PrmObjectDelete(FrostFsContainerId containerId, FrostFsObjectId objectId, CallContext? ctx = null) : PrmBase(ctx), ISessionToken public sealed class PrmObjectDelete(FrostFsContainerId containerId, FrostFsObjectId objectId, CallContext? ctx = null) : PrmBase(ctx), ISessionToken
{ {

View file

@ -1,4 +1,4 @@
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public sealed class PrmObjectGet(FrostFsContainerId containerId, FrostFsObjectId objectId, CallContext? ctx = null) : PrmBase(ctx), ISessionToken public sealed class PrmObjectGet(FrostFsContainerId containerId, FrostFsObjectId objectId, CallContext? ctx = null) : PrmBase(ctx), ISessionToken
{ {

View file

@ -1,4 +1,4 @@
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public sealed class PrmObjectHeadGet(FrostFsContainerId containerId, FrostFsObjectId objectId, CallContext? ctx = null) : PrmBase(ctx), ISessionToken public sealed class PrmObjectHeadGet(FrostFsContainerId containerId, FrostFsObjectId objectId, CallContext? ctx = null) : PrmBase(ctx), ISessionToken
{ {

View file

@ -1,6 +1,6 @@
using System.IO; using System.IO;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public sealed class PrmObjectPatch(FrostFsAddress address, CallContext? ctx = null) : PrmBase(ctx), ISessionToken public sealed class PrmObjectPatch(FrostFsAddress address, CallContext? ctx = null) : PrmBase(ctx), ISessionToken
{ {

View file

@ -1,6 +1,6 @@
using System.IO; using System.IO;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public sealed class PrmObjectPut(CallContext? ctx = null) : PrmBase(ctx), ISessionToken public sealed class PrmObjectPut(CallContext? ctx = null) : PrmBase(ctx), ISessionToken
{ {

View file

@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public sealed class PrmObjectSearch(FrostFsContainerId containerId, CallContext? ctx = null, params IObjectFilter[] filters) : PrmBase(ctx), ISessionToken public sealed class PrmObjectSearch(FrostFsContainerId containerId, CallContext? ctx = null, params IObjectFilter[] filters) : PrmBase(ctx), ISessionToken
{ {

View file

@ -1,4 +1,4 @@
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public sealed class PrmRangeGet( public sealed class PrmRangeGet(
FrostFsContainerId containerId, FrostFsContainerId containerId,

View file

@ -1,4 +1,4 @@
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public sealed class PrmRangeHashGet( public sealed class PrmRangeHashGet(
FrostFsContainerId containerId, FrostFsContainerId containerId,

View file

@ -1,4 +1,4 @@
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public sealed class PrmSessionCreate(ulong expiration, CallContext? ctx = null) : PrmBase(ctx) public sealed class PrmSessionCreate(ulong expiration, CallContext? ctx = null) : PrmBase(ctx)
{ {

View file

@ -1,4 +1,4 @@
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public sealed class PrmSingleObjectPut(FrostFsObject frostFsObject, CallContext? ctx = null) : PrmBase(ctx), ISessionToken public sealed class PrmSingleObjectPut(FrostFsObject frostFsObject, CallContext? ctx = null) : PrmBase(ctx), ISessionToken
{ {

View file

@ -1,6 +1,6 @@
using System; using System;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public class PrmWait(TimeSpan timeout, TimeSpan pollInterval) public class PrmWait(TimeSpan timeout, TimeSpan pollInterval)
{ {

View file

@ -3,7 +3,7 @@ using System.Threading;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
// clientStatusMonitor count error rate and other statistics for connection. // clientStatusMonitor count error rate and other statistics for connection.
public class ClientStatusMonitor : IClientStatus public class ClientStatusMonitor : IClientStatus

View file

@ -3,7 +3,7 @@ using System.Threading.Tasks;
using Grpc.Core; using Grpc.Core;
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
// clientWrapper is used by default, alternative implementations are intended for testing purposes only. // clientWrapper is used by default, alternative implementations are intended for testing purposes only.
public class ClientWrapper : ClientStatusMonitor public class ClientWrapper : ClientStatusMonitor
@ -101,27 +101,41 @@ public class ClientWrapper : ClientStatusMonitor
await ScheduleGracefulClose().ConfigureAwait(false); await ScheduleGracefulClose().ConfigureAwait(false);
} }
//#pragma warning disable CA2000 // Dispose objects before losing scope: will be disposed manually FrostFSClient? client = null;
FrostFSClient client = new(WrapperPrm, sessionCache);
//#pragma warning restore CA2000
//TODO: set additioanl params try
var error = await client.Dial(ctx).ConfigureAwait(false);
if (!string.IsNullOrEmpty(error))
{ {
SetUnhealthyOnDial(); client = new(WrapperPrm, sessionCache);
return wasHealthy;
var dialCtx = new CallContext
{
Timeout = TimeSpan.FromTicks((long)WrapperPrm.DialTimeout),
CancellationToken = ctx.CancellationToken
};
var error = await client.Dial(ctx).ConfigureAwait(false);
if (!string.IsNullOrEmpty(error))
{
SetUnhealthyOnDial();
return wasHealthy;
}
lock (_lock)
{
Client = client;
}
client = null;
} }
finally
lock (_lock)
{ {
Client = client; client?.Dispose();
} }
try try
{ {
var prmNodeInfo = new PrmNodeInfo(ctx); var prmNodeInfo = new PrmNodeInfo(ctx);
var res = await client.GetNodeInfoAsync(prmNodeInfo).ConfigureAwait(false); var res = await Client.GetNodeInfoAsync(prmNodeInfo).ConfigureAwait(false);
} }
catch (FrostFsException) catch (FrostFsException)
{ {

View file

@ -1,4 +1,4 @@
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
// values for healthy status of clientStatusMonitor. // values for healthy status of clientStatusMonitor.
public enum HealthyStatus public enum HealthyStatus

View file

@ -1,4 +1,4 @@
namespace FrostFS.SDK.ClientV2; namespace FrostFS.SDK.Client;
public interface IClientStatus public interface IClientStatus
{ {

Some files were not shown because too many files have changed in this diff Show more