Browse Source

Add MeansImplicitUse to DI attributes

pull/333/head
Ionite 12 months ago
parent
commit
d5ce53bcc2
No known key found for this signature in database
  1. 8
      StabilityMatrix.Core/Attributes/ManagedServiceAttribute.cs
  2. 5
      StabilityMatrix.Core/Attributes/TransientAttribute.cs

8
StabilityMatrix.Core/Attributes/ManagedServiceAttribute.cs

@ -1,4 +1,8 @@
namespace StabilityMatrix.Core.Attributes;
using System.Diagnostics.CodeAnalysis;
using JetBrains.Annotations;
namespace StabilityMatrix.Core.Attributes;
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors), MeansImplicitUse]
[AttributeUsage(AttributeTargets.Class)]
public class ManagedServiceAttribute : Attribute { }
public class ManagedServiceAttribute : Attribute;

5
StabilityMatrix.Core/Attributes/TransientAttribute.cs

@ -1,13 +1,14 @@
using System.Diagnostics.CodeAnalysis;
using JetBrains.Annotations;
namespace StabilityMatrix.Core.Attributes;
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors), MeansImplicitUse]
[AttributeUsage(AttributeTargets.Class)]
public class TransientAttribute : Attribute
{
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)]
public Type? InterfaceType { get; init; }
public Type? InterfaceType { get; }
public TransientAttribute() { }

Loading…
Cancel
Save