Пример #1
0
        /// <summary>
        /// Initialises a new instance of the <see cref="AthleteData"/> class.
        /// </summary>
        /// <param name="generalIo">general IO manager</param>
        /// <param name="logger">application logger</param>
        public AthleteData(
            IGeneralIo generalIo,
            INormalisationConfigMngr normalisationConfigManager,
            ISeriesConfigMngr seriesConfigManager,
            IJHcLogger logger)
        {
            this.generalIo = generalIo;
            this.logger    = logger;

            this.athleteDataReader =
                new AthleteDataReader(
                    normalisationConfigManager,
                    seriesConfigManager,
                    this.logger);
            this.athleteSeasonDataReader =
                new AthleteSeasonDataReader(
                    this.logger);

            string rootDirectory = RootIO.LoadRootFile();

            this.dataPath = $"{rootDirectory}{Path.DirectorySeparatorChar}{IOPaths.dataPath}{Path.DirectorySeparatorChar}";
            Messenger.Default.Register <ReinitialiseRoot>(this, this.ReinitialiseRoot);
        }
Пример #2
0
 /// <summary>
 /// Reinitialise the data path value from the file.
 /// </summary>
 /// <param name="message">reinitialise message</param>
 private void ReinitialiseRoot(ReinitialiseRoot message)
 {
     this.ModelRootDirectory = RootIO.LoadRootFile();
 }
Пример #3
0
        /// <summary>
        /// A reinitialise root message has been received.
        /// </summary>
        /// <param name="message">reinitialise root message</param>
        public void ReinitialiseRoot(ReinitialiseRoot message)
        {
            string rootDirectory = RootIO.LoadRootFile();

            this.dataPath = $"{rootDirectory}{Path.DirectorySeparatorChar}{IOPaths.dataPath}{Path.DirectorySeparatorChar}";
        }
Пример #4
0
 /// <summary>
 /// Reinitialise the data path value from the file.
 /// </summary>
 /// <param name="message">reinitialise message</param>
 private void ReinitialiseRoot(ReinitialiseRoot message)
 {
     this.rootDirectory     = RootIO.LoadRootFile();
     this.dataPath          = $"{this.rootDirectory}{Path.DirectorySeparatorChar}{IOPaths.dataPath}{Path.DirectorySeparatorChar}";
     this.configurationPath = $"{this.rootDirectory}{Path.DirectorySeparatorChar}{IOPaths.configurationPath}{Path.DirectorySeparatorChar}";
 }