/// <summary>
 /// Gets/sets the globalization.
 /// </summary>
 /// <returns>The globalization.</returns>
 protected CultureInfo GetApprotiateGlobalization()
 {
     if (_appropriateGlobalization.IsNull())
     {
         _appropriateGlobalization = CultureInfo.CreateSpecificCulture("en-GB");
     }
     return(_appropriateGlobalization);
 }
Ejemplo n.º 2
0
 public static bool IsDateTime(this string self, CultureInfo provider=null)
 {
     if (provider.IsNull())
         provider = CultureInfo.InvariantCulture;
     if (self.IsNullOrEmpty())
         return false;
     DateTime dateTime;
     return DateTime.TryParse(self ,provider,DateTimeStyles.AllowWhiteSpaces, out dateTime);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Money"/> class.
        /// </summary>
        /// <param name="amount">The amount.</param>
        /// <param name="culture">The culture.</param>
        public Money(decimal amount, CultureInfo culture)
        {
            this.amount = amount;

            this.cultureInfo = culture.IsNull() ? CultureInfo.CurrentCulture : culture;
        }