<commit_before>#region (c) 2010-2011 Lokad - CQRS for Windows Azure - New BSD License 

// Copyright (c) Lokad 2010-2011, http://www.lokad.com
// This code is released as Open Source under the terms of the New BSD Licence

#endregion

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Lokad.Cqrs.Build.Events;

namespace Lokad.Cqrs.Build
{
    public sealed class CqrsEngineHost : IDisposable
    {
        readonly ICollection<IEngineProcess> _serverProcesses;

        readonly Stack<IDisposable> _disposables = new Stack<IDisposable>(); 
        public CqrsEngineHost(ICollection<IEngineProcess> serverProcesses)
        {
            _serverProcesses = serverProcesses;

            foreach (var engineProcess in serverProcesses)
            {
                _disposables.Push(engineProcess);
            }
        }

        public void RunForever()
        {
            var token = new CancellationTokenSource();
            Start(token.Token);<commit_msg>Made disposables method on Engine public<commit_after>#region (c) 2010-2011 Lokad - CQRS for Windows Azure - New BSD License 

// Copyright (c) Lokad 2010-2011, http://www.lokad.com
// This code is released as Open Source under the terms of the New BSD Licence

#endregion

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Lokad.Cqrs.Build.Events;

namespace Lokad.Cqrs.Build
{
    public sealed class CqrsEngineHost : IDisposable
    {
        readonly ICollection<IEngineProcess> _serverProcesses;

        readonly Stack<IDisposable> _disposables = new Stack<IDisposable>(); 
        public CqrsEngineHost(ICollection<IEngineProcess> serverProcesses)
        {
            _serverProcesses = serverProcesses;

            foreach (var engineProcess in serverProcesses)
            {
                _disposables.Push(engineProcess);
            }
        }

        public void AddDisposable(IDisposable disposable)
        {
            _disposables.Push(disposable);
        }

        public void RunForever()
        {
            var token = new CancellationTokenSource();
            Start(token.Token);
{'fraction_non_alphanumeric': 0.07621550591327202, 'fraction_numerical': 0.01401664476565922, 'mean_word_length': 2.7259380097879284, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, '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': '1554667', 'n_tokens_mistral': 672, 'n_tokens_neox': 627, 'n_words': 169}