DizzyJump

Untitled

Nov 6th, 2025
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.59 KB | None | 0 0
  1. using System;
  2.  
  3. namespace CodeBase.CompositionRoot.Helpers
  4. {
  5.     [AttributeUsage(AttributeTargets.Interface, AllowMultiple = false)]
  6.     public class VContainerAutoRegistrationAttribute : Attribute
  7.     {
  8.         public TargetLifetime Lifetime { get; set; } = TargetLifetime.Transient;
  9.         public RegisterType RegisterAs { get; set; } = RegisterType.ImplementedInterfaces;
  10.     }
  11.  
  12.     public enum TargetLifetime
  13.     {
  14.         Transient,
  15.         Scoped,
  16.         Singleton
  17.     }
  18.    
  19.     public enum RegisterType
  20.     {
  21.         Self,
  22.         ImplementedInterfaces,
  23.         Both
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment