public ScriptController(LoggingService myLoggingService, PreferenceRepository myPreferenceRepository, ScriptRepository myScriptRepository, ActionRepository myActionRepository) { _LoggingService = myLoggingService; _PreferenceRepository = myPreferenceRepository; _ScriptRepository = myScriptRepository; _ActionRepository = myActionRepository; }
public HomeController(LoggingService myLoggingService, PreferenceRepository myPreferenceRepository, PlaneRepository myPlaneRepository, ScriptRepository myScriptRepository, ExecutionRepository myExecutionRepository) { _LoggingService = myLoggingService; _PreferenceRepository = myPreferenceRepository; _PlaneRepository = myPlaneRepository; _ScriptRepository = myScriptRepository; _ExecutionRepository = myExecutionRepository; }
public void Init() { _LoggingService = ServiceResolver.Resolve <LoggingService>(); _PreferenceRepository = ServiceResolver.Resolve <PreferenceRepository>(); _ExecutionRepository = ServiceResolver.Resolve <ExecutionRepository>(); _ActionRepository = ServiceResolver.Resolve <ActionRepository>(); _PlaneRepository = ServiceResolver.Resolve <PlaneRepository>(); _WcfService = ServiceResolver.Resolve <WcfService>(); _FileService = ServiceResolver.Resolve <FileService>(); }
public ExecutionController(LoggingService myLoggingService, PreferenceRepository myPreferenceRepository, ExecutionRepository myExecutionRepository, WcfService myWcfService, ActionRepository myActionRepository, FileService myFileService, PlaneRepository myPlaneRepository) { _LoggingService = myLoggingService; _PreferenceRepository = myPreferenceRepository; _ExecutionRepository = myExecutionRepository; _ActionRepository = myActionRepository; _PlaneRepository = myPlaneRepository; _WcfService = myWcfService; _FileService = myFileService; }
public static UserApiResult GetUserLogged() { UserApiResult user = null; Preference preferenceUser = PreferenceRepository.GetByKey(Preference.USER_LOGGED_JSON); if (preferenceUser != null) { user = JsonConvert.DeserializeObject <UserApiResult>(preferenceUser.Value); } return(user); }
public void Init() { ServiceProvider = new ServiceCollection() .AddLogging() .AddSingleton(new LoggerFactory().AddSerilog(SerilogExtensions.Configure("CCSS.Preference.Repository.Tests.log"))) .AddTransient <IRepository <IPreferenceEvent>, PreferenceRepository>() .AddSingleton <IConfigurationStore, GenericConfiguration>() .AddMemoryCache() .BuildServiceProvider(); ConfigStore = ServiceProvider.GetRequiredService <IConfigurationStore>(); PrefRepo = ServiceProvider.GetRequiredService <IRepository <IPreferenceEvent> >() as PreferenceRepository; Assert.IsNotNull(ServiceProvider.GetService <ILoggerFactory>()); }
public static void SaveUserLogged(UserApiResult user) { if (user != null) { UserApiResult actualUser = GetUserLogged(); if (actualUser == null || !actualUser.ProfilePicture.Url.Equals(user.ProfilePicture.Url)) { string blobImageUrl = user.ProfilePicture != null ? user.ProfilePicture.Url : StringUtils.EMPTY; user.ProfilePicture.Base64 = Functions.GetBase64ImageFromUrl(blobImageUrl); } else if (actualUser != null && actualUser.ContainsProfilePictureBase64()) { user.ProfilePicture = actualUser.ProfilePicture; } string jsonUser = JsonConvert.SerializeObject(user); PreferenceRepository.Save(Preference.USER_LOGGED_JSON, jsonUser); } }
public PlaneController(LoggingService myLoggingService, PreferenceRepository myPreferenceRepository, PlaneRepository myPlaneRepository) { _LoggingService = myLoggingService; _PreferenceRepository = myPreferenceRepository; _PlaneRepository = myPlaneRepository; }
public void Init() { myPreferenceRepository = ServiceResolver.Resolve <PreferenceRepository>(); }