Esempio n. 1
0
        public static ITraceObserver GetTrace(string componentName, string className)
        {
            var manager     = TraceManager.Instance;
            var TracerStore = Reflector.GetInstanceFieldByName(TraceManager.Instance, "m_TracerStore")
                              as Dictionary <string, IComponentTrace>;

            foreach (var k in TracerStore.Keys)
            {
                if (k == componentName)
                {
                    HierarchyName hierarchyName  = new HierarchyName(componentName, className, null);
                    var           componentTrace = TracerStore[k];
                    var           trace          = componentTrace.GetTracerForClass(hierarchyName);
                    return(trace as ITraceObserver);
                }
            }
            return(null);
        }
Esempio n. 2
0
 ITrace IComponentTrace.GetTracerForClass(HierarchyName hierarchyName)
 {
     return(new ConsoleTrace());
 }