Skip to content

Commit

Permalink
Use dnlib 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfsck committed Mar 16, 2018
1 parent 8d8608e commit 6cbb3e1
Show file tree
Hide file tree
Showing 174 changed files with 645 additions and 628 deletions.
118 changes: 59 additions & 59 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
root = true

[*]
#end_of_line =
indent_size = 4
indent_style = tab
insert_final_newline = true
tab_width = 4
#end_of_line =

[*.json]

Expand All @@ -29,82 +29,82 @@ indent_style = space
indent_style = space

[*.{cs,vb}]
dotnet_separate_import_directive_groups = false
dotnet_sort_system_directives_first = true
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_event = false:suggestion
dotnet_style_predefined_type_for_locals_parameters_members = true:none
dotnet_style_predefined_type_for_member_access = true:none
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_separate_import_directive_groups = false
dotnet_style_null_propagation = true:suggestion
dotnet_style_object_initializer = true:suggestion
dotnet_style_predefined_type_for_locals_parameters_members = true:none
dotnet_style_predefined_type_for_member_access = true:none
dotnet_style_prefer_auto_properties = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = false:suggestion
dotnet_style_qualification_for_event = false:suggestion
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
dotnet_style_require_accessibility_modifiers = never:info

[*.cs]
csharp_style_throw_expression = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_var_for_built_in_types = false:none
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = true:suggestion
csharp_style_conditional_delegate_call = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_expression_bodied_constructors = true:suggestion
csharp_style_expression_bodied_methods = true:suggestion
csharp_style_expression_bodied_operators = true:suggestion
csharp_style_expression_bodied_properties = true:suggestion
csharp_style_expression_bodied_indexers = true:suggestion
csharp_style_expression_bodied_accessors = true:suggestion
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = false
csharp_indent_labels = flush_left
csharp_indent_switch_labels = false
csharp_new_line_before_catch = true
csharp_new_line_before_else = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_open_brace = none
csharp_new_line_between_query_expression_clauses = true
csharp_prefer_braces = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_between_parentheses =
csharp_prefer_simple_default_expression = true:suggestion
#csharp_preferred_modifier_order =
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true
csharp_space_after_cast = false
csharp_space_around_declaration_statements = false
csharp_space_before_open_square_brackets = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_square_brackets = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = false
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_around_binary_operators = before_and_after
csharp_indent_braces = false
csharp_indent_block_contents = true
csharp_indent_switch_labels = false
csharp_indent_case_contents = true
csharp_indent_labels = flush_left
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true
csharp_new_line_before_open_brace = none
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_between_query_expression_clauses = true
csharp_indent_case_contents_when_block = false
csharp_prefer_inferred_anonymous_type_member_names = true:suggestion
csharp_prefer_inferred_tuple_names = true:suggestion
csharp_prefer_simple_default_expression = true:suggestion
#csharp_preferred_modifier_order =
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses =
csharp_space_between_square_brackets = false
csharp_style_conditional_delegate_call = true:suggestion
csharp_style_deconstructed_variable_declaration = false:none
csharp_style_expression_bodied_accessors = true:suggestion
csharp_style_expression_bodied_constructors = true:suggestion
csharp_style_expression_bodied_indexers = true:suggestion
csharp_style_expression_bodied_methods = true:suggestion
csharp_style_expression_bodied_operators = true:suggestion
csharp_style_expression_bodied_properties = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_pattern_local_over_anonymous_function = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_throw_expression = true:suggestion
csharp_style_var_elsewhere = true:suggestion
csharp_style_var_for_built_in_types = false:none
csharp_style_var_when_type_is_apparent = true:suggestion

[*.vb]
visual_basic_prefer_inferred_anonymous_type_member_names = true:suggestion
visual_basic_prefer_inferred_tuple_names = true:suggestion
#visual_basic_preferred_modifier_order =
5 changes: 4 additions & 1 deletion AssemblyData/AssemblyData.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AssemblyData</RootNamespace>
<AssemblyName>AssemblyData</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\de4dot.snk</AssemblyOriginatorKeyFile>
<Features>strict</Features>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
1 change: 0 additions & 1 deletion AssemblyData/EmuStringDecrypter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License
along with de4dot. If not, see <http://www.gnu.org/licenses/>.
*/

using System;
using System.Collections.Generic;
using System.Reflection;
using AssemblyData.methodsrewriter;
Expand Down
1 change: 0 additions & 1 deletion AssemblyData/methodsrewriter/AssemblyResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ You should have received a copy of the GNU General Public License
using System.Collections.Generic;
using System.Reflection;
using dnlib.DotNet;
using de4dot.blocks;

namespace AssemblyData.methodsrewriter {
class MGenericParameter {
Expand Down
2 changes: 0 additions & 2 deletions AssemblyData/methodsrewriter/CodeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ You should have received a copy of the GNU General Public License

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Reflection.Emit;
using dnlib.DotNet.Emit;
using dnlib.DotNet;
using de4dot.blocks;

using OpCode = dnlib.DotNet.Emit.OpCode;
using OpCodes = dnlib.DotNet.Emit.OpCodes;
Expand Down
1 change: 0 additions & 1 deletion AssemblyData/methodsrewriter/MethodsRewriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ You should have received a copy of the GNU General Public License

using OpCode = dnlib.DotNet.Emit.OpCode;
using OpCodes = dnlib.DotNet.Emit.OpCodes;
using ROpCode = System.Reflection.Emit.OpCode;
using ROpCodes = System.Reflection.Emit.OpCodes;

namespace AssemblyData.methodsrewriter {
Expand Down
1 change: 0 additions & 1 deletion AssemblyData/methodsrewriter/Resolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ You should have received a copy of the GNU General Public License
using System.Collections.Generic;
using System.Reflection;
using dnlib.DotNet;
using de4dot.blocks;

namespace AssemblyData.methodsrewriter {
static class Resolver {
Expand Down
1 change: 0 additions & 1 deletion AssemblyData/methodsrewriter/ResolverUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ You should have received a copy of the GNU General Public License
using System.Collections.Generic;
using System.Reflection;
using dnlib.DotNet;
using de4dot.blocks;

namespace AssemblyData.methodsrewriter {
static class ResolverUtils {
Expand Down
1 change: 0 additions & 1 deletion AssemblyData/methodsrewriter/TypeResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ You should have received a copy of the GNU General Public License
using System.Collections.Generic;
using System.Reflection;
using dnlib.DotNet;
using de4dot.blocks;

namespace AssemblyData.methodsrewriter {
class TypeResolver {
Expand Down
5 changes: 4 additions & 1 deletion AssemblyServer-CLR20-x64/AssemblyServer-CLR20-x64.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AssemblyServer_CLR20_x64</RootNamespace>
<AssemblyName>AssemblyServer-CLR20-x64</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\de4dot.snk</AssemblyOriginatorKeyFile>
<Features>strict</Features>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x64</PlatformTarget>
Expand Down
5 changes: 4 additions & 1 deletion AssemblyServer-CLR20/AssemblyServer-CLR20.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AssemblyServer_CLR20</RootNamespace>
<AssemblyName>AssemblyServer-CLR20</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\de4dot.snk</AssemblyOriginatorKeyFile>
<Features>strict</Features>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
Expand Down
2 changes: 2 additions & 0 deletions AssemblyServer-CLR40-x64/AssemblyServer-CLR40-x64.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\de4dot.snk</AssemblyOriginatorKeyFile>
<Features>strict</Features>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x64</PlatformTarget>
Expand Down
2 changes: 2 additions & 0 deletions AssemblyServer-CLR40/AssemblyServer-CLR40.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\de4dot.snk</AssemblyOriginatorKeyFile>
<Features>strict</Features>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
Expand Down
5 changes: 4 additions & 1 deletion AssemblyServer-x64/AssemblyServer-x64.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AssemblyServer_x64</RootNamespace>
<AssemblyName>AssemblyServer-x64</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\de4dot.snk</AssemblyOriginatorKeyFile>
<Features>strict</Features>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x64</PlatformTarget>
Expand Down
5 changes: 4 additions & 1 deletion AssemblyServer/AssemblyServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AssemblyServer</RootNamespace>
<AssemblyName>AssemblyServer</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\de4dot.snk</AssemblyOriginatorKeyFile>
<Features>strict</Features>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
Expand Down
3 changes: 2 additions & 1 deletion Test.Rename.Dll/Test.Rename.Dll.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<AssemblyName>Test.Rename.Dll</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<Features>strict</Features>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
3 changes: 2 additions & 1 deletion Test.Rename/Test.Rename.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<AssemblyName>Test.Rename</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<Features>strict</Features>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down
5 changes: 4 additions & 1 deletion de4dot-x64/de4dot-x64.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>de4dot_x64</RootNamespace>
<AssemblyName>de4dot-x64</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\de4dot.snk</AssemblyOriginatorKeyFile>
<Features>strict</Features>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x64</PlatformTarget>
Expand Down
2 changes: 0 additions & 2 deletions de4dot.blocks/FilterHandlerBlock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ You should have received a copy of the GNU General Public License
along with de4dot. If not, see <http://www.gnu.org/licenses/>.
*/

using System.Collections.Generic;

namespace de4dot.blocks {
public class FilterHandlerBlock : ScopeBlock {
}
Expand Down
3 changes: 1 addition & 2 deletions de4dot.blocks/GenericArgsSubstitutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ You should have received a copy of the GNU General Public License

using System.Collections.Generic;
using dnlib.DotNet;
using dnlib.Threading;

namespace de4dot.blocks {
public struct GenericArgsSubstitutor {
Expand Down Expand Up @@ -292,7 +291,7 @@ MethodSig Create(MethodSig sig) {
newSig.Params.Add(Create2(sig.Params[i]));
newSig.GenParamCount = sig.GenParamCount;
if (sig.ParamsAfterSentinel != null) {
newSig.ParamsAfterSentinel = ThreadSafeListCreator.Create<TypeSig>();
newSig.ParamsAfterSentinel = new List<TypeSig>();
for (int i = 0; i < sig.ParamsAfterSentinel.Count; i++)
newSig.ParamsAfterSentinel.Add(Create2(sig.ParamsAfterSentinel[i]));
}
Expand Down
2 changes: 0 additions & 2 deletions de4dot.blocks/HandlerBlock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ You should have received a copy of the GNU General Public License
along with de4dot. If not, see <http://www.gnu.org/licenses/>.
*/

using System.Collections.Generic;

namespace de4dot.blocks {
// This is the block inside catch(xxx) { }.
public class HandlerBlock : ScopeBlock {
Expand Down
1 change: 0 additions & 1 deletion de4dot.blocks/MemberDefDict.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License
along with de4dot. If not, see <http://www.gnu.org/licenses/>.
*/

using System;
using System.Collections.Generic;
using dnlib.DotNet;

Expand Down
2 changes: 0 additions & 2 deletions de4dot.blocks/MethodBlocks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ You should have received a copy of the GNU General Public License
along with de4dot. If not, see <http://www.gnu.org/licenses/>.
*/

using System.Collections.Generic;

namespace de4dot.blocks {
// Start of a method
public class MethodBlocks : ScopeBlock {
Expand Down
Loading

0 comments on commit 6cbb3e1

Please sign in to comment.