Esempio n. 1
0
 public static ILogging CreateProxy(this ILoggingBase self, string prefix, MyLogSeverity level)
 {
     return(new LoggingProxy(self, prefix)
     {
         Level = level
     });
 }
 public GridMeteorShower(ILoggingBase rootLogger, params Meteor[] impacts)
 {
     Logger = rootLogger.CreateProxy(GetType().Name);
     foreach (var f in impacts)
     {
         m_impactDirectionRadius.Add(f);
     }
 }
Esempio n. 3
0
 public RoomRemapper(ILoggingBase root)
 {
     Logger = root.CreateProxy(GetType().Name);
     m_allPre.Add(new GridRemap_Names(root));
     m_allPre.Add(new Coloring(root));
     m_allPre.Add(new GridRemap_Ownership(root));
     m_primary.Add(new GridRemap_LocalTransform(root));
     m_auxiliary.Add(new GridRemap_WorldTransform(root));
     DebugRoomColors = Settings.DebugDrawRoomColors;
 }
Esempio n. 4
0
        protected LoggingSessionComponent()
        {
            m_logger = null;

            var builder = new StringBuilder(48);

            builder.Append(GetType().Name).Append(' ');
            var simpleName = builder.ToString();

            DependsOn((LoggerBase y) =>
            {
                RootLogger = y;
                m_logger   = y?.CreateProxy(simpleName);
            });
        }
Esempio n. 5
0
        public static ILogging CreateProxy(this ILoggingBase logger, Type type)
        {
            var match = type.FullName ?? "";

            MyLogSeverity?result = null;

            while (match.Length > 0)
            {
                MyLogSeverity severity;
                if (_levels.TryGetValue(match, out severity))
                {
                    result = severity;
                    break;
                }

                var i = match.LastIndexOf('.');
                if (i < 0)
                {
                    break;
                }
                match = match.Substring(0, i);
            }
            return(logger.CreateProxy(type.Name, result ?? _levels[""]));
        }
Esempio n. 6
0
 public GridRemap_WorldTransform(ILoggingBase root) : base(root)
 {
 }
Esempio n. 7
0
 public static ILogging CreateProxy(this ILoggingBase self, string prefix)
 {
     return(new LoggingProxy(self, prefix));
 }
Esempio n. 8
0
 public GridRemap_LocalDamage(ILoggingBase root) : base(root)
 {
     Seed         = 0;
     DamageOffset = 0.5;
 }
Esempio n. 9
0
 protected IGridRemap(ILoggingBase root)
 {
     Logger = root.CreateProxy(GetType().Name);
 }
Esempio n. 10
0
 public LoggingProxy(ILoggingBase backing, string prefix)
 {
     Backing = backing;
     Prefix  = prefix + " ";
 }
Esempio n. 11
0
 public Coloring(ILoggingBase root) : base(root)
 {
 }
Esempio n. 12
0
 public GridRemap_Ownership(ILoggingBase root) : base(root)
 {
 }
Esempio n. 13
0
 public GridRemap_Names(ILoggingBase root) : base(root)
 {
 }
Esempio n. 14
0
 public GridRemap_LocalTransform(ILoggingBase root) : base(root)
 {
 }