Example #1
0
 public static MemoryLogger GetLoggerForType(this MemoryLogFactory factory, Type theType)
 {
     if (theType == null)
     {
         throw new ArgumentNullException(nameof(theType));
     }
     return(factory.GetLogger(theType.FullName));
 }
Example #2
0
        public static MemoryLogger GetLoggerForInstance(this MemoryLogFactory factory, object instance)
        {
            if (instance == null)
            {
                throw new ArgumentNullException(nameof(instance));
            }
            var name = $"{instance.GetType().FullName}[@]{instance.GetHashCode()}";

            return(factory.GetLogger(name));
        }
Example #3
0
 public static MemoryLogger GetLoggerForType <T>(this MemoryLogFactory factory)
 {
     return(factory.GetLoggerForType(typeof(T)));
 }