<commit_before>﻿using System;
using System.Drawing;
using System.Reflection;
using System.Globalization;
using System.IO;
using System.Text;
using System.Runtime.InteropServices;

namespace Datakido.FileSplitStrategyEngine
{
    /// <exclude/>
    public class Common
    {
        /// <summary>
        /// Gets the large icon.
        /// </summary>
        /// <param name="fileName">Name of the file.</param>
        /// <returns></returns>
        public static Icon GetLargeIcon(string fileName)
        {
            // Get the large generic file icon.
            var shfi = new Shell32.SHFILEINFO();
            Shell32.SHGetFileInfo(fileName, Shell32.FILE_ATTRIBUTE_NORMAL, ref shfi, Convert.ToUInt32(Marshal.SizeOf(shfi)), Convert.ToUInt32(Convert.ToInt32(Shell32.SHGFI_USEFILEATTRIBUTES) | Convert.ToInt32(Shell32.SHGFI_ICON)));

            Icon icon = Icon.FromHandle(shfi.hIcon);

            return icon;
        }

        /// <summary>
        /// Determines whether the specified input string is integer.
        /// </summary>
        /// <param name="inputString">The input string.</param>
        /// <returns>
        ///   <c>true</c> if the specified input string is integer; otherwise, <c>false</c>.
        /// </returns>
        public static bool IsInteger(string inputString)
        {
            int number;

            bool isNumber = int.TryParse(inputString, out number);

            return isNumber;
        }

        /// <summary>
        /// Gets the default file pattern.
        /// </summary>
        public static string DefaultFilePattern
        {
            get { return "[FILENAME]-[SEQUENCE:0].[EXT]"; }
        }

        /// <summary>
        /// Gets the version number.
        /// </summary>
        public static string VersionNumber
        {
            get
            {
                string major = Assembly.GetExecutingAssembly().GetName().Version.Major.ToString(CultureInfo.InvariantCulture);
                string minor = Assembly.GetExecutingAssembly().GetName().Version.Minor.ToString(CultureInfo.InvariantCulture);<commit_msg>Testing TravisCI integration.<commit_after>﻿using System;
using System.Drawing;
using System.Reflection;
using System.Globalization;
using System.IO;
using System.Text;
using System.Runtime.InteropServices;

namespace Datakido.FileSplitStrategyEngine
{
    /// <exclude/>
    public class Common
    {
        /// <summary>
        /// Gets the large icon.
        /// </summary>
        /// <param name="fileName">Name of the file.</param>
        /// <returns></returns>
        public static Icon GetLargeIcon(string fileName)
        {
            // Get the large generic file icon.
            var shfi = new Shell32.SHFILEINFO();
            Shell32.SHGetFileInfo(fileName, Shell32.FILE_ATTRIBUTE_NORMAL, ref shfi, Convert.ToUInt32(Marshal.SizeOf(shfi)), Convert.ToUInt32(Convert.ToInt32(Shell32.SHGFI_USEFILEATTRIBUTES) | Convert.ToInt32(Shell32.SHGFI_ICON)));

            Icon icon = Icon.FromHandle(shfi.hIcon);

            return icon;
        }

        /// <summary>
        /// Determines whether the specified input string is integer.
        /// </summary>
        /// <param name="inputString">The input string.</param>
        /// <returns>
        ///   <c>true</c> if the specified input string is integer; otherwise, <c>false</c>.
        /// </returns>
        public static bool IsInteger(string inputString)
        {
            int number;

            bool isNumber = int.TryParse(inputString, out number);

            return isNumber;
        }

        /// <summary>
        /// Gets the default file pattern.
        /// </summary>
        public static string DefaultFilePattern => "[FILENAME]-[SEQUENCE:0].[EXT]";

        /// <summary>
        /// Gets the version number.
        /// </summary>
        public static string VersionNumber
        {
            get
            {
                string major = Assembly.GetExecutingAssembly().GetName().Version.Major.ToString(CultureInfo.InvariantCulture);
                string minor = Assembly.GetExecutingAssembly().GetName().Version.Minor.ToString(CultureInfo.InvariantCulture);
{'fraction_non_alphanumeric': 0.11983669548511047, 'fraction_numerical': 0.009125840537944284, 'mean_word_length': 2.0468178493050475, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 46, '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': '4019271', 'n_tokens_mistral': 1128, 'n_tokens_neox': 1088, 'n_words': 259}