<commit_before>/*
 * Copyright (c) .NET Foundation and Contributors
 *
 * This software may be modified and distributed under the terms
 * of the MIT license.  See the LICENSE file for details.
 *
 * http://github.com/piranhacms/piranha
 *
 */

using Microsoft.EntityFrameworkCore;
using System;
using System.Linq;

namespace Piranha
{
    public abstract class Db<T> : DbContext, IDb where T : Db<T>
    {
        /// <summary>
        /// Gets/sets whether the db context as been initialized. This
        /// is only performed once in the application lifecycle.
        /// </summary>
        private static volatile bool IsInitialized = false;

        /// <summary>
        /// The object mutext used for initializing the context.
        /// </summary>
        private static readonly object Mutex = new object();

        /// <summary>
        /// Gets/sets the alias set.
        /// </summary>
        public DbSet<Data.Alias> Aliases { get; set; }

        /// <summary>
        /// Gets/sets the block set.
        /// </summary>
        public DbSet<Data.Block> Blocks { get; set; }

        /// <summary>
        /// Gets/sets the block field set.
        /// </summary>
        public DbSet<Data.BlockField> BlockFields { get; set; }

        /// <summary>
        /// Gets/sets the category set.
        /// </summary>
        public DbSet<Data.Category> Categories { get; set; }

        /// <summary>
        /// Gets/sets the content set.
        /// </summary>
        public DbSet<Data.Content> Content { get; set; }

        /// <summary>
        /// Gets/sets the content block set.<commit_msg>Fixes typo<commit_after>/*
 * Copyright (c) .NET Foundation and Contributors
 *
 * This software may be modified and distributed under the terms
 * of the MIT license.  See the LICENSE file for details.
 *
 * http://github.com/piranhacms/piranha
 *
 */

using Microsoft.EntityFrameworkCore;
using System;
using System.Linq;

namespace Piranha
{
    public abstract class Db<T> : DbContext, IDb where T : Db<T>
    {
        /// <summary>
        /// Gets/sets whether the db context as been initialized. This
        /// is only performed once in the application lifecycle.
        /// </summary>
        private static volatile bool IsInitialized = false;

        /// <summary>
        /// The object mutex used for initializing the context.
        /// </summary>
        private static readonly object Mutex = new object();

        /// <summary>
        /// Gets/sets the alias set.
        /// </summary>
        public DbSet<Data.Alias> Aliases { get; set; }

        /// <summary>
        /// Gets/sets the block set.
        /// </summary>
        public DbSet<Data.Block> Blocks { get; set; }

        /// <summary>
        /// Gets/sets the block field set.
        /// </summary>
        public DbSet<Data.BlockField> BlockFields { get; set; }

        /// <summary>
        /// Gets/sets the category set.
        /// </summary>
        public DbSet<Data.Category> Categories { get; set; }

        /// <summary>
        /// Gets/sets the content set.
        /// </summary>
        public DbSet<Data.Content> Content { get; set; }

        /// <summary>
        /// Gets/sets the content block set.
{'fraction_non_alphanumeric': 0.12701363073110286, 'fraction_numerical': 0.0, 'mean_word_length': 1.7692967409948541, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 47, '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': '2329529', 'n_tokens_mistral': 901, 'n_tokens_neox': 870, 'n_words': 298}