コード例 #1
0
 private void CopyMovie(ICharacterRoster target, ICharacterRoster source)
 {
     target._CharName = source._CharName;
     target._Attrib   = source._Attrib;
     target._Descrip  = source._Descrip;
     target._Prof     = source._Prof;
     target._Race     = source._Race;
 }
コード例 #2
0
        //protected void UpdateCore ( int id, ICharacterDatabase memoryCharacter )
        //{
        //var existing = FindById(id);
        //}

        ICharacterDatabase CloneMovie(ICharacterRoster memoryCharacter)
        {
            var item = new ICharacterRoster();

            item.Id = memoryCharacter.Id;

            CopyMovie(item, memoryCharacter);

            return(item.Add(item));
        }
コード例 #3
0
ファイル: SeedDatabase.cs プロジェクト: StuartTCCD/itse1430
        public void Seed(ICharacterRoster database)
        {
            var character1 = new Character()
            {
                Name         = "Michael",
                Profession   = "Wizard",
                Race         = "Human",
                Strength     = 100,
                Intelligence = 100,
                Agility      = 100,
                Constitution = 100,
                Charisma     = 100,
                Biography    = "A really smart C# Professor!"
            };

            var character2 = new Character()
            {
                Name         = "Bill",
                Profession   = "Hunter",
                Race         = "Human",
                Strength     = 5,
                Intelligence = 5,
                Agility      = 5,
                Constitution = 5,
                Charisma     = 5
            };

            var character3 = new Character()
            {
                Name         = "Frank",
                Profession   = "Hunter",
                Race         = "Human",
                Strength     = 5,
                Intelligence = 5,
                Agility      = 5,
                Constitution = 5,
                Charisma     = 5
            };

            database.Add(character1, out var error);
            database.Add(character2, out error);
            database.Add(character3, out error);
        }