public void AddDocument(object data, CompletionHandler handler) { _collectionReference.AddDocument(data.ToNativeFieldValues(), (error) => { handler?.Invoke(error == null ? null : ExceptionMapper.Map(error)); }); }
public void UpdateData(FieldPath field, object value, CompletionHandler handler, params object[] moreFieldsAndValues) { _documentReference.Update(field.ToNative(), value.ToNativeFieldValue(), moreFieldsAndValues.Select(x => x.ToNativeFieldValue()).ToArray()).AddOnCompleteListener(new OnCompleteHandlerListener((task) => { handler?.Invoke(task.IsSuccessful ? null : ExceptionMapper.Map(task.Exception)); })); }
public void Commit(CompletionHandler handler) { WriteBatch.Commit().AddOnCompleteListener(new OnCompleteHandlerListener((task) => { handler?.Invoke(task.IsSuccessful ? null : new CloudFirestoreException(task.Exception.Message)); })); }
public void DeleteDocument(CompletionHandler handler) { _documentReference.Delete().AddOnCompleteListener(new OnCompleteHandlerListener((task) => { handler?.Invoke(task.IsSuccessful ? null : ExceptionMapper.Map(task.Exception)); })); }
public void Commit(CompletionHandler handler) { WriteBatch.Commit((error) => { handler?.Invoke(error == null ? null : new CloudFirestoreException(error.LocalizedDescription)); }); }
public void SetData <T>(T documentData, IEnumerable <string> mergeFields, CompletionHandler handler) where T : class { DocumentReference.SetData(documentData.ToNativeFieldValues(), mergeFields.ToArray(), (error) => { handler?.Invoke(error == null ? null : new CloudFirestoreException(error.LocalizedDescription)); }); }
public void SetData(object documentData, CompletionHandler handler) { _documentReference.Set(documentData.ToNativeFieldValue()).AddOnCompleteListener(new OnCompleteHandlerListener((task) => { handler?.Invoke(task.IsSuccessful ? null : ExceptionMapper.Map(task.Exception)); })); }
public void SetData(object documentData, CompletionHandler handler, params FieldPath[] mergeFields) { _documentReference.SetData(documentData.ToNativeFieldValues(), mergeFields.Select(x => x.ToNative()).ToArray(), (error) => { handler?.Invoke(error == null ? null : ExceptionMapper.Map(error)); }); }
public void DeleteDocument(CompletionHandler handler) { DocumentReference.Delete().AddOnCompleteListener(new OnCompleteHandlerListener((task) => { handler?.Invoke(task.IsSuccessful ? null : new CloudFirestoreException(task.Exception.Message)); })); }
public void SetData <T>(T documentData, IEnumerable <string> mergeFields, CompletionHandler handler) where T : class { DocumentReference.Set(documentData.ToNativeFieldValues(), SetOptions.MergeFields(mergeFields.ToArray())).AddOnCompleteListener(new OnCompleteHandlerListener((task) => { handler?.Invoke(task.IsSuccessful ? null : new CloudFirestoreException(task.Exception.Message)); })); }
public void UpdateData <T>(T fields, CompletionHandler handler) where T : class { DocumentReference.Update(fields.ToNativeFieldValues()).AddOnCompleteListener(new OnCompleteHandlerListener((task) => { handler?.Invoke(task.IsSuccessful ? null : new CloudFirestoreException(task.Exception.Message)); })); }
public void UpdateData <T>(string field, T value, CompletionHandler handler, params object[] moreFieldsAndValues) { DocumentReference.Update(field, value.ToNativeFieldValue(), moreFieldsAndValues.Select(x => x.ToNativeFieldValue()).ToArray()).AddOnCompleteListener(new OnCompleteHandlerListener((task) => { handler?.Invoke(task.IsSuccessful ? null : new CloudFirestoreException(task.Exception.Message)); })); }
public void DeleteDocument(CompletionHandler handler) { DocumentReference.DeleteDocument((error) => { handler?.Invoke(error == null ? null : new CloudFirestoreException(error.LocalizedDescription)); }); }
public void UpdateData(object fields, CompletionHandler handler) { _documentReference.UpdateData(fields.ToNativeFieldValues(), (error) => { handler?.Invoke(error == null ? null : ExceptionMapper.Map(error)); }); }
public void SetData(object documentData, bool merge, CompletionHandler handler) { _documentReference.SetData(documentData.ToNativeFieldValues(), merge, (error) => { handler?.Invoke(error == null ? null : ExceptionMapper.Map(error)); }); }
public void AddDocument <T>(T data, CompletionHandler handler) where T : class { CollectionReference.AddDocument(data.ToNativeFieldValues(), (error) => { handler?.Invoke(error == null ? null : new CloudFirestoreException(error.LocalizedDescription)); }); }
public void DeleteDocument(CompletionHandler handler) { _documentReference.DeleteDocument((error) => { handler?.Invoke(error == null ? null : ExceptionMapper.Map(error)); }); }
public void UpdateData(object fields, CompletionHandler handler) { _documentReference.Update(fields.ToNativeFieldValues()).AddOnCompleteListener(new OnCompleteHandlerListener((task) => { handler?.Invoke(task.IsSuccessful ? null : ExceptionMapper.Map(task.Exception)); })); }
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 void SetData(object documentData, CompletionHandler handler, params string[] mergeFields) { _documentReference.Set(documentData.ToNativeFieldValues(), SetOptions.MergeFields(mergeFields)).AddOnCompleteListener(new OnCompleteHandlerListener((task) => { handler?.Invoke(task.IsSuccessful ? null : ExceptionMapper.Map(task.Exception)); })); }
public void Commit(CompletionHandler handler) { _writeBatch.Commit((error) => { handler?.Invoke(error == null ? null : ExceptionMapper.Map(error)); }); }
public void Commit(CompletionHandler handler) { _writeBatch.Commit().AddOnCompleteListener(new OnCompleteHandlerListener((task) => { handler?.Invoke(task.IsSuccessful ? null : ExceptionMapper.Map(task.Exception)); })); }
public void UpdateData <T>(T fields, CompletionHandler handler) where T : class { DocumentReference.UpdateData(fields.ToNativeFieldValues(), (error) => { handler?.Invoke(error == null ? null : new CloudFirestoreException(error.LocalizedDescription)); }); }
public void AddDocument <T>(T data, CompletionHandler handler) where T : class { CollectionReference.Add(data.ToNativeFieldValues()) .AddOnCompleteListener(new OnCompleteHandlerListener((task) => { handler?.Invoke(task.IsSuccessful ? null : new CloudFirestoreException(task.Exception.Message)); })); }
public void AddDocument(object data, CompletionHandler handler) { _collectionReference.Add(data.ToNativeFieldValues()) .AddOnCompleteListener(new OnCompleteHandlerListener((task) => { handler?.Invoke(task.IsSuccessful ? null : ExceptionMapper.Map(task.Exception)); })); }
public void UpdateData <T>(string field, T value, CompletionHandler handler, params object[] moreFieldsAndValues) { var fields = Field.CreateFields(field, value, moreFieldsAndValues); DocumentReference.UpdateData(fields, (error) => { handler?.Invoke(error == null ? null : new CloudFirestoreException(error.LocalizedDescription)); }); }
public void UpdateData(FieldPath field, object?value, CompletionHandler handler, params object?[] moreFieldsAndValues) { var fields = Field.CreateFields(field, value, moreFieldsAndValues); _documentReference.UpdateData(fields, (error) => { handler?.Invoke(error == null ? null : ExceptionMapper.Map(error)); }); }
public void SetData(object documentData, bool merge, CompletionHandler handler) { if (!merge) { SetData(documentData, handler); return; } _documentReference.Set(documentData.ToNativeFieldValues(), SetOptions.Merge()).AddOnCompleteListener(new OnCompleteHandlerListener((task) => { handler?.Invoke(task.IsSuccessful ? null : ExceptionMapper.Map(task.Exception)); })); }
public void SetData <T>(T documentData, bool merge, CompletionHandler handler) where T : class { if (!merge) { SetData(documentData, handler); return; } DocumentReference.Set(documentData.ToNativeFieldValues(), SetOptions.Merge()).AddOnCompleteListener(new OnCompleteHandlerListener((task) => { handler?.Invoke(task.IsSuccessful ? null : new CloudFirestoreException(task.Exception.Message)); })); }
public override void DidFinishEventsForBackgroundSession(NSUrlSession session) { this.manager.CompleteSession(); CompletionHandler?.Invoke(); }