using System; namespace Tanshu.Accounts.Print { internal class ThermalPrinter { internal static PlatformPrinter Printer; static ThermalPrinter() { Printer = RunningOnLinux() ? (PlatformPrinter)new PrinterLinux() : new PrinterWindows(); } internal static bool RunningOnLinux() { var platform = (int)Environment.OSVersion.Platform; return (platform == 4) || (platform == 6) || (platform == 128); } } }