Exemplo n.º 1
0
        private async void Execute()
        {
            //DisplayAlert("TEST", param.ToString(), "OK");
            var p    = new MyProxy();
            var user = await p.GetUser(Model.ID);

            Model.UserName = user.Name;
        }
Exemplo n.º 2
0
        static async Task Main(string[] args)
        {
            Console.WriteLine("Press key to test");
            Console.ReadKey();
            var p    = new MyProxy();
            var user = await p.GetUser("test");

            Console.WriteLine(user.Name);

            Console.ReadKey();
        }
Exemplo n.º 3
0
        private async void Button_OnClicked(object sender, EventArgs e)
        {
            var p    = new MyProxy();
            var user = await p.GetUser("test");

            Model = new MainPageModel
            {
                UserName = user.Name
            };

            //DisplayAlert("TEST", "TEST222222222222222", "OK");


            //using (var db = new LiteDatabase(@"MyData.db"))
            //{
            //    // Get customer collection
            //    var col = db.GetCollection<Customer>("customers");

            //    // Create your new customer instance
            //    var customer = new Customer
            //    {
            //        Name = "John Doe",
            //        Phones = new string[] { "8000-0000", "9000-0000" },
            //        Age = 39,
            //        IsActive = true
            //    };

            //    // Create unique index in Name field
            //    col.EnsureIndex(x => x.Name, true);

            //    // Insert new customer document (Id will be auto-incremented)
            //    col.Insert(customer);

            //    // Update a document inside a collection
            //    customer.Name = "Joana Doe";

            //    col.Update(customer);

            //    // Use LINQ to query documents (with no index)
            //    var results = col.Find(x => x.Age > 20);


            //}
        }