public bool AddFrontend(CoreDispatcher d, ISignalFrontend w) { Logger.LogTrace("AddFrontend() locking"); SemaphoreSlim.Wait(CancelSource.Token); try { Logger.LogTrace("AddFrontend() locked"); if (Running && LikelyHasValidStore) { Logger.LogInformation("Registering frontend of dispatcher {0}", w.GetHashCode()); Frames.Add(d, w); w.ReplaceConversationList(GetConversations()); return(true); } else { Logger.LogInformation("Ignoring AddFrontend call"); return(false); } } finally { SemaphoreSlim.Release(); Logger.LogTrace("AddFrontend() released"); } }
public void AddFrontend(CoreDispatcher d, ISignalFrontend w) { Logger.LogTrace("AddFrontend() locking"); SemaphoreSlim.Wait(CancelSource.Token); Logger.LogTrace("AddFrontend() locked"); if (Running) { Logger.LogInformation("Registering frontend of dispatcher {0}", w.GetHashCode()); Frames.Add(d, w); w.ReplaceConversationList(GetConversations()); } else { Logger.LogInformation("Ignoring AddFrontend call, release in progress"); } SemaphoreSlim.Release(); Logger.LogTrace("AddFrontend() released"); }