// <copyright file="JellyfinDatabaseProviderKeyAttribute.cs" company="PlaceholderCompany">
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>

#pragma warning disable CS0649 // Field is never assigned to, and will always have its default value null
#pragma warning disable CS0649 // Assignment made to same variable

namespace Jellyfin.Database.Implementations;

/// <summary>
/// Defines the key of the database provider.
/// </summary>
[System.AttributeUsage(System.AttributeTargets.Class, Inherited = true, AllowMultiple = true)]
public sealed class JellyfinDatabaseProviderKeyAttribute : System.Attribute
{
    // See the attribute guidelines at
    //  http://go.microsoft.com/fwlink/?LinkId=85236
    private readonly string databaseProviderKey;

    /// <summary>
    /// Initializes a new instance of the <see cref="JellyfinDatabaseProviderKeyAttribute"/> class.
    /// </summary>
    /// <param name="databaseProviderKey">The key on which to identify the annotated provider.</param>
    public JellyfinDatabaseProviderKeyAttribute(string databaseProviderKey)
    {
        this.databaseProviderKey = databaseProviderKey;
    }

    /// <summary>
    /// Gets the key on which to identify the annotated provider.
    /// </summary>
    public string DatabaseProviderKey
    {
        get { return this.databaseProviderKey; }
    }
}
