Skip to content

Commit

Permalink
Merge pull request #522 from pardeike/feature/monomod-core
Browse files Browse the repository at this point in the history
Feature/monomod core
  • Loading branch information
pardeike authored Jun 1, 2023
2 parents 4ff5696 + f6b5daf commit dd34cfe
Show file tree
Hide file tree
Showing 57 changed files with 649 additions and 852 deletions.
70 changes: 70 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,73 @@ csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_preserve_single_line_statements = true
csharp_preserve_single_line_blocks = true
csharp_using_directive_placement = outside_namespace:silent
csharp_prefer_simple_using_statement = true:warning
csharp_style_namespace_declarations = block_scoped:silent
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_expression_bodied_lambdas = when_on_single_line:silent
csharp_style_expression_bodied_local_functions = when_on_single_line:silent

[*.{cs,vb}]
#### Naming styles ####

# Naming rules

dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i

dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case

dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case

# Symbol specifications

dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interface.required_modifiers =

dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types.required_modifiers =

dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =

# Naming styles

dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_auto_properties = true:silent
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
dotnet_style_prefer_conditional_expression_over_return = true:silent
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 3
indent_size = 3
3 changes: 2 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

<PropertyGroup>
<HarmonyVersion>2.3.0.0</HarmonyVersion>
<MonoModCommonVersion>22.6.3.1</MonoModCommonVersion>
<HarmonyPrerelease>-prerelease.2</HarmonyPrerelease>
<MonoModCoreVersion>1.0.0-prerelease.2</MonoModCoreVersion>
</PropertyGroup>

</Project>
1 change: 0 additions & 1 deletion Harmony.sln
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Directory.Build.props = Directory.Build.props
global.json = global.json
LICENSE = LICENSE
nuget.config = nuget.config
README.md = README.md
EndProjectSection
EndProject
Expand Down
15 changes: 8 additions & 7 deletions Harmony/Documentation/Documentation.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net35;net45;net472;net48;netcoreapp3.0;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>net35;net452;net472;net48;netcoreapp3.0;netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
<LangVersion>preview</LangVersion>
<IsPackable>false</IsPackable>
<IntermediateOutputPath>obj</IntermediateOutputPath>
Expand All @@ -27,13 +27,14 @@
</PropertyGroup>

<ItemGroup>
<!-- Reference assemblies are needed for non-Windows .NET Framework targeting builds. -->
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="all" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net35" Version="1.0.2" PrivateAssets="all" />
</ItemGroup>
<PackageReference Include="MonoMod.Core" Version="$(MonoModCoreVersion)" />

<ItemGroup>
<PackageReference Include="MonoMod.Common" Version="$(MonoModCommonVersion)" />
<!-- Reference assemblies are needed for non-Windows .NET Framework targeting builds. -->
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="all" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net35" Version="1.0.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

</Project>
29 changes: 15 additions & 14 deletions Harmony/Documentation/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
using System.Diagnostics.CodeAnalysis;

[assembly: SuppressMessage("Design", "CA1034:Nested types should not be visible")]
[assembly: SuppressMessage("Design", "CA1052:Static holder types should be Static or NotInheritable")]
[assembly: SuppressMessage("Design", "CA1031:Do not catch general exception types")]
[assembly: SuppressMessage("Design", "CA1034")]
[assembly: SuppressMessage("Design", "CA1052")]
[assembly: SuppressMessage("Design", "CA1031")]

[assembly: SuppressMessage("Style", "IDE0058:Expression value is never used")]
[assembly: SuppressMessage("Style", "IDE0025:Use expression body for properties")]
[assembly: SuppressMessage("Style", "IDE0060:Remove unused parameter")]
[assembly: SuppressMessage("Style", "IDE0044:Add readonly modifier")]
[assembly: SuppressMessage("Style", "IDE0062:")]
[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value")]
[assembly: SuppressMessage("Style", "IDE0058")]
[assembly: SuppressMessage("Style", "IDE0025")]
[assembly: SuppressMessage("Style", "IDE0060")]
[assembly: SuppressMessage("Style", "IDE0044")]
[assembly: SuppressMessage("Style", "IDE0062")]
[assembly: SuppressMessage("Style", "IDE0059")]

[assembly: SuppressMessage("Usage", "CA2211:Non-constant fields should not be visible")]
[assembly: SuppressMessage("Usage", "CA2211")]

[assembly: SuppressMessage("CodeQuality", "IDE0051:Remove unused private members")]
[assembly: SuppressMessage("CodeQuality", "IDE0051")]

[assembly: SuppressMessage("Performance", "CA1822:Mark members as static")]
[assembly: SuppressMessage("Performance", "CA1806:Do not ignore method results")]
[assembly: SuppressMessage("Performance", "CA1822")]
[assembly: SuppressMessage("Performance", "CA1806")]

[assembly: SuppressMessage("", "CS0649:")]
[assembly: SuppressMessage("", "CS0649")]
[assembly: SuppressMessage("", "IDE0251")]
4 changes: 2 additions & 2 deletions Harmony/Documentation/examples/execution_with.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static R ReplacementMethod(T optionalThisArgument /*, ... arguments ... */ )
ex = EditFinalizer(ex, ref result);
finalized = true;

if (ex is object) throw ex;
if (ex is not null) throw ex;
return result;
}
catch (Exception e)
Expand All @@ -61,7 +61,7 @@ static R ReplacementMethod(T optionalThisArgument /*, ... arguments ... */ )
else
{
// alternative 2: at least one non-void finalizer
if (ex is object) throw ex;
if (ex is not null) throw ex;
}

return result;
Expand Down
4 changes: 2 additions & 2 deletions Harmony/Extras/FastAccess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ public static GetterHandler<T, S> CreateFieldGetter<T, S>(params string[] names)
foreach (var name in names)
{
var field = typeof(T).GetField(name, AccessTools.all);
if (field is object)
if (field is not null)
return CreateGetterHandler<T, S>(field);

var property = typeof(T).GetProperty(name, AccessTools.all);
if (property is object)
if (property is not null)
return CreateGetterHandler<T, S>(property);
}

Expand Down
45 changes: 45 additions & 0 deletions Harmony/ForwardingAttributes/Mono.Cecil.Cil.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#if NETFRAMEWORK || NETSTANDARD2_0
using System.Runtime.CompilerServices;

[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.Code))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.ConstantDebugInformation))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.CustomDebugInformation))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.CustomDebugInformationKind))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.DebugInformation))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.Document))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.DocumentHashAlgorithm))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.DocumentLanguage))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.DocumentLanguageVendor))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.DocumentType))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.ExceptionHandler))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.ExceptionHandlerType))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.FlowControl))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.ILProcessor))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.ImageDebugDirectory))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.ImageDebugHeader))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.ImageDebugHeaderEntry))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.ImageDebugType))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.ImportDebugInformation))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.ImportTarget))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.ImportTargetKind))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.Instruction))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.InstructionOffset))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.ISymbolReader))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.ISymbolReaderProvider))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.ISymbolWriter))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.ISymbolWriterProvider))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.MethodBody))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.MethodDebugInformation))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.OpCode))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.OpCodeType))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.OperandType))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.ScopeDebugInformation))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.SequencePoint))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.StackBehaviour))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.SymbolsNotFoundException))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.SymbolsNotMatchingException))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.VariableAttributes))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.VariableDebugInformation))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.VariableDefinition))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Cil.VariableReference))]
#endif
5 changes: 5 additions & 0 deletions Harmony/ForwardingAttributes/Mono.Cecil.Mdb.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#if NETFRAMEWORK || NETSTANDARD2_0
using System.Runtime.CompilerServices;

[assembly: TypeForwardedTo(typeof(Mono.Cecil.Mdb.MdbReader))]
#endif
6 changes: 6 additions & 0 deletions Harmony/ForwardingAttributes/Mono.Cecil.Pdb.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#if NETFRAMEWORK || NETSTANDARD2_0
using System.Runtime.CompilerServices;

[assembly: TypeForwardedTo(typeof(Mono.Cecil.Pdb.NativePdbReader))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Pdb.NativePdbWriter))]
#endif
8 changes: 8 additions & 0 deletions Harmony/ForwardingAttributes/Mono.Cecil.Rocks.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#if NETFRAMEWORK || NETSTANDARD2_0
using System.Runtime.CompilerServices;

[assembly: TypeForwardedTo(typeof(Mono.Cecil.Rocks.IILVisitor))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Rocks.ILParser))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Rocks.ModuleDefinitionRocks))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Rocks.TypeDefinitionRocks))]
#endif
85 changes: 85 additions & 0 deletions Harmony/ForwardingAttributes/Mono.Cecil.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#if NETFRAMEWORK || NETSTANDARD2_0
using System.Runtime.CompilerServices;

[assembly: TypeForwardedTo(typeof(Mono.Cecil.AssemblyAttributes))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.AssemblyDefinition))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.AssemblyHashAlgorithm))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.AssemblyNameDefinition))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.AssemblyNameReference))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.AssemblyResolutionException))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.CallSite))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.CustomAttribute))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.CustomAttributeArgument))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.CustomAttributeNamedArgument))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.EventAttributes))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.EventDefinition))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.EventReference))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.ExportedType))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.FieldAttributes))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.FieldDefinition))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.FieldReference))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.GenericParameter))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.GenericParameterAttributes))]
#if NET472
[assembly: TypeForwardedTo(typeof(Mono.Cecil.GenericParameterConstraint))]
#endif
[assembly: TypeForwardedTo(typeof(Mono.Cecil.GenericParameterType))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.IAssemblyResolver))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.ICustomAttributeProvider))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.IGenericParameterProvider))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.IMemberDefinition))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.IMetadataImporter))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.IMetadataImporterProvider))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.IMetadataResolver))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.IMetadataScope))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.IMetadataTokenProvider))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.IMethodSignature))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.InterfaceImplementation))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.IReflectionImporter))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.IReflectionImporterProvider))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.ManifestResourceAttributes))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.MarshalInfo))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.MemberReference))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.MetadataKind))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.MetadataScopeType))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.MetadataToken))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.MetadataType))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.MethodAttributes))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.MethodCallingConvention))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.MethodDefinition))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.MethodImplAttributes))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.MethodReference))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.MethodReturnType))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.MethodSemanticsAttributes))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.ModuleAttributes))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.ModuleCharacteristics))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.ModuleDefinition))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.ModuleKind))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.ModuleParameters))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.ModuleReference))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.NativeType))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.ParameterAttributes))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.ParameterDefinition))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.ParameterReference))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.PInvokeAttributes))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.PInvokeInfo))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.PropertyAttributes))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.PropertyDefinition))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.PropertyReference))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.ReaderParameters))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.ReadingMode))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.ResolutionException))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.Resource))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.ResourceType))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.SecurityAction))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.SecurityAttribute))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.SecurityDeclaration))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.TargetArchitecture))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.TargetRuntime))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.TokenType))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.TypeAttributes))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.TypeDefinition))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.TypeReference))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.TypeSystem))]
[assembly: TypeForwardedTo(typeof(Mono.Cecil.WriterParameters))]
#endif
5 changes: 5 additions & 0 deletions Harmony/ForwardingAttributes/Mono.Collections.Generic.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#if NETFRAMEWORK || NETSTANDARD2_0
using System.Runtime.CompilerServices;

[assembly: TypeForwardedTo(typeof(Mono.Collections.Generic.Collection<>))]
#endif
18 changes: 18 additions & 0 deletions Harmony/ForwardingAttributes/Mono.CompilerServices.SymbolWriter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#if NETFRAMEWORK || NETSTANDARD2_0
using System.Runtime.CompilerServices;

[assembly: TypeForwardedTo(typeof(Mono.CompilerServices.SymbolWriter.AnonymousScopeEntry))]
[assembly: TypeForwardedTo(typeof(Mono.CompilerServices.SymbolWriter.CapturedScope))]
[assembly: TypeForwardedTo(typeof(Mono.CompilerServices.SymbolWriter.CapturedVariable))]
[assembly: TypeForwardedTo(typeof(Mono.CompilerServices.SymbolWriter.CodeBlockEntry))]
[assembly: TypeForwardedTo(typeof(Mono.CompilerServices.SymbolWriter.CompileUnitEntry))]
[assembly: TypeForwardedTo(typeof(Mono.CompilerServices.SymbolWriter.LineNumberEntry))]
[assembly: TypeForwardedTo(typeof(Mono.CompilerServices.SymbolWriter.LineNumberTable))]
[assembly: TypeForwardedTo(typeof(Mono.CompilerServices.SymbolWriter.LocalVariableEntry))]
[assembly: TypeForwardedTo(typeof(Mono.CompilerServices.SymbolWriter.MethodEntry))]
[assembly: TypeForwardedTo(typeof(Mono.CompilerServices.SymbolWriter.MonoSymbolFile))]
[assembly: TypeForwardedTo(typeof(Mono.CompilerServices.SymbolWriter.NamespaceEntry))]
[assembly: TypeForwardedTo(typeof(Mono.CompilerServices.SymbolWriter.OffsetTable))]
[assembly: TypeForwardedTo(typeof(Mono.CompilerServices.SymbolWriter.ScopeVariable))]
[assembly: TypeForwardedTo(typeof(Mono.CompilerServices.SymbolWriter.SourceFileEntry))]
#endif
6 changes: 6 additions & 0 deletions Harmony/ForwardingAttributes/MonoMod.Utils.Cil.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#if NETFRAMEWORK || NETSTANDARD2_0
using System.Runtime.CompilerServices;

[assembly: TypeForwardedTo(typeof(MonoMod.Utils.Cil.CecilILGenerator))]
[assembly: TypeForwardedTo(typeof(MonoMod.Utils.Cil.ILGeneratorShim))]
#endif
11 changes: 11 additions & 0 deletions Harmony/ForwardingAttributes/MonoMod.Utils.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#if NETFRAMEWORK || NETSTANDARD2_0
using System.Runtime.CompilerServices;

[assembly: TypeForwardedTo(typeof(MonoMod.Utils.DMDEmitDynamicMethodGenerator))]
[assembly: TypeForwardedTo(typeof(MonoMod.Utils.DMDGenerator<>))]
[assembly: TypeForwardedTo(typeof(MonoMod.Utils.DynamicMethodDefinition))]
[assembly: TypeForwardedTo(typeof(MonoMod.Utils.Extensions))]
[assembly: TypeForwardedTo(typeof(MonoMod.Utils.ICallSiteGenerator))]
[assembly: TypeForwardedTo(typeof(MonoMod.Utils.ReflectionHelper))]
[assembly: TypeForwardedTo(typeof(MonoMod.Utils.Relinker))]
#endif
Loading

0 comments on commit dd34cfe

Please sign in to comment.