using System; namespace NTwain.Triplets { /// /// Base class for grouping triplet operations. /// public abstract class BaseTriplet { /// /// Gets the associated . /// protected readonly TwainSession Session; /// /// Initializes a new instance of the class. /// /// The session. /// protected BaseTriplet(TwainSession session) { this.Session = session ?? throw new ArgumentNullException(nameof(session)); Is32Bit = session.Config.Is32Bit; IsWin = session.Config.Platform == System.PlatformID.Win32NT; IsLinux = session.Config.Platform == System.PlatformID.Unix; IsMac = session.Config.Platform == System.PlatformID.MacOSX; } /// /// Whether to use 32bit data structures. /// protected readonly bool Is32Bit; /// /// Whether platform is Windows. /// protected readonly bool IsWin; /// /// Whether platform is Linux. /// protected readonly bool IsLinux; /// /// Whether platform is MacOS. /// protected readonly bool IsMac; } }