Use a public static property dictionary and wrap the static private dictionary inside.
Then you only need to take care about mutable or immutable types, first one you need to iterate inside the wrapper. That allows you to read a dictionary, but not edit it (not the entries and not the whole reference) with the option to allow edit inside the set{} part using any authentication model you prefer.
(I was looking for something different, like static performance in parallel coding, saw this search result and find the wrapper approach missing.)
For those who don't know what wrapping is, here a non static example (you can easily add the static key-word):
public Dictionary<string, Boolean> Access
{
get
{
// Same here, iterate if needed..
return new Dictionary<string, Boolean>(prv_Access);
}
set
{
MainWindow.NewSession.Renew();
if (MainWindow.NewSession.Actual)
{
prv_HistoryAccess.Add(DateTime.Now, new Dictionary<string, Boolean>(prv_Access));
// Here you would need to iterate when you deal with mutables..
prv_Access = value;
}
}
}