public static bool Equals(LocalizedString a, string b) { if (ReferenceEquals(a, b)) { return(true); } return(string.Equals(a?.ToString(), b)); }
public static bool Equals(LocalizedString a, string b, StringComparison comparisonType) { if (ReferenceEquals(a, b)) { return(true); } return(string.Equals(a?.ToString(), b, comparisonType)); }
public TestData() { CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture; SampleString = new LocalizedString("chicken") .InCanadianEnglish("chicken, eh") .InCanadianFrench("éh poulet") .InFrench("poulet") .InQueensEnglish("hen") .In("de", "das bird"); SampleString.ToString(); }
public void EqualInvariant() { Assert.Equal("chicken", sample.ToString()); }
public string GetString(IValidationContext context) { return(_localizedString?.ToString()); }