コード例 #1
0
        protected UpdatingContext CreateContext(ILauncherSettings settings)
        {
            var progress = new ProgressReporter();

            progress.ProgressChanged.AddListener(Data.UpdateProgressChanged);

            var context = new UpdatingContext(settings, progress);

            context.Logger            = new MHLab.Patch.Utilities.Logging.Logger(settings.GetLogsFilePath());
            context.Serializer        = new NewtonsoftSerializer();
            context.LocalizedMessages = new EnglishUpdaterLocalizedMessages();

            return(context);
        }
コード例 #2
0
        private UpdatingContext CreateContext(ILauncherSettings settings)
        {
            var progress = new ProgressReporter();

            progress.ProgressChanged.AddListener(Data.UpdateProgressChanged);

            var context = new UpdatingContext(settings, progress);

            context.Logger            = new SimpleLogger(context.FileSystem, settings.GetLogsFilePath(), settings.DebugMode);
            context.Serializer        = new JsonSerializer();
            context.LocalizedMessages = new EnglishUpdaterLocalizedMessages();

            return(context);
        }