Exemple #1
0
 private static List <Item> HandleDatabaseResult(DatabaseResult r)
 {
     return(r.Result.Select(i => new Item
     {
         Name = i.Name,
         SellIn = Convert.ToInt32(i.SellIn),
         Quality = Convert.ToInt32(i.Quality)
     }).ToList());
 }
Exemple #2
0
        public static IObservable <DatabaseResult> GetItems()
        {
            var result = new DatabaseResult(
                new DateTime(),
                new List <DatabaseItem>
            {
                new DatabaseItem("Helmet", "1", "1"),
                new DatabaseItem("Shield", "1", "1")
            }
                );

            return(Observable.Return(result));
        }