Пример #1
0
 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;
         }
     }
 }
Пример #2
0
 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;
     }
 }
Пример #3
0
 public Product(string appKey, string secretKey, iLogHandler handler) : base(appKey, secretKey)
 {
     base.Attach(handler);
 }
Пример #4
0
 public Review(string appKey, string secretKey, iLogHandler handler) : base(appKey, secretKey)
 {
     base.Attach(handler);
 }