React to options rename
This commit is contained in:
parent
7d5a29a9fd
commit
d9119f4c47
|
|
@ -25,7 +25,7 @@ namespace Microsoft.AspNet.Security.DataProtection.Azure
|
|||
internal static readonly XNamespace XmlNamespace = XNamespace.Get("http://www.asp.net/dataProtection/2014/azure");
|
||||
internal static readonly XName KeyRingElementName = XmlNamespace.GetName("keyRing");
|
||||
|
||||
public BlobStorageXmlRepository([NotNull] IOptionsAccessor<BlobStorageXmlRepositoryOptions> optionsAccessor)
|
||||
public BlobStorageXmlRepository([NotNull] IOptions<BlobStorageXmlRepositoryOptions> optionsAccessor)
|
||||
{
|
||||
Directory = optionsAccessor.Options.Directory;
|
||||
CryptoUtil.Assert(Directory != null, "Directory != null");
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
|
|||
{
|
||||
private readonly CngCbcAuthenticatedEncryptorConfigurationOptions _options;
|
||||
|
||||
public CngCbcAuthenticatedEncryptorConfigurationFactory([NotNull] IOptionsAccessor<CngCbcAuthenticatedEncryptorConfigurationOptions> optionsAccessor)
|
||||
public CngCbcAuthenticatedEncryptorConfigurationFactory([NotNull] IOptions<CngCbcAuthenticatedEncryptorConfigurationOptions> optionsAccessor)
|
||||
{
|
||||
_options = optionsAccessor.Options.Clone();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
|
|||
{
|
||||
private readonly CngGcmAuthenticatedEncryptorConfigurationOptions _options;
|
||||
|
||||
public CngGcmAuthenticatedEncryptorConfigurationFactory([NotNull] IOptionsAccessor<CngGcmAuthenticatedEncryptorConfigurationOptions> optionsAccessor)
|
||||
public CngGcmAuthenticatedEncryptorConfigurationFactory([NotNull] IOptions<CngGcmAuthenticatedEncryptorConfigurationOptions> optionsAccessor)
|
||||
{
|
||||
_options = optionsAccessor.Options.Clone();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
|
|||
{
|
||||
private readonly ManagedAuthenticatedEncryptorConfigurationOptions _options;
|
||||
|
||||
public ManagedAuthenticatedEncryptorConfigurationFactory([NotNull] IOptionsAccessor<ManagedAuthenticatedEncryptorConfigurationOptions> optionsAccessor)
|
||||
public ManagedAuthenticatedEncryptorConfigurationFactory([NotNull] IOptions<ManagedAuthenticatedEncryptorConfigurationOptions> optionsAccessor)
|
||||
{
|
||||
_options = optionsAccessor.Options.Clone();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace Microsoft.AspNet.Security.DataProtection
|
|||
}
|
||||
|
||||
public DefaultDataProtectionProvider(
|
||||
[NotNull] IOptionsAccessor<DataProtectionOptions> optionsAccessor,
|
||||
[NotNull] IOptions<DataProtectionOptions> optionsAccessor,
|
||||
[NotNull] IKeyManager keyManager)
|
||||
{
|
||||
KeyRingBasedDataProtectionProvider rootProvider = new KeyRingBasedDataProtectionProvider(new KeyRingProvider(keyManager));
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ namespace Microsoft.AspNet.Security.DataProtection
|
|||
return _dataProtectionProvider.CreateProtector(purpose);
|
||||
}
|
||||
|
||||
private sealed class DefaultOptionsAccessor<T> : IOptionsAccessor<T> where T : class, new()
|
||||
private sealed class DefaultOptionsAccessor<T> : IOptions<T> where T : class, new()
|
||||
{
|
||||
public T Options { get; } = new T();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue