Exemple #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));
        }
Exemple #2
0
 public static void LogClientIn(ClientAccount clientAccount)
 {
     LoggedClients.Add(clientAccount);
     CalculateMaxTasksPerClient();
     ClientLoggedIn?.Invoke(LoggedClients);
 }
Exemple #3
0
 public static void LogClientOut(ClientAccount clientAccount)
 {
     LoggedClients.Remove(clientAccount);
     CalculateMaxTasksPerClient();
     ClientLoggedOut?.Invoke(LoggedClients);
 }