Ejemplo n.º 1
0
        static UsersService()
        {
            storage = new XmlFileService(UsersFilename, typeof(User[]));
            users   = new Dictionary <string, User>();

            if (File.Exists(UsersFilename))
            {
                var collection = storage.Load() as User[];
                foreach (var item in collection)
                {
                    users.Add(item.Username, item);
                }
            }
        }
Ejemplo n.º 2
0
        static UsersService()
        {
            storage = new XmlFileService(UsersFilename, typeof(User[]));
            users = new Dictionary<string, User>();

            if (File.Exists(UsersFilename))
            {
                var collection = storage.Load() as User[];
                foreach (var item in collection)
                {
                    users.Add(item.Username, item);
                }
            }
        }
        static TokenizationService()
        {
            storage         = new XmlFileService(CardsFilename, typeof(Card[]));
            cards           = new Dictionary <string, Card>();
            randomGenerator = new Random();

            if (File.Exists(CardsFilename))
            {
                var collection = storage.Load() as Card[];
                foreach (var item in collection)
                {
                    cards.Add(item.Token, item);
                }
            }
        }
        static TokenizationService()
        {
            storage = new XmlFileService(CardsFilename, typeof(Card[]));
            cards = new Dictionary<string, Card>();
            randomGenerator = new Random();

            if (File.Exists(CardsFilename))
            {
                var collection = storage.Load() as Card[];
                foreach (var item in collection)
                {
                    cards.Add(item.Token, item);
                }
            }
        }