Ejemplo n.º 1
0
        private static SealedDeckIndex BuildIndex()
        {
            var index = new SealedDeckIndex();

            foreach (var resource in Folder.ReadAll())
            {
                if (!resource.Name.EndsWith(".dec"))
                {
                    continue;
                }

                var deck = DeckFile.Read(resource.Name, resource.Content);
                index.Entries[resource.Name] = deck.LimitedCode.GetValueOrDefault();
            }

            WriteIndex(index);
            return(index);
        }
Ejemplo n.º 2
0
 public static IEnumerable <Deck> ReadDecks()
 {
     return(Folder.ReadAll().Select(r => DeckFile.Read(r.Name, r.Content)));
 }
Ejemplo n.º 3
0
        private static Deck Get(string filename)
        {
            var file = Folder.ReadFile(filename);

            return(DeckFile.Read(filename, file.Content));
        }