Пример #1
4
        public async void TestFixtureSetUp()
        {
            IFirebaseConfig config = new FirebaseConfig
            {
                AuthSecret = FirebaseSecret,
                BasePath = BasePath
            };
            _client = new FirebaseClient(config); //Uses Newtonsoft.Json Json Serializer

            Task<FirebaseResponse> task1 = _client.DeleteAsync("todos");
            Task<FirebaseResponse> task2 = _client.DeleteAsync("fakepath");

            await Task.WhenAll(task1, task2);
        }
Пример #2
0
        private async void buttonDelete_Click(object sender, EventArgs e)
        {
            FirebaseResponse response = await client.DeleteAsync("Datanya/" + textBoxID.Text);

            MessageBox.Show("Deleted Record of ID : " + textBoxID.Text);

            buttonUpdate.Enabled  = false;
            buttonDelete.Enabled  = false;
            button_insert.Enabled = true;
        }
Пример #3
0
        public async void Delete()
        {
            _firebaseRequestManagerMock.Setup(firebaseRequestManager => firebaseRequestManager.DeleteAsync("todos"))
            .Returns(Task.FromResult(_expectedResponse));

            var response = await _firebaseClient.DeleteAsync("todos");

            Assert.NotNull(response);
            Assert.AreEqual(response.Success, true);
        }
Пример #4
0
        public async Task SetScheduledJobsAsync(ICollection <Event> jobs)
        {
            // delete given child node
            await mFirebaseClient.DeleteAsync(JOBS);

            var e = jobs.GetEnumerator();

            while (e.MoveNext())
            {
                await mFirebaseClient.PushAsync(JOBS, e.Current).ConfigureAwait(false);
            }
        }
Пример #5
0
        public async void TestFixtureSetUp()
        {
            IFirebaseConfig config = new FirebaseConfig
            {
                AuthSecret = FirebaseSecret,
                BasePath   = BasePath
            };

            _client = new FirebaseClient(config); //Uses Newtonsoft.Json Json Serializer

            Task <FirebaseResponse> task1 = _client.DeleteAsync("todos");
            Task <FirebaseResponse> task2 = _client.DeleteAsync("fakepath");

            await Task.WhenAll(task1, task2);
        }
Пример #6
0
        protected override async void FinalizeSetUp()
        {
            IFirebaseConfig config = new FirebaseConfig();

            _client = new FirebaseClient(config); //Uses RestSharp JsonSerializer as default
            await _client.DeleteAsync("todos");
        }
Пример #7
0
        /// <summary>
        /// Server refresh and check on every 10 seconds. Iterates through the database and adds and then deletes to update
        /// the instructors queue.
        /// </summary>
        /// <param name="sender"></param> Sender of the event
        /// <param name="e"></param> The event
        private async void ServerTimer_Tick(object sender, EventArgs e)
        {
            FirebaseResponse retrieveQuestions = await client.GetAsync("Question Information/" + _username);

            QuestionInformation quesData = retrieveQuestions.ResultAs <QuestionInformation>();

            //Call a helper to get all of the student usernames and place each one in a queue
            if (quesData != null)
            {
                Stack <string> questions     = GetQuestion(quesData.question);
                Stack <string> passQuestions = new Stack <string>();

                if (_isInstructor)
                {
                    while (questions.Count > 0)
                    {
                        if (questions.Peek() == string.Empty)
                        {
                            questions.Pop();
                        }
                        else
                        {
                            queue.AddQuestion(passQuestions.Pop(), quesData.IP, quesData.username);
                        }
                    }
                    uxQuestionCount.Text = "# of Questions: " + queue.Count.ToString();
                    FirebaseResponse delete = await client.DeleteAsync("Question Information/" + _username);
                }
                else if (!_isInstructor)
                {
                    // queue = queue stored in the cloud
                }
            } //changes
        }
Пример #8
0
        private async void materialFlatButton1_Click(object sender, EventArgs e)
        {
            //deletes an entry from the DB
            FirebaseResponse response = await client.DeleteAsync(textBox9.Text);

            MessageBox.Show("Data Deleted");
        }
        public async Task DeleteAllAsync(CancellationToken cancellationToken)
        {
            var readModelDescription = _readModelDescriptionProvider.GetReadModelDescription <TReadModel>();

            _log.Information($"Deleting ALL '{typeof(TReadModel).PrettyPrint()}' by DELETING NODE '{readModelDescription.RootNodeName}'!");
            if (_firebaseReadStoreConfiguration.UseBackupStore)
            {
                await _readModelBackUpStore.DeleteAllAsync <TReadModel>(readModelDescription.RootNodeName.Value, cancellationToken);

                await _readModelBackUpStore.TryFirebaseCoupleOfTimesAsync <TReadModel, FirebaseResponse>(_firebaseClient.DeleteAsync, readModelDescription.RootNodeName.Value);
            }
            else
            {
                await _firebaseClient.DeleteAsync(readModelDescription.RootNodeName.Value);
            }
        }
        public async void AddNewDevices(AccountModel data)
        {
            try {
                ButtonEnable = "False";
                string username = data.Email.Substring(0, data.Email.IndexOf("@"));
                data.Email = data.Email.Trim().ToLower();
                FirebaseResponse check = await client.GetAsync("/Account/" + username + "/Tiles/");

                List <TilesModel> tiles = check.ResultAs <List <TilesModel> >() ?? new List <TilesModel>();
                if (tiles.Count > 0)
                {
                    tiles.Add(this.newTiles);
                    FirebaseResponse clearResponse = await client.DeleteAsync("/Account/" + username + "/Tiles");

                    FirebaseResponse response = await client.SetAsync <List <TilesModel> >("/Account/" + username + "/Tiles/", tiles);

                    List <TilesModel> result = response.ResultAs <List <TilesModel> >();
                }
                else
                {
                    List <TilesModel> Newtiles = new List <TilesModel>();
                    Newtiles.Add(this.newTiles);
                    SetResponse response = await client.SetAsync <List <TilesModel> >("/Account/" + username + "/Tiles/", Newtiles);
                }
            } catch (Exception ex) {
                MessageBox.Show(ex.Message);
            }
            ButtonEnable = "True";
        }
Пример #11
0
        public async Task <System.Net.HttpStatusCode> UpdateFireDataAsync <T>(string path)
        {
            FirebaseResponse response = await cliente.DeleteAsync(path); //Deletes todos collection

            var temp = response.StatusCode;

            return(temp);
        }
Пример #12
0
 protected override void FinalizeSetUp()
 {
     IFirebaseConfig config = new FirebaseConfig
     {
         AuthSecret = FIREBASE_SECRET,
         BasePath = BASE_PATH
     };
     _client = new FirebaseClient(config); //Uses RestSharp JsonSerializer as default
     _client.DeleteAsync("todos").Wait();
 }
Пример #13
0
        public async Task <HttpStatusCode> DeleteItemAsync(string id)
        {
            if (string.IsNullOrEmpty(id) && !CrossConnectivity.Current.IsConnected)
            {
                return(HttpStatusCode.BadRequest);
            }

            var response = await client.DeleteAsync($"api/item/{id}");

            return(response.StatusCode);
        }
Пример #14
0
        public async Task <bool> Delete(string User)
        {
            try
            {
                FirebaseResponse response = await Client.DeleteAsync("/" + User);
            }catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }

            return(true);
        }
Пример #15
0
        public async Task DeleteAsync()
        {
            await _client.PushAsync("todos/pushAsync", new Todo
            {
                name     = "Execute PUSH4GET",
                priority = 2
            });

            var response = await _client.DeleteAsync("todos/pushAsync");

            Assert.NotNull(response);
        }
Пример #16
0
        public async void Delete()
        {
            await _client.PushAsync("todos/push", new Todo
            {
                name     = "Execute PUSH4GET",
                priority = 2
            });

            var response = await _client.DeleteAsync("todos");

            Assert.NotNull(response);
            Assert.IsTrue(response.Success);
        }
Пример #17
0
        private async void btneliminar_Click(object sender, EventArgs e)
        {
            try
            {
                if (lblid.Text == " ")
                {
                    MessageBox.Show("Seleccione un estudiante");
                }
                else
                {
                    var count = dgvinfo.Rows
                                .Cast <DataGridViewRow>()
                                .Select(row => row.Cells["No. Control"].Value.ToString())
                                .Count(s => s == lblctl.Text);


                    if (count == 1)
                    {
                        FirebaseResponse res = await client.DeleteAsync("estudiante/" + lblid.Text);

                        FirebaseResponse res2 = await client.DeleteAsync("Control/" + lblctl.Text);
                    }
                    else
                    {
                        FirebaseResponse res = await client.DeleteAsync("estudiante/" + lblid.Text);
                    }


                    grid();
                    lblcorreoD.Text = lblid.Text = lblctl.Text = lblnombreD.Text = lblproyecto.Text = lblempresa.Text = lblasesor.Text = lblasesor.Text = lblcarrera.Text = lblcorreo.Text = null;
                    MessageBox.Show("Se borro de la base de datos");
                }
            }
            catch
            {
                MessageBox.Show("Checar la conexion de internet");
            }
        }
Пример #18
0
        private async void DeleteFromFirebase(string val)
        {
            client = new FirebaseClient(config);
            FirebaseResponse delete = await client.DeleteAsync("FireSharp/Name/" + val);

            var status = delete.StatusCode;

            //If Firebase returns OK status, value is removed from ListView
            if (status.ToString() == "OK")
            {
                listView.Items.Remove(listView.SelectedItem);
                keyHolder.Remove(val);
            }
        }
Пример #19
0
        public async Task <bool> PostSurvey(string surveyKey, string choiceKey)
        {
            try
            {
                var delete = await client.DeleteAsync(CollectionEnum.userchoices.ToString() + '/' + User.UserId + '/' + surveyKey);

                var response = await client.PushAsync(CollectionEnum.userchoices.ToString() + '/' + User.UserId + '/' + surveyKey,
                                                      new UserChoice()
                {
                    ChoiceKey = choiceKey
                });
            }
            catch (Exception ex)
            {
                return(false);
            }

            return(true);
        }
Пример #20
0
        public async Task <HttpStatusCode> Delete(string path)
        {
            FirebaseResponse response = await _firebaseClient.DeleteAsync(path);

            return(response.StatusCode);
        }
Пример #21
0
        private static void cleanFirebase()
        {
            Task <FirebaseResponse> t = client.DeleteAsync(door + "/Log"); //Deletes todos collection

            t.Wait();
        }
Пример #22
0
 public async void DeleteSelectedItem(LoadDTO loadDTO)
 {
     loadDTO.Id = (Convert.ToInt32(loadDTO.Id) - 1).ToString();
     await client.DeleteAsync("TeachersLoad/" + loadDTO.Id);
 }
Пример #23
0
        public async void DeleteTimeTableFromFB()
        {
            await client.DeleteAsync("GroupsTimetable");

            MessageBox.Show("База данных была полностью очищенна");
        }
 public async void deleteFromPending(String path)
 {
     FirebaseResponse response = await client.DeleteAsync("pending/" + path);
 }
Пример #25
0
        private async void button4_Click(object sender, EventArgs e)
        {
            FirebaseResponse response = await client.DeleteAsync("Information/" + textBox1.Text);

            MessageBox.Show("Data Deleted...");
        }
        private async void DeleteFromFirebase(string val)
        {
            client = new FirebaseClient(config);
            FirebaseResponse delete = await client.DeleteAsync("FireSharp/Name/" + val);
            var status = delete.StatusCode;
            //If Firebase returns OK status, value is removed from ListView
            if (status.ToString() == "OK")
            {
                listView.Items.Remove(listView.SelectedItem);
                keyHolder.Remove(val);
            }

        }
Пример #27
0
        public async void getthongtincuoi(string CMND, int vitrivuaxoa)
        {
            try
            {
                var action = await DisplayAlert("Thông báo", "Bạn có chắc xóa thông tin này chứ?", "Đồng Ý", "Hủy");

                if (action)
                {
                    if (employees.Count == 1) //Nếu chỉ còn 1 phần tử  thì xóa ngay
                    {
                        FirebaseResponse xoahet = await client.DeleteAsync("khachthue/" + CMND + "/KHACHTHUEQUATRINH/" + vitrivuaxoa + "/");

                        getquatrinh(CMND_);
                    }
                    else // Ngược lại
                    {
                        //Tiến hành lấy vị trí cuối
                        var mangvitricuoi = new List <listquatrinh>();
                        //client = new FireSharp.FirebaseClient(config);
                        int  i     = 0;
                        bool check = true;
                        while (check)
                        {
                            i++;
                            try
                            {
                                FirebaseResponse tk = await client.GetAsync("khachthue/" + CMND + "/KHACHTHUEQUATRINH/" + i + "/");

                                if (tk.Body == "null")
                                {
                                    //Tiến hành duyệt mảng đến null thì vào đây làm bước tiếp theo
                                    int cuoi             = i - 1;
                                    FirebaseResponse tk1 = await client.GetAsync("khachthue/" + CMND + "/KHACHTHUEQUATRINH/" + cuoi + "/");

                                    KHACH_THUE_QUA_TRINH QT = tk1.ResultAs <KHACH_THUE_QUA_TRINH>();
                                    mangvitricuoi.Add(
                                        new listquatrinh(
                                            QT.ID,
                                            QT.NGHENGHIEP,
                                            QT.NOILAMVIEC,
                                            QT.CHO_O,
                                            QT.TUTHANGNAM,
                                            QT.DENTHANGNAM
                                            )
                                        );                   // Lưu thông tin cuối mảng vào 1 mảng
                                          //Tiến hành hành động xóa
                                    if (vitrivuaxoa == cuoi) //Nếu vị trí vừa chọn là cuối thì tiến hành xóa ngay
                                    {
                                        FirebaseResponse xoahet = await client.DeleteAsync("khachthue/" + CMND + "/KHACHTHUEQUATRINH/" + vitrivuaxoa + "/");
                                    }
                                    else //Nếu vị trí vừa chọn là ngẫu nhiên thì tiến hành xóa vị trí hiện tại và xóa vị trí cuối
                                    {
                                        FirebaseResponse xoa = await client.DeleteAsync("khachthue/" + CMND + "/KHACHTHUEQUATRINH/" + vitrivuaxoa + "/");

                                        FirebaseResponse xoacuoi = await client.DeleteAsync("khachthue/" + CMND + "/KHACHTHUEQUATRINH/" + cuoi + "/");

                                        //Gán giá trị lưu ở mảng trên vào vị trí vừa xóa
                                        foreach (var item in mangvitricuoi)
                                        {
                                            var data = new KHACH_THUE_QUA_TRINH
                                            {
                                                ID          = vitrivuaxoa,
                                                CHO_O       = item.choo,
                                                TUTHANGNAM  = item.tungay,
                                                DENTHANGNAM = item.denngay,
                                                NGHENGHIEP  = item.nghenghiep,
                                                NOILAMVIEC  = item.noilamviec
                                            };
                                            SetResponse response = await client.SetAsync("khachthue/" + CMND_ + "/KHACHTHUEQUATRINH/" + vitrivuaxoa + "/", data);
                                        }
                                    }
                                    //Cuối cũng tiến hành clear mảng ==> gét thông tin về ==> thoát While
                                    employees.Clear();
                                    getquatrinh(CMND_);
                                    check = false;
                                }
                            }
                            catch { }
                        }
                    }
                }
                else
                {
                    getquatrinh(UserData.shared.IDCard);
                }
            }
            catch (Exception e) { }
        }
Пример #28
0
        public async void getthongtincuoi(string CMND, int vitrivuaxoa)
        {
            var action = await DisplayAlert("Thông báo", "Bạn có chắc xóa thông tin này chứ?", "Đồng Ý", "Hủy");

            if (action)
            {
                if (employees.Count == 1) //Nếu chỉ còn 1 phần tử  thì xóa ngay
                {
                    FirebaseResponse xoahet = await client.DeleteAsync("khachthue/" + CMND + "/KHACHTHUEGIADINH/" + vitrivuaxoa + "/");

                    getgiadinh(CMND_);
                }
                else // Ngược lại
                {
                    //Tiến hành lấy vị trí cuối
                    var  mangvitricuoi = new List <listgiadinh>();
                    int  i             = 0;
                    bool check         = true;
                    while (check)
                    {
                        i++;
                        try
                        {
                            FirebaseResponse tk = await client.GetAsync("khachthue/" + CMND + "/KHACHTHUEGIADINH/" + i + "/");

                            if (tk.Body == "null")
                            {
                                //Tiến hành duyệt mảng đến null thì vào đây làm bước tiếp theo
                                int cuoi             = i - 1;
                                FirebaseResponse tk1 = await client.GetAsync("khachthue/" + CMND + "/KHACHTHUEGIADINH/" + cuoi + "/");

                                KHACH_THUE_GIA_DINH GD = tk1.ResultAs <KHACH_THUE_GIA_DINH>();
                                mangvitricuoi.Add(
                                    new listgiadinh(
                                        GD.ID,
                                        GD.HOTEN,
                                        GD.NGAYSINH,
                                        GD.GIOITINH,
                                        GD.QUANHE,
                                        GD.NGHENGHIEP,
                                        GD.DIACHICHOOHIENNAY
                                        )
                                    );                   // Lưu thông tin cuối mảng vào 1 mảng
                                //Tiến hành hành động xóa
                                if (vitrivuaxoa == cuoi) //Nếu vị trí vừa chọn là cuối thì tiến hành xóa ngay
                                {
                                    FirebaseResponse xoahet = await client.DeleteAsync("khachthue/" + CMND + "/KHACHTHUEGIADINH/" + vitrivuaxoa + "/");
                                }
                                else //Nếu vị trí vừa chọn là ngẫu nhiên thì tiến hành xóa vị trí hiện tại và xóa vị trí cuối
                                {
                                    FirebaseResponse xoa = await client.DeleteAsync("khachthue/" + CMND + "/KHACHTHUEGIADINH/" + vitrivuaxoa + "/");

                                    FirebaseResponse xoacuoi = await client.DeleteAsync("khachthue/" + CMND + "/KHACHTHUEGIADINH/" + cuoi + "/");

                                    //Gán giá trị lưu ở mảng trên vào vị trí vừa xóa
                                    foreach (var item in mangvitricuoi)
                                    {
                                        var data = new KHACH_THUE_GIA_DINH
                                        {
                                            ID                = vitrivuaxoa,
                                            HOTEN             = item.hoten,
                                            GIOITINH          = item.gioitinh,
                                            NGAYSINH          = item.ngaysinh,
                                            DIACHICHOOHIENNAY = item.choo,
                                            NGHENGHIEP        = item.nghenghiep,
                                            QUANHE            = item.quanhe
                                        };
                                        SetResponse response = await client.SetAsync("khachthue/" + CMND_ + "/KHACHTHUEGIADINH/" + vitrivuaxoa + "/", data);
                                    }
                                }
                                //Cuối cũng tiến hành clear mảng ==> gét thông tin về ==> thoát While
                                employees.Clear();
                                getgiadinh(CMND_);
                                check = false;
                            }
                        }
                        catch { }
                    }
                }
            }
            else
            {
                getgiadinh(CMND_);
            }
        }
 protected override async void FinalizeSetUp()
 {
     IFirebaseConfig config = new FirebaseConfig();
     _client = new FirebaseClient(config); //Uses RestSharp JsonSerializer as default
     await _client.DeleteAsync("todos");
 }
Пример #30
0
        internal static async Task DeleteAsync(string parent_node, string child_node)
        {
            string address = parent_node + "/" + child_node;

            await client.DeleteAsync(address);
        }
        protected override async Task onMessage(string mid = null, string author_id = null, string message = null, FB_Message message_object = null, string thread_id = null, ThreadType?thread_type = null, long ts = 0, JToken metadata = null, JToken msg = null)
        {
            //authorId: Nguoi Gui
            //threaId: Nguoi Nhan
            try
            {
                if (thread_type == ThreadType.ROOM || thread_type == ThreadType.GROUP)
                {
                    return;
                }
                IFirebaseClient client = FirebaseHelper.SetFirebaseClientForChat();
                //Check Remove blockall
                if (message.ToLower() == "removestopall")
                {
                    await client.DeleteAsync("ListBlockUser/" + thread_id);

                    return;
                }

                if (author_id == GetUserUid())
                {
                    await client.SetAsync("ListBlockUser/" + GetUserUid(), new MessageFirsebase
                    {
                        Id       = GetUserUid(),
                        BlockAll = true
                    });

                    return;
                }

                //Check ListBlockUser
                FirebaseResponse firebaseResponse = await client.GetAsync("ListBlockUser");

                Dictionary <string, MessageFirsebase> listBlockUser = JsonConvert.DeserializeObject <Dictionary <string, MessageFirsebase> >(firebaseResponse.Body);
                var isBlockedAll = listBlockUser != null && listBlockUser.Values.Any(x => x.BlockAll == true && x.Id == thread_id);
                if (isBlockedAll)
                {
                    return;
                }


                var firebaseGet = await client.GetAsync("ListUser/" + author_id);

                if (firebaseGet == null)
                {
                    if (!await CheckUserInListSimsimi(client, thread_id))
                    {
                        await Add5MinuteUser(client, author_id, author_id, thread_id, message, false);
                    }
                }
                else
                {
                    //Thơi gian hien tai < Thoi gian Block
                    var response = firebaseGet.ResultAs <MessageFirsebase>();
                    if (DateTime.UtcNow < response?.BlockUntil)
                    {
                        if (message.ToLower() == "stopall")
                        {
                            await client.SetAsync("ListBlockUser/" + thread_id, new MessageFirsebase
                            {
                                Id       = thread_id,
                                BlockAll = true
                            });

                            return;
                        }
                        else if (message.ToLower() == "stophour")
                        {
                            await client.SetAsync("ListUser/" + thread_id, new MessageFirsebase
                            {
                                BlockUntil = DateTime.UtcNow.AddHours(1)
                            });

                            return;
                        }
                        else if (message.ToLower() == "trolyao")
                        {
                            await client.SetAsync("ListSimsimiUser/" + thread_id, new MessageFirsebase
                            {
                                Id = thread_id
                            });
                            await send(new FB_Message { text = "Chào bạn. Mình là Trợ lý ảo của Quang.\nNhững tin nhắn này được trả lời tự động. Mục đích vui là chính :D" }, author_id, ThreadType.USER);
                        }
                        if (await CheckUserInListSimsimi(client, thread_id))
                        {
                            string answer = await SimsimiHelper.SendSimsimi(message);

                            string text = "Trợ lý ảo:\n" + answer;
                            await send(new FB_Message { text = text }, author_id, ThreadType.USER);
                        }
                    }
                    else
                    {
                        if (message.ToLower() == "stopall")
                        {
                            await client.SetAsync("ListBlockUser/" + thread_id, new MessageFirsebase
                            {
                                Id       = thread_id,
                                BlockAll = true
                            });

                            return;
                        }
                        else if (message.ToLower() == "stophour")
                        {
                            await client.SetAsync("ListUser/" + thread_id, new MessageFirsebase
                            {
                                Id         = thread_id,
                                BlockUntil = DateTime.UtcNow.AddHours(1)
                            });

                            return;
                        }
                        else if (message.ToLower() == "trolyao")
                        {
                            await client.SetAsync("ListSimsimiUser/" + thread_id, new MessageFirsebase
                            {
                                Id = thread_id
                            });
                            await send(new FB_Message { text = "Chào bạn. Mình là Trợ lý ảo của Quang.\nNhững tin nhắn này được trả lời tự động. Mục đích vui là chính :D" }, author_id, ThreadType.USER);
                        }


                        //Co the send message o day
                        Console.ForegroundColor = ConsoleColor.Green;
                        Console.WriteLine(string.Format($"{DateTime.Now}: Got new 1 message from author_id = {author_id}: {message}. Thread_type = {thread_type.ToString()} \nthread_id={thread_id}"));
                        if (author_id != GetUserUid())
                        {
                            Console.ForegroundColor = ConsoleColor.Blue;
                            if (await CheckUserInListSimsimi(client, thread_id))
                            {
                                string answer = await SimsimiHelper.SendSimsimi(message);

                                string text = "Trợ lý ảo:\n" + answer;
                                await send(new FB_Message { text = text }, author_id, ThreadType.USER);
                            }
                            else
                            {
                                string text = "Đây là trợ lý ảo của Quang.\nHiện tại Quang không đang online nên không thể trả lời bạn ngay được.\nTrong khi chờ đợi, các bạn có thể gõ tin nhắn \"trolyao\" để trao đổi với trợ lý ảo";

                                await send(new FB_Message { text = text }, author_id, ThreadType.USER);
                            }



                            #region Ít dùng
                            //using (FileStream stream = File.OpenRead(@"the girl with katana.jpg"))
                            //{
                            //    await sendLocalFiles(
                            //        file_paths: new Dictionary<string, Stream>() { { @"the girl with katana.jpg", stream } },
                            //        message: null,
                            //        thread_id: author_id,
                            //        thread_type: ThreadType.USER);
                            //}
                            //await send(new FB_Message { text = "Đáp lại tin nhắn----" }, author_id, ThreadType.USER);
                            //await send(new FB_Message { text = await Covid19Helper.GetDetail() }, author_id, ThreadType.USER);

                            #endregion
                        }

                        ///////////////////
                        if (!await CheckUserInListSimsimi(client, thread_id))
                        {
                            await Add5MinuteUser(client, author_id, author_id, thread_id, message, false);
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine($"{DateTime.Now}: Có lỗi xảy ra. Exception = {e.Message}");
            }
        }
Пример #32
0
 public async Task DeleteAsync(string path)
 {
     await client.DeleteAsync(path);
 }
Пример #33
0
        private async void delete_btn_Click(object sender, EventArgs e)
        {
            FirebaseResponse response = await client.DeleteAsync("Cars/" + textBox1.Text);

            MessageBox.Show("Record Deleted");
        }