public override void Initialize(string name, NameValueCollection config)
{
if (config == null)
throw new ArgumentNullException("config");
_providerName = name;
base.Initialize(name, config);
SetConfigurationProperties(config);
if (_documentStore == null)
{
if (string.IsNullOrEmpty(config["connectionStringName"]))
throw new ConfigurationErrorsException("Must supply a connectionStringName.");
_documentStore = new DocumentStore
{
ConnectionStringName = config["connectionStringName"],
};
_documentStore.Initialize();
}
// create indexes
_documentStore.ExecuteIndex(new Users_ByApplicationNameAndRoleName());
}