public void Detach(iLogHandler logHandler) { if (this.loghandlers != null) { if (this.loghandlers.ContainsKey(logHandler.Identifier)) { this.loghandlers.Remove(logHandler.Identifier); } if (this.loghandlers.Count == 0) { this.loghandlers = null; } } }
public void Attach(iLogHandler logHandler) { if (this.loghandlers == null) { loghandlers = new Dictionary <string, iLogHandler>(); } if (!this.loghandlers.ContainsKey(logHandler.Identifier)) { this.loghandlers.Add(logHandler.Identifier, logHandler); } else { this.loghandlers[logHandler.Identifier] = logHandler; } }
public Product(string appKey, string secretKey, iLogHandler handler) : base(appKey, secretKey) { base.Attach(handler); }
public Review(string appKey, string secretKey, iLogHandler handler) : base(appKey, secretKey) { base.Attach(handler); }