public void ValidatePublisher() { AssertionConcern.AssertArgumentLength(this.Name, 3, 150, Errors.InvalidName); }
public void SetPage(int page) { AssertionConcern.AssertArgumentNotNull(page, Errors.PageRequired); Page = page < 1 ? 1 : page; }
public void SetTotalRows(int totalRows) { AssertionConcern.AssertArgumentNotNull(totalRows, Errors.TotalRowsRequired); TotalRows = totalRows; }
public static bool ChangeModeScopeIsValid(this CoachingProcess coachingProcess, EModeProcess mode) { return(AssertionConcern.IsSatisfiedBy( AssertionConcern.AssertArgumentNotNull(mode, Errors.ModeIsRequired) )); }
public static bool ChangePriceScopeIsValid(this Budget budget, float price) { return(AssertionConcern.IsSatisfiedBy( AssertionConcern.AssertArgumentNotNull(price, Errors.PriceIsRequired) )); }
public CalendarSharer(Participant participant) { AssertionConcern.AssertArgumentNotNull(participant, "Participant must be provided."); this.participant = participant; }
public static bool ChangeEndDateScopeIsValid(this CoachingProcess coachingProcess, DateTime endDate) { return(AssertionConcern.IsSatisfiedBy( AssertionConcern.AssertArgumentIsGreaterOrEqualThan(endDate, coachingProcess.StartDate, Errors.StartDateIsRequired) )); }
public void Validate() { AssertionConcern.AssertArgumentLength(this.Name, 3, 200, Errors.InvalidUserName); EmailAssertionConcern.AssertIsValid(this.Email); PasswordAssertionConcern.AssertIsValid(this.Password); }
public ICollection <InvitationDescriptor> AllUnavailableRegistrationInvitations() { AssertionConcern.AssertStateTrue(Active, "Tenant is not active."); return(AllRegistrationInvitationsFor(false)); }
public CustomerCommandResult GetByName(string name) { AssertionConcern.AssertArgumentNotEmpty(name.ToString(), "O Nome não pode ser nulo."); return(_repository.Get(name)); }
public EventStoreApplicationService(IEventStoreCoreClient eventStoreClient, ISettingsService settingsService) { AssertionConcern.AssertArgumentNotNull(eventStoreClient, nameof(eventStoreClient)); this.eventStoreClient = eventStoreClient; this.settingsService = settingsService; }
public static bool PossuiNomeCidadeInformado(this AdicionaNovaCidadeCommand command) { return(AssertionConcern.IsSatisfiedBy(AssertionConcern.AssertTrue(command.Nome != string.Empty, "Nome da Cidade não informado"))); }
public static bool PossuiNomeCidadeUnico(this AdicionaNovaCidadeCommand command, ICidadeRepository cidadeRepository) { return(AssertionConcern.IsSatisfiedBy(AssertionConcern.AssertTrue(cidadeRepository.ObterPorNome(command.Nome) == null, "Nome da Cidade já existe"))); }
public void IsValid() { AssertionConcern.ValidateNotEqOrLessThanMin(Height, 0, "The field height can't be equal or less than 0"); AssertionConcern.ValidateNotEqOrLessThanMin(Width, 0, "The field width can't be equal or less than 0"); AssertionConcern.ValidateNotEqOrLessThanMin(Length, 0, "The field length can't be equal or less than 0"); }
public static void AsserIsValid(string password) { AssertionConcern.AssertArgumentNotNull(password, ""); }
public void SetCustomer(int customerId) { AssertionConcern.AssertArgumentNotNull(customerId, Errors.CustomerRequired); CustomerId = customerId; }
public static bool CreateTreinoScopIsValid(this Treino treino) { return(AssertionConcern.IsSatisfiedBy( AssertionConcern.AssertNotEmpty(treino.DsTreino, "O campo treino é Obrigatório!") )); }
public void SetOrderNumber(string orderNumber) { AssertionConcern.AssertArgumentLength(orderNumber ?? "", OrderNumberMaxLength, string.Format(Errors.OrderNumberMaxLength, OrderNumberMaxLength)); OrderNumber = orderNumber ?? ""; }
public static bool ChangeNameScopeIsValid(this CoachingProcess coachingProcess, string name) { return(AssertionConcern.IsSatisfiedBy( AssertionConcern.AssertArgumentNotNull(name, Errors.NameIsRequired) )); }
public void Validar() { AssertionConcern.AssertArgumentNotNull(Descricao, string.Format(Erros.NullParameter, "Descricao")); AssertionConcern.AssertArgumentNotEmpty(Descricao, string.Format(Erros.EmptyParameter, "Descricao")); }
public static bool ChangeStartDateScopeIsValid(this CoachingProcess coachingProcess, DateTime startDate) { return(AssertionConcern.IsSatisfiedBy( AssertionConcern.AssertArgumentNotNull(startDate, Errors.StartDateIsRequired) )); }
public static void ValidTaskTitle(string title) { AssertionConcern.IsValid( AssertionConcern.AssertLength(title, 5, 30, "O título da tarefa deve ser maior ou igual a 5 e menor ou igual a 100 caracteres!") ); }
public static bool ChangeStatusScopeIsValid(this Budget budget, EBudgetStatus status) { return(AssertionConcern.IsSatisfiedBy( AssertionConcern.AssertArgumentNotNull(status, Errors.InvalidStatus) )); }
void AssertValidTeamMember(TeamMember teamMember) { AssertionConcern.AssertArgumentNotNull(teamMember, "A team member must be provided."); AssertionConcern.AssertArgumentEquals(this.TenantId, teamMember.TenantId, "Team member must be of the same tenant."); }
public static bool ChangeProposalScopeIsValid(this Budget budget, string proposal) { return(AssertionConcern.IsSatisfiedBy( AssertionConcern.AssertArgumentNotNull(proposal, Errors.ProposalIsRequired) )); }
public BusinessPriority(BusinessPriorityRatings ratings) { AssertionConcern.AssertArgumentNotNull(ratings, "The ratings must be provided."); Ratings = ratings; }
public void SetRowsPerPage(int rowsPerPage) { AssertionConcern.AssertArgumentNotNull(rowsPerPage, Errors.RowsPerPageRequired); RowsPerPage = rowsPerPage; }
//Valida se o objeto instanciado está correto public void Valid() { AssertionConcern.AssertArgumentLength(this.Name, 3, 250, "Nome inválido"); EmailAssertionConcern.Email(this.Email); }
/// <summary> /// validate limit order price /// </summary> private static void ValidateLimitOrderPrice(decimal limitPrice) { AssertionConcern.AssertGreaterThanZero(limitPrice, "Limit Price should be greater than 0"); }
public void ChangeDescription(string description) { AssertionConcern.ValidateIfEmpty(description, "Product Description field cannot be empty"); Description = description; }