Add MeansImplicitUse attribute to patch and injectable attributes
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
namespace SPTarkov.DI.Annotations;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace SPTarkov.DI.Annotations;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
|
||||
[MeansImplicitUse]
|
||||
public class Injectable(InjectionType injectionType = InjectionType.Scoped, Type? typeOverride = null, int typePriority = int.MaxValue)
|
||||
: Attribute
|
||||
{
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="JetBrains.Annotations" Version="2025.2.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.9" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,18 +1,25 @@
|
||||
namespace SPTarkov.Reflection.Patching;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace SPTarkov.Reflection.Patching;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
[MeansImplicitUse]
|
||||
public class PatchPrefixAttribute : Attribute { }
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
[MeansImplicitUse]
|
||||
public class PatchPostfixAttribute : Attribute { }
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
[MeansImplicitUse]
|
||||
public class PatchTranspilerAttribute : Attribute { }
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
[MeansImplicitUse]
|
||||
public class PatchFinalizerAttribute : Attribute { }
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
[MeansImplicitUse]
|
||||
public class PatchIlManipulatorAttribute : Attribute { }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="HarmonyX" Version="2.15.0" />
|
||||
<PackageReference Include="JetBrains.Annotations" Version="2025.2.2" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SPTarkov.DI\SPTarkov.DI.csproj" />
|
||||
|
||||
Reference in New Issue
Block a user