mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-19 15:51:45 +00:00
Allow multiple [TargetType] and [TargetAssembly] attributes (#1343)
Patch-method discovery already reads both with the plural MetadataHelper.GetAttributes<T>(), and the docs say additional target attributes can be specified, but the attributes lacked AllowMultiple = true, so the compiler rejected a second one (CS0579). Set AllowMultiple = true on both.
This commit is contained in:
1 parent
da64b220eb
commit
5f39645992
1 file changed
+2
-2
@@ -82,7 +82,7 @@ public class PatcherPluginInfoAttribute : Attribute
|
||||
/// <summary>
|
||||
/// Defines an assembly that a patch method will target.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
|
||||
public class TargetAssemblyAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
@@ -108,7 +108,7 @@ public class TargetAssemblyAttribute : Attribute
|
||||
/// <summary>
|
||||
/// Defines a type that a patch method will target.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
|
||||
public class TargetTypeAttribute : Attribute
|
||||
{
|
||||
/// <param name="targetAssembly">The short filename of the assembly of which <paramref name="targetType" /> belongs to.</param>
|
||||
|
||||
Reference in new issue
Block a user