public static Action <Func <IServiceProvider, Tuple <Type, object> > > GetRuntimeRegistrationDelegate( this IDictionary <string, object> environment) { if (environment == null) { throw new ArgumentNullException("environment"); } PerRequestContainerTuple perRequestContainerTuple = environment[Constants.OwinRequestContainerEnvironmentKey] as PerRequestContainerTuple; return(perRequestContainerTuple != null ? perRequestContainerTuple.Item2 : null); }
public static IServiceProvider GetRequestContainer( this IDictionary <string, object> environment) { if (environment == null) { throw new ArgumentNullException("environment"); } PerRequestContainerTuple perRequestContainerTuple = environment[Constants.OwinRequestContainerEnvironmentKey] as PerRequestContainerTuple; return(perRequestContainerTuple != null ? perRequestContainerTuple.Item1 : null); }