protected void Application_Start() { GlobalConfiguration.Configure(WebApiConfig.Register); // Code that runs on application startup IRegistry registry = RegistryFactory.GetRegistry(); registry.Register <Module>(); }
public void Start() { var registry = RegistryFactory.GetRegistry(); foreach (var reg in registryModels) { var registryValue = registry.GetValue(reg); if (string.IsNullOrEmpty(registryValue)) { logger.Info($"Unable to get \"{reg.SubKey}\\{reg.Key}\"."); continue; } logger.Info($"Found \"{reg.SubKey}\\{reg.Key}\": \"{registryValue}\""); if (registry.SetValue(reg)) { registryValue = registry.GetValue(reg); logger.Info($"Updated \"{reg.SubKey}\\{reg.Key}\": \"{registryValue}\""); } else { logger.Warn("Unable to update, make sure the registry is available and you are running the process in admin mode."); } } }
protected T Resolve <T>() { return(RegistryFactory.GetRegistry().Resolve <T>()); }