<commit_before>﻿using System;

namespace Sakuno
{
    public static class OS
    {
        static OperatingSystem r_OS = Environment.OSVersion;

        public static bool IsWindows => r_OS.Platform == PlatformID.Win32NT;
        public static bool Is64Bit => IntPtr.Size == 8;

        public static bool IsWinXPOrLater => r_OS.Version.Major >= 6 || (r_OS.Version.Major == 5 && r_OS.Version.Minor >= 1);
        public static bool IsWin7OrLater => r_OS.Version.Major >= 7 || (r_OS.Version.Major == 6 && r_OS.Version.Minor >= 1);
        public static bool IsWin8OrLater => r_OS.Version.Major >= 7 || (r_OS.Version.Major == 6 && r_OS.Version.Minor >= 2);
        public static bool IsWin81OrLater => r_OS.Version.Major >= 7 || (r_OS.Version.Major == 6 && r_OS.Version.Minor >= 3);
        public static bool IsWin10OrLater => r_OS.Version.Major >= 10;
    }
}
<commit_msg>Property to query .Net Framework release number<commit_after>﻿using Microsoft.Win32;
using System;

namespace Sakuno
{
    public static class OS
    {
        static OperatingSystem r_OS = Environment.OSVersion;

        public static bool IsWindows => r_OS.Platform == PlatformID.Win32NT;
        public static bool Is64Bit => IntPtr.Size == 8;

        public static bool IsWinXPOrLater => r_OS.Version.Major >= 6 || (r_OS.Version.Major == 5 && r_OS.Version.Minor >= 1);
        public static bool IsWin7OrLater => r_OS.Version.Major >= 7 || (r_OS.Version.Major == 6 && r_OS.Version.Minor >= 1);
        public static bool IsWin8OrLater => r_OS.Version.Major >= 7 || (r_OS.Version.Major == 6 && r_OS.Version.Minor >= 2);
        public static bool IsWin81OrLater => r_OS.Version.Major >= 7 || (r_OS.Version.Major == 6 && r_OS.Version.Minor >= 3);
        public static bool IsWin10OrLater => r_OS.Version.Major >= 10;

        public static int? DotNetFrameworkReleaseNumber
        {
            get
            {
                const string rSubKey = @"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\";

                try
                {
                    using (var rRegisterKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32).OpenSubKey(rSubKey))
                    {
                        var rValue = rRegisterKey?.GetValue("Release");

                        return rValue != null ? (int?)rValue : null;
                    }
                }
                catch
                {
                    return null;
                }
            }
        }
    }
}

{'fraction_non_alphanumeric': 0.11467522052927025, 'fraction_numerical': 0.022052927024859663, 'mean_word_length': 2.1304893350062737, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3050738', 'n_tokens_mistral': 819, 'n_tokens_neox': 720, 'n_words': 176}