public PageViewModel( IBlogConfig blogConfig, IHttpContextAccessor httpContextAccessor, IAesEncryptor aceEncryptor) : base(blogConfig, httpContextAccessor, aceEncryptor) { }
public RegisterUserCommandHandler(IUserRepository userRepository, IValidator <RegisterUserCommand> validator, IEcdsa ecdsa, IAesEncryptor encryptor) { _userRepository = userRepository; _validator = validator; _ecdsa = ecdsa; _encryptor = encryptor; }
public CommonFactory( ILogger <CommonFactory> logger, IOptions <AppSettings> settings, IMapper mapper, IBlogConfig blogConfig, IAesEncryptor aesEncryption, IHttpContextAccessor httpContextAccessor) { if (logger != null) { this.Logger = logger; } if (settings != null) { this.Settings = settings; } if (mapper != null) { this.Mapper = mapper; } if (blogConfig != null) { this.BlogConfig = blogConfig; } if (aesEncryption != null) { this.AesEncryption = aesEncryption; } if (httpContextAccessor != null) { this.HttpContextAccessor = httpContextAccessor; } }
public SignShareFileCommandHandler(IShareRepository shareRepository, IUserRepository userRepository, IFileRepository fileRepository, IAesEncryptor encryptor, IEcdsa ecdsa) { _shareRepository = shareRepository; _userRepository = userRepository; _fileRepository = fileRepository; _encryptor = encryptor; _ecdsa = ecdsa; }
public PostViewViewModel( IBlogConfig blogConfig, IHttpContextAccessor httpContextAccessor, IAesEncryptor aceEncryptor) : base(blogConfig, httpContextAccessor, aceEncryptor) { RelatedPosts = new List <RelatedPostViewModel>(); }
public BlogConfig( ILogger <BlogConfig> logger, IAesEncryptor encryptionService, IConfiguration configuration) { _encryptionService = encryptionService; _logger = logger; BlogOwnerSettings = new BlogOwnerSettings(); ContentSettings = new ContentSettings(); GeneralSettings = new GeneralSettings(); EmailSettings = new EmailSettings(); FeedSettings = new FeedSettings(); WatermarkSettings = new WatermarkSettings(); Initialize(); }
public BaseVM(IBlogConfig blogConfig, IHttpContextAccessor httpContextAccessor, IAesEncryptor aceEncryptor) { _blogConfig = blogConfig; _httpContextAccessor = httpContextAccessor; this._aceEncryptor = aceEncryptor; var data = new TokenValidateViewModel { SessionId = Guid.NewGuid(), Time = DateTime.Now.ToFileTime(), Token = CodeMazeConfiguration.TokenValidatePost }; MazeToken = _aceEncryptor.Encrypt(JsonConvert.SerializeObject(data)); if (_httpContextAccessor.HttpContext.Session.HasValue(SessionHelper.SessionLogin)) { UserClaim = _httpContextAccessor.HttpContext.Session.Get <UserClaim>(SessionHelper.SessionLogin); } }
/// <summary> /// Initializes a new instance of the <see cref="DataOperator"/> class. /// </summary> /// <param name="Encryptor">The encryptor.</param> /// <param name="source">The source.</param> /// <exception cref="ArgumentNullException">source</exception> public DataOperator(IAesEncryptor Encryptor, string source) { _Encryptor = Encryptor ?? null; Source = source ?? throw new ArgumentNullException(nameof(source)); }
public UserMapper(IAesEncryptor encryptor) { _encryptor = encryptor; }
public UserRepository(IAesEncryptor encryptor) { _encryptor = encryptor; }