<commit_before>using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Threading;
using UpdateControls.Correspondence;
using UpdateControls.Correspondence.IsolatedStorage;
using UpdateControls.Correspondence.POXClient;
using FacetedWorlds.MyCon.Models;
using FacetedWorlds.MyCon.Model;

namespace FacetedWorlds.MyCon
{
    public class SynchronizationService
    {
        private const string ConferenceID = "Conference ID";

        private NavigationModel _navigationModel;
        private Community _community;
        private Conference _conference;

        public SynchronizationService(NavigationModel navigationModel)
        {
            _navigationModel = navigationModel;
        }

        public void Initialize()
        {
            POXConfigurationProvider configurationProvider = new POXConfigurationProvider();
            _community = new Community(IsolatedStorageStorageStrategy.Load())
                .AddAsynchronousCommunicationStrategy(new POXAsynchronousCommunicationStrategy(configurationProvider))
                .Register<CorrespondenceModel>()
                ;

            _conference = _community.AddFact(new Conference(ConferenceID));

            // Synchronize whenever the user has something to send.
            _community.FactAdded += delegate
            {
                _community.BeginSending();
            };

            // Periodically resume if there is an error.
            DispatcherTimer synchronizeTimer = new DispatcherTimer();
            synchronizeTimer.Tick += delegate
            {
                _community.BeginSending();
                _community.BeginReceiving();
            };
            synchronizeTimer.Interval = TimeSpan.FromSeconds(60.0);
            synchronizeTimer.Start();

            // And synchronize on startup.
            _community.BeginSending();
            _community.BeginReceiving();

            InitializeData();
        }

        public Community Community
        {
            get { return _community; }
        }

        public Conference Conference
        {
            get { return _conference; }
        }

        public bool Synchronizing
        {
            get { return _community.Synchronizing; }
        }

        public Exception LastException
        {
            get { return _community.LastException; }
        }

        private void InitializeData()
        {
            _conference.GetTime(new DateTime(2011, 8, 12, 9, 0, 0));
            _conference.GetTime(new DateTime(2011, 8, 12, 10, 30, 0));
            _conference.GetTime(new DateTime(2011, 8, 12, 12, 0, 0));
            _conference.GetTime(new DateTime(2011, 8, 12, 13, 0, 0));
            _conference.GetTime(new DateTime(2011, 8, 12, 14, 30, 0));
            _conference.GetTime(new DateTime(2011, 8, 12, 16, 0, 0));

            _conference.GetTime(new DateTime(2011, 8, 13, 9, 0, 0));
            _conference.GetTime(new DateTime(2011, 8, 13, 10, 30, 0));
            _conference.GetTime(new DateTime(2011, 8, 13, 12, 0, 0));
            _conference.GetTime(new DateTime(2011, 8, 13, 13, 0, 0));
            _conference.GetTime(new DateTime(2011, 8, 13, 14, 30, 0));
            _conference.GetTime(new DateTime(2011, 8, 13, 16, 0, 0));
        }
    }
}
<commit_msg>Set the name of the conference.<commit_after>using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Threading;
using UpdateControls.Correspondence;
using UpdateControls.Correspondence.IsolatedStorage;
using UpdateControls.Correspondence.POXClient;
using FacetedWorlds.MyCon.Models;
using FacetedWorlds.MyCon.Model;

namespace FacetedWorlds.MyCon
{
    public class SynchronizationService
    {
        private const string ConferenceID = "Conference ID";

        private NavigationModel _navigationModel;
        private Community _community;
        private Conference _conference;

        public SynchronizationService(NavigationModel navigationModel)
        {
            _navigationModel = navigationModel;
        }

        public void Initialize()
        {
            POXConfigurationProvider configurationProvider = new POXConfigurationProvider();
            _community = new Community(IsolatedStorageStorageStrategy.Load())
                .AddAsynchronousCommunicationStrategy(new POXAsynchronousCommunicationStrategy(configurationProvider))
                .Register<CorrespondenceModel>()
                ;

            _conference = _community.AddFact(new Conference(ConferenceID));

            // Synchronize whenever the user has something to send.
            _community.FactAdded += delegate
            {
                _community.BeginSending();
            };

            // Periodically resume if there is an error.
            DispatcherTimer synchronizeTimer = new DispatcherTimer();
            synchronizeTimer.Tick += delegate
            {
                _community.BeginSending();
                _community.BeginReceiving();
            };
            synchronizeTimer.Interval = TimeSpan.FromSeconds(60.0);
            synchronizeTimer.Start();

            // And synchronize on startup.
            _community.BeginSending();
            _community.BeginReceiving();

            InitializeData();
        }

        public Community Community
        {
            get { return _community; }
        }

        public Conference Conference
        {
            get { return _conference; }
        }

        public bool Synchronizing
        {
            get { return _community.Synchronizing; }
        }

        public Exception LastException
        {
            get { return _community.LastException; }
        }

        private void InitializeData()
        {
            string conferenceName = "Dallas TechFest 2011";

            if (_conference.Name.Value != conferenceName)
                _conference.Name = conferenceName;

            _conference.GetTime(new DateTime(2011, 8, 12, 9, 0, 0));
            _conference.GetTime(new DateTime(2011, 8, 12, 10, 30, 0));
            _conference.GetTime(new DateTime(2011, 8, 12, 12, 0, 0));
            _conference.GetTime(new DateTime(2011, 8, 12, 13, 0, 0));
            _conference.GetTime(new DateTime(2011, 8, 12, 14, 30, 0));
            _conference.GetTime(new DateTime(2011, 8, 12, 16, 0, 0));

            _conference.GetTime(new DateTime(2011, 8, 13, 9, 0, 0));
            _conference.GetTime(new DateTime(2011, 8, 13, 10, 30, 0));
            _conference.GetTime(new DateTime(2011, 8, 13, 12, 0, 0));
            _conference.GetTime(new DateTime(2011, 8, 13, 13, 0, 0));
            _conference.GetTime(new DateTime(2011, 8, 13, 14, 30, 0));
            _conference.GetTime(new DateTime(2011, 8, 13, 16, 0, 0));
        }
    }
}

{'fraction_non_alphanumeric': 0.08866558297620807, 'fraction_numerical': 0.04108172011230974, 'mean_word_length': 2.1406032482598607, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '978009', 'n_tokens_mistral': 2044, 'n_tokens_neox': 1724, 'n_words': 427}