public static void Main() { var framework = Assembly .GetEntryAssembly()? .GetCustomAttribute <TargetFrameworkAttribute>()? .FrameworkName; var procArch = Environment.Is64BitProcess ? "X64" : "X86"; var osArch = Environment.Is64BitOperatingSystem ? "X64" : "X86"; #if NETCORE2 Console.Title = $"MonoStream {RI.FrameworkDescription}"; Console.WriteLine($"Framework: {framework} ({RI.FrameworkDescription}) CLR: {RE.GetSystemVersion()}"); Console.WriteLine($"OS: {Environment.OSVersion} ({RI.OSDescription.Trim()}) {procArch} {RI.OSArchitecture} {RI.ProcessArchitecture}"); #else Console.WriteLine($"Framework: {framework} CLR: {Environment.Version}"); Console.WriteLine($"OS: {Environment.OSVersion} {procArch} {osArch}"); #endif Console.WriteLine(); helloWorldZippedBytes = Convert.FromBase64String(helloWorldZippedBase64); defaultColor = Console.ForegroundColor; test(ms => new System.IO.Compression.GZipStream(ms, System.IO.Compression.CompressionMode.Decompress)); test(ms => new ICSharpCode.SharpZipLib.GZip.GZipInputStream(ms)); #if !CI_BUILD Console.Write("Press any key to exit..."); Console.ReadKey(); #endif }
public void FromGlobalAccessCache_nNvoke_ReturnsFalse() { Assert.False(RuntimeEnvironment.FromGlobalAccessCache(typeof(RuntimeEnvironmentTests).Assembly)); Assert.False(RuntimeEnvironment.FromGlobalAccessCache(null)); }
public void GetRuntimeInterfaceAsIntPtr_Invoke_ThrowsPlatformNotSupportedException() { Assert.Throws <PlatformNotSupportedException>(() => RuntimeEnvironment.GetRuntimeInterfaceAsIntPtr(Guid.Empty, Guid.Empty)); }
public void RuntimeEnvironmentSysVersion() { Assert.NotEmpty(RuntimeEnvironment.GetSystemVersion()); }
public void RuntimeEnvironmentRuntimeDirectory() { Assert.True(Directory.Exists(RuntimeEnvironment.GetRuntimeDirectory())); }
public void GetRuntimeInterfaceAsIntPtr_Invoke_ThrowsPlatformNotSupportedException() { #pragma warning disable 618 // GetRuntimeInterfaceAsIntPtr is marked as Obsolete Assert.Throws <PlatformNotSupportedException>(() => RuntimeEnvironment.GetRuntimeInterfaceAsIntPtr(Guid.Empty, Guid.Empty)); #pragma warning restore 618 }