-
Notifications
You must be signed in to change notification settings - Fork 0
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:
- 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. - 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. - 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 likeGetConcreteMethodTelemetry
). - 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. - 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 intoCollectedDataEntity
, add a new await statement inside the if-statementif (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.