private async Task RegisterOnPremiseAsync(IRequest request, string connectionId, OnPremiseClaims claims) { var context = _lifetimeScope.Resolve <IOnPremiseConnectionContext>(); context.ConnectionId = connectionId; context.LinkId = claims.OnPremiseId; context.UserName = claims.UserName; context.Role = claims.Role; context.RequestAction = (cr, cancellationToken) => ForwardClientRequestAsync(connectionId, cr); context.IpAddress = GetIpAddressFromOwinEnvironment(request.Environment); context.ConnectorVersion = GetConnectorVersionFromRequest(request); context.ConnectorAssemblyVersion = GetConnectorAssemblyVersionFromRequest(request); await _backendCommunication.RegisterOnPremiseAsync(context).ConfigureAwait(false); }
private async Task RegisterOnPremiseAsync(IRequest request, string connectionId, OnPremiseClaims claims) { await _backendCommunication.RegisterOnPremiseAsync(new OnPremiseConnectionContext() { ConnectionId = connectionId, LinkId = claims.OnPremiseId, UserName = claims.UserName, Role = claims.Role, RequestAction = (cr, cancellationToken) => ForwardClientRequestAsync(connectionId, cr), IpAddress = GetIpAddressFromOwinEnvironment(request.Environment), ConnectorVersion = GetConnectorVersionFromRequest(request), ConnectorAssemblyVersion = GetConnectorAssemblyVersionFromRequest(request), }).ConfigureAwait(false); }