public InviteController(IUserRepository userRepo, IInviteRepository inviteRepo, IEncryptionKeyGeneratorProvider encryptionGP, IEmailProvider emailService, IAmazonS3ImageProvider amazons3imageprovider ) { userRepository = userRepo; inviteRepository = inviteRepo; encryptionProvider = encryptionGP; emailProvider = emailService; amazonS3ImageProvider = amazons3imageprovider; }
public UserController(IUserRepository userRepo, IAuthtenticationCurrentContext currentAuthContext, IMapper autoMapper, IEncryptionKeyGeneratorProvider encryptionP, IDecryptProvider decryptProvider, IAmazonS3ImageProvider amazons3imageprovider) { userRepository = userRepo; authenticationCurrentContext = currentAuthContext; mapper = autoMapper; encryptionProvider = encryptionP; decryptionProvider = decryptProvider; amazonS3ImageProvider = amazons3imageprovider; }
public MilestoneController(IMilestoneRepository milestoneRepo, IAuthtenticationCurrentContext currentAuthContext, ICacheProvider cacheP, IMapper automapper, IUserRepository userrepo, ILikeRepository likeRepo, IUserCache usrCache, IAmazonS3ImageProvider amazons3imageprovider ) { milestoneRepository = milestoneRepo; currentAuthenticationContext = currentAuthContext; cacheProvider = cacheP; mapper = automapper; userRepository = userrepo; likeRepository = likeRepo; userCache = usrCache; amazonS3ImageProvider = amazons3imageprovider; }
public static async Task <bool> UsersDo() { IUserRepository userRepository = DI.ServiceProvider.GetServiceInstance <IUserRepository>(); IAmazonS3ImageProvider amazonS3ImageProvider = DI.ServiceProvider.GetServiceInstance <IAmazonS3ImageProvider>(); foreach (Mdls.User user in await userRepository.GetAll()) { if (user.Image != null && user.Image.StartsWith("data:image/png;base64,")) { string path = await amazonS3ImageProvider.Add($"users/{user.id}/profile.png", user.Image); bool saved = await userRepository.UpdateImage(user.id, user.Image); } } return(true); }
public static async Task <bool> MilestonesDo() { IMilestoneRepository milestoneRepository = DI.ServiceProvider.GetServiceInstance <IMilestoneRepository>(); IAmazonS3ImageProvider amazonS3ImageProvider = DI.ServiceProvider.GetServiceInstance <IAmazonS3ImageProvider>(); foreach (Mdls.Milestone milestone in await milestoneRepository.GetAll()) { if (milestone.Image != null && milestone.Image.StartsWith("data:image/png;base64,")) { string path = await amazonS3ImageProvider.Add($"{milestone.UserId}/{milestone.id}/img.png", milestone.Image); bool saved = await milestoneRepository.SetImage(milestone.id, path); } } return(true); }