private string DetermineSheetName(PackAnimationCommand command, SpriteSheetConfig <ImageRgba32> spriteSheetConfig) { var name = string.IsNullOrWhiteSpace(command.PackedName) ? spriteSheetConfig.Name : command.PackedName; if (string.IsNullOrEmpty(name)) { name = $"Unknown{_time.Now().GetHashCode().ToString()}"; } return(name); }
public async Task Handle(RentBookRequest request) { //Todo: add lender not returned book validation var bookForRent = await _bookForRentRepository.Get(request.BookId); var lender = await _lenderRepository.Get(request.LenderId); bookForRent.RentBook(lender, _time.Now()); await _bookForRentRepository.Save(); }
internal bool Authorize(AuthorizeUserCommand command) { var lookUp = _sessionToken.Get(); if (!lookUp.Found) { return(false); } var sessionToken = lookUp.Get(); return(sessionToken.ExpireAt.CompareTo(_time.Now()) < 1); }
private string DetermineSheetName(string name) { return(string.IsNullOrWhiteSpace(name) ? $"Unknown{_time.Now().GetHashCode().ToString()}" : name); }