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

namespace Benchmarking
{
    /// <summary>
    /// Saga repository only for benchmarking. 
    /// Does not really store anything
    /// </summary>
    internal class FastSagaRepository : ISagaRepository
    {
        private readonly ISagaFactory sagaFactory;

        public FastSagaRepository(ISagaFactory sagaFactory)
        {
            this.sagaFactory = sagaFactory;
        }


        public TSaga Find<TSaga>(Guid correlationId) where TSaga : class
        {
            if (correlationId == Program.FirstGuid)
            {
                return null;
            }

            var saga = sagaFactory.Resolve<TSaga>();
            Reflection.Set(saga, "CorrelationId", correlationId);

            return saga;
        }

        public void Save<TSaga>(TSaga saga) where TSaga : class
        {
            // nothing
        }

        public void Complete<TSaga>(TSaga saga) where TSaga : class
        {
            // nothing
        }

        public void Complete(Guid correlationId)
        {
            // nothing
        }
    }
}
<commit_msg>Fix build error after merge<commit_after>﻿using System;
using System.Collections.Generic;
using NSaga;

namespace Benchmarking
{
    /// <summary>
    /// Saga repository only for benchmarking. 
    /// Does not really store anything
    /// </summary>
    internal class FastSagaRepository : ISagaRepository
    {
        private readonly ISagaFactory sagaFactory;

        public FastSagaRepository(ISagaFactory sagaFactory)
        {
            this.sagaFactory = sagaFactory;
        }


        public TSaga Find<TSaga>(Guid correlationId) where TSaga : class, IAccessibleSaga
        {
            if (correlationId == Program.FirstGuid)
            {
                return null;
            }

            var saga = sagaFactory.ResolveSaga<TSaga>();
            Reflection.Set(saga, "CorrelationId", correlationId);

            return saga;
        }

        public void Save<TSaga>(TSaga saga) where TSaga : class, IAccessibleSaga
        {
            // nothing
        }

        public void Complete<TSaga>(TSaga saga) where TSaga : class, IAccessibleSaga
        {
            // nothing
        }

        public void Complete(Guid correlationId)
        {
            // nothing
        }
    }
}

{'fraction_non_alphanumeric': 0.08160676532769556, 'fraction_numerical': 0.0, 'mean_word_length': 1.713302752293578, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '5553832', 'n_tokens_mistral': 647, 'n_tokens_neox': 596, 'n_words': 155}