JellyfinDatabaseProviderKeyAttribute.cs 1021 B

1234567891011121314151617181920212223242526272829
  1. namespace Jellyfin.Server.Implementations;
  2. /// <summary>
  3. /// Defines the key of the database provider.
  4. /// </summary>
  5. [System.AttributeUsage(System.AttributeTargets.Class, Inherited = true, AllowMultiple = true)]
  6. public sealed class JellyfinDatabaseProviderKeyAttribute : System.Attribute
  7. {
  8. // See the attribute guidelines at
  9. // http://go.microsoft.com/fwlink/?LinkId=85236
  10. private readonly string _databaseProviderKey;
  11. /// <summary>
  12. /// Initializes a new instance of the <see cref="JellyfinDatabaseProviderKeyAttribute"/> class.
  13. /// </summary>
  14. /// <param name="databaseProviderKey">The key on which to identify the annotated provider.</param>
  15. public JellyfinDatabaseProviderKeyAttribute(string databaseProviderKey)
  16. {
  17. this._databaseProviderKey = databaseProviderKey;
  18. }
  19. /// <summary>
  20. /// Gets the key on which to identify the annotated provider.
  21. /// </summary>
  22. public string DatabaseProviderKey
  23. {
  24. get { return _databaseProviderKey; }
  25. }
  26. }