IFirebaseConfig config = new FirebaseConfig();

        public async Task UpdateFireblob(CloudBlobContainer blobContainer)
        {

            try
            {
                IFirebaseConfig config = new FirebaseConfig
                {
                    AuthSecret = "Gg5t1fSLC0WWPVM1VMoNxlM29qO1s53dEso7Jrfp",
                    BasePath = "https://ringtoneapp.firebaseio.com/"
                };

                IFirebaseClient client = new FirebaseClient(config);
                var list = blobContainer.ListBlobs();
                List<CloudBlockBlob> blobNames = list.OfType<CloudBlockBlob>().ToList();

                // SET
                var todo = new Todo();

                List<Todo> todoList = new List<Todo>();
                List<UploadDataModel> MetaList = new List<UploadDataModel>();
                foreach (var blb in blobNames)
                {
                    blb.FetchAttributes();
                    Todo td = new Todo();
                    td.name = blb.Name;
                    td.url = blb.Uri.AbsoluteUri.ToString();
                    if (blb.Metadata.Values.Count > 0)
                    {
                        td.Category = blb.Metadata.Values.ElementAt(0);
                        td.UserName = blb.Metadata.Values.ElementAt(1);
                        td.Number = blb.Metadata.Values.ElementAt(2);
                        td.Email = blb.Metadata.Values.ElementAt(3);
                        td.Comments = blb.Metadata.Values.ElementAt(4);
                    }
                    todoList.Add(td);
                }

                SetResponse response = await client.SetAsync(FirebaseContainer, todoList);
                List<Todo> setresult = response.ResultAs<List<Todo>>();
            }
            catch (Exception e)
            {

            }

            //GET
            //FirebaseResponse getresponse = await client.GetAsync("ringtones");
            //List<Todo> gettodo = response.ResultAs<List<Todo>>(); //The response will contain the data being retreived
        }

Are there any code examples left?
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source