RegistryXmlRepository Class

An XML repository backed by the Windows registry.

Namespace
Microsoft.AspNetCore.DataProtection.Repositories
Assemblies
  • Microsoft.AspNetCore.DataProtection

Syntax

public class RegistryXmlRepository : IXmlRepository
class Microsoft.AspNetCore.DataProtection.Repositories.RegistryXmlRepository

Constructors

RegistryXmlRepository(Microsoft.Win32.RegistryKey)

Creates a Microsoft.AspNetCore.DataProtection.Repositories.RegistryXmlRepository with keys stored in the given registry key.

Arguments:registryKey (Microsoft.Win32.RegistryKey) – The registry key in which to persist key material.
public RegistryXmlRepository(RegistryKey registryKey)
RegistryXmlRepository(Microsoft.Win32.RegistryKey, System.IServiceProvider)

Creates a Microsoft.AspNetCore.DataProtection.Repositories.RegistryXmlRepository with keys stored in the given registry key.

Arguments:
  • registryKey (Microsoft.Win32.RegistryKey) – The registry key in which to persist key material.
  • services (System.IServiceProvider) – The System.IServiceProvider used to resolve services.
public RegistryXmlRepository(RegistryKey registryKey, IServiceProvider services)

Properties

Microsoft.AspNetCore.DataProtection.Repositories.RegistryXmlRepository.DefaultRegistryKey

The default key storage directory, which currently corresponds to “HKLMSOFTWAREMicrosoftASP.NET4.0.30319.0AutoGenKeys{SID}”.

Return type:Microsoft.Win32.RegistryKey
public static RegistryKey DefaultRegistryKey { get; }
Microsoft.AspNetCore.DataProtection.Repositories.RegistryXmlRepository.RegistryKey

The registry key into which key material will be written.

Return type:Microsoft.Win32.RegistryKey
public RegistryKey RegistryKey { get; }
Microsoft.AspNetCore.DataProtection.Repositories.RegistryXmlRepository.Services

The System.IServiceProvider provided to the constructor.

Return type:System.IServiceProvider
protected IServiceProvider Services { get; }

Methods

GetAllElements()
Return type:System.Collections.Generic.IReadOnlyCollection<System.Xml.Linq.XElement>
public virtual IReadOnlyCollection<XElement> GetAllElements()
StoreElement(System.Xml.Linq.XElement, System.String)
public virtual void StoreElement(XElement element, string friendlyName)