<commit_before>﻿using System;
using System.Collections.Generic;

namespace NAppUpdate.Framework.Conditions
{
	[Serializable]
    public sealed class BooleanCondition : IUpdateCondition
    {
        #region Condition types

        [Flags]
        public enum ConditionType : byte
        {
            AND = 1,
            OR = 2,
            NOT = 4,
        }

        public static ConditionType ConditionTypeFromString(string type)
        {
            if (!string.IsNullOrEmpty(type))
            {
                switch (type.ToLower())
                {
                    case "and":
                        return ConditionType.AND;
                    case "or":
                        return ConditionType.OR;
                    case "not":
                    case "and-not":
                        return ConditionType.AND | ConditionType.NOT;
                    case "or-not":
                        return ConditionType.OR | ConditionType.NOT;
                }
            }

            // Make AND the default condition type
            return ConditionType.AND;
        }
        #endregion

        private class ConditionItem
        {
            public ConditionItem(IUpdateCondition cnd, ConditionType typ)
            {
                this._Condition = cnd;
                this._ConditionType = typ;
            }

            public readonly IUpdateCondition _Condition;
            public readonly ConditionType _ConditionType;
        }

        public BooleanCondition()
        {
            Attributes = new Dictionary<string, string>();
        }

        protected LinkedList<ConditionItem> ChildConditions { get; set; }<commit_msg>Fixing compilation<commit_after>﻿using System;
using System.Collections.Generic;

namespace NAppUpdate.Framework.Conditions
{
	[Serializable]
    public sealed class BooleanCondition : IUpdateCondition
    {
        #region Condition types

        [Flags]
        public enum ConditionType : byte
        {
            AND = 1,
            OR = 2,
            NOT = 4,
        }

        public static ConditionType ConditionTypeFromString(string type)
        {
            if (!string.IsNullOrEmpty(type))
            {
                switch (type.ToLower())
                {
                    case "and":
                        return ConditionType.AND;
                    case "or":
                        return ConditionType.OR;
                    case "not":
                    case "and-not":
                        return ConditionType.AND | ConditionType.NOT;
                    case "or-not":
                        return ConditionType.OR | ConditionType.NOT;
                }
            }

            // Make AND the default condition type
            return ConditionType.AND;
        }
        #endregion

        protected class ConditionItem
        {
            public ConditionItem(IUpdateCondition cnd, ConditionType typ)
            {
                this._Condition = cnd;
                this._ConditionType = typ;
            }

            public readonly IUpdateCondition _Condition;
            public readonly ConditionType _ConditionType;
        }

        public BooleanCondition()
        {
            Attributes = new Dictionary<string, string>();
        }

        protected LinkedList<ConditionItem> ChildConditions { get; set; }
{'fraction_non_alphanumeric': 0.06668651384340578, 'fraction_numerical': 0.0017862459065197975, 'mean_word_length': 1.2950819672131149, 'pattern_counts': {'":': 10, '<': 7, '<?xml version=': 0, '>': 7, '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': '2271788', 'n_tokens_mistral': 771, 'n_tokens_neox': 722, 'n_words': 191}