React to options changes

This commit is contained in:
Hao Kung 2014-10-14 19:03:51 -07:00
commit 4e43fa24cf
5 changed files with 5 additions and 5 deletions

View File

@ -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 XNamespace XmlNamespace = XNamespace.Get("http://www.asp.net/dataProtection/2014/azure");
internal static readonly XName KeyRingElementName = XmlNamespace.GetName("keyRing"); internal static readonly XName KeyRingElementName = XmlNamespace.GetName("keyRing");
public BlobStorageXmlRepository([NotNull] IOptionsAccessor<BlobStorageXmlRepositoryOptions> optionsAccessor) public BlobStorageXmlRepository([NotNull] IOptions<BlobStorageXmlRepositoryOptions> optionsAccessor)
{ {
Directory = optionsAccessor.Options.Directory; Directory = optionsAccessor.Options.Directory;
CryptoUtil.Assert(Directory != null, "Directory != null"); CryptoUtil.Assert(Directory != null, "Directory != null");

View File

@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
{ {
private readonly CngCbcAuthenticatedEncryptorConfigurationOptions _options; private readonly CngCbcAuthenticatedEncryptorConfigurationOptions _options;
public CngCbcAuthenticatedEncryptorConfigurationFactory([NotNull] IOptionsAccessor<CngCbcAuthenticatedEncryptorConfigurationOptions> optionsAccessor) public CngCbcAuthenticatedEncryptorConfigurationFactory([NotNull] IOptions<CngCbcAuthenticatedEncryptorConfigurationOptions> optionsAccessor)
{ {
_options = optionsAccessor.Options.Clone(); _options = optionsAccessor.Options.Clone();
} }

View File

@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
{ {
private readonly CngGcmAuthenticatedEncryptorConfigurationOptions _options; private readonly CngGcmAuthenticatedEncryptorConfigurationOptions _options;
public CngGcmAuthenticatedEncryptorConfigurationFactory([NotNull] IOptionsAccessor<CngGcmAuthenticatedEncryptorConfigurationOptions> optionsAccessor) public CngGcmAuthenticatedEncryptorConfigurationFactory([NotNull] IOptions<CngGcmAuthenticatedEncryptorConfigurationOptions> optionsAccessor)
{ {
_options = optionsAccessor.Options.Clone(); _options = optionsAccessor.Options.Clone();
} }

View File

@ -11,7 +11,7 @@ namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
{ {
private readonly ManagedAuthenticatedEncryptorConfigurationOptions _options; private readonly ManagedAuthenticatedEncryptorConfigurationOptions _options;
public ManagedAuthenticatedEncryptorConfigurationFactory([NotNull] IOptionsAccessor<ManagedAuthenticatedEncryptorConfigurationOptions> optionsAccessor) public ManagedAuthenticatedEncryptorConfigurationFactory([NotNull] IOptions<ManagedAuthenticatedEncryptorConfigurationOptions> optionsAccessor)
{ {
_options = optionsAccessor.Options.Clone(); _options = optionsAccessor.Options.Clone();
} }

View File

@ -26,7 +26,7 @@ namespace Microsoft.AspNet.Security.DataProtection
} }
public DefaultDataProtectionProvider( public DefaultDataProtectionProvider(
[NotNull] IOptionsAccessor<DataProtectionOptions> optionsAccessor, [NotNull] IOptions<DataProtectionOptions> optionsAccessor,
[NotNull] IKeyManager keyManager) [NotNull] IKeyManager keyManager)
{ {
KeyRingBasedDataProtectionProvider rootProvider = new KeyRingBasedDataProtectionProvider(new KeyRingProvider(keyManager)); KeyRingBasedDataProtectionProvider rootProvider = new KeyRingBasedDataProtectionProvider(new KeyRingProvider(keyManager));