using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.Storage.Pickers;
using Windows.Storage;
using Windows.Data.Xml.Dom;
using System.IO;
using System.Net;
using System.Xml;
using System.Xml.Serialization;
using Windows.Storage.Streams;

namespace EAT_IT
{
    public class MyRecipe
    {
        //Diese Klasse dient zum abspeichern und neu erstellen von Rezepten. Der Unterschied zur Rezept-Klasse besteht darin,
        //dass die Elemente nicht mehr in Listenform  vorliegen.
        public double Rating
        {
            get;
            set;
        }

        public string Dateiname
        { 
            get;
            set;
        }
        public string Zubereitung
        {
            get;
            set;
        }

        public string Arbeitszeit
        {
            get;
            set;
        }

        public string Ruhezeit
        {
            get;
            set;
        }

        public string Schwierigkeit
        {
            get;
            set;
        }

        public int Portionen
        {
            get;
            set;
        }

        public List<string> Zutaten
        {
            get;
            set;
        }

        public List<double> Zutatenmenge
        {
            get;
            set;
        }

        public List<string> Zutateneinheit
        {
            get;
            set;
        }


        public string Kurzbeschreibung
        {
            get;
            set;
        }

        public string Titel
        {
            get;
            set;
        }

        public string ImagePfad
        {
            get;
            set;
        }

        //public async Task Opener()
        //{
        //    StorageFile sessionFile = await ApplicationData.Current.LocalFolder.CreateFileAsync("lolerskates", CreationCollisionOption.OpenIfExists);
        //    if (sessionFile == null)
        //    {
        //        return;
        //    }
        //    IInputStream sessionInputStream = await sessionFile.OpenReadAsync();

        //    //Using DataContractSerializer , look at the cat-class
        //    // var sessionSerializer = new DataContractSerializer(typeof(List<object>), new Type[] { typeof(T) });
        //    //_data = (List<object>)sessionSerializer.ReadObject(sessionInputStream.AsStreamForRead());

        //    //Using XmlSerializer , look at the Dog-class

        //    rez = (MyRecipe)serializer.Deserialize(sessionInputStream.AsStreamForRead());
        //    sessionInputStream.Dispose();

        //}


    }
}
