Skip to content

HowTo: Adding a new Store and a new Data Model

Jérôme Oesch edited this page Feb 26, 2018 · 5 revisions

To create a new store, the following steps have to be undertaken:

  1. A new model class has to be created that inherits from ConcreteMethod. As it is used as data container, it should contain public variables that are used to store an instance's data.
  2. To use this class, a new store has to be created that has as type the just created class. This has to be done in the header of class StoreManager, analog to the already coded stores.
  3. Inside the DataCollection folder, the class CollectedDataEntity has to be altered such that it is also able to convert itself into this newly created class (similarly like GetConcreteMethodTelemetry).
  4. The class AveragedMethod has to be altered. Write a new constructor for it to accept all stores from which data should be displayed in VS. Everything that should be displayed in VS with the plugin needs its own property inside this class. If this measure has to be calculated, a new method can be added in this class and called from the constructor.
  5. Inside StoreHandler, multiple changes have to be done:
  • Inside UpdateStoresAsync, add a new case to the switch statement with the string that was specified when storing the data into CollectedDataEntity, add a new await statement inside the if-statement if (updateOccured).
  • Method GenerateAveragedMethodDictionary: change the arguments to match the newly created store.
  • Method StartBackgroudTaskAsync: add a new await statement alike the already coded ones.

Interfaces in VS have to be added or changed depending on the data that should be displayed.