I want to take HttpContext.Current.Request and HttpContext.Current.Session and wrap them together into one class.
Basically i want to write col["key"]; and have it check one of these for the key and if it doesnt exist to check the other.
AFAIK they don't share an interface (i looked around using "Go To Definition" but i am pretty bad). How would i write a class that can take both these types as parameters? I tried writing an interface but that didnt work because the classes dont inherit from them. The i tried assigning object o = request; then writing object o2 = o["key"]; but that also caused a compile error.
I am positive this can be done easily but i have no idea how.