[#26] All: Remove V2 from naming
Rename project, namespaces and class names Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
parent
c406df1a78
commit
766f61a5f7
219 changed files with 219 additions and 974 deletions
45
src/FrostFS.SDK.Client/Parameters/CallContext.cs
Normal file
45
src/FrostFS.SDK.Client/Parameters/CallContext.cs
Normal file
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Security.Cryptography;
|
||||
using System.Threading;
|
||||
|
||||
using FrostFS.SDK.Cryptography;
|
||||
|
||||
using Google.Protobuf;
|
||||
|
||||
using Grpc.Core.Interceptors;
|
||||
|
||||
namespace FrostFS.SDK.Client;
|
||||
|
||||
public class CallContext()
|
||||
{
|
||||
private ByteString? publicKeyCache;
|
||||
|
||||
internal Action<Exception>? PoolErrorHandler { get; set; }
|
||||
|
||||
public ECDsa? Key { get; set; }
|
||||
|
||||
public FrostFsOwner? OwnerId { get; set; }
|
||||
|
||||
public FrostFsVersion? Version { get; set; }
|
||||
|
||||
public CancellationToken CancellationToken { get; set; }
|
||||
|
||||
public TimeSpan Timeout { get; set; }
|
||||
|
||||
public DateTime? Deadline => Timeout.Ticks > 0 ? DateTime.UtcNow.Add(Timeout) : null;
|
||||
|
||||
public Action<CallStatistics>? Callback { get; set; }
|
||||
|
||||
public Collection<Interceptor> Interceptors { get; } = [];
|
||||
|
||||
public ByteString? GetPublicKeyCache()
|
||||
{
|
||||
if (publicKeyCache == null && Key != null)
|
||||
{
|
||||
publicKeyCache = ByteString.CopyFrom(Key.PublicKey());
|
||||
}
|
||||
|
||||
return publicKeyCache;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue