W
WT
Hello,
I was using hastable to store collection of objects of the same class
MyClass.
I start replacing this hastable by a Dictionary<string,MyClass>....but
I was storing this hastable in cache an accessing it from another component
in an Provider.
This component was developped in a separate assembly and loaded dynamically.
There was no need for it to know Myclass, it was simply retrieving a
hastable and using the ToString() method on each value.
Now that I store Dictionary<string,MyClass> in cache , I don't know how to
implement this module,
Adding MyClass to it project is not easy due to interrelated classes, I
would have to add lot of classes, and may be place them in a separate
assembly which I don't want.
Is there some way to tell it that what it takes from cache could be casted
to Dictionary<string,object> rather than Dictionary<string,MyClass> ????
or to some general interface used by Dictionary<K,T> that could allow me to
call ToString() on the values ????
This seems to be a general problem, should I go back to my hashtable
implementation ?
Thanks to generic gurus for help.
CS
I was using hastable to store collection of objects of the same class
MyClass.
I start replacing this hastable by a Dictionary<string,MyClass>....but
I was storing this hastable in cache an accessing it from another component
in an Provider.
This component was developped in a separate assembly and loaded dynamically.
There was no need for it to know Myclass, it was simply retrieving a
hastable and using the ToString() method on each value.
Now that I store Dictionary<string,MyClass> in cache , I don't know how to
implement this module,
Adding MyClass to it project is not easy due to interrelated classes, I
would have to add lot of classes, and may be place them in a separate
assembly which I don't want.
Is there some way to tell it that what it takes from cache could be casted
to Dictionary<string,object> rather than Dictionary<string,MyClass> ????
or to some general interface used by Dictionary<K,T> that could allow me to
call ToString() on the values ????
This seems to be a general problem, should I go back to my hashtable
implementation ?
Thanks to generic gurus for help.
CS