public void SetData(object documentData, CompletionHandler handler, params FieldPath[] mergeFields) { _documentReference.Set(documentData.ToNativeFieldValues(), SetOptions.MergeFieldPaths(new JavaList <Firebase.Firestore.FieldPath>(mergeFields.Select(x => x.ToNative())))).AddOnCompleteListener(new OnCompleteHandlerListener((task) => { handler?.Invoke(task.IsSuccessful ? null : ExceptionMapper.Map(task.Exception)); })); }
public Task SetDataAsync(object documentData, params FieldPath[] mergeFields) { var tcs = new TaskCompletionSource <bool>(); _documentReference.Set(documentData.ToNativeFieldValues(), SetOptions.MergeFieldPaths(new JavaList <Firebase.Firestore.FieldPath>(mergeFields.Select(x => x.ToNative())))).AddOnCompleteListener(new OnCompleteHandlerListener((task) => { if (task.IsSuccessful) { tcs.SetResult(true); } else { tcs.SetException(ExceptionMapper.Map(task.Exception)); } })); return(tcs.Task); }
public void SetData(IDocumentReference document, object documentData, params FieldPath[] mergeFields) { var wrapper = (DocumentReferenceWrapper)document; _writeBatch.Set((DocumentReference)wrapper, documentData.ToNativeFieldValues(), SetOptions.MergeFieldPaths(new JavaList <Firebase.Firestore.FieldPath>(mergeFields.Select(x => x.ToNative())))); }
public ITransaction Set <T>(IDocumentReference document, T documentData, params FieldPath[] mergeFields) { var wrapper = (DocumentReferenceWrapper)document; _transaction.Set((DocumentReference)wrapper, documentData.ToNativeFieldValues(), SetOptions.MergeFieldPaths(new JavaList <Firebase.Firestore.FieldPath>(mergeFields.Select(x => x.ToNative())))); return(this); }
public void SetData(IDocumentReference document, object documentData, params FieldPath[] mergeFields) { _transaction.Set(document.ToNative(), documentData.ToNativeFieldValues(), SetOptions.MergeFieldPaths(new JavaList <Firebase.Firestore.FieldPath>(mergeFields.Select(x => x.ToNative())))); }
public IWriteBatch Set <T>(IDocumentReference document, T documentData, params FieldPath[] mergeFields) { _writeBatch.Set(document.ToNative(), documentData.ToNativeFieldValues(), SetOptions.MergeFieldPaths(new JavaList <Firebase.Firestore.FieldPath>(mergeFields.Select(x => x.ToNative())))); return(this); }