public string Push<T>(T data, FirebasePromise<bool> onCompletion = null)
 {
     var newNode = databaseReference.Push();
     var command = newNode.SetValue(ToNativeConverter.ToNative(data.GetType(), data));
     if (onCompletion != null)
         command.AddOnCompleteListener(new CommandCompletedListener(onCompletion));
     return newNode.Key;
 }
        public void Update<T>(T data, FirebasePromise<bool> onCompletion = null)
        {
            var newNode = databaseReference;
            var convertedData = ToNativeConverter.ToDictionary(typeof(T), data);

            newNode.UpdateChildren(convertedData).AddOnCompleteListener(new CommandCompletedListener(onCompletion));

        }
 public string Put<T>(T data, FirebasePromise<bool> onCompletion = null)
 {
     var newNode = databaseReference;
     var convertedData = ToNativeConverter.ToNative(typeof(T), data);
     var command = newNode.SetValue(convertedData);
     if (onCompletion != null)
         command.AddOnCompleteListener(new CommandCompletedListener(onCompletion));
     return newNode.Key;
 }
 public override void SetValue(T data)
 {
     mutableData.Value = ToNativeConverter.ToNative(typeof(T), data);
 }