<commit_before>﻿
namespace Bearded.Utilities
{
    /// <summary>
    /// A generic box to keep typesafe to store valuetypes on the heap.
    /// Advantages include reference sharing of a valuetype and atomic access for thread safety.
    /// </summary>
    public sealed class Box<T> where T : struct
    {<commit_msg>added static initialiser for type interference to box<commit_after>
namespace Bearded.Utilities
{
    /// <summary>
    /// Static Box class to help with box creation.
    /// </summary>
    public static class Box
    {
        /// <summary>
        /// Gets a new box witha  given value.
        /// </summary>
        /// <param name="value">The value of the box.</param>
        public static Box<T> This<T>(T value)
            where T : struct
        {
            return new Box<T>(value);
        }
    }

    /// <summary>
    /// A generic box to keep typesafe to store valuetypes on the heap.
    /// Advantages include reference sharing of a valuetype and atomic access for thread safety.
    /// </summary>
    public sealed class Box<T> where T : struct
    {
{'fraction_non_alphanumeric': 0.10531135531135531, 'fraction_numerical': 0.0, 'mean_word_length': 2.0445682451253484, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 18, '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': '4844235', 'n_tokens_mistral': 301, 'n_tokens_neox': 296, 'n_words': 121}