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