private object MismatchedComponentView(IHandler[] handlers)
 {
     return(new DebuggerViewItemWithDetails(GetName(handlers, handlers.First()),
                                            GetKey(handlers.Last()),
                                            GetMismatchMessage(handlers),
                                            Array.ConvertAll(handlers, h => ComponentDebuggerView.BuildFor(h))));
 }
示例#2
0
        private DebuggerViewItem OnSelector(IGrouping <IHandler, Burden> lookup)
        {
            var handler = lookup.Key;
            var objects = lookup.Select(g => g.Instance).ToArray();
            var view    = ComponentDebuggerView.BuildFor(handler);

            return(new DebuggerViewItem(handler.GetComponentName(),
                                        "Count = " + objects.Length,
                                        new ReleasePolicyTrackedObjectsDebuggerViewItem(view, objects)));
        }
示例#3
0
        private DebuggerViewItem BuildItem(ILookup <IHandler, object> results)
        {
            var totalCount = 0;
            var items      = new List <DebuggerViewItem>();

            foreach (var result in results)
            {
                var handler = result.Key;
                var objects = result.ToArray();
                totalCount += objects.Length;
                var view = ComponentDebuggerView.BuildFor(handler);
                var item = new DebuggerViewItem(handler.GetComponentName(),
                                                "Count = " + objects.Length,
                                                new ReleasePolicyTrackedObjectsDebuggerViewItem(view, objects));
                items.Add(item);
            }
            return(new DebuggerViewItem(name, "Count = " + totalCount, items.ToArray()));
        }
        private DebuggerViewItem BuildItem(ILookup <IHandler, object> results)
        {
            var totalCount = 0;
            var items      = new List <DebuggerViewItem>();

            foreach (var result in results.OrderBy(l => l.Key.ComponentModel.Name))
            {
                var handler = result.Key;
                var objects = result.ToArray();
                totalCount += objects.Length;
                var view = ComponentDebuggerView.BuildFor(handler);
                var item = new DebuggerViewItem(handler.GetComponentName(),
                                                "Count = " + objects.Length,
                                                new MasterDetailsDebuggerViewItem(view, view.Description, "Component", objects));
                items.Add(item);
            }
            items.Sort((f, s) => f.Name.CompareTo(s.Name));
            return(new DebuggerViewItem(name, "Count = " + totalCount, items.ToArray()));
        }
 protected ComponentDebuggerView DefaultComponentView(IHandler handler, string description = null)
 {
     return(ComponentDebuggerView.BuildFor(handler, description));
 }
示例#6
0
 protected ComponentDebuggerView DefaultComponentView(IHandler handler)
 {
     return(ComponentDebuggerView.BuildFor(handler));
 }