コード例 #1
0
 public void Configure(Type type, LoggingOptions options)
 {
     lock (syncRoot)
     {
         LocalLogger l = this[type] as LocalLogger;
         l.Options = options;
     }
 }
コード例 #2
0
        public ILogger this[Type type]
        {
            get
            {
                lock (syncRoot)
                {
                    ILogger searched;
                    if (logger.TryGetValue(type.FullName, out searched))
                    {
                        return(searched);
                    }

                    // We create it.
                    searched = new LocalLogger(this);
                    logger[type.FullName] = searched;
                    return(searched);
                }
            }
        }