static SCardAPI() { if (Environment.OSVersion.Platform.ToString().Contains("Win32") || Environment.OSVersion.Platform.ToString().Contains("Win64")) { iswindows = true; lib = new WinSCardAPI(); lib.TextEncoding = new UnicodeEncoding(); } else { iswindows = false; lib = new PCSCliteAPI(); lib.TextEncoding = new UTF8Encoding(); } }
static Platform() { var platform = Environment.OSVersion.Platform.ToString(); if (platform.Contains("Win32") || platform.Contains("Win64")) { IsWindows = true; Lib = new WinSCardAPI { TextEncoding = new UnicodeEncoding() }; return; } IsWindows = false; Lib = new PCSCliteAPI { TextEncoding = new UTF8Encoding() }; }
static Platform() { var platform = Environment.OSVersion.Platform.ToString(); if (platform.Contains("Win32") || platform.Contains("Win64") || platform.Contains("WinCE")) { IsWindows = true; Lib = new WinSCardAPI { TextEncoding = new UnicodeEncoding() }; return; } IsWindows = false; Lib = new PCSCliteAPI { TextEncoding = new UTF8Encoding() }; }
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(); }