private static object Resolve(Type type, ILifetimeScope scope = null) { if (scope == null) { //no scope specified scope = ScopeProvider.Scope(); } return(scope.Resolve(type)); }
private static T Resolve <T>(string key = "", ILifetimeScope scope = null) where T : class { if (scope == null) { //no scope specified scope = ScopeProvider.Scope(); } if (string.IsNullOrEmpty(key)) { return(scope.Resolve <T>()); } return(scope.ResolveKeyed <T>(key)); }