lundi 27 novembre 2017

Common pattern for temporarily storing data

I am wondering about temporarily saving data. I dont mean to save data on a drive, I refer to a structure in code that saves some data, e.g. user input. Imagine an user runs a programm, enters some text but I cant use it right after that. So I want to store it for later processing. Should be accessible among different classes, but in the same assembly.

What is the common pattern to do so? The only thing I can think of is to use a Singleton class or a static class as a data container but that doesnt feel right.

Aucun commentaire:

Enregistrer un commentaire