PropertyAssociationAttribute.cs 457 B

12345678910111213141516
  1. using System;
  2. using System.Collections.Generic;
  3. namespace ShakerApp.ViewModels
  4. {
  5. [AttributeUsage(AttributeTargets.Property)]
  6. public sealed class PropertyAssociationAttribute: Attribute
  7. {
  8. public PropertyAssociationAttribute(params string[] strings)
  9. {
  10. names.AddRange(strings);
  11. }
  12. private readonly List<string> names = new List<string>();
  13. public IReadOnlyList<string> Names => names;
  14. }
  15. }