aboutsummaryrefslogtreecommitdiff
path: root/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDatabaseProviderKeyAttribute.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDatabaseProviderKeyAttribute.cs')
-rw-r--r--src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDatabaseProviderKeyAttribute.cs29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDatabaseProviderKeyAttribute.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDatabaseProviderKeyAttribute.cs
new file mode 100644
index 000000000..778aca373
--- /dev/null
+++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDatabaseProviderKeyAttribute.cs
@@ -0,0 +1,29 @@
+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)
+ {
+ _databaseProviderKey = databaseProviderKey;
+ }
+
+ /// <summary>
+ /// Gets the key on which to identify the annotated provider.
+ /// </summary>
+ public string DatabaseProviderKey
+ {
+ get { return _databaseProviderKey; }
+ }
+}