@@ -31,6 +31,7 @@ public sealed class AssemblyReferenceTreeNode : ILSpyTreeNode
31
31
{
32
32
readonly AssemblyReference r ;
33
33
readonly AssemblyTreeNode parentAssembly ;
34
+ private bool ? loadFualt ;
34
35
35
36
public AssemblyReferenceTreeNode ( AssemblyReference r , AssemblyTreeNode parentAssembly )
36
37
{
@@ -45,7 +46,11 @@ public override object Text {
45
46
get { return Language . EscapeName ( r . Name ) + GetSuffixString ( r . Handle ) ; }
46
47
}
47
48
48
- public override object Icon => Images . Assembly ;
49
+ public override object Icon => loadFualt switch
50
+ {
51
+ true => Images . AssemblyWarning ,
52
+ _ => Images . Assembly
53
+ } ;
49
54
50
55
public override bool ShowExpander {
51
56
get {
@@ -79,9 +84,15 @@ protected override void LoadChildren()
79
84
var module = resolver . Resolve ( r ) ;
80
85
if ( module != null )
81
86
{
87
+ loadFualt = false ;
82
88
foreach ( var childRef in module . AssemblyReferences )
83
89
this . Children . Add ( new AssemblyReferenceTreeNode ( childRef , parentAssembly ) ) ;
84
90
}
91
+ else
92
+ {
93
+ loadFualt = true ;
94
+ }
95
+ RaisePropertyChanged ( nameof ( Icon ) ) ;
85
96
}
86
97
87
98
public override void Decompile ( Language language , ITextOutput output , DecompilationOptions options )
@@ -100,14 +111,22 @@ public override void Decompile(Language language, ITextOutput output, Decompilat
100
111
output . Indent ( ) ;
101
112
language . WriteCommentLine ( output , "Assembly reference loading information:" ) ;
102
113
if ( info . HasErrors )
114
+ {
103
115
language . WriteCommentLine ( output , "There were some problems during assembly reference load, see below for more information!" ) ;
116
+ loadFualt = true ;
117
+ }
118
+ else
119
+ {
120
+ loadFualt = false ;
121
+ }
104
122
foreach ( var item in info . Messages )
105
123
{
106
124
language . WriteCommentLine ( output , $ "{ item . Item1 } : { item . Item2 } ") ;
107
125
}
108
126
output . Unindent ( ) ;
109
127
output . WriteLine ( ) ;
110
128
}
129
+ RaisePropertyChanged ( nameof ( Icon ) ) ;
111
130
}
112
131
}
113
132
}
0 commit comments