Ejemplo n.º 1
0
        public void Action()
        {
            VieDeMerdeService    query = new VieDeMerdeService();
            VieDeMerdeCollection vdms  = query.GetLastVieDeMerdes();

            vdms.Display(this.Writer);
        }
Ejemplo n.º 2
0
        public void Action()
        {
            string applicationData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
            string path            = Path.Combine(applicationData, "FilPasRouge");
            string filename        = Path.Combine(path, "viedemerde.json");

            if (this.FileSystem.Exists(filename))
            {
                string json = this.FileSystem.ReadAllText(filename);
                VieDeMerdeCollection collection = Newtonsoft.Json.JsonConvert.DeserializeObject <VieDeMerdeCollection>(json);

                collection.Display(this.Writer);
            }
            else
            {
                this.Writer.WriteLine("Pas de données.");
            }
        }