public void DoCommand() { switch (command) { case FirebaseCommand.Get: firebase.GetValue(param); break; case FirebaseCommand.Set: if (valObj != null) { firebase.SetValue(valObj, param); } else { firebase.SetValue(valStr, isJson, param); } break; case FirebaseCommand.Update: if (valObj != null) { firebase.UpdateValueObject(valObj, param); } else { firebase.UpdateValue(valStr, param); } break; case FirebaseCommand.Push: if (valObj != null) { firebase.Push(valObj, param); } else { firebase.Push(valStr, isJson, param); } break; case FirebaseCommand.Delete: firebase.Delete(param); break; } }