<commit_before>﻿using System;
using System.Collections.Generic;
using Hadouken.Common.JsonRpc;
using Hadouken.Extensions.AutoMove.Data;
using Hadouken.Extensions.AutoMove.Data.Models;

namespace Hadouken.Extensions.AutoMove.Services
{
    public sealed class AutoMoveServices : IJsonRpcService
    {
        private readonly IAutoMoveRepository _autoMoveRepository;

        public AutoMoveServices(IAutoMoveRepository autoMoveRepository)
        {
            if (autoMoveRepository == null) throw new ArgumentNullException("autoMoveRepository");
            _autoMoveRepository = autoMoveRepository;
        }

        [JsonRpcMethod("automove.rules.create")]
        public Rule CreateRule(Rule rule)
        {
            _autoMoveRepository.CreateRule(rule);
            return rule;
        }

        [JsonRpcMethod("automove.parameters.create")]
        public Parameter CreateParameter(Parameter parameter)
        {
            _autoMoveRepository.CreateParameter(parameter);
            return parameter;
        }

        [JsonRpcMethod("automove.rules.delete")]
        public void DeleteRule(int ruleId)
        {
            _autoMoveRepository.DeleteRule(ruleId);
        }

        [JsonRpcMethod("automove.parameters.delete")]
        public void DeleteParameter(int parameterId)
        {
            _autoMoveRepository.DeleteParameter(parameterId);
        }

        [JsonRpcMethod("automove.rules.update")]
        public void UpdateRule(Rule rule)
        {
            _autoMoveRepository.UpdateRule(rule);
        }

        [JsonRpcMethod("automove.parameters.update")]
        public void UpdateParameter(Parameter parameter)
        {
            _autoMoveRepository.UpdateParameter(parameter);
        }

        [JsonRpcMethod("automove.parameters.getByRuleId")]
        public IEnumerable<Parameter> GetByRuleId(int ruleId)
        {
            return _autoMoveRepository.GetParametersByRuleId(ruleId);
        }
    }
}
<commit_msg>Added missing JSONRPC service.<commit_after>﻿using System;
using System.Collections.Generic;
using Hadouken.Common.JsonRpc;
using Hadouken.Extensions.AutoMove.Data;
using Hadouken.Extensions.AutoMove.Data.Models;

namespace Hadouken.Extensions.AutoMove.Services
{
    public sealed class AutoMoveServices : IJsonRpcService
    {
        private readonly IAutoMoveRepository _autoMoveRepository;

        public AutoMoveServices(IAutoMoveRepository autoMoveRepository)
        {
            if (autoMoveRepository == null) throw new ArgumentNullException("autoMoveRepository");
            _autoMoveRepository = autoMoveRepository;
        }

        [JsonRpcMethod("automove.rules.create")]
        public Rule CreateRule(Rule rule)
        {
            _autoMoveRepository.CreateRule(rule);
            return rule;
        }

        [JsonRpcMethod("automove.parameters.create")]
        public Parameter CreateParameter(Parameter parameter)
        {
            _autoMoveRepository.CreateParameter(parameter);
            return parameter;
        }

        [JsonRpcMethod("automove.rules.delete")]
        public void DeleteRule(int ruleId)
        {
            _autoMoveRepository.DeleteRule(ruleId);
        }

        [JsonRpcMethod("automove.parameters.delete")]
        public void DeleteParameter(int parameterId)
        {
            _autoMoveRepository.DeleteParameter(parameterId);
        }

        [JsonRpcMethod("automove.rules.update")]
        public void UpdateRule(Rule rule)
        {
            _autoMoveRepository.UpdateRule(rule);
        }

        [JsonRpcMethod("automove.parameters.update")]
        public void UpdateParameter(Parameter parameter)
        {
            _autoMoveRepository.UpdateParameter(parameter);
        }

        [JsonRpcMethod("automove.parameters.getByRuleId")]
        public IEnumerable<Parameter> GetByRuleId(int ruleId)
        {
            return _autoMoveRepository.GetParametersByRuleId(ruleId);
        }

        [JsonRpcMethod("automove.rules.getAll")]
        public IEnumerable<Rule> GetRules()
        {
            return _autoMoveRepository.GetRules();
        } 
    }
}

{'fraction_non_alphanumeric': 0.0797834784655213, 'fraction_numerical': 0.0, 'mean_word_length': 2.3048211508553655, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '676745', 'n_tokens_mistral': 1091, 'n_tokens_neox': 1048, 'n_words': 167}