public async Task<SnapshotResult> Get(Firebase reference)
        {
            CheckDisposed();

            var request = new GetRequest(reference);
            return await PerformRequest(request) as SnapshotResult;
        }
        public Task<Result> Remove(Firebase reference)
        {
            CheckDisposed();
            ArgUtils.CheckForNull(reference, nameof(reference));

            var request = new Request(reference, HttpMethod.Delete);
            return PerformRequest(request);
        }
Beispiel #3
0
        public void Cleanup()
        {
            user = null;

            // Remove all data from firebase
            firebase.AuthToken = new AuthToken(TestData.Secret); // Auth as admin to ensure we can delete everything
            firebase.Remove();
            firebase = null;
        }
        public Task<Result> Push(Firebase reference, object content = null)
        {
            CheckDisposed();

            ArgUtils.CheckForNull(reference, nameof(reference));

            var request = new PushRequest(reference, content);
            return PerformRequest(request);
        }
        public Task<Result> Set(Firebase reference, object content)
        {
            CheckDisposed();

            ArgUtils.CheckForNull(reference, nameof(reference));
            ArgUtils.CheckForNull(content, nameof(content));

            var request = new Request(reference, HttpMethod.Put, content);
            return PerformRequest(request);
        }
 protected FirebaseEventArgs(Firebase firebase, Snapshot snapshot)
 {
     Firebase = firebase;
     Snapshot = snapshot;
 }
Beispiel #7
0
 public Request(Firebase reference, HttpMethod method, object content = null)
 {
     Reference = reference;
     Method = method;
     Content = content;
 }
Beispiel #8
0
 public PushRequest(Firebase reference, object content = null)
     : base(reference, HttpMethod.Post, content ?? false)
 {
 }
Beispiel #9
0
 public Snapshot(IJsonObject jsonObject, Firebase reference)
 {
     JsonObject = jsonObject;
     Reference  = reference;
 }
Beispiel #10
0
        public void Initialize()
        {
            user = new User { FirstName = "Ryan", LastName = "Esteves" };

            firebase = new Firebase(TestData.IntanceUrl);
        }