     }
     
     public static func resolve<D, C: Hashable, N: Hashable>(container: C, name: N, parameter: Any = (), lifecycle: Lifecycle = .cached) -> D? {
-        let key = Key(type: String(reflecting: D.self), container: container, name: name)
+        let key = Key(type: D.self, container: container, name: name)
         return resolve(key: key, parameter: parameter, lifecycle: lifecycle)
     }
     

    
    public static func register<P, D>(lifecycle: Lifecycle = .notCached, resolve: @escaping (P) -> D) -> Key {
        return register(container: Container.default, name: Name.default, lifecycle: lifecycle, resolve: resolve)
    }
    
    public static func container<C: Hashable>(name: C, lifecycle: Lifecycle = .notCached) -> Guise {

    case once
}

public struct Key: Hashable {
    fileprivate let type: String
    fileprivate let name: AnyHashable
    fileprivate let container: AnyHashable
    
    init<D, C: Hashable, N: Hashable>(type: D.Type, container: C, name: N) {
        self.type = String(reflecting: D.self)
        self.name = name
        self.container = container
        // djb2 hash algorithm: http://www.cse.yorku.ca/~oz/hash.html
        // &+ operator handles Int overflow
        var hash = 5381
        hash = ((hash << 5) &+ hash) &+ self.type.hashValue
        hash = ((hash << 5) &+ hash) &+ self.container.hashValue
        hash = ((hash << 5) &+ hash) &+ self.name.hashValue
        hashValue = hash
    }
    
    init<P, D, C: Hashable, N: Hashable>(container: C, name: N, resolve: (P) -> D) {
        self.init(type: D.self, container: container, name: name)
    }
    
    public let hashValue: Int
