<commit_before>﻿
using System;

namespace Advasoft.CmdArgsTool
{
    public abstract class OptionsFactoryBase
    {
        protected IOptionsPolicy _creationPolicy;
        private ILogger _logger;

        protected OptionsFactoryBase(IOptionsPolicy creationPolicy, ILogger logger)
        {
            _creationPolicy = creationPolicy;
            _logger = logger;
        }

        public OptionsBase CreateOptions(string[] cmdArgsArray)
        {
            try
            {
                return CreateOptionsByPolicy(cmdArgsArray, _creationPolicy);
            }
            catch(Exception exception)
            {
                _logger.LogError(exception);
            }

            throw new ApplicationException("Invalid parse cmd arguments");
        }

        protected abstract OptionsBase CreateOptionsByPolicy(string[] cmdArgsArray,
            IOptionsPolicy creationPolicy);
    }
}
<commit_msg>Easy refactor. Move concrete method 'CreateOptions' to end of class<commit_after>﻿
using System;

namespace Advasoft.CmdArgsTool
{
    public abstract class OptionsFactoryBase
    {
        protected IOptionsPolicy _creationPolicy;
        private ILogger _logger;

        protected OptionsFactoryBase(IOptionsPolicy creationPolicy, ILogger logger)
        {
            _creationPolicy = creationPolicy;
            _logger = logger;
        }

        protected abstract OptionsBase CreateOptionsByPolicy(string[] cmdArgsArray,
            IOptionsPolicy creationPolicy);

        public OptionsBase CreateOptions(string[] cmdArgsArray)
        {
            try
            {
                return CreateOptionsByPolicy(cmdArgsArray, _creationPolicy);
            }
            catch (Exception exception)
            {
                _logger.LogError(exception);
            }

            throw new ApplicationException("Invalid parse cmd arguments");
        }
    }
}

{'fraction_non_alphanumeric': 0.05628616517622304, 'fraction_numerical': 0.0, 'mean_word_length': 2.057877813504823, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3837261', 'n_tokens_mistral': 442, 'n_tokens_neox': 426, 'n_words': 106}