Example #1
0
        public async Task DoWork()
        {
            telemetryTable = client.GetTable <Telemetry>();
            var entries = await telemetryTable.Select(e => e.value).ToListAsync();

            foreach (var entry in entries)
            {
                Console.WriteLine(entry);
            }

            var messageTable = client.GetTable <Messages>();

            while (true)
            {
                Console.WriteLine("Type Message");
                var input = Console.ReadLine();
                var msg   = input;
                Console.WriteLine("Type R value");
                input = Console.ReadLine();
                var r = Int32.Parse(input ?? "0");
                Console.WriteLine("Type G value");
                input = Console.ReadLine();
                var g = Int32.Parse(input ?? "0");
                Console.WriteLine("Type B value");
                input = Console.ReadLine();
                var b = Int32.Parse(input ?? "0");

                var message = new Messages {
                    R = r, G = g, B = b, Message = msg
                };
                await messageTable.InsertAsync(message);
            }
        }
Example #2
0
 private async void OnUpdateClicked(object sender, EventArgs e)
 {
     using (var scope = new ActivityIndicatorScope(syncIndicator, true, layoutToEnable))
     {
         CartConstants.OfflineCarts = await _client.GetTable <Cart>().OrderBy(x => x.Identifier).ToCollectionAsync();
     }
     cartPicker.ItemsSource = CartConstants.OfflineCarts;
 }
Example #3
0
 public AzureExpenseService(IMobileServiceClient client)
 {
     _client              = client;
     _expenseTable        = _client.GetTable <Expense>();
     _reportTable         = _client.GetTable <Report>();
     _expenseReceiptTable = _client.GetTable <ExpenseReceipt>();
     _categoryTable       = _client.GetTable <Category>();
 }
        public FinancialsPage()
        {
            InitializeComponent();

            _client     = new MobileServiceClient(Constants.ApplicationURL);
            _orders     = _client.GetTable <Order>();
            _resupplies = _client.GetTable <Resupply>();
        }
        public async Task PostComments()
        {
            IMobileServiceClient              client       = GetClient();
            IMobileServiceTable <BlogPost>    postTable    = client.GetTable <BlogPost>();
            IMobileServiceTable <BlogComment> commentTable = client.GetTable <BlogComment>();
            var userDefinedParameters = new Dictionary <string, string>()
            {
                { "state", "NY" }, { "tags", "#pizza #beer" }
            };

            // Add a few posts and a comment
            Log("Adding posts");
            BlogPost post = new BlogPost {
                Title = "Windows 8"
            };
            await postTable.InsertAsync(post, userDefinedParameters);

            BlogPost highlight = new BlogPost {
                Title = "ZUMO"
            };
            await postTable.InsertAsync(highlight);

            await commentTable.InsertAsync(new BlogComment
            {
                BlogPostId = post.Id,
                UserName   = "******",
                Text       = "Beta runs great"
            });

            await commentTable.InsertAsync(new BlogComment
            {
                BlogPostId = highlight.Id,
                UserName   = "******",
                Text       = "Whooooo"
            });

            Assert.AreEqual(2, (await postTable.Where(p => p.Id >= post.Id)
                                .WithParameters(userDefinedParameters)
                                .ToListAsync()).Count);



            // Navigate to the first post and add a comment
            Log("Adding comment to first post");
            BlogPost first = await postTable.LookupAsync(post.Id);

            Assert.AreEqual("Windows 8", first.Title);
            BlogComment opinion = new BlogComment {
                BlogPostId = first.Id, Text = "Can't wait"
            };
            await commentTable.InsertAsync(opinion);

            Assert.AreNotEqual(0, opinion.Id);
        }
Example #6
0
        /* O código inicia o cliente do back-end e a instância IMobileServiceTable para poder realizar operações com o quadro do back-end.
         *  Certifique-se de atribuir a URL de seu Azure Mobile Apps na variável MyAppServiceURL. */
        public AzureService()
        {
            string myAppServiceURL = "http://friendsappvini.azurewebsites.net";

            _client = new MobileServiceClient(myAppServiceURL);
            _table  = _client.GetTable <T>();
        }
Example #7
0
        public AzureServices()
        {
            string MyappServiceURL = "http://meoapp.azurewebsites.net/";

            Client = new MobileServiceClient(MyappServiceURL);
            Table  = Client.GetTable <T>();
        }
        public PetsInLoveApiService()
        {
            string MyAppServiceURL = "https://petsinlove.azurewebsites.net/";

            _client = new MobileServiceClient(MyAppServiceURL);
            Table   = _client.GetTable <Pet>();
        }
        public AzureService()
        {
            string myAppServiceURL = "http://labmarcuscoutomaratonaxamarin.azurewebsites.net/";

            client = new MobileServiceClient(myAppServiceURL);
            table  = client.GetTable <T>();
        }
Example #10
0
        public AzureService()
        {
            string MyAppServiceURL = "http://demonaydenxamarin.azurewebsites.net";

            Client = new MobileServiceClient(MyAppServiceURL);
            Table  = Client.GetTable <T>();
        }
        public AzureRepository()
        {
            string MyAppServiceURL = "rua url aqui";

            Client = new MobileServiceClient(MyAppServiceURL);
            Table  = Client.GetTable <TEntity>();
        }
Example #12
0
        public AzureServices()
        {
            string theCatsAppServiceURL = "http://thecatsapp.azurewebsites.net";

            _client = new MobileServiceClient(theCatsAppServiceURL);
            _table  = _client.GetTable <T>();
        }
Example #13
0
        public AzureServices()
        {
            string MyAppServiceURL = "http://appacats.azurewebsites.net";

            Client = new MobileServiceClient(MyAppServiceURL);
            Table  = Client.GetTable <T>();
        }
Example #14
0
        public AzureService()
        {
            string MyAppServiceURL = "http://demodeveloperxamarin.azurewebsites.net";

            Client = new MobileServiceClient(MyAppServiceURL);
            Table  = Client.GetTable <Contacts>();
        }
Example #15
0
        public AzureServices()
        {
            string MyAppServiceURL = "http://pedro1teste.azurewebsites.net";

            Client = new MobileServiceClient(MyAppServiceURL);
            Table  = Client.GetTable <Model.Luminosidade>();
        }
Example #16
0
        public AzureService()
        {
            string myAppServiceURL = "http://catscmf.azurewebsites.net";

            client = new MobileServiceClient(myAppServiceURL);
            table  = client.GetTable <T>();
        }
Example #17
0
        public AzureService()
        {
            string AjaiouUrl = "http://ajaiou.azurewebsites.net";

            Client = new MobileServiceClient(AjaiouUrl);
            Table  = Client.GetTable <T>();
        }
Example #18
0
        public AzureService()
        {
            string MyAppServiceURL = "http://provaxamarindaniel.azurewebsites.net/";

            Client = new MobileServiceClient(MyAppServiceURL);
            Table  = Client.GetTable <T>();
        }
Example #19
0
        public AzureService()
        {
            string MyAppServiceURL = "http://stephanoxamarincats.azurewebsites.net/";

            Client = new MobileServiceClient(MyAppServiceURL);
            Table  = Client.GetTable <T>();
        }
Example #20
0
        public AzureService()
        {
            string MyAppServiceURL = "http://catsapp-anderson.azurewebsites.net";

            Client = new MobileServiceClient(MyAppServiceURL);
            Table  = Client.GetTable <T>();
        }
        public AzureProjetoRepository()
        {
            string MyAppServiceURL = "https://calcfreelancer.azurewebsites.net";

            Client = new MobileServiceClient(MyAppServiceURL);
            Table  = Client.GetTable <Projeto>();
        }
Example #22
0
        public AzureService()
        {
            string url = "http://lab05brasil.azurewebsites.net/";

            Client = new MobileServiceClient(url);
            Table  = Client.GetTable <T>();
        }
Example #23
0
        public AzureService()
        {
            string MyAppServiceURL = "http://<seuservico>.azurewebsites.net";

            Client = new MobileServiceClient(MyAppServiceURL);
            Table  = Client.GetTable <T>();
        }
        public AzureService()
        {
            var myAppServiceUrl = "http://notasrapidasxamarin.azurewebsites.net";

            Client = new MobileServiceClient(myAppServiceUrl);
            Table  = Client.GetTable <T>();
        }
        public AzureRepository()
        {
            string MyAppServiceURL = "https://apppucminas2018.azurewebsites.net/";

            Client = new MobileServiceClient(MyAppServiceURL);
            Table  = Client.GetTable <TEntity>();
        }
        public AzureRepository()
        {
            string MyAppServiceURL = "https://calculadorafreelancer01.azurewebsites.net";

            Client = new MobileServiceClient(MyAppServiceURL);
            Table  = Client.GetTable <Profissional>();
        }
Example #27
0
        public AzureService()
        {
            string MyAppServiceURL = "http://demosnotas.azurewebsites.net";

            Client = new MobileServiceClient(MyAppServiceURL);
            Notes  = Client.GetTable <Note>();
        }
        public AzureService()
        {
            //Change service URL
            string MyAppServiceURL = "http://testeazurehenriqu3.azurewebsites.net";

            Client = new MobileServiceClient(MyAppServiceURL);
            Table  = Client.GetTable <T>();
        }
Example #29
0
        public AzureClient()
        {
            _client =
                new
                MobileServiceClient("http://EderadoXamarinTest.azurewebsites.net");

            _table = _client.GetTable <Nota>();
        }
        public AzureService()
        {
            //Url from Mobile app Service to connect...
            string MyAppServiceURL = "http://colluraappcats.azurewebsites.net";

            //Create instance of Mobile Service Client
            Client = new MobileServiceClient(MyAppServiceURL);

            //Receive Table of any Type from Azure
            Table = Client.GetTable <T>();
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="client"></param>
        public MainViewModel(IMobileServiceClient client, NetworkInformationDelegate networkDelegate)
        {
            this.client = client;
            this.networkDelegate = networkDelegate;

            this.todoTable = client.GetTable<TodoItem2>();

            this.RefreshCommand = new RelayCommand(this.RefreshTodoItems);
            this.SaveCommand = new RelayCommand(this.Save);
            this.CompletedCommand = new RelayCommand<TodoItem2>(x => this.Complete(x));
            this.RemoveCommand = new RelayCommand<TodoItem2>(x => this.Remove(x));

            this.Items = new ObservableCollection<TodoItem2>();

            //this.RefreshTodoItems();
        }
        public virtual async Task<MobileServiceTable> GetTable(string tableName, IMobileServiceClient client = null)
        {
            await this.EnsureInitializedAsync();

            MobileServiceTable table;
            if (client == null)
            {
                table = this.client.GetTable(tableName) as MobileServiceTable;
            }
            else
            {
                table = client.GetTable(tableName) as MobileServiceTable;
            }
            table.Features = MobileServiceFeatures.Offline;

            return table;
        }