<commit_before>﻿using Natasha.Template;
using System;

namespace Natasha.Builder
{
    /// <summary>
    /// 一次性方法构建器
    /// </summary>
    /// <typeparam name="TBuilder"></typeparam>
    public class OnceMethodBuilder<TBuilder> : OnceMethodDelegateTemplate<TBuilder> where TBuilder : OnceMethodBuilder<TBuilder>,new()
    {


        //使用默认编译器
        public readonly AssemblyComplier Complier;
        private bool _inCache;
        public OnceMethodBuilder(bool inCache = false)
        {
            _inCache = inCache;
            Complier = new AssemblyComplier();
        }




        /// <summary>
        /// 如果参数为空，则使用默认域
        /// 如果参数不为空，则创建以参数为名字的独立域
        /// </summary>
        /// <param name="domainName">域名</param>
        /// <returns></returns>
        public static TBuilder Create(string domainName = default, bool complieInFile = default)
        {

            TBuilder instance = new TBuilder();
            instance.Complier.ComplieInFile = complieInFile;<commit_msg>Update OnceMethodBuilder.cs<commit_after>﻿using Natasha.Template;
using System;

namespace Natasha.Builder
{
    /// <summary>
    /// 一次性方法构建器
    /// </summary>
    /// <typeparam name="TBuilder"></typeparam>
    public class OnceMethodBuilder<TBuilder> : OnceMethodDelegateTemplate<TBuilder> where TBuilder : OnceMethodBuilder<TBuilder>,new()
    {


        //使用默认编译器
        public readonly AssemblyComplier Complier;
        private bool _inCache;
        public OnceMethodBuilder(bool inCache = false)
        {
            _inCache = inCache;
            Complier = new AssemblyComplier();
        }



        public static TBuilder Default
        {

            get { return Create(); }

        }


        /// <summary>
        /// 如果参数为空，则使用默认域
        /// 如果参数不为空，则创建以参数为名字的独立域
        /// </summary>
        /// <param name="domainName">域名</param>
        /// <returns></returns>
        public static TBuilder Create(string domainName = default, bool complieInFile = default)
        {

            TBuilder instance = new TBuilder();
            instance.Complier.ComplieInFile = complieInFile;
{'fraction_non_alphanumeric': 0.11084793936522976, 'fraction_numerical': 0.0, 'mean_word_length': 2.110456553755523, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '4323719', 'n_tokens_mistral': 640, 'n_tokens_neox': 639, 'n_words': 121}