public void Call(IDictionary <string, object> parameters = null, C8oResponseListener c8oResponseListener = null, C8oExceptionListener c8oExceptionListener = null) { // IMPORTANT : all c8o calls have to end here ! try { c8oLogger.LogMethodCall("Call", parameters); // Checks parameters validity if (parameters == null) { parameters = new Dictionary <string, object>(); } else { // Clones parameters in order to modify them parameters = new Dictionary <string, object>(parameters); } // Creates a async task running on another thread // Exceptions have to be handled by the C8oExceptionListener var task = new C8oCallTask(this, parameters, c8oResponseListener, c8oExceptionListener); task.Execute(); } catch (Exception e) { HandleCallException(c8oExceptionListener, parameters, e); } }
internal void AddLive(string liveid, string db, C8oCallTask task) { CancelLive(liveid); lock (lives) { lives[liveid] = task; } lock (livesDb) { livesDb[liveid] = db; } AddFullSyncChangeListener(db, HandleFullSyncLive); }