Skip to content

Commit

Permalink
add conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
pwelter34 committed Oct 25, 2022
1 parent f986ed4 commit d22275f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Injectio.Attributes/RegisterAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Injectio.Attributes;
/// Attribute to indicate the target class should be register for dependency injection
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
[System.Diagnostics.Conditional("REGISTER_SERVICE_USAGES")]
public abstract class RegisterAttribute : Attribute
{
/// <summary>
Expand Down
1 change: 1 addition & 0 deletions src/Injectio.Attributes/RegisterScopedAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace Injectio.Attributes;
/// </code>
/// </example>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
[System.Diagnostics.Conditional("REGISTER_SERVICE_USAGES")]
public class RegisterScopedAttribute : RegisterAttribute
{
}
1 change: 1 addition & 0 deletions src/Injectio.Attributes/RegisterServicesAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ namespace Injectio.Attributes;
/// </code>
/// </example>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
[System.Diagnostics.Conditional("REGISTER_SERVICE_USAGES")]
public class RegisterServicesAttribute : Attribute
{

Expand Down
1 change: 1 addition & 0 deletions src/Injectio.Attributes/RegisterSingletonAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace Injectio.Attributes;
/// </code>
/// </example>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
[System.Diagnostics.Conditional("REGISTER_SERVICE_USAGES")]
public class RegisterSingletonAttribute : RegisterAttribute
{
}
1 change: 1 addition & 0 deletions src/Injectio.Attributes/RegisterTransientAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ namespace Injectio.Attributes;
/// </code>
/// </example>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
[System.Diagnostics.Conditional("REGISTER_SERVICE_USAGES")]
public class RegisterTransientAttribute : RegisterAttribute
{
}

0 comments on commit d22275f

Please sign in to comment.