<commit_before>﻿using System;
using System.Data.Entity;
using Kandanda.BusinessLayer.ServiceImplementations;
using Kandanda.BusinessLayer.ServiceInterfaces;
using Kandanda.Dal;
using Microsoft.Practices.Unity;
using Prism.Modularity;

namespace Kandanda.BusinessLayer
{
    public class ModuleKandandaServices : IModule
    {
        private readonly IUnityContainer _container;

        public ModuleKandandaServices(IUnityContainer container)
        {
            _container = container;
        }

        public KandandaDbContext BuildKandandaContext()
        {
            return new KandandaDbContext(new SampleDataDbInitializer());
        }

        public void Initialize()
        {
            _container
                .RegisterInstance(BuildKandandaContext())
                .RegisterType<IMatchService, MatchService>(new ContainerControlledLifetimeManager())
                .RegisterType<ITournamentService, TournamentService>(new ContainerControlledLifetimeManager())
                .RegisterType<IParticipantService, ParticipantService>(new ContainerControlledLifetimeManager())
                .RegisterType<IPublishTournamentService, PublishTournamentService>(new ContainerControlledLifetimeManager(),
                    new InjectionConstructor(new Uri("https://www.kandanda.ch/"), typeof(IPublishTournamentRequestBuilder)))
                .RegisterType<IPublishTournamentRequestBuilder, PublishTournamentRequestBuilder>(
                    new ContainerControlledLifetimeManager());
        }
    }
}<commit_msg>adding phase service to ModuleKandandaService.cs<commit_after>﻿using System;
using System.Data.Entity;
using Kandanda.BusinessLayer.ServiceImplementations;
using Kandanda.BusinessLayer.ServiceInterfaces;
using Kandanda.Dal;
using Microsoft.Practices.Unity;
using Prism.Modularity;

namespace Kandanda.BusinessLayer
{
    public class ModuleKandandaServices : IModule
    {
        private readonly IUnityContainer _container;

        public ModuleKandandaServices(IUnityContainer container)
        {
            _container = container;
        }

        public KandandaDbContext BuildKandandaContext()
        {
            return new KandandaDbContext(new SampleDataDbInitializer());
        }

        public void Initialize()
        {
            _container
                .RegisterInstance(BuildKandandaContext())
                .RegisterType<IMatchService, MatchService>(new ContainerControlledLifetimeManager())
                .RegisterType<ITournamentService, TournamentService>(new ContainerControlledLifetimeManager())
                .RegisterType<IParticipantService, ParticipantService>(new ContainerControlledLifetimeManager())
                .RegisterType<IPhaseService, PhaseService>(new ContainerControlledLifetimeManager())
                .RegisterType<IPublishTournamentService, PublishTournamentService>(new ContainerControlledLifetimeManager(),
                    new InjectionConstructor(new Uri("https://www.kandanda.ch/"), typeof(IPublishTournamentRequestBuilder)))
                .RegisterType<IPublishTournamentRequestBuilder, PublishTournamentRequestBuilder>(
                    new ContainerControlledLifetimeManager());
        }
    }
}
{'fraction_non_alphanumeric': 0.07054070851460534, 'fraction_numerical': 0.0, 'mean_word_length': 3.292, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '6268878', 'n_tokens_mistral': 804, 'n_tokens_neox': 756, 'n_words': 129}