public Translation( string code, string text, CultureInfo culture ) { _code = code.Required(); _text = text.Required(); _culture = culture.Required(); }
/// <summary> /// Set culture, will perform check if culture is supported /// </summary> /// <param name="culture"></param> /// <param name="applicationSettings"></param> public virtual void SetCulture(CultureInfo culture, IApplicationSettings applicationSettings) { culture.Required("Culture is required"); if (!applicationSettings.AcceptedCultures.Contains(culture)) { throw new BusinessRuleViolationException("Culture is not accepted"); } _culture = culture; }