<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using Elders.Cronus.MessageProcessing;

namespace Elders.Cronus.Projections.Versioning
{
    [DataContract(Name = EventTypeIndexForProjections.ContractId)]
    public class EventTypeIndexForProjections : ISubscriber
    {
        public const string ContractId = "13423df4-b815-421d-a53d-c767b157cc81";
        public const string StateId = "55f9e248-7bb3-4288-8db8-ba9620c67228";
        private readonly HashSet<Type> allEventTypesInTheSystem;
        private readonly IProjectionStore store;
        private readonly ICornusInternalStore internalStore;
        private string currentHash;

        public string Id { get { return nameof(EventTypeIndexForProjections); } }

        public EventTypeIndexForProjections(IEnumerable<Type> allEventTypesInTheSystem, IPublisher<ICommand> publisher, IProjectionStore store, ICornusInternalStore internalStore)
        {
            var hasher = new ProjectionHasher();
            currentHash = hasher.CalculateHash(typeof(EventTypeIndexForProjections));

            var gg = new ProjectionVersion(ContractId, ProjectionStatus.Live, 1, currentHash);
            store.InitializeProjectionStore(gg);

            this.allEventTypesInTheSystem = new HashSet<Type>(allEventTypesInTheSystem);
            this.store = store;
            this.internalStore = internalStore;
        }

        public IEnumerable<Type> GetInvolvedMessageTypes()
        {
            return allEventTypesInTheSystem;
        }

        private ProjectionVersion Version { get { return new ProjectionVersion(ContractId, ProjectionStatus.Live, 1, currentHash); } }

        public void Process(CronusMessage message)
        {
            var indexId = new EventStoreIndexEventTypeId(message.Payload.GetType().GetContractId());<commit_msg>Renamed local variable<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using Elders.Cronus.MessageProcessing;

namespace Elders.Cronus.Projections.Versioning
{
    [DataContract(Name = EventTypeIndexForProjections.ContractId)]
    public class EventTypeIndexForProjections : ISubscriber
    {
        public const string ContractId = "13423df4-b815-421d-a53d-c767b157cc81";
        public const string StateId = "55f9e248-7bb3-4288-8db8-ba9620c67228";
        private readonly HashSet<Type> allEventTypesInTheSystem;
        private readonly IProjectionStore store;
        private readonly ICornusInternalStore internalStore;
        private string currentHash;

        public string Id { get { return nameof(EventTypeIndexForProjections); } }

        public EventTypeIndexForProjections(IEnumerable<Type> allEventTypesInTheSystem, IPublisher<ICommand> publisher, IProjectionStore store, ICornusInternalStore internalStore)
        {
            var hasher = new ProjectionHasher();
            currentHash = hasher.CalculateHash(typeof(EventTypeIndexForProjections));

            var version = new ProjectionVersion(ContractId, ProjectionStatus.Live, 1, currentHash);
            store.InitializeProjectionStore(version);

            this.allEventTypesInTheSystem = new HashSet<Type>(allEventTypesInTheSystem);
            this.store = store;
            this.internalStore = internalStore;
        }

        public IEnumerable<Type> GetInvolvedMessageTypes()
        {
            return allEventTypesInTheSystem;
        }

        private ProjectionVersion Version { get { return new ProjectionVersion(ContractId, ProjectionStatus.Live, 1, currentHash); } }

        public void Process(CronusMessage message)
        {
            var indexId = new EventStoreIndexEventTypeId(message.Payload.GetType().GetContractId());
{'fraction_non_alphanumeric': 0.0723080953628504, 'fraction_numerical': 0.02462667015981137, 'mean_word_length': 3.5834333733493398, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '7151387', 'n_tokens_mistral': 1066, 'n_tokens_neox': 1006, 'n_words': 209}