diff options
| author | Cody Robibero <cody@robibe.ro> | 2025-03-25 21:34:26 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-25 21:34:26 -0600 |
| commit | d848faeb75f0109b5616f1f8405fa85cf734f860 (patch) | |
| tree | 59671ffe495d438cbb9ce095f1c3f26247095291 /src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDatabaseProviderKeyAttribute.cs | |
| parent | 035ecbdde33ce5b71cd580ebb0c3e1df320f80c7 (diff) | |
| parent | 1b388d729682435b92cb10eba67a1170ecbfcc6c (diff) | |
Merge pull request #13589 from JPVenson/feature/DatabaseRefactor
[Feature] Database code refactor
Diffstat (limited to 'src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDatabaseProviderKeyAttribute.cs')
| -rw-r--r-- | src/Jellyfin.Database/Jellyfin.Database.Implementations/JellyfinDatabaseProviderKeyAttribute.cs | 29 |
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; } + } +} |
