コード例 #1
0
        private void downloadNewXmlFile()
        {
            MessageHub.Instance.Publish(new StartedDownloadingUpdatedScheduleMessage(this));

            _client.GetXml(xml =>
            {
                if (string.IsNullOrEmpty(xml))
                {
                    MessageHub.Instance.Publish(new ErrorDownloadingUpdatedScheduleMessage(this));
                }
                else
                {
                    _fileHelper.WriteFile(_fileName, xml);

                    Repository = new CodeCampRepository(xml);

                    MessageHub.Instance.Publish(new FinishedUpdatingScheduleMessage(this));
                }
            });
        }