Smdn.Fundamental.RuntimeInformation version 3.0.3
smdn
released this
12 May 11:20
·
427 commits
to main
since this release
Released package
Release notes
The full release notes are available at gist.
Change log
Change log in this release:
- 2023-05-12 update package version
- 2023-05-11 enable package validation
- 2023-05-11 suppress code analysis warnings
- 2023-05-11 compliant IDE0030; empty the root namespace so that the namespace is determined only by the directory name
- 2023-05-10 use field initializer instead of static ctor
- 2023-04-19 bump Smdn.MSBuild.ProjectAssets.Library up to 1.5.0
API changes
API changes in this release:
diff --git a/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-net45.apilist.cs b/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-net45.apilist.cs
index 2e4ff50d..cb0d7658 100644
--- a/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-net45.apilist.cs
+++ b/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-net45.apilist.cs
@@ -1,49 +1,49 @@
-// Smdn.Fundamental.RuntimeInformation.dll (Smdn.Fundamental.RuntimeInformation-3.0.2)
+// Smdn.Fundamental.RuntimeInformation.dll (Smdn.Fundamental.RuntimeInformation-3.0.3)
// Name: Smdn.Fundamental.RuntimeInformation
-// AssemblyVersion: 3.0.2.0
-// InformationalVersion: 3.0.2+2b7169e01e02e90474ecf7f27e6d37aaa0a385f9
+// AssemblyVersion: 3.0.3.0
+// InformationalVersion: 3.0.3+50cd3a5ddb6026e07a1bf790427b237a96c07bb8
// TargetFramework: .NETFramework,Version=v4.5
// Configuration: Release
// Referenced assemblies:
// System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
#nullable enable annotations
using System;
using System.Runtime.Versioning;
using Smdn;
namespace Smdn {
public enum RuntimeEnvironment : int {
Mono = 2,
NetCore = 3,
NetFx = 1,
Unknown = 0,
}
public static class FrameworkNameUtils {
public static bool TryGetMoniker(FrameworkName? frameworkName, out string? frameworkMoniker) {}
public static bool TryGetMoniker(string? frameworkName, out string? frameworkMoniker) {}
}
[TypeForwardedFrom("Smdn, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null")]
public static class Runtime {
public static bool IsRunningOnDotNet5OrOver { get; }
public static bool IsRunningOnMono { get; }
public static bool IsRunningOnNetCore { get; }
public static bool IsRunningOnNetFx { get; }
[Obsolete("use Smdn.Platform.IsRunningOnUnix")]
public static bool IsRunningOnUnix { get; }
[Obsolete("use Smdn.Platform.IsRunningOnWindows")]
public static bool IsRunningOnWindows { get; }
public static string Name { get; }
public static RuntimeEnvironment RuntimeEnvironment { get; }
public static bool SupportsIanaTimeZoneName { get; }
public static Version? Version { get; }
public static string VersionString { get; }
}
}
-// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.1.7.0.
+// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.2.1.0.
// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.2.0.0 (/~https://github.com/smdn/Smdn.Reflection.ReverseGenerating)
diff --git a/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-net47.apilist.cs b/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-net47.apilist.cs
index e78de301..a892b23d 100644
--- a/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-net47.apilist.cs
+++ b/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-net47.apilist.cs
@@ -1,49 +1,49 @@
-// Smdn.Fundamental.RuntimeInformation.dll (Smdn.Fundamental.RuntimeInformation-3.0.2)
+// Smdn.Fundamental.RuntimeInformation.dll (Smdn.Fundamental.RuntimeInformation-3.0.3)
// Name: Smdn.Fundamental.RuntimeInformation
-// AssemblyVersion: 3.0.2.0
-// InformationalVersion: 3.0.2+2b7169e01e02e90474ecf7f27e6d37aaa0a385f9
+// AssemblyVersion: 3.0.3.0
+// InformationalVersion: 3.0.3+50cd3a5ddb6026e07a1bf790427b237a96c07bb8
// TargetFramework: .NETFramework,Version=v4.7
// Configuration: Release
// Referenced assemblies:
// System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
#nullable enable annotations
using System;
using System.Runtime.Versioning;
using Smdn;
namespace Smdn {
public enum RuntimeEnvironment : int {
Mono = 2,
NetCore = 3,
NetFx = 1,
Unknown = 0,
}
public static class FrameworkNameUtils {
public static bool TryGetMoniker(FrameworkName? frameworkName, out string? frameworkMoniker) {}
public static bool TryGetMoniker(string? frameworkName, out string? frameworkMoniker) {}
}
[TypeForwardedFrom("Smdn, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null")]
public static class Runtime {
public static bool IsRunningOnDotNet5OrOver { get; }
public static bool IsRunningOnMono { get; }
public static bool IsRunningOnNetCore { get; }
public static bool IsRunningOnNetFx { get; }
[Obsolete("use Smdn.Platform.IsRunningOnUnix")]
public static bool IsRunningOnUnix { get; }
[Obsolete("use Smdn.Platform.IsRunningOnWindows")]
public static bool IsRunningOnWindows { get; }
public static string Name { get; }
public static RuntimeEnvironment RuntimeEnvironment { get; }
public static bool SupportsIanaTimeZoneName { get; }
public static Version? Version { get; }
public static string VersionString { get; }
}
}
-// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.1.7.0.
+// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.2.1.0.
// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.2.0.0 (/~https://github.com/smdn/Smdn.Reflection.ReverseGenerating)
diff --git a/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-net6.0.apilist.cs b/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-net6.0.apilist.cs
index 694f7a82..7bba3007 100644
--- a/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-net6.0.apilist.cs
+++ b/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-net6.0.apilist.cs
@@ -1,49 +1,49 @@
-// Smdn.Fundamental.RuntimeInformation.dll (Smdn.Fundamental.RuntimeInformation-3.0.2)
+// Smdn.Fundamental.RuntimeInformation.dll (Smdn.Fundamental.RuntimeInformation-3.0.3)
// Name: Smdn.Fundamental.RuntimeInformation
-// AssemblyVersion: 3.0.2.0
-// InformationalVersion: 3.0.2+2b7169e01e02e90474ecf7f27e6d37aaa0a385f9
+// AssemblyVersion: 3.0.3.0
+// InformationalVersion: 3.0.3+50cd3a5ddb6026e07a1bf790427b237a96c07bb8
// TargetFramework: .NETCoreApp,Version=v6.0
// Configuration: Release
// Referenced assemblies:
// System.Linq, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime.InteropServices.RuntimeInformation, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
#nullable enable annotations
using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.Versioning;
using Smdn;
namespace Smdn {
public enum RuntimeEnvironment : int {
Mono = 2,
NetCore = 3,
NetFx = 1,
Unknown = 0,
}
public static class FrameworkNameUtils {
public static bool TryGetMoniker(FrameworkName? frameworkName, [NotNullWhen(true)] out string? frameworkMoniker) {}
public static bool TryGetMoniker(string? frameworkName, [NotNullWhen(true)] out string? frameworkMoniker) {}
}
[TypeForwardedFrom("Smdn, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null")]
public static class Runtime {
public static bool IsRunningOnDotNet5OrOver { get; }
public static bool IsRunningOnMono { get; }
public static bool IsRunningOnNetCore { get; }
public static bool IsRunningOnNetFx { get; }
[Obsolete("use Smdn.Platform.IsRunningOnUnix")]
public static bool IsRunningOnUnix { get; }
[Obsolete("use Smdn.Platform.IsRunningOnWindows")]
public static bool IsRunningOnWindows { get; }
public static string Name { get; }
public static RuntimeEnvironment RuntimeEnvironment { get; }
public static bool SupportsIanaTimeZoneName { get; }
public static Version? Version { get; }
public static string VersionString { get; }
}
}
-// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.1.7.0.
+// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.2.1.0.
// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.2.0.0 (/~https://github.com/smdn/Smdn.Reflection.ReverseGenerating)
diff --git a/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-netstandard1.1.apilist.cs b/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-netstandard1.1.apilist.cs
index 24050f99..29d0011a 100644
--- a/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-netstandard1.1.apilist.cs
+++ b/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-netstandard1.1.apilist.cs
@@ -1,42 +1,42 @@
-// Smdn.Fundamental.RuntimeInformation.dll (Smdn.Fundamental.RuntimeInformation-3.0.2)
+// Smdn.Fundamental.RuntimeInformation.dll (Smdn.Fundamental.RuntimeInformation-3.0.3)
// Name: Smdn.Fundamental.RuntimeInformation
-// AssemblyVersion: 3.0.2.0
-// InformationalVersion: 3.0.2+2b7169e01e02e90474ecf7f27e6d37aaa0a385f9
+// AssemblyVersion: 3.0.3.0
+// InformationalVersion: 3.0.3+50cd3a5ddb6026e07a1bf790427b237a96c07bb8
// TargetFramework: .NETStandard,Version=v1.1
// Configuration: Release
// Referenced assemblies:
// System.Reflection, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
#nullable enable annotations
using System;
using Smdn;
namespace Smdn {
public enum RuntimeEnvironment : int {
Mono = 2,
NetCore = 3,
NetFx = 1,
Unknown = 0,
}
[TypeForwardedFrom("Smdn, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null")]
public static class Runtime {
public static bool IsRunningOnDotNet5OrOver { get; }
public static bool IsRunningOnMono { get; }
public static bool IsRunningOnNetCore { get; }
public static bool IsRunningOnNetFx { get; }
[Obsolete("use Smdn.Platform.IsRunningOnUnix")]
public static bool IsRunningOnUnix { get; }
[Obsolete("use Smdn.Platform.IsRunningOnWindows")]
public static bool IsRunningOnWindows { get; }
public static string Name { get; }
public static RuntimeEnvironment RuntimeEnvironment { get; }
public static bool SupportsIanaTimeZoneName { get; }
public static Version? Version { get; }
public static string VersionString { get; }
}
}
-// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.1.7.0.
+// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.2.1.0.
// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.2.0.0 (/~https://github.com/smdn/Smdn.Reflection.ReverseGenerating)
diff --git a/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-netstandard1.3.apilist.cs b/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-netstandard1.3.apilist.cs
index 46c3574e..2ea49592 100644
--- a/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-netstandard1.3.apilist.cs
+++ b/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-netstandard1.3.apilist.cs
@@ -1,49 +1,49 @@
-// Smdn.Fundamental.RuntimeInformation.dll (Smdn.Fundamental.RuntimeInformation-3.0.2)
+// Smdn.Fundamental.RuntimeInformation.dll (Smdn.Fundamental.RuntimeInformation-3.0.3)
// Name: Smdn.Fundamental.RuntimeInformation
-// AssemblyVersion: 3.0.2.0
-// InformationalVersion: 3.0.2+2b7169e01e02e90474ecf7f27e6d37aaa0a385f9
+// AssemblyVersion: 3.0.3.0
+// InformationalVersion: 3.0.3+50cd3a5ddb6026e07a1bf790427b237a96c07bb8
// TargetFramework: .NETStandard,Version=v1.3
// Configuration: Release
// Referenced assemblies:
// System.Reflection, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime.Extensions, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
#nullable enable annotations
using System;
using System.Runtime.Versioning;
using Smdn;
namespace Smdn {
public enum RuntimeEnvironment : int {
Mono = 2,
NetCore = 3,
NetFx = 1,
Unknown = 0,
}
public static class FrameworkNameUtils {
public static bool TryGetMoniker(FrameworkName? frameworkName, out string? frameworkMoniker) {}
public static bool TryGetMoniker(string? frameworkName, out string? frameworkMoniker) {}
}
[TypeForwardedFrom("Smdn, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null")]
public static class Runtime {
public static bool IsRunningOnDotNet5OrOver { get; }
public static bool IsRunningOnMono { get; }
public static bool IsRunningOnNetCore { get; }
public static bool IsRunningOnNetFx { get; }
[Obsolete("use Smdn.Platform.IsRunningOnUnix")]
public static bool IsRunningOnUnix { get; }
[Obsolete("use Smdn.Platform.IsRunningOnWindows")]
public static bool IsRunningOnWindows { get; }
public static string Name { get; }
public static RuntimeEnvironment RuntimeEnvironment { get; }
public static bool SupportsIanaTimeZoneName { get; }
public static Version? Version { get; }
public static string VersionString { get; }
}
}
-// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.1.7.0.
+// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.2.1.0.
// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.2.0.0 (/~https://github.com/smdn/Smdn.Reflection.ReverseGenerating)
diff --git a/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-netstandard1.5.apilist.cs b/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-netstandard1.5.apilist.cs
index 3bf02be5..8779e5f2 100644
--- a/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-netstandard1.5.apilist.cs
+++ b/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-netstandard1.5.apilist.cs
@@ -1,50 +1,50 @@
-// Smdn.Fundamental.RuntimeInformation.dll (Smdn.Fundamental.RuntimeInformation-3.0.2)
+// Smdn.Fundamental.RuntimeInformation.dll (Smdn.Fundamental.RuntimeInformation-3.0.3)
// Name: Smdn.Fundamental.RuntimeInformation
-// AssemblyVersion: 3.0.2.0
-// InformationalVersion: 3.0.2+2b7169e01e02e90474ecf7f27e6d37aaa0a385f9
+// AssemblyVersion: 3.0.3.0
+// InformationalVersion: 3.0.3+50cd3a5ddb6026e07a1bf790427b237a96c07bb8
// TargetFramework: .NETStandard,Version=v1.5
// Configuration: Release
// Referenced assemblies:
// System.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Reflection, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime.Extensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
#nullable enable annotations
using System;
using System.Runtime.Versioning;
using Smdn;
namespace Smdn {
public enum RuntimeEnvironment : int {
Mono = 2,
NetCore = 3,
NetFx = 1,
Unknown = 0,
}
public static class FrameworkNameUtils {
public static bool TryGetMoniker(FrameworkName? frameworkName, out string? frameworkMoniker) {}
public static bool TryGetMoniker(string? frameworkName, out string? frameworkMoniker) {}
}
[TypeForwardedFrom("Smdn, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null")]
public static class Runtime {
public static bool IsRunningOnDotNet5OrOver { get; }
public static bool IsRunningOnMono { get; }
public static bool IsRunningOnNetCore { get; }
public static bool IsRunningOnNetFx { get; }
[Obsolete("use Smdn.Platform.IsRunningOnUnix")]
public static bool IsRunningOnUnix { get; }
[Obsolete("use Smdn.Platform.IsRunningOnWindows")]
public static bool IsRunningOnWindows { get; }
public static string Name { get; }
public static RuntimeEnvironment RuntimeEnvironment { get; }
public static bool SupportsIanaTimeZoneName { get; }
public static Version? Version { get; }
public static string VersionString { get; }
}
}
-// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.1.7.0.
+// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.2.1.0.
// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.2.0.0 (/~https://github.com/smdn/Smdn.Reflection.ReverseGenerating)
diff --git a/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-netstandard1.6.apilist.cs b/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-netstandard1.6.apilist.cs
index 1bc8a0a5..bc71ddd1 100644
--- a/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-netstandard1.6.apilist.cs
+++ b/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-netstandard1.6.apilist.cs
@@ -1,51 +1,51 @@
-// Smdn.Fundamental.RuntimeInformation.dll (Smdn.Fundamental.RuntimeInformation-3.0.2)
+// Smdn.Fundamental.RuntimeInformation.dll (Smdn.Fundamental.RuntimeInformation-3.0.3)
// Name: Smdn.Fundamental.RuntimeInformation
-// AssemblyVersion: 3.0.2.0
-// InformationalVersion: 3.0.2+2b7169e01e02e90474ecf7f27e6d37aaa0a385f9
+// AssemblyVersion: 3.0.3.0
+// InformationalVersion: 3.0.3+50cd3a5ddb6026e07a1bf790427b237a96c07bb8
// TargetFramework: .NETStandard,Version=v1.6
// Configuration: Release
// Referenced assemblies:
// System.AppContext, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Linq, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Reflection, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime.Extensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
#nullable enable annotations
using System;
using System.Runtime.Versioning;
using Smdn;
namespace Smdn {
public enum RuntimeEnvironment : int {
Mono = 2,
NetCore = 3,
NetFx = 1,
Unknown = 0,
}
public static class FrameworkNameUtils {
public static bool TryGetMoniker(FrameworkName? frameworkName, out string? frameworkMoniker) {}
public static bool TryGetMoniker(string? frameworkName, out string? frameworkMoniker) {}
}
[TypeForwardedFrom("Smdn, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null")]
public static class Runtime {
public static bool IsRunningOnDotNet5OrOver { get; }
public static bool IsRunningOnMono { get; }
public static bool IsRunningOnNetCore { get; }
public static bool IsRunningOnNetFx { get; }
[Obsolete("use Smdn.Platform.IsRunningOnUnix")]
public static bool IsRunningOnUnix { get; }
[Obsolete("use Smdn.Platform.IsRunningOnWindows")]
public static bool IsRunningOnWindows { get; }
public static string Name { get; }
public static RuntimeEnvironment RuntimeEnvironment { get; }
public static bool SupportsIanaTimeZoneName { get; }
public static Version? Version { get; }
public static string VersionString { get; }
}
}
-// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.1.7.0.
+// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.2.1.0.
// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.2.0.0 (/~https://github.com/smdn/Smdn.Reflection.ReverseGenerating)
diff --git a/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-netstandard2.0.apilist.cs b/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-netstandard2.0.apilist.cs
index ef8942be..ffa91e3c 100644
--- a/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-netstandard2.0.apilist.cs
+++ b/doc/api-list/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation-netstandard2.0.apilist.cs
@@ -1,46 +1,46 @@
-// Smdn.Fundamental.RuntimeInformation.dll (Smdn.Fundamental.RuntimeInformation-3.0.2)
+// Smdn.Fundamental.RuntimeInformation.dll (Smdn.Fundamental.RuntimeInformation-3.0.3)
// Name: Smdn.Fundamental.RuntimeInformation
-// AssemblyVersion: 3.0.2.0
-// InformationalVersion: 3.0.2+2b7169e01e02e90474ecf7f27e6d37aaa0a385f9
+// AssemblyVersion: 3.0.3.0
+// InformationalVersion: 3.0.3+50cd3a5ddb6026e07a1bf790427b237a96c07bb8
// TargetFramework: .NETStandard,Version=v2.0
// Configuration: Release
// Referenced assemblies:
// netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
#nullable enable annotations
using System;
using System.Runtime.Versioning;
using Smdn;
namespace Smdn {
public enum RuntimeEnvironment : int {
Mono = 2,
NetCore = 3,
NetFx = 1,
Unknown = 0,
}
public static class FrameworkNameUtils {
public static bool TryGetMoniker(FrameworkName? frameworkName, out string? frameworkMoniker) {}
public static bool TryGetMoniker(string? frameworkName, out string? frameworkMoniker) {}
}
[TypeForwardedFrom("Smdn, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null")]
public static class Runtime {
public static bool IsRunningOnDotNet5OrOver { get; }
public static bool IsRunningOnMono { get; }
public static bool IsRunningOnNetCore { get; }
public static bool IsRunningOnNetFx { get; }
[Obsolete("use Smdn.Platform.IsRunningOnUnix")]
public static bool IsRunningOnUnix { get; }
[Obsolete("use Smdn.Platform.IsRunningOnWindows")]
public static bool IsRunningOnWindows { get; }
public static string Name { get; }
public static RuntimeEnvironment RuntimeEnvironment { get; }
public static bool SupportsIanaTimeZoneName { get; }
public static Version? Version { get; }
public static string VersionString { get; }
}
}
-// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.1.7.0.
+// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.2.1.0.
// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.2.0.0 (/~https://github.com/smdn/Smdn.Reflection.ReverseGenerating)
Full changes
Full changes in this release:
diff --git a/src/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation.csproj b/src/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation.csproj
index 51f5c26a..bcbab2ba 100644
--- a/src/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation.csproj
+++ b/src/Smdn.Fundamental.RuntimeInformation/Smdn.Fundamental.RuntimeInformation.csproj
@@ -6,10 +6,12 @@ SPDX-License-Identifier: MIT
<PropertyGroup>
<TargetFrameworks>net6.0;net47;net45;netstandard2.0;netstandard1.6;netstandard1.5;netstandard1.3;netstandard1.1</TargetFrameworks>
<RootNamespace>Smdn</RootNamespace>
- <VersionPrefix>3.0.2</VersionPrefix>
+ <VersionPrefix>3.0.3</VersionPrefix>
<VersionSuffix></VersionSuffix>
- <!-- <PackageValidationBaselineVersion>3.0.0</PackageValidationBaselineVersion> -->
+ <PackageValidationBaselineVersion>3.0.0</PackageValidationBaselineVersion>
<Nullable>enable</Nullable>
+ <EnableTrimAnalyzer>false</EnableTrimAnalyzer>
+ <RootNamespace/> <!-- empty the root namespace so that the namespace is determined only by the directory name, for code style rule IDE0030 -->
</PropertyGroup>
<PropertyGroup Label="assembly attributes">
diff --git a/src/Smdn.Fundamental.RuntimeInformation/Smdn/Runtime.cs b/src/Smdn.Fundamental.RuntimeInformation/Smdn/Runtime.cs
index c767c764..e0ad8f03 100644
--- a/src/Smdn.Fundamental.RuntimeInformation/Smdn/Runtime.cs
+++ b/src/Smdn.Fundamental.RuntimeInformation/Smdn/Runtime.cs
@@ -1,6 +1,7 @@
// SPDX-FileCopyrightText: 2009 smdn <smdn@smdn.jp>
// SPDX-License-Identifier: MIT
using System;
+using System.Collections.Generic;
#if SYSTEM_ASSEMBLY_GETREFERENCEDASSEMBLIES
using System.Linq;
#endif
@@ -11,34 +12,36 @@ using System.Threading;
namespace Smdn;
[System.Runtime.CompilerServices.TypeForwardedFrom("Smdn, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null")]
+#pragma warning disable CA1724
public static partial class Runtime {
+#pragma warning restore CA1724
internal static readonly Version RuntimeVersionNET5 = new(5, 0);
- public static RuntimeEnvironment RuntimeEnvironment { get; }
- public static string Name { get; }
+ // use KeyValuePair`2 instead since ValueTuple`2 cannot be used
+ private static readonly KeyValuePair<RuntimeEnvironment, string> RuntimeEnvironmentAndName = GetRuntimeEnvironmentAndName();
- private static readonly Lazy<Version?> lazyVersion;
+ public static RuntimeEnvironment RuntimeEnvironment => RuntimeEnvironmentAndName.Key;
+ public static string Name => RuntimeEnvironmentAndName.Value;
+
+ private static readonly Lazy<Version?> lazyVersion = new(GetRuntimeVersion, LazyThreadSafetyMode.PublicationOnly);
public static Version? Version => lazyVersion.Value;
- static Runtime()
+ private static KeyValuePair<RuntimeEnvironment, string> GetRuntimeEnvironmentAndName()
{
- lazyVersion = new(GetRuntimeVersion, LazyThreadSafetyMode.PublicationOnly);
+ static bool FrameworkDescriptionContains(string value)
+ => RuntimeInformation.FrameworkDescription
+#if SYSTEM_STRING_CONTAINS_STRING_STRINGCOMPARISON
+ .Contains(value, StringComparison.Ordinal);
+#else
+ .Contains(value);
+#endif
- if (RuntimeInformation.FrameworkDescription.Contains(".NET Framework")) {
- RuntimeEnvironment = RuntimeEnvironment.NetFx;
- Name = ".NET Framework";
- return;
- }
- else if (RuntimeInformation.FrameworkDescription.Contains(".NET Core")) {
- RuntimeEnvironment = RuntimeEnvironment.NetCore;
- Name = ".NET Core";
- return;
- }
- else if (RuntimeInformation.FrameworkDescription.Contains("Mono")) {
- RuntimeEnvironment = RuntimeEnvironment.Mono;
- Name = "Mono";
- return;
- }
+ if (FrameworkDescriptionContains(".NET Framework"))
+ return new(RuntimeEnvironment.NetFx, ".NET Framework");
+ if (FrameworkDescriptionContains(".NET Core"))
+ return new(RuntimeEnvironment.NetCore, ".NET Core");
+ if (FrameworkDescriptionContains("Mono"))
+ return new(RuntimeEnvironment.Mono, "Mono");
var clr = RuntimeEnvironment.Unknown;
string? name = null;
@@ -77,8 +80,10 @@ public static partial class Runtime {
}
#endif
- RuntimeEnvironment = clr;
- Name = name ?? ".NET compatible runtime"; // fallback
+ return new(
+ clr,
+ name ?? ".NET compatible runtime" // fallback
+ );
#if SYSTEM_ASSEMBLY_GETREFERENCEDASSEMBLIES
static bool IsAssemblyNameSystemRuntime(AssemblyName n)
Notes
Full Changelog: releases/Smdn.Fundamental.RuntimeInformation-3.0.2...releases/Smdn.Fundamental.RuntimeInformation-3.0.3