parent
605463ec24
commit
ae67b12313
28 changed files with 943 additions and 554 deletions
|
@ -1,13 +1,26 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using FrostFS.SDK.ModelsV2;
|
||||
using Grpc.Core.Interceptors;
|
||||
|
||||
namespace FrostFS.SDK.ClientV2;
|
||||
|
||||
public class Context()
|
||||
{
|
||||
private List<Interceptor> interceptors;
|
||||
|
||||
public CancellationToken CancellationToken { get; set; } = default;
|
||||
public TimeSpan Timeout { get; set; } = default;
|
||||
public string SessionToken { get; set; } = string.Empty;
|
||||
|
||||
public DateTime? Deadline => Timeout.Ticks > 0 ? DateTime.UtcNow.Add(Timeout) : null;
|
||||
|
||||
public Action<CallStatistics> Callback { get; set; }
|
||||
|
||||
public List<Interceptor> Interceptors
|
||||
{
|
||||
get { return interceptors ??= []; }
|
||||
set { interceptors = value; }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue