Exemplo n.º 1
0
        // Login client
        public Cookie LogIn(string clientName, string folderPath)
        {
            var clientAccount = new ClientAccount()
            {
                Name                = clientName,
                IsPremium           = Configuration.PremiumClients.Contains(clientName),
                PerformedOperations = 0,
                TransferTotalSize   = 0
            };

            Server.LogClientIn(clientAccount);

            return(new Cookie(clientName, folderPath));
        }
Exemplo n.º 2
0
 public static void LogClientIn(ClientAccount clientAccount)
 {
     LoggedClients.Add(clientAccount);
     CalculateMaxTasksPerClient();
     ClientLoggedIn?.Invoke(LoggedClients);
 }
Exemplo n.º 3
0
 public static void LogClientOut(ClientAccount clientAccount)
 {
     LoggedClients.Remove(clientAccount);
     CalculateMaxTasksPerClient();
     ClientLoggedOut?.Invoke(LoggedClients);
 }