private IKeyInfoHelper GetKeyInfoHelper(Type keyType)
        {
            IKeyInfoService service = null;

            if (this.Database != null)
            {
                service = this
                          .Database
                          .DatabaseEngine
                          .ServiceProvider
                          .GetService <IKeyInfoService>();
            }

            if (service == null)
            {
                // Should we really fall back?
                // Tests would fail without this, add injection?
                service = DefaultServiceConfigurations.CreateDefaultKeyInfoService();
            }

            IKeyInfoHelper result;

            service.TryCreateKeyInfoHelper(keyType, out result);

            return(result);
        }
        public ModularKeyInfoFactory(IDatabase database)
        {
            this.service = database
                           .DatabaseEngine
                           .ServiceProvider
                           .GetService <IKeyInfoService>();

            if (this.service == null)
            {
                // Fallback
                this.service = DefaultServiceConfigurations.CreateDefaultKeyInfoService();
            }
        }
 public DefaultKeyInfoFactory()
     : base(DefaultServiceConfigurations.CreateDefaultKeyInfoService())
 {
 }