Skip to content

Commit

Permalink
added deprecation annotation for resolve with unnamed runtime arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyapuchka committed Nov 26, 2015
1 parent c6e90a6 commit 84c09db
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Dip/Dip/RuntimeArguments.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ extension DependencyContainer {
return resolve(tag: tag) { (factory: (Arg1) -> T) in factory(arg1) }
}

///**Deprecated** Use `resolve(tag:withArguments:)` method instead.
@available(*, deprecated, message="Use `resolve(tag:withArguments:)` method instead.")
public func resolve<T, Arg1>(tag tag: Tag? = nil, _ arg1: Arg1) -> T {
return resolve(tag: tag) { (factory: (Arg1) -> T) in factory(arg1) }
}
Expand All @@ -76,6 +78,8 @@ extension DependencyContainer {
return resolve(tag: tag) { (factory: (Arg1, Arg2) -> T) in factory(arg1, arg2) }
}

///**Deprecated** Use `resolve(tag:withArguments:_:)` method instead.
@available(*, deprecated, message="Use `resolve(tag:withArguments:_:)` method instead.")
public func resolve<T, Arg1, Arg2>(tag tag: Tag? = nil, _ arg1: Arg1, _ arg2: Arg2) -> T {
return resolve(tag: tag) { (factory: (Arg1, Arg2) -> T) in factory(arg1, arg2) }
}
Expand All @@ -91,6 +95,8 @@ extension DependencyContainer {
return resolve(tag: tag) { (factory: (Arg1, Arg2, Arg3) -> T) in factory(arg1, arg2, arg3) }
}

///**Deprecated** Use `resolve(tag:withArguments:_:_:)` method instead.
@available(*, deprecated, message="Use `resolve(tag:withArguments:_:_:)` method instead.")
public func resolve<T, Arg1, Arg2, Arg3>(tag tag: Tag? = nil, _ arg1: Arg1, _ arg2: Arg2, _ arg3: Arg3) -> T {
return resolve(tag: tag) { (factory: (Arg1, Arg2, Arg3) -> T) in factory(arg1, arg2, arg3) }
}
Expand All @@ -106,6 +112,8 @@ extension DependencyContainer {
return resolve(tag: tag) { (factory: (Arg1, Arg2, Arg3, Arg4) -> T) in factory(arg1, arg2, arg3, arg4) }
}

///**Deprecated** Use `resolve(tag:withArguments:_:_:_:)` method instead.
@available(*, deprecated, message="Use `resolve(tag:withArguments:_:_:_:)` method instead.")
public func resolve<T, Arg1, Arg2, Arg3, Arg4>(tag tag: Tag? = nil, _ arg1: Arg1, _ arg2: Arg2, _ arg3: Arg3, _ arg4: Arg4) -> T {
return resolve(tag: tag) { (factory: (Arg1, Arg2, Arg3, Arg4) -> T) in factory(arg1, arg2, arg3, arg4) }
}
Expand All @@ -121,6 +129,8 @@ extension DependencyContainer {
return resolve(tag: tag) { (factory: (Arg1, Arg2, Arg3, Arg4, Arg5) -> T) in factory(arg1, arg2, arg3, arg4, arg5) }
}

///**Deprecated** Use `resolve(tag:withArguments:_:_:_:_:)` method instead.
@available(*, deprecated, message="Use `resolve(tag:withArguments:_:_:_:_:)` method instead.")
public func resolve<T, Arg1, Arg2, Arg3, Arg4, Arg5>(tag tag: Tag? = nil, _ arg1: Arg1, _ arg2: Arg2, _ arg3: Arg3, _ arg4: Arg4, _ arg5: Arg5) -> T {
return resolve(tag: tag) { (factory: (Arg1, Arg2, Arg3, Arg4, Arg5) -> T) in factory(arg1, arg2, arg3, arg4, arg5) }
}
Expand All @@ -136,6 +146,8 @@ extension DependencyContainer {
return resolve(tag: tag) { (factory: (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6) -> T) in factory(arg1, arg2, arg3, arg4, arg5, arg6) }
}

///**Deprecated** Use `resolve(tag:withArguments:_:_:_:_:_:)` method instead.
@available(*, deprecated, message="Use `resolve(tag:withArguments:_:_:_:_:_:)` method instead.")
public func resolve<T, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6>(tag tag: Tag? = nil, _ arg1: Arg1, _ arg2: Arg2, _ arg3: Arg3, _ arg4: Arg4, _ arg5: Arg5, _ arg6: Arg6) -> T {
return resolve(tag: tag) { (factory: (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6) -> T) in factory(arg1, arg2, arg3, arg4, arg5, arg6) }
}
Expand Down

0 comments on commit 84c09db

Please sign in to comment.