From 24fb4c8b45f993fb5b95ce67a50cd20a84b73aaa Mon Sep 17 00:00:00 2001 From: SokyranTheDragon <36712560+SokyranTheDragon@users.noreply.github.com> Date: Tue, 22 Oct 2024 19:28:33 +0200 Subject: [PATCH] Allow for multiple MpCompatSyncWorkerAttribute on same method (#486) There isn't anything preventing us from doing that normally, and we do that in some situations - especially for empty (and `shouldConstruct` only) sync workers. --- Source/MpCompatAttributes.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/MpCompatAttributes.cs b/Source/MpCompatAttributes.cs index 8c195a0..f1310ea 100644 --- a/Source/MpCompatAttributes.cs +++ b/Source/MpCompatAttributes.cs @@ -495,7 +495,7 @@ public MpCompatSyncFieldAttribute(Type type, string instancePath, string fieldNa => this.instancePath = instancePath; } - [AttributeUsage(AttributeTargets.Method)] + [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] [MeansImplicitUse(ImplicitUseTargetFlags.WithMembers)] public class MpCompatSyncWorkerAttribute : Attribute {