예제 #1
0
 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();
     }
 }
예제 #2
0
 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();
     }
 }
예제 #3
0
        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()
            };
        }
예제 #4
0
        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()
            };
        }
예제 #5
0
        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();
        }