|
|
|
@ -72,15 +72,18 @@ namespace ICSharpCode.ILSpy |
|
|
|
} |
|
|
|
} |
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
public override string Name { |
|
|
|
public override string Name |
|
|
|
|
|
|
|
{ |
|
|
|
get { return name; } |
|
|
|
get { return name; } |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public override string FileExtension { |
|
|
|
public override string FileExtension |
|
|
|
|
|
|
|
{ |
|
|
|
get { return ".cs"; } |
|
|
|
get { return ".cs"; } |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public override string ProjectFileExtension { |
|
|
|
public override string ProjectFileExtension |
|
|
|
|
|
|
|
{ |
|
|
|
get { return ".csproj"; } |
|
|
|
get { return ".csproj"; } |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -329,7 +332,8 @@ namespace ICSharpCode.ILSpy |
|
|
|
IEnumerable<DictionaryEntry> rs = null; |
|
|
|
IEnumerable<DictionaryEntry> rs = null; |
|
|
|
try { |
|
|
|
try { |
|
|
|
rs = new ResourceSet(s).Cast<DictionaryEntry>(); |
|
|
|
rs = new ResourceSet(s).Cast<DictionaryEntry>(); |
|
|
|
} catch (ArgumentException) { |
|
|
|
} |
|
|
|
|
|
|
|
catch (ArgumentException) { |
|
|
|
} |
|
|
|
} |
|
|
|
if (rs != null && rs.All(e => e.Value is Stream)) { |
|
|
|
if (rs != null && rs.All(e => e.Value is Stream)) { |
|
|
|
foreach (var pair in rs) { |
|
|
|
foreach (var pair in rs) { |
|
|
|
@ -347,7 +351,8 @@ namespace ICSharpCode.ILSpy |
|
|
|
string xaml = null; |
|
|
|
string xaml = null; |
|
|
|
try { |
|
|
|
try { |
|
|
|
xaml = decompiler.DecompileBaml(ms, assembly.FileName, new ConnectMethodDecompiler(assembly), new AssemblyResolver(assembly)); |
|
|
|
xaml = decompiler.DecompileBaml(ms, assembly.FileName, new ConnectMethodDecompiler(assembly), new AssemblyResolver(assembly)); |
|
|
|
} catch (XamlXmlWriterException) {} // ignore XAML writer exceptions
|
|
|
|
} |
|
|
|
|
|
|
|
catch (XamlXmlWriterException) { } // ignore XAML writer exceptions
|
|
|
|
if (xaml != null) { |
|
|
|
if (xaml != null) { |
|
|
|
File.WriteAllText(Path.Combine(options.SaveAsProjectDirectory, Path.ChangeExtension(fileName, ".xaml")), xaml); |
|
|
|
File.WriteAllText(Path.Combine(options.SaveAsProjectDirectory, Path.ChangeExtension(fileName, ".xaml")), xaml); |
|
|
|
yield return Tuple.Create("Page", Path.ChangeExtension(fileName, ".xaml")); |
|
|
|
yield return Tuple.Create("Page", Path.ChangeExtension(fileName, ".xaml")); |
|
|
|
@ -368,7 +373,8 @@ namespace ICSharpCode.ILSpy |
|
|
|
} |
|
|
|
} |
|
|
|
yield return Tuple.Create("EmbeddedResource", fileName); |
|
|
|
yield return Tuple.Create("EmbeddedResource", fileName); |
|
|
|
} |
|
|
|
} |
|
|
|
} finally { |
|
|
|
} |
|
|
|
|
|
|
|
finally { |
|
|
|
if (bamlDecompilerAppDomain != null) |
|
|
|
if (bamlDecompilerAppDomain != null) |
|
|
|
AppDomain.Unload(bamlDecompilerAppDomain); |
|
|
|
AppDomain.Unload(bamlDecompilerAppDomain); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -466,6 +472,14 @@ namespace ICSharpCode.ILSpy |
|
|
|
return showAllMembers || !AstBuilder.MemberIsHidden(member, new DecompilationOptions().DecompilerSettings); |
|
|
|
return showAllMembers || !AstBuilder.MemberIsHidden(member, new DecompilationOptions().DecompilerSettings); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public override MemberReference GetOriginalCodeLocation(MemberReference member) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (showAllMembers || !DecompilerSettingsPanel.CurrentDecompilerSettings.AnonymousMethods) |
|
|
|
|
|
|
|
return member; |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
return ICSharpCode.ILSpy.TreeNodes.Analyzer.Helpers.GetOriginalCodeLocation(member); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public override string GetTooltip(MemberReference member) |
|
|
|
public override string GetTooltip(MemberReference member) |
|
|
|
{ |
|
|
|
{ |
|
|
|
MethodDefinition md = member as MethodDefinition; |
|
|
|
MethodDefinition md = member as MethodDefinition; |
|
|
|
|