T IDebuggable.GetDebugInfo <T>(int parentDepth, int childDepth) { if (typeof(T).IsAssignableFrom(typeof(DebugDataProvider))) { return(new DebugDataProvider { Name = Name, Instance = this, Package = Package.GetDebugInfo <DebugPackage>(), DataConsumer = DataConsumer.GetDebugInfo <DebugDataConsumer>(), DataSupplier = DataSupplier.GetDebugInfo <DebugDataSupplier>() } as T); } if (typeof(T).IsAssignableFrom(typeof(DebugDataConsumer))) { return(DataConsumer.GetDebugInfo <T>(parentDepth, childDepth)); } if (typeof(T).IsAssignableFrom(typeof(DebugDataSupplier))) { return(DataSupplier.GetDebugInfo <T>(parentDepth, childDepth)); } return(null); }
protected override T PopulateDebugInfo <T>(DebugInfo debugInfo, int parentDepth, int childDepth) { _dataScopeRules.ElementName = "Page " + Name; if (typeof(T).IsAssignableFrom(typeof(DebugPage))) { var debugPage = debugInfo as DebugPage ?? new DebugPage(); debugPage.RequiredPermission = RequiredPermission; debugPage.DataContext = _dataContextBuilder.GetDebugInfo <DebugDataScopeRules>(0, -1); debugPage.Scope = _dataScopeRules.GetDebugInfo <DebugDataScopeRules>(0, -1); if (childDepth != 0) { debugPage.Layout = _layout.GetDebugInfo <DebugLayout>(0, childDepth - 1); } return(base.PopulateDebugInfo <T>(debugPage, parentDepth, childDepth)); } if (typeof(T).IsAssignableFrom(typeof(DebugDataScopeRules))) { var debugDataScopeRules = _dataScopeRules.GetDebugInfo <T>(parentDepth, childDepth); return(base.PopulateDebugInfo <T>(debugDataScopeRules, parentDepth, childDepth)); } if (typeof(T).IsAssignableFrom(typeof(DebugDataConsumer))) { var debugDataConsumer = _dataConsumer.GetDebugInfo <T>(parentDepth, childDepth); return(base.PopulateDebugInfo <T>(debugDataConsumer, parentDepth, childDepth)); } return(base.PopulateDebugInfo <T>(debugInfo, parentDepth, childDepth)); }