BaseIO.cs

34 lines | 825 B Blame History Raw Download
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Globalization;
using System.Threading;

namespace yEd.XGML.IO
{
    /// <summary>
    /// Используется для того, чтобы выполнять парсинг чисел с разделителем точкой 10.10
    /// </summary>
    public abstract class BaseIO
    {
        private CultureInfo ThreadCulture;

        protected BaseIO()
        {
            ThreadCulture = Thread.CurrentThread.CurrentCulture;
        }

        protected void SetCulture_en_US()
        {
            Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
        }
        protected void RestoreCulture()
        {
            Thread.CurrentThread.CurrentCulture = ThreadCulture;
        }

    }
}