static Platform() { var platform = Environment.OSVersion.Platform; switch (platform) { case PlatformID.Unix: if (Unix.Native.GetUnameSysName() == Unix.Native.OS_NAME_OSX) { // Mono identifies MacOSX as Unix goto case PlatformID.MacOSX; } Type = PlatformType.Linux; Lib = new PCSCliteLinux(); break; case PlatformID.MacOSX: Type = PlatformType.MacOSX; Lib = new PCSCliteMacOsX(); break; case PlatformID.Win32NT: case PlatformID.Win32S: case PlatformID.Win32Windows: case PlatformID.WinCE: Type = PlatformType.Windows; Lib = new WinSCardAPI(); break; default: throw new NotSupportedException("Sorry, your OS platform is not supported."); } }
static Platform() { var platform = Environment.OSVersion.Platform; if ( platform == PlatformID.Win32S || platform == PlatformID.Win32Windows || platform == PlatformID.Win32NT || platform == PlatformID.WinCE ) { IsWindows = true; Lib = new WinSCardAPI(); return; } IsWindows = false; Lib = new PCSCliteAPI(); }
internal CardHandle(ISCardApi api, ISCardContext context) { _api = api ?? throw new ArgumentNullException(nameof(api)); _context = context ?? throw new ArgumentNullException(nameof(context)); }
internal CardReader(ISCardApi api, ICardHandle cardHandle, bool isOwner) { _api = api; CardHandle = cardHandle ?? throw new ArgumentNullException(nameof(cardHandle)); _isOwner = isOwner; }
internal SCardContext(ISCardApi api) { _api = api; }