Welcome to ForkCan.com
ForkCan is all about sharing code in a social way.
Discuss, debate or argue with other devs about their or your own code.
Give other devs feedback or make a Fork (Make a better version of a shared code).
Rate the code, if you use the code mark it as used so others can see if the shared code is used by someone.
Help each other to be better devs and to be more productive.
Features not working yet:
Flag a post
A HttpContextLifetimeManager to make Unity 2.0 work better with for example MVC.
public class HttpContextLifetimeManager<T> : LifetimeManager, IDisposable
public override object GetValue()
public override void RemoveValue()
public override void SetValue(object newValue)
HttpContext.Current.Items[typeof(T).AssemblyQualifiedName] = newValue;
public void Dispose()
You must log in before you can give any feedback
You must log in before you can post a comment
Regarding the "generic of T" stuff to get a key - I haven't seen that specific pattern before, what's the reasoning behind it?
Also, couldn't you make
typeof(T).AssemblyQualifiedName a static variable instead of re-evaluating it in every call?