Ejemplo n.º 1
0
 public static MemoryLogger GetLoggerForType(this MemoryLogFactory factory, Type theType)
 {
     if (theType == null)
     {
         throw new ArgumentNullException(nameof(theType));
     }
     return(factory.GetLogger(theType.FullName));
 }
Ejemplo n.º 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));
        }
Ejemplo n.º 3
0
 public static MemoryLogger GetLoggerForType <T>(this MemoryLogFactory factory)
 {
     return(factory.GetLoggerForType(typeof(T)));
 }