Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = true, AllowMultiple = true)]
  2. public sealed class ExtractNameAttribute : Attribute
  3. { }
  4.  
  5. static bool IsMarked(Type type)
  6. {
  7. return type.GetCustomAttributes(typeof(ExtractNameAttribute), true).Any();
  8. }
  9.  
  10.  
  11. [ExtractName]
  12. public class Container
  13. {
  14. public List<string> Addresses { get; set; }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement