Exemplo n.º 1
0
        public PlaylogRecordTableUnit(Playlog.Unit unit)
        {
            if (unit == null)
            {
                throw new ArgumentNullException(nameof(unit));
            }

            Name        = unit.Name;
            Difficulty  = unit.Difficulty;
            Score       = unit.Score;
            Rank        = unit.Rank;
            IsNewRecord = unit.IsNewRecord;
            IsClear     = unit.IsClear;
            ComboStatus = unit.ComboStatus;
            ChainStatus = unit.ChainStatus;
            Track       = unit.Track;
            PlayDate    = unit.PlayDate;
        }
        private Playlog.Unit ParseUnit(IElement content, int index)
        {
            var unit = new Playlog.Unit();

            unit.Name        = GetName(content);
            unit.ImageName   = GetImageName(content);
            unit.Difficulty  = GetDifficulty(content);
            unit.Score       = GetScore(content);
            unit.Rank        = GetRank(content);
            unit.IsNewRecord = GetIsNewRecord(content);
            unit.IsClear     = GetIsClear(content);
            unit.ComboStatus = GetComboStatus(content);
            unit.ChainStatus = GetChainStatus(content);
            unit.Track       = GetTrack(content);
            unit.PlayDate    = GetPlayDate(content);

            return(unit);
        }