[#13] Client: Use code analyzers
Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
parent
d7dbbf8da8
commit
d1271df207
102 changed files with 2168 additions and 733 deletions
|
@ -7,13 +7,14 @@ internal interface ISessionProvider
|
|||
ValueTask<Session.SessionToken> GetOrCreateSession(ISessionToken args, Context ctx);
|
||||
}
|
||||
|
||||
internal class SessionProvider(ClientEnvironment env)
|
||||
{
|
||||
internal sealed class SessionProvider(ClientEnvironment env)
|
||||
{
|
||||
public async ValueTask<Session.SessionToken> GetOrCreateSession(ISessionToken args, Context ctx)
|
||||
{
|
||||
if (args.SessionToken is null)
|
||||
{
|
||||
return await env.Client.CreateSessionInternalAsync(new PrmSessionCreate(uint.MaxValue) { Context = ctx });
|
||||
{
|
||||
return await env.Client.CreateSessionInternalAsync(new PrmSessionCreate(uint.MaxValue) { Context = ctx })
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
|
||||
return new Session.SessionToken().Deserialize(args.SessionToken.Token);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue