0001 // 0002 // Resolvable.swift 0003 // Swinject 0004 // 0005 // Created by Yoichi Tagaya on 8/18/15. 0006 // Copyright (c) 2015 Swinject Contributors. All rights reserved. 0007 // 0008 0009 // 0010 // NOTICE: 0011 // 0012 // Resolvable.swift is generated from Resolvable.erb by ERB. 0013 // Do NOT modify Container.Arguments.swift directly. 0014 // Instead, modify Resolvable.erb and run `script/gencode` at the project root directory to generate the code. 0015 // 0016 0017 0018 public protocol Resolvable{ 0019 /// Retrieves the instance with the specified service type. 0020 /// 0021 /// - Parameter serviceType: The service type to resolve. 0022 /// 0023 /// - Returns: The resolved service type instance, or nil if no service is found. 0024 func resolve<Service>(serviceType: Service.Type) -> Service? 0025 0026 /// Retrieves the instance with the specified service type and registration name. 0027 /// 0028 /// - Parameters: 0029 /// - serviceType: The service type to resolve. 0030 /// - name: The registration name. 0031 /// 0032 /// - Returns: The resolved service type instance, or nil if no service with the name is found. 0033 func resolve<Service>(serviceType: Service.Type, name: String?) -> Service? 0034 0035 /// Retrieves the instance with the specified service type and 1 argument to the factory closure. 0036 /// 0037 /// - Parameters: 0038 /// - serviceType: The service type to resolve. 0039 /// - argument: 1 argument to pass to the factory closure. 0040 /// 0041 /// - Returns: The resolved service type instance, or nil if no registration for the service type 0042 /// and 1 argument is found. 0043 func resolve<Service, Arg1>( 0044 serviceType: Service.Type, 0045 argument: Arg1) -> Service? 0046 0047 /// Retrieves the instance with the specified service type, 1 argument to the factory closure and registration name. 0048 /// 0049 /// - Parameters: 0050 /// - serviceType: The service type to resolve. 0051 /// - name: The registration name. 0052 /// - argument: 1 argument to pass to the factory closure. 0053 /// 0054 /// - Returns: The resolved service type instance, or nil if no registration for the service type, 0055 /// 1 argument and name is found. 0056 func resolve<Service, Arg1>( 0057 serviceType: Service.Type, 0058 name: String?, 0059 argument: Arg1) -> Service? 0060 0061 /// Retrieves the instance with the specified service type and tuple of 2 arguments to the factory closure. 0062 /// 0063 /// - Parameters: 0064 /// - serviceType: The service type to resolve. 0065 /// - arguments: Tuple of 2 arguments to pass to the factory closure. 0066 /// 0067 /// - Returns: The resolved service type instance, or nil if no registration for the service type 0068 /// and tuple of 2 arguments is found. 0069 func resolve<Service, Arg1, Arg2>( 0070 serviceType: Service.Type, 0071 arguments: (Arg1, Arg2)) -> Service? 0072 0073 /// Retrieves the instance with the specified service type, tuple of 2 arguments to the factory closure and registration name. 0074 /// 0075 /// - Parameters: 0076 /// - serviceType: The service type to resolve. 0077 /// - name: The registration name. 0078 /// - arguments: Tuple of 2 arguments to pass to the factory closure. 0079 /// 0080 /// - Returns: The resolved service type instance, or nil if no registration for the service type, 0081 /// tuple of 2 arguments and name is found. 0082 func resolve<Service, Arg1, Arg2>( 0083 serviceType: Service.Type, 0084 name: String?, 0085 arguments: (Arg1, Arg2)) -> Service? 0086 0087 /// Retrieves the instance with the specified service type and tuple of 3 arguments to the factory closure. 0088 /// 0089 /// - Parameters: 0090 /// - serviceType: The service type to resolve. 0091 /// - arguments: Tuple of 3 arguments to pass to the factory closure. 0092 /// 0093 /// - Returns: The resolved service type instance, or nil if no registration for the service type 0094 /// and tuple of 3 arguments is found. 0095 func resolve<Service, Arg1, Arg2, Arg3>( 0096 serviceType: Service.Type, 0097 arguments: (Arg1, Arg2, Arg3)) -> Service? 0098 0099 /// Retrieves the instance with the specified service type, tuple of 3 arguments to the factory closure and registration name. 0100 /// 0101 /// - Parameters: 0102 /// - serviceType: The service type to resolve. 0103 /// - name: The registration name. 0104 /// - arguments: Tuple of 3 arguments to pass to the factory closure. 0105 /// 0106 /// - Returns: The resolved service type instance, or nil if no registration for the service type, 0107 /// tuple of 3 arguments and name is found. 0108 func resolve<Service, Arg1, Arg2, Arg3>( 0109 serviceType: Service.Type, 0110 name: String?, 0111 arguments: (Arg1, Arg2, Arg3)) -> Service? 0112 0113 /// Retrieves the instance with the specified service type and tuple of 4 arguments to the factory closure. 0114 /// 0115 /// - Parameters: 0116 /// - serviceType: The service type to resolve. 0117 /// - arguments: Tuple of 4 arguments to pass to the factory closure. 0118 /// 0119 /// - Returns: The resolved service type instance, or nil if no registration for the service type 0120 /// and tuple of 4 arguments is found. 0121 func resolve<Service, Arg1, Arg2, Arg3, Arg4>( 0122 serviceType: Service.Type, 0123 arguments: (Arg1, Arg2, Arg3, Arg4)) -> Service? 0124 0125 /// Retrieves the instance with the specified service type, tuple of 4 arguments to the factory closure and registration name. 0126 /// 0127 /// - Parameters: 0128 /// - serviceType: The service type to resolve. 0129 /// - name: The registration name. 0130 /// - arguments: Tuple of 4 arguments to pass to the factory closure. 0131 /// 0132 /// - Returns: The resolved service type instance, or nil if no registration for the service type, 0133 /// tuple of 4 arguments and name is found. 0134 func resolve<Service, Arg1, Arg2, Arg3, Arg4>( 0135 serviceType: Service.Type, 0136 name: String?, 0137 arguments: (Arg1, Arg2, Arg3, Arg4)) -> Service? 0138 0139 /// Retrieves the instance with the specified service type and tuple of 5 arguments to the factory closure. 0140 /// 0141 /// - Parameters: 0142 /// - serviceType: The service type to resolve. 0143 /// - arguments: Tuple of 5 arguments to pass to the factory closure. 0144 /// 0145 /// - Returns: The resolved service type instance, or nil if no registration for the service type 0146 /// and tuple of 5 arguments is found. 0147 func resolve<Service, Arg1, Arg2, Arg3, Arg4, Arg5>( 0148 serviceType: Service.Type, 0149 arguments: (Arg1, Arg2, Arg3, Arg4, Arg5)) -> Service? 0150 0151 /// Retrieves the instance with the specified service type, tuple of 5 arguments to the factory closure and registration name. 0152 /// 0153 /// - Parameters: 0154 /// - serviceType: The service type to resolve. 0155 /// - name: The registration name. 0156 /// - arguments: Tuple of 5 arguments to pass to the factory closure. 0157 /// 0158 /// - Returns: The resolved service type instance, or nil if no registration for the service type, 0159 /// tuple of 5 arguments and name is found. 0160 func resolve<Service, Arg1, Arg2, Arg3, Arg4, Arg5>( 0161 serviceType: Service.Type, 0162 name: String?, 0163 arguments: (Arg1, Arg2, Arg3, Arg4, Arg5)) -> Service? 0164 0165 /// Retrieves the instance with the specified service type and tuple of 6 arguments to the factory closure. 0166 /// 0167 /// - Parameters: 0168 /// - serviceType: The service type to resolve. 0169 /// - arguments: Tuple of 6 arguments to pass to the factory closure. 0170 /// 0171 /// - Returns: The resolved service type instance, or nil if no registration for the service type 0172 /// and tuple of 6 arguments is found. 0173 func resolve<Service, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6>( 0174 serviceType: Service.Type, 0175 arguments: (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)) -> Service? 0176 0177 /// Retrieves the instance with the specified service type, tuple of 6 arguments to the factory closure and registration name. 0178 /// 0179 /// - Parameters: 0180 /// - serviceType: The service type to resolve. 0181 /// - name: The registration name. 0182 /// - arguments: Tuple of 6 arguments to pass to the factory closure. 0183 /// 0184 /// - Returns: The resolved service type instance, or nil if no registration for the service type, 0185 /// tuple of 6 arguments and name is found. 0186 func resolve<Service, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6>( 0187 serviceType: Service.Type, 0188 name: String?, 0189 arguments: (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)) -> Service? 0190 0191 /// Retrieves the instance with the specified service type and tuple of 7 arguments to the factory closure. 0192 /// 0193 /// - Parameters: 0194 /// - serviceType: The service type to resolve. 0195 /// - arguments: Tuple of 7 arguments to pass to the factory closure. 0196 /// 0197 /// - Returns: The resolved service type instance, or nil if no registration for the service type 0198 /// and tuple of 7 arguments is found. 0199 func resolve<Service, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7>( 0200 serviceType: Service.Type, 0201 arguments: (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7)) -> Service? 0202 0203 /// Retrieves the instance with the specified service type, tuple of 7 arguments to the factory closure and registration name. 0204 /// 0205 /// - Parameters: 0206 /// - serviceType: The service type to resolve. 0207 /// - name: The registration name. 0208 /// - arguments: Tuple of 7 arguments to pass to the factory closure. 0209 /// 0210 /// - Returns: The resolved service type instance, or nil if no registration for the service type, 0211 /// tuple of 7 arguments and name is found. 0212 func resolve<Service, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7>( 0213 serviceType: Service.Type, 0214 name: String?, 0215 arguments: (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7)) -> Service? 0216 0217 /// Retrieves the instance with the specified service type and tuple of 8 arguments to the factory closure. 0218 /// 0219 /// - Parameters: 0220 /// - serviceType: The service type to resolve. 0221 /// - arguments: Tuple of 8 arguments to pass to the factory closure. 0222 /// 0223 /// - Returns: The resolved service type instance, or nil if no registration for the service type 0224 /// and tuple of 8 arguments is found. 0225 func resolve<Service, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8>( 0226 serviceType: Service.Type, 0227 arguments: (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8)) -> Service? 0228 0229 /// Retrieves the instance with the specified service type, tuple of 8 arguments to the factory closure and registration name. 0230 /// 0231 /// - Parameters: 0232 /// - serviceType: The service type to resolve. 0233 /// - name: The registration name. 0234 /// - arguments: Tuple of 8 arguments to pass to the factory closure. 0235 /// 0236 /// - Returns: The resolved service type instance, or nil if no registration for the service type, 0237 /// tuple of 8 arguments and name is found. 0238 func resolve<Service, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8>( 0239 serviceType: Service.Type, 0240 name: String?, 0241 arguments: (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8)) -> Service? 0242 0243 /// Retrieves the instance with the specified service type and tuple of 9 arguments to the factory closure. 0244 /// 0245 /// - Parameters: 0246 /// - serviceType: The service type to resolve. 0247 /// - arguments: Tuple of 9 arguments to pass to the factory closure. 0248 /// 0249 /// - Returns: The resolved service type instance, or nil if no registration for the service type 0250 /// and tuple of 9 arguments is found. 0251 func resolve<Service, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9>( 0252 serviceType: Service.Type, 0253 arguments: (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9)) -> Service? 0254 0255 /// Retrieves the instance with the specified service type, tuple of 9 arguments to the factory closure and registration name. 0256 /// 0257 /// - Parameters: 0258 /// - serviceType: The service type to resolve. 0259 /// - name: The registration name. 0260 /// - arguments: Tuple of 9 arguments to pass to the factory closure. 0261 /// 0262 /// - Returns: The resolved service type instance, or nil if no registration for the service type, 0263 /// tuple of 9 arguments and name is found. 0264 func resolve<Service, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9>( 0265 serviceType: Service.Type, 0266 name: String?, 0267 arguments: (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9)) -> Service? 0268 0269 0270 } 0271
Container.swift:13 public typealias ResolverType = protocol<Resolvable, PropertyRetrievable>Container.swift:90 public func synchronize() -> Resolvable {Container.swift:112 extension Container: Resolvable {SynchronizedResolver.swift:17 extension SynchronizedResolver: Resolvable {