public override void WriteAync(ISettingItem[] items, IReporter reporter = null, int timeout = 100, int retryLimit = 3) { CheckConnection(); List <ISettingValue> settings = GetAllValues(items); lock (readWriteLock) { if (IsRunningReadWrite_NoLock == true) { throw new Exception("Already running a " + currentProcess.Mode + " async process."); } reporterWrapper = new ReporterWrapper(reporter); currentProcess = new SettingProcess(Connection, reporterWrapper, settings, timeout, retryLimit); try { reporterWrapper.Completed += CurrentProcess_Completed; currentProcess.WriteAsync(); } catch (Exception ex) { reporterWrapper.Completed -= CurrentProcess_Completed; throw ex; } } }