void IAsyncTranslator.AddTranslationHandler(Guid id, IAsyncTranslationComplete handler) { lock (this.lockAsyncTranslationHandlers) { List <IAsyncTranslationComplete> handlers = null; this.AsyncTranslationHandlers.TryGetValue(id, out handlers); if (handlers == null) { handlers = new List <IAsyncTranslationComplete>(); } handlers.Add(handler); this.AsyncTranslationHandlers[id] = handlers; } }
internal void AddTranslationHandler(Guid id, IAsyncTranslationComplete handler) { lock (this.lockAsyncTranslationHandlers) { List<IAsyncTranslationComplete> handlers = null; this.AsyncTranslationHandlers.TryGetValue(id, out handlers); if (handlers == null) { handlers = new List<IAsyncTranslationComplete>(); } handlers.Add(handler); this.AsyncTranslationHandlers[id] = handlers; } }