Skip to content

Commit

Permalink
Fix attribute constructor method naming
Browse files Browse the repository at this point in the history
  • Loading branch information
thegu5 authored and SamboyCoding committed Jun 30, 2024
1 parent 4943b34 commit b385c7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cpp2IL.Core/Model/MultiAssemblyInjectedType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public Dictionary<AssemblyAnalysisContext, InjectedMethodAnalysisContext> Inject
=> InjectedTypes.ToDictionary(t => t.DeclaringAssembly, t => t.InjectMethodContext(name, isStatic, returnType, attributes, args));

public Dictionary<AssemblyAnalysisContext, InjectedMethodAnalysisContext> InjectConstructor(bool isStatic, params TypeAnalysisContext[] args)
=> InjectMethodToAllAssemblies(isStatic ? ".ctor" : ".cctor", isStatic, InjectedTypes.First().AppContext.SystemTypes.SystemVoidType, MethodAttributes.Public | MethodAttributes.SpecialName | MethodAttributes.RTSpecialName, args);
=> InjectMethodToAllAssemblies(isStatic ? ".cctor" : ".ctor", isStatic, InjectedTypes.First().AppContext.SystemTypes.SystemVoidType, MethodAttributes.Public | MethodAttributes.SpecialName | MethodAttributes.RTSpecialName, args);

public Dictionary<AssemblyAnalysisContext, InjectedFieldAnalysisContext> InjectFieldToAllAssemblies(string name, TypeAnalysisContext fieldType, FieldAttributes attributes)
=> InjectedTypes.ToDictionary(t => t.DeclaringAssembly, t => t.InjectFieldContext(name, fieldType, attributes));
}
}

0 comments on commit b385c7e

Please sign in to comment.