示例#1
0
        protected override void UpdateMe(ViewerAccount newAccount)
        {
            if (!(newAccount is PlayerAccount))
            {
                throw new Exception($"Wrong account type: got {newAccount.GetType()} but PlayerAccount needed!");
            }

            base.UpdateMe(newAccount);
        }
示例#2
0
        public void OnAllPersonsChanged()
        {
            AllPersons = new ViewerAccount[] { _showMan }
            .Concat(Players)
            .Concat(Viewers)
            .Where(a => a.IsConnected)
            .ToDictionary(a => a.Name);

            PersonsUpdateHistory.Append($"Update: ").Append(PrintPersons());
        }
示例#3
0
        public void OnAllPersonsChanged()
        {
            try
            {
                AllPersons = new ViewerAccount[] { _showMan }
                .Concat(Players)
                .Concat(Viewers)
                .Where(a => a.IsConnected)
                .ToDictionary(a => a.Name);
            }
            catch (ArgumentException exc)
            {
                throw new Exception($"OnAllPersonsChanged error: {PersonsUpdateHistory}", exc);
            }

            PersonsUpdateHistory.Append($"Update: ").Append(PrintPersons());
        }
示例#4
0
文件: Data.cs 项目: VladimirKhil/SI
 protected static string PrintAccount(ViewerAccount viewerAccount) =>
 $"{viewerAccount?.Name}@{viewerAccount?.IsHuman}:{viewerAccount?.IsConnected}";