Пример #1
0
		private bool IsArm64Process ()
		{
			if (Environment.OSVersion.Platform != PlatformID.Unix || !Environment.Is64BitProcess)
				return false;

			try {
				var process = new global::System.Diagnostics.Process ();
				process.StartInfo.FileName = "uname";
				process.StartInfo.Arguments = "-m";
				process.StartInfo.RedirectStandardOutput = true;
				process.StartInfo.UseShellExecute = false;
				process.Start ();
				process.WaitForExit ();
				var output = process.StandardOutput.ReadToEnd ();

				return output.Trim () == "aarch64";
			} catch {
				return false;
			}
		}
Пример #2
0
		public Process(global::System.Diagnostics.Process systemProcess)
		{
			Contract.Requires(systemProcess != null);
			_systemProcess = systemProcess;
		}