diff --git a/src/OpenIddict.EntityFramework/Stores/OpenIddictApplicationStore.cs b/src/OpenIddict.EntityFramework/Stores/OpenIddictApplicationStore.cs index 5d923bfc..ea098b90 100644 --- a/src/OpenIddict.EntityFramework/Stores/OpenIddictApplicationStore.cs +++ b/src/OpenIddict.EntityFramework/Stores/OpenIddictApplicationStore.cs @@ -17,6 +17,7 @@ using System.Threading; using System.Threading.Tasks; using JetBrains.Annotations; using Microsoft.Extensions.Caching.Memory; +using Microsoft.Extensions.Options; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using OpenIddict.Abstractions; @@ -33,8 +34,11 @@ namespace OpenIddict.EntityFramework OpenIddictToken, TContext, string> where TContext : DbContext { - public OpenIddictApplicationStore([NotNull] IMemoryCache cache, [NotNull] TContext context) - : base(cache, context) + public OpenIddictApplicationStore( + [NotNull] IMemoryCache cache, + [NotNull] TContext context, + [NotNull] IOptions options) + : base(cache, context, options) { } } @@ -54,10 +58,14 @@ namespace OpenIddict.EntityFramework where TContext : DbContext where TKey : IEquatable { - public OpenIddictApplicationStore([NotNull] IMemoryCache cache, [NotNull] TContext context) + public OpenIddictApplicationStore( + [NotNull] IMemoryCache cache, + [NotNull] TContext context, + [NotNull] IOptions options) { Cache = cache; Context = context; + Options = options; } /// @@ -70,6 +78,11 @@ namespace OpenIddict.EntityFramework /// protected TContext Context { get; } + /// + /// Gets the options associated with the current store. + /// + protected IOptions Options { get; } + /// /// Gets the database set corresponding to the entity. /// diff --git a/src/OpenIddict.EntityFramework/Stores/OpenIddictAuthorizationStore.cs b/src/OpenIddict.EntityFramework/Stores/OpenIddictAuthorizationStore.cs index 6d0220fe..838cf424 100644 --- a/src/OpenIddict.EntityFramework/Stores/OpenIddictAuthorizationStore.cs +++ b/src/OpenIddict.EntityFramework/Stores/OpenIddictAuthorizationStore.cs @@ -17,6 +17,7 @@ using System.Threading; using System.Threading.Tasks; using JetBrains.Annotations; using Microsoft.Extensions.Caching.Memory; +using Microsoft.Extensions.Options; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using OpenIddict.Abstractions; @@ -33,8 +34,11 @@ namespace OpenIddict.EntityFramework OpenIddictToken, TContext, string> where TContext : DbContext { - public OpenIddictAuthorizationStore([NotNull] IMemoryCache cache, [NotNull] TContext context) - : base(cache, context) + public OpenIddictAuthorizationStore( + [NotNull] IMemoryCache cache, + [NotNull] TContext context, + [NotNull] IOptions options) + : base(cache, context, options) { } } @@ -54,10 +58,14 @@ namespace OpenIddict.EntityFramework where TContext : DbContext where TKey : IEquatable { - public OpenIddictAuthorizationStore([NotNull] IMemoryCache cache, [NotNull] TContext context) + public OpenIddictAuthorizationStore( + [NotNull] IMemoryCache cache, + [NotNull] TContext context, + [NotNull] IOptions options) { Cache = cache; Context = context; + Options = options; } /// @@ -70,6 +78,11 @@ namespace OpenIddict.EntityFramework /// protected TContext Context { get; } + /// + /// Gets the options associated with the current store. + /// + protected IOptions Options { get; } + /// /// Gets the database set corresponding to the entity. /// diff --git a/src/OpenIddict.EntityFramework/Stores/OpenIddictScopeStore.cs b/src/OpenIddict.EntityFramework/Stores/OpenIddictScopeStore.cs index f7765539..d3496fbd 100644 --- a/src/OpenIddict.EntityFramework/Stores/OpenIddictScopeStore.cs +++ b/src/OpenIddict.EntityFramework/Stores/OpenIddictScopeStore.cs @@ -15,6 +15,7 @@ using System.Threading; using System.Threading.Tasks; using JetBrains.Annotations; using Microsoft.Extensions.Caching.Memory; +using Microsoft.Extensions.Options; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using OpenIddict.Abstractions; @@ -29,8 +30,11 @@ namespace OpenIddict.EntityFramework public class OpenIddictScopeStore : OpenIddictScopeStore where TContext : DbContext { - public OpenIddictScopeStore([NotNull] IMemoryCache cache, [NotNull] TContext context) - : base(cache, context) + public OpenIddictScopeStore( + [NotNull] IMemoryCache cache, + [NotNull] TContext context, + [NotNull] IOptions options) + : base(cache, context, options) { } } @@ -46,10 +50,14 @@ namespace OpenIddict.EntityFramework where TContext : DbContext where TKey : IEquatable { - public OpenIddictScopeStore([NotNull] IMemoryCache cache, [NotNull] TContext context) + public OpenIddictScopeStore( + [NotNull] IMemoryCache cache, + [NotNull] TContext context, + [NotNull] IOptions options) { Cache = cache; Context = context; + Options = options; } /// @@ -62,6 +70,11 @@ namespace OpenIddict.EntityFramework /// protected TContext Context { get; } + /// + /// Gets the options associated with the current store. + /// + protected IOptions Options { get; } + /// /// Gets the database set corresponding to the entity. /// diff --git a/src/OpenIddict.EntityFramework/Stores/OpenIddictTokenStore.cs b/src/OpenIddict.EntityFramework/Stores/OpenIddictTokenStore.cs index 44fc62ce..de6dcc1c 100644 --- a/src/OpenIddict.EntityFramework/Stores/OpenIddictTokenStore.cs +++ b/src/OpenIddict.EntityFramework/Stores/OpenIddictTokenStore.cs @@ -17,6 +17,7 @@ using System.Threading; using System.Threading.Tasks; using JetBrains.Annotations; using Microsoft.Extensions.Caching.Memory; +using Microsoft.Extensions.Options; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using OpenIddict.Abstractions; @@ -33,8 +34,11 @@ namespace OpenIddict.EntityFramework OpenIddictAuthorization, TContext, string> where TContext : DbContext { - public OpenIddictTokenStore([NotNull] IMemoryCache cache, [NotNull] TContext context) - : base(cache, context) + public OpenIddictTokenStore( + [NotNull] IMemoryCache cache, + [NotNull] TContext context, + [NotNull] IOptions options) + : base(cache, context, options) { } } @@ -54,10 +58,14 @@ namespace OpenIddict.EntityFramework where TContext : DbContext where TKey : IEquatable { - public OpenIddictTokenStore([NotNull] IMemoryCache cache, [NotNull] TContext context) + public OpenIddictTokenStore( + [NotNull] IMemoryCache cache, + [NotNull] TContext context, + [NotNull] IOptions options) { Cache = cache; Context = context; + Options = options; } /// @@ -70,6 +78,11 @@ namespace OpenIddict.EntityFramework /// protected TContext Context { get; } + /// + /// Gets the options associated with the current store. + /// + protected IOptions Options { get; } + /// /// Gets the database set corresponding to the entity. /// diff --git a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictApplicationStore.cs b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictApplicationStore.cs index d1e18578..bcbda794 100644 --- a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictApplicationStore.cs +++ b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictApplicationStore.cs @@ -18,6 +18,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage; using Microsoft.Extensions.Caching.Memory; +using Microsoft.Extensions.Options; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using OpenIddict.Abstractions; @@ -34,8 +35,11 @@ namespace OpenIddict.EntityFrameworkCore OpenIddictToken, TContext, string> where TContext : DbContext { - public OpenIddictApplicationStore([NotNull] IMemoryCache cache, [NotNull] TContext context) - : base(cache, context) + public OpenIddictApplicationStore( + [NotNull] IMemoryCache cache, + [NotNull] TContext context, + [NotNull] IOptions options) + : base(cache, context, options) { } } @@ -51,8 +55,11 @@ namespace OpenIddict.EntityFrameworkCore where TContext : DbContext where TKey : IEquatable { - public OpenIddictApplicationStore([NotNull] IMemoryCache cache, [NotNull] TContext context) - : base(cache, context) + public OpenIddictApplicationStore( + [NotNull] IMemoryCache cache, + [NotNull] TContext context, + [NotNull] IOptions options) + : base(cache, context, options) { } } @@ -72,10 +79,14 @@ namespace OpenIddict.EntityFrameworkCore where TContext : DbContext where TKey : IEquatable { - public OpenIddictApplicationStore([NotNull] IMemoryCache cache, [NotNull] TContext context) + public OpenIddictApplicationStore( + [NotNull] IMemoryCache cache, + [NotNull] TContext context, + [NotNull] IOptions options) { Cache = cache; Context = context; + Options = options; } /// @@ -88,6 +99,11 @@ namespace OpenIddict.EntityFrameworkCore /// protected TContext Context { get; } + /// + /// Gets the options associated with the current store. + /// + protected IOptions Options { get; } + /// /// Gets the database set corresponding to the entity. /// diff --git a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictAuthorizationStore.cs b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictAuthorizationStore.cs index 73411eb7..dff60728 100644 --- a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictAuthorizationStore.cs +++ b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictAuthorizationStore.cs @@ -18,6 +18,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage; using Microsoft.Extensions.Caching.Memory; +using Microsoft.Extensions.Options; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using OpenIddict.Abstractions; @@ -34,8 +35,11 @@ namespace OpenIddict.EntityFrameworkCore OpenIddictToken, TContext, string> where TContext : DbContext { - public OpenIddictAuthorizationStore([NotNull] IMemoryCache cache, [NotNull] TContext context) - : base(cache, context) + public OpenIddictAuthorizationStore( + [NotNull] IMemoryCache cache, + [NotNull] TContext context, + [NotNull] IOptions options) + : base(cache, context, options) { } } @@ -51,8 +55,11 @@ namespace OpenIddict.EntityFrameworkCore where TContext : DbContext where TKey : IEquatable { - public OpenIddictAuthorizationStore([NotNull] IMemoryCache cache, [NotNull] TContext context) - : base(cache, context) + public OpenIddictAuthorizationStore( + [NotNull] IMemoryCache cache, + [NotNull] TContext context, + [NotNull] IOptions options) + : base(cache, context, options) { } } @@ -72,10 +79,14 @@ namespace OpenIddict.EntityFrameworkCore where TContext : DbContext where TKey : IEquatable { - public OpenIddictAuthorizationStore([NotNull] IMemoryCache cache, [NotNull] TContext context) + public OpenIddictAuthorizationStore( + [NotNull] IMemoryCache cache, + [NotNull] TContext context, + [NotNull] IOptions options) { Cache = cache; Context = context; + Options = options; } /// @@ -88,6 +99,11 @@ namespace OpenIddict.EntityFrameworkCore /// protected TContext Context { get; } + /// + /// Gets the options associated with the current store. + /// + protected IOptions Options { get; } + /// /// Gets the database set corresponding to the entity. /// diff --git a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictScopeStore.cs b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictScopeStore.cs index e3ef7ad1..a3dfb8e7 100644 --- a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictScopeStore.cs +++ b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictScopeStore.cs @@ -14,6 +14,7 @@ using System.Threading.Tasks; using JetBrains.Annotations; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Caching.Memory; +using Microsoft.Extensions.Options; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using OpenIddict.Abstractions; @@ -28,8 +29,11 @@ namespace OpenIddict.EntityFrameworkCore public class OpenIddictScopeStore : OpenIddictScopeStore where TContext : DbContext { - public OpenIddictScopeStore([NotNull] IMemoryCache cache, [NotNull] TContext context) - : base(cache, context) + public OpenIddictScopeStore( + [NotNull] IMemoryCache cache, + [NotNull] TContext context, + [NotNull] IOptions options) + : base(cache, context, options) { } } @@ -43,8 +47,11 @@ namespace OpenIddict.EntityFrameworkCore where TContext : DbContext where TKey : IEquatable { - public OpenIddictScopeStore([NotNull] IMemoryCache cache, [NotNull] TContext context) - : base(cache, context) + public OpenIddictScopeStore( + [NotNull] IMemoryCache cache, + [NotNull] TContext context, + [NotNull] IOptions options) + : base(cache, context, options) { } } @@ -60,10 +67,14 @@ namespace OpenIddict.EntityFrameworkCore where TContext : DbContext where TKey : IEquatable { - public OpenIddictScopeStore([NotNull] IMemoryCache cache, [NotNull] TContext context) + public OpenIddictScopeStore( + [NotNull] IMemoryCache cache, + [NotNull] TContext context, + [NotNull] IOptions options) { Cache = cache; Context = context; + Options = options; } /// @@ -76,6 +87,11 @@ namespace OpenIddict.EntityFrameworkCore /// protected TContext Context { get; } + /// + /// Gets the options associated with the current store. + /// + protected IOptions Options { get; } + /// /// Gets the database set corresponding to the entity. /// diff --git a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictTokenStore.cs b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictTokenStore.cs index 16a18bc4..0c6c4451 100644 --- a/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictTokenStore.cs +++ b/src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictTokenStore.cs @@ -18,6 +18,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage; using Microsoft.Extensions.Caching.Memory; +using Microsoft.Extensions.Options; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using OpenIddict.Abstractions; @@ -34,8 +35,11 @@ namespace OpenIddict.EntityFrameworkCore OpenIddictAuthorization, TContext, string> where TContext : DbContext { - public OpenIddictTokenStore([NotNull] IMemoryCache cache, [NotNull] TContext context) - : base(cache, context) + public OpenIddictTokenStore( + [NotNull] IMemoryCache cache, + [NotNull] TContext context, + [NotNull] IOptions options) + : base(cache, context, options) { } } @@ -51,8 +55,11 @@ namespace OpenIddict.EntityFrameworkCore where TContext : DbContext where TKey : IEquatable { - public OpenIddictTokenStore([NotNull] IMemoryCache cache, [NotNull] TContext context) - : base(cache, context) + public OpenIddictTokenStore( + [NotNull] IMemoryCache cache, + [NotNull] TContext context, + [NotNull] IOptions options) + : base(cache, context, options) { } } @@ -72,10 +79,14 @@ namespace OpenIddict.EntityFrameworkCore where TContext : DbContext where TKey : IEquatable { - public OpenIddictTokenStore([NotNull] IMemoryCache cache, [NotNull] TContext context) + public OpenIddictTokenStore( + [NotNull] IMemoryCache cache, + [NotNull] TContext context, + [NotNull] IOptions options) { Cache = cache; Context = context; + Options = options; } /// @@ -88,6 +99,11 @@ namespace OpenIddict.EntityFrameworkCore /// protected TContext Context { get; } + /// + /// Gets the options associated with the current store. + /// + protected IOptions Options { get; } + /// /// Gets the database set corresponding to the entity. ///