Before

…lines 1–491 unchanged (491 lines)
492 assembly.GetDebugInfoOrNull ()
493 ) {
494 this.assembly = assembly;
495 this.options = options;
496 }
497
498 protected override IEnumerable<(string itemType, string fileName, List<PartialTypeInfo> partialTypes)> WriteResourceToFile(string fileName, string resourceName, Stream entryStream)
499 {
500 foreach (var handler in App.ExportProvider.GetExportedValues<IResourceFileHandler>())
501 {
502 if (handler.CanHandle(fileName, options))
503 {
504 entryStream.Position = 0;
505 fileName = handler.WriteResourceToFile(assembly, fileName, entryStream, options);
506 return new[] { (handler.EntryType, fileName, (List<PartialTypeInfo>)null) };
507 }
508 }
509 return base.WriteResourceToFile(fileName, resourceName, entryStream);
510 }
511 }
512
…lines 513–721 unchanged (209 lines)

After

…lines 1–493 unchanged (493 lines)
494 )
495 {
496 this.assembly = assembly;
497 this.options = options;
498 }
499
500 protected override IEnumerable<ProjectItemInfo> WriteResourceToFile(string fileName, string resourceName, Stream entryStream)
501 {
502 foreach (var handler in App.ExportProvider.GetExportedValues<IResourceFileHandler>())
503 {
504 if (handler.CanHandle(fileName, options))
505 {
506 entryStream.Position = 0;
507 fileName = handler.WriteResourceToFile(assembly, fileName, entryStream, options);
508 return new[] { new ProjectItemInfo(handler.EntryType, fileName) };
509 }
510 }
511 return base.WriteResourceToFile(fileName, resourceName, entryStream);
512 }
513 }
514
…lines 515–723 unchanged (209 lines)

Before

compilation_unit
comment "// Copyright (c) 2011 AlphaSierraPapa for the SharpDevelop T"...
comment "// "
comment "// Permission is hereby granted, free of charge, to any pers"...
comment "// software and associated documentation files (the \"Softwar"...
comment "// without restriction, including without limitation the rig"...
comment "// publish, distribute, sublicense, and/or sell copies of th"...
comment "// to whom the Software is furnished to do so, subject to th"...
comment "// "
comment "// The above copyright notice and this permission notice sha"...
comment "// substantial portions of the Software."
comment "// "
comment "// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY"...
comment "// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTAB"...
comment "// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR"...
comment "// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN "...
comment "// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE"...
comment "// DEALINGS IN THE SOFTWARE."
using_directive
using "using"
identifier "System"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "System"
. "."
identifier "Collections"
. "."
identifier "Generic"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "System"
. "."
identifier "ComponentModel"
. "."
identifier "Composition"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "IO"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Linq"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Reflection"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "System"
. "."
identifier "Reflection"
. "."
identifier "Metadata"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Text"
; ";"
using_directive
using "using"
identifier "Avalonia"
; ";"
using_directive
using "using"
qualified_name
identifier "Avalonia"
. "."
identifier "Controls"
; ";"
using_directive
using "using"
qualified_name
identifier "Avalonia"
. "."
identifier "Layout"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "Avalonia"
. "."
identifier "Media"
. "."
identifier "Imaging"
; ";"
using_directive
using "using"
qualified_name
identifier "ICSharpCode"
. "."
identifier "Decompiler"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "ICSharpCode"
. "."
identifier "Decompiler"
. "."
identifier "CSharp"
; ";"
using_directive
using "using"
qualified_name
qualified_name
qualified_name
identifier "ICSharpCode"
. "."
identifier "Decompiler"
. "."
identifier "CSharp"
. "."
identifier "OutputVisitor"
; ";"
using_directive
using "using"
qualified_name
qualified_name
qualified_name
identifier "ICSharpCode"
. "."
identifier "Decompiler"
. "."
identifier "CSharp"
. "."
identifier "ProjectDecompiler"
; ";"
using_directive
using "using"
qualified_name
qualified_name
qualified_name
identifier "ICSharpCode"
. "."
identifier "Decompiler"
. "."
identifier "CSharp"
. "."
identifier "Syntax"
; ";"
using_directive
using "using"
qualified_name
qualified_name
qualified_name
identifier "ICSharpCode"
. "."
identifier "Decompiler"
. "."
identifier "CSharp"
. "."
identifier "Transforms"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "ICSharpCode"
. "."
identifier "Decompiler"
. "."
identifier "Metadata"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "ICSharpCode"
. "."
identifier "Decompiler"
. "."
identifier "Output"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "ICSharpCode"
. "."
identifier "Decompiler"
. "."
identifier "Solution"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "ICSharpCode"
. "."
identifier "Decompiler"
. "."
identifier "TypeSystem"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "ICSharpCode"
. "."
identifier "Decompiler"
. "."
identifier "Util"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "ICSharpCode"
. "."
identifier "ILSpy"
. "."
identifier "TextView"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "ICSharpCode"
. "."
identifier "ILSpy"
. "."
identifier "TreeNodes"
; ";"
namespace_declaration
namespace "namespace"
qualified_name
identifier "ICSharpCode"
. "."
identifier "ILSpy"
declaration_list
{ "{"
comment "/// <summary>"
comment "/// C# decompiler integration into ILSpy."
comment "/// Note: if you're interested in using the decompiler witho"...
comment "/// please directly use the CSharpDecompiler class."
comment "/// </summary>"
class_declaration
attribute_list
[ "["
attribute
identifier "Export"
attribute_argument_list
( "("
attribute_argument
typeof_expression
typeof "typeof"
( "("
identifier "Language"
) ")"
) ")"
] "]"
modifier
public "public"
class "class"
identifier "CSharpLanguage"
base_list
: ":"
identifier "Language"
declaration_list
{ "{"
field_declaration
variable_declaration
predefined_type "string"
variable_declarator
identifier "name"
= "="
string_literal
" "\""
string_literal_content "C#"
" "\""
; ";"
field_declaration
variable_declaration
predefined_type "bool"
variable_declarator
identifier "showAllMembers"
= "="
boolean_literal
false "false"
; ";"
field_declaration
variable_declaration
predefined_type "int"
variable_declarator
identifier "transformCount"
= "="
member_access_expression
predefined_type "int"
. "."
identifier "MaxValue"
; ";"
preproc_if (+144 nodes collapsed)
property_declaration
modifier
public "public"
modifier
override "override"
predefined_type "string"
identifier "Name"
accessor_list
{ "{"
accessor_declaration
get "get"
block
{ "{"
return_statement
return "return"
identifier "name"
; ";"
} "}"
} "}"
property_declaration (+22 nodes collapsed)
property_declaration (+22 nodes collapsed)
field_declaration
variable_declaration
generic_name
identifier "IReadOnlyList"
type_argument_list
< "<"
identifier "LanguageVersion"
> ">"
variable_declarator
identifier "versions"
; ";"
property_declaration (+488 nodes collapsed)
method_declaration (+117 nodes collapsed)
method_declaration (+136 nodes collapsed)
method_declaration (+279 nodes collapsed)
class_declaration (+388 nodes collapsed)
method_declaration (+142 nodes collapsed)
method_declaration (+267 nodes collapsed)
method_declaration (+156 nodes collapsed)
comment "/// <summary>"
comment "/// Removes all top-level members except for the specified f"...
comment "/// </summary>"
class_declaration (+150 nodes collapsed)
method_declaration (+142 nodes collapsed)
method_declaration (+139 nodes collapsed)
method_declaration (+217 nodes collapsed)
method_declaration (+94 nodes collapsed)
method_declaration (+318 nodes collapsed)
method_declaration (+997 nodes collapsed)
class_declaration
class "class"
identifier "ILSpyWholeProjectDecompiler"
base_list
: ":"
identifier "WholeProjectDecompiler"
declaration_list
{ "{"
field_declaration
modifier
readonly "readonly"
variable_declaration
identifier "LoadedAssembly"
variable_declarator
identifier "assembly"
; ";"
field_declaration
modifier
readonly "readonly"
variable_declaration
identifier "DecompilationOptions"
variable_declarator
identifier "options"
; ";"
constructor_declaration (+69 nodes collapsed)
method_declaration
modifier
protected "protected"
modifier
override "override"
generic_name
identifier "IEnumerable"
type_argument_list
< "<"
tuple_type
( "("
tuple_element
predefined_type "string"
identifier "itemType"
, ","
tuple_element
predefined_type "string"
identifier "fileName"
, ","
tuple_element
generic_name
identifier "List"
type_argument_list
< "<"
identifier "PartialTypeInfo"
> ">"
identifier "partialTypes"
) ")"
> ">"
identifier "WriteResourceToFile"
parameter_list
( "("
parameter
predefined_type "string"
identifier "fileName"
, ","
parameter
predefined_type "string"
identifier "resourceName"
, ","
parameter
identifier "Stream"
identifier "entryStream"
) ")"
block
{ "{"
foreach_statement
foreach "foreach"
( "("
implicit_type
var "var"
identifier "handler"
in "in"
invocation_expression
member_access_expression
member_access_expression
identifier "App"
. "."
identifier "ExportProvider"
. "."
generic_name
identifier "GetExportedValues"
type_argument_list
< "<"
identifier "IResourceFileHandler"
> ">"
argument_list
( "("
) ")"
) ")"
block
{ "{"
if_statement
if "if"
( "("
invocation_expression
member_access_expression
identifier "handler"
. "."
identifier "CanHandle"
argument_list
( "("
argument
identifier "fileName"
, ","
argument
identifier "options"
) ")"
) ")"
block
{ "{"
expression_statement
assignment_expression
member_access_expression
identifier "entryStream"
. "."
identifier "Position"
= "="
integer_literal "0"
; ";"
expression_statement (+24 nodes collapsed)
return_statement
return "return"
implicit_array_creation_expression
new "new"
[ "["
] "]"
initializer_expression
{ "{"
tuple_expression
( "("
argument
member_access_expression
identifier "handler"
. "."
identifier "EntryType"
, ","
argument
identifier "fileName"
, ","
argument
cast_expression
( "("
generic_name
identifier "List"
type_argument_list
< "<"
identifier "PartialTypeInfo"
> ">"
) ")"
null_literal "null"
) ")"
} "}"
; ";"
} "}"
} "}"
return_statement
return "return"
invocation_expression
member_access_expression
base "base"
. "."
identifier "WriteResourceToFile"
argument_list
( "("
argument
identifier "fileName"
, ","
argument
identifier "resourceName"
, ","
argument
identifier "entryStream"
) ")"
; ";"
} "}"
} "}"
method_declaration (+47 nodes collapsed)
method_declaration (+128 nodes collapsed)
method_declaration (+235 nodes collapsed)
method_declaration (+72 nodes collapsed)
method_declaration (+72 nodes collapsed)
method_declaration (+72 nodes collapsed)
method_declaration (+72 nodes collapsed)
method_declaration (+442 nodes collapsed)
method_declaration (+917 nodes collapsed)
method_declaration (+65 nodes collapsed)
method_declaration (+70 nodes collapsed)
method_declaration (+36 nodes collapsed)
field_declaration
variable_declaration
identifier "CSharpBracketSearcher"
variable_declarator
identifier "bracketSearcher"
= "="
object_creation_expression
new "new"
identifier "CSharpBracketSearcher"
argument_list
( "("
) ")"
; ";"
property_declaration
modifier
public "public"
modifier
override "override"
identifier "IBracketSearcher"
identifier "BracketSearcher"
arrow_expression_clause
=> "=>"
identifier "bracketSearcher"
; ";"
} "}"
} "}"

After

compilation_unit
comment "// Copyright (c) 2011 AlphaSierraPapa for the SharpDevelop T"...
comment "// "
comment "// Permission is hereby granted, free of charge, to any pers"...
comment "// software and associated documentation files (the \"Softwar"...
comment "// without restriction, including without limitation the rig"...
comment "// publish, distribute, sublicense, and/or sell copies of th"...
comment "// to whom the Software is furnished to do so, subject to th"...
comment "// "
comment "// The above copyright notice and this permission notice sha"...
comment "// substantial portions of the Software."
comment "// "
comment "// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY"...
comment "// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTAB"...
comment "// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR"...
comment "// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN "...
comment "// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE"...
comment "// DEALINGS IN THE SOFTWARE."
using_directive
using "using"
identifier "System"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "System"
. "."
identifier "Collections"
. "."
identifier "Generic"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "System"
. "."
identifier "ComponentModel"
. "."
identifier "Composition"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "IO"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Linq"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Reflection"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "System"
. "."
identifier "Reflection"
. "."
identifier "Metadata"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Text"
; ";"
using_directive
using "using"
identifier "Avalonia"
; ";"
using_directive
using "using"
qualified_name
identifier "Avalonia"
. "."
identifier "Controls"
; ";"
using_directive
using "using"
qualified_name
identifier "Avalonia"
. "."
identifier "Layout"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "Avalonia"
. "."
identifier "Media"
. "."
identifier "Imaging"
; ";"
using_directive
using "using"
qualified_name
identifier "ICSharpCode"
. "."
identifier "Decompiler"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "ICSharpCode"
. "."
identifier "Decompiler"
. "."
identifier "CSharp"
; ";"
using_directive
using "using"
qualified_name
qualified_name
qualified_name
identifier "ICSharpCode"
. "."
identifier "Decompiler"
. "."
identifier "CSharp"
. "."
identifier "OutputVisitor"
; ";"
using_directive
using "using"
qualified_name
qualified_name
qualified_name
identifier "ICSharpCode"
. "."
identifier "Decompiler"
. "."
identifier "CSharp"
. "."
identifier "ProjectDecompiler"
; ";"
using_directive
using "using"
qualified_name
qualified_name
qualified_name
identifier "ICSharpCode"
. "."
identifier "Decompiler"
. "."
identifier "CSharp"
. "."
identifier "Syntax"
; ";"
using_directive
using "using"
qualified_name
qualified_name
qualified_name
identifier "ICSharpCode"
. "."
identifier "Decompiler"
. "."
identifier "CSharp"
. "."
identifier "Transforms"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "ICSharpCode"
. "."
identifier "Decompiler"
. "."
identifier "Metadata"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "ICSharpCode"
. "."
identifier "Decompiler"
. "."
identifier "Output"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "ICSharpCode"
. "."
identifier "Decompiler"
. "."
identifier "Solution"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "ICSharpCode"
. "."
identifier "Decompiler"
. "."
identifier "TypeSystem"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "ICSharpCode"
. "."
identifier "Decompiler"
. "."
identifier "Util"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "ICSharpCode"
. "."
identifier "ILSpy"
. "."
identifier "TextView"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "ICSharpCode"
. "."
identifier "ILSpy"
. "."
identifier "TreeNodes"
; ";"
namespace_declaration
namespace "namespace"
qualified_name
identifier "ICSharpCode"
. "."
identifier "ILSpy"
declaration_list
{ "{"
comment "/// <summary>"
comment "/// C# decompiler integration into ILSpy."
comment "/// Note: if you're interested in using the decompiler witho"...
comment "/// please directly use the CSharpDecompiler class."
comment "/// </summary>"
class_declaration
attribute_list
[ "["
attribute
identifier "Export"
attribute_argument_list
( "("
attribute_argument
typeof_expression
typeof "typeof"
( "("
identifier "Language"
) ")"
) ")"
] "]"
modifier
public "public"
class "class"
identifier "CSharpLanguage"
base_list
: ":"
identifier "Language"
declaration_list
{ "{"
field_declaration
variable_declaration
predefined_type "string"
variable_declarator
identifier "name"
= "="
string_literal
" "\""
string_literal_content "C#"
" "\""
; ";"
field_declaration
variable_declaration
predefined_type "bool"
variable_declarator
identifier "showAllMembers"
= "="
boolean_literal
false "false"
; ";"
field_declaration
variable_declaration
predefined_type "int"
variable_declarator
identifier "transformCount"
= "="
member_access_expression
predefined_type "int"
. "."
identifier "MaxValue"
; ";"
preproc_if (+144 nodes collapsed)
property_declaration
modifier
public "public"
modifier
override "override"
predefined_type "string"
identifier "Name"
accessor_list
{ "{"
accessor_declaration
get "get"
block
{ "{"
return_statement
return "return"
identifier "name"
; ";"
} "}"
} "}"
property_declaration (+22 nodes collapsed)
property_declaration (+22 nodes collapsed)
field_declaration
variable_declaration
generic_name
identifier "IReadOnlyList"
type_argument_list
< "<"
identifier "LanguageVersion"
> ">"
variable_declarator
identifier "versions"
; ";"
property_declaration (+488 nodes collapsed)
method_declaration (+117 nodes collapsed)
method_declaration (+136 nodes collapsed)
method_declaration (+279 nodes collapsed)
class_declaration (+388 nodes collapsed)
method_declaration (+142 nodes collapsed)
method_declaration (+267 nodes collapsed)
method_declaration (+156 nodes collapsed)
comment "/// <summary>"
comment "/// Removes all top-level members except for the specified f"...
comment "/// </summary>"
class_declaration (+150 nodes collapsed)
method_declaration (+142 nodes collapsed)
method_declaration (+139 nodes collapsed)
method_declaration (+217 nodes collapsed)
method_declaration (+94 nodes collapsed)
method_declaration (+318 nodes collapsed)
method_declaration (+997 nodes collapsed)
class_declaration
class "class"
identifier "ILSpyWholeProjectDecompiler"
base_list
: ":"
identifier "WholeProjectDecompiler"
declaration_list
{ "{"
field_declaration
modifier
readonly "readonly"
variable_declaration
identifier "LoadedAssembly"
variable_declarator
identifier "assembly"
; ";"
field_declaration
modifier
readonly "readonly"
variable_declaration
identifier "DecompilationOptions"
variable_declarator
identifier "options"
; ";"
constructor_declaration (+69 nodes collapsed)
method_declaration
modifier
protected "protected"
modifier
override "override"
generic_name
identifier "IEnumerable"
type_argument_list
< "<"
identifier "ProjectItemInfo"
> ">"
identifier "WriteResourceToFile"
parameter_list
( "("
parameter
predefined_type "string"
identifier "fileName"
, ","
parameter
predefined_type "string"
identifier "resourceName"
, ","
parameter
identifier "Stream"
identifier "entryStream"
) ")"
block
{ "{"
foreach_statement
foreach "foreach"
( "("
implicit_type
var "var"
identifier "handler"
in "in"
invocation_expression
member_access_expression
member_access_expression
identifier "App"
. "."
identifier "ExportProvider"
. "."
generic_name
identifier "GetExportedValues"
type_argument_list
< "<"
identifier "IResourceFileHandler"
> ">"
argument_list
( "("
) ")"
) ")"
block
{ "{"
if_statement
if "if"
( "("
invocation_expression
member_access_expression
identifier "handler"
. "."
identifier "CanHandle"
argument_list
( "("
argument
identifier "fileName"
, ","
argument
identifier "options"
) ")"
) ")"
block
{ "{"
expression_statement
assignment_expression
member_access_expression
identifier "entryStream"
. "."
identifier "Position"
= "="
integer_literal "0"
; ";"
expression_statement (+24 nodes collapsed)
return_statement
return "return"
implicit_array_creation_expression
new "new"
[ "["
] "]"
initializer_expression
{ "{"
object_creation_expression
new "new"
identifier "ProjectItemInfo"
argument_list
( "("
argument
member_access_expression
identifier "handler"
. "."
identifier "EntryType"
, ","
argument
identifier "fileName"
) ")"
} "}"
; ";"
} "}"
} "}"
return_statement
return "return"
invocation_expression
member_access_expression
base "base"
. "."
identifier "WriteResourceToFile"
argument_list
( "("
argument
identifier "fileName"
, ","
argument
identifier "resourceName"
, ","
argument
identifier "entryStream"
) ")"
; ";"
} "}"
} "}"
method_declaration (+47 nodes collapsed)
method_declaration (+128 nodes collapsed)
method_declaration (+235 nodes collapsed)
method_declaration (+72 nodes collapsed)
method_declaration (+72 nodes collapsed)
method_declaration (+72 nodes collapsed)
method_declaration (+72 nodes collapsed)
method_declaration (+442 nodes collapsed)
method_declaration (+917 nodes collapsed)
method_declaration (+65 nodes collapsed)
method_declaration (+70 nodes collapsed)
method_declaration (+36 nodes collapsed)
field_declaration
variable_declaration
identifier "CSharpBracketSearcher"
variable_declarator
identifier "bracketSearcher"
= "="
object_creation_expression
new "new"
identifier "CSharpBracketSearcher"
argument_list
( "("
) ")"
; ";"
property_declaration
modifier
public "public"
modifier
override "override"
identifier "IBracketSearcher"
identifier "BracketSearcher"
arrow_expression_clause
=> "=>"
identifier "bracketSearcher"
; ";"
} "}"
} "}"