diff --git a/FieryCrucible/DependencyFactory.swift b/FieryCrucible/DependencyFactory.swift index e17f32c..461bb8d 100644 --- a/FieryCrucible/DependencyFactory.swift +++ b/FieryCrucible/DependencyFactory.swift @@ -83,7 +83,7 @@ public class DependencyFactory { public init() { } - public func shared(name: String, factory: @autoclosure () -> T, configure configureOrNil: ((T) -> ())? = nil) -> T { + public func shared(name: String, @autoclosure factory: () -> T, configure configureOrNil: ((T) -> ())? = nil) -> T { return inject( lifecyle: .Shared, name: name, @@ -94,7 +94,7 @@ public class DependencyFactory { ) } - public func weakShared(name: String, factory: @autoclosure () -> T, configure configureOrNil: ((T) -> ())? = nil) -> T { + public func weakShared(name: String, @autoclosure factory: () -> T, configure configureOrNil: ((T) -> ())? = nil) -> T { return inject( lifecyle: .WeakShared, name: name, @@ -105,7 +105,7 @@ public class DependencyFactory { ) } - public func unshared(name: String, factory: @autoclosure () -> T, configure configureOrNil: ((T) -> ())? = nil) -> T { + public func unshared(name: String, @autoclosure factory: () -> T, configure configureOrNil: ((T) -> ())? = nil) -> T { var unsharedInstances: [String:AnyObject] = [:] return inject( lifecyle: .Unshared, @@ -117,7 +117,7 @@ public class DependencyFactory { ) } - public func scoped(name: String, factory: @autoclosure () -> T, configure configureOrNil: ((T) -> ())? = nil) -> T { + public func scoped(name: String, @autoclosure factory: () -> T, configure configureOrNil: ((T) -> ())? = nil) -> T { return inject( lifecyle: .Scoped, name: name, @@ -128,7 +128,7 @@ public class DependencyFactory { ) } - func inject(# lifecyle: Lifecyle, name: String, inout instancePool: [String:AnyObject], containerFactory: (T) -> C, factory: @autoclosure () -> T, configure configureOrNil: ((T) -> ())?) -> T { + func inject(# lifecyle: Lifecyle, name: String, inout instancePool: [String:AnyObject], containerFactory: (T) -> C, @autoclosure factory: () -> T, configure configureOrNil: ((T) -> ())?) -> T { if let container = instancePool[name] as? C { if let instance = container.instance { return instance