Equals() public method

Compares for equality with another ABI object.
Comparison is performed by value.
public Equals ( ABI other ) : bool
other ABI
return bool
Ejemplo n.º 1
0
        public static NativeLibrary LoadNativeLibrary()
        {
            ABI abi = Library.GetProcessABI();

            if (abi.Equals(ABI.Unknown))
            {
                return(null);
            }

            INativeLibraryLoader loader = GetNativeLibraryLoader(abi);

            if (loader == null)
            {
                return(null);
            }

            string resource = GetNativeLibraryResource(abi);

            if (resource == null)
            {
                return(null);
            }

            string path = ExtractResource(resource);

            if (path == null)
            {
                return(null);
            }

            return(new NativeLibrary(path, loader));
        }
Ejemplo n.º 2
0
		private static string GetNativeLibraryResource(ABI abi)
		{
			if (abi.Equals(ABI.Windows_X86))
				return "windows/x86/yeppp.dll";
			else if (abi.Equals(ABI.Windows_X86_64))
				return "windows/x86_64/yeppp.dll";
			else if (abi.Equals(ABI.OSX_X86))
				return "osx/x86/libyeppp.dylib";
			else if (abi.Equals(ABI.OSX_X86_64))
				return "osx/x86_64/libyeppp.dylib";
			else if (abi.Equals(ABI.Linux_X86))
				return "linux/x86/libyeppp.so";
			else if (abi.Equals(ABI.Linux_X86_64))
				return "linux/x86_64/libyeppp.so";
			else if (abi.Equals(ABI.Linux_ARMEL))
				return "linux/armel/libyeppp.so";
			else if (abi.Equals(ABI.Linux_ARMHF))
				return "linux/armhf/libyeppp.so";
			else
				return null;
		}
Ejemplo n.º 3
0
 private static string GetNativeLibraryResource(ABI abi)
 {
     if (abi.Equals(ABI.Windows_X86))
         return "windows/x86/yeppp.dll";
     else if (abi.Equals(ABI.Windows_X86_64))
         return "windows/x86_64/yeppp.dll";
     else if (abi.Equals(ABI.OSX_X86))
         return "osx/x86/libyeppp.dylib";
     else if (abi.Equals(ABI.OSX_X86_64))
         return "osx/x86_64/libyeppp.dylib";
     else if (abi.Equals(ABI.Linux_X86))
         return "linux/x86/libyeppp.so";
     else if (abi.Equals(ABI.Linux_X86_64))
         return "linux/x86_64/libyeppp.so";
     else if (abi.Equals(ABI.Linux_ARMEL))
         return "linux/armel/libyeppp.so";
     else if (abi.Equals(ABI.Linux_ARMHF))
         return "linux/armhf/libyeppp.so";
     else
         return null;
 }