Commit 243cc5cf by Dima Bart

Rename aggregate initializer. Convert strong -> weak queue reference.

parent 6a53263e
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
@property (strong, atomic) NSArray<NSOperation *> *operations; @property (strong, atomic) NSArray<NSOperation *> *operations;
+ (instancetype)operationWithQueue:(NSOperationQueue *)queue operations:(NSArray<NSOperation *> *)operations; + (instancetype)aggregateOperationWithRequestQueue:(NSOperationQueue *)queue operations:(NSArray<NSOperation *> *)operations;
- (instancetype)initWithQueue:(NSOperationQueue *)queue operations:(NSArray<NSOperation *> *)operations; - (instancetype)initWithRequestQueue:(NSOperationQueue *)queue operations:(NSArray<NSOperation *> *)operations;
- (void)finishWithObject:(id)object; - (void)finishWithObject:(id)object;
- (void)finishWithError:(NSError *)error; - (void)finishWithError:(NSError *)error;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
@interface BUYAggregateOperation () @interface BUYAggregateOperation ()
@property (strong, nonatomic) NSOperationQueue *queue; @property (weak, nonatomic) NSOperationQueue *queue;
@end @end
...@@ -36,12 +36,12 @@ ...@@ -36,12 +36,12 @@
#pragma mark - Init - #pragma mark - Init -
+ (instancetype)operationWithQueue:(NSOperationQueue *)queue operations:(NSArray<NSOperation *> *)operations + (instancetype)aggregateOperationWithRequestQueue:(NSOperationQueue *)queue operations:(NSArray<NSOperation *> *)operations
{ {
return [[[self class] alloc] initWithQueue:queue operations:operations]; return [[[self class] alloc] initWithRequestQueue:queue operations:operations];
} }
- (instancetype)initWithQueue:(NSOperationQueue *)queue operations:(NSArray<NSOperation *> *)operations - (instancetype)initWithRequestQueue:(NSOperationQueue *)queue operations:(NSArray<NSOperation *> *)operations
{ {
self = [super init]; self = [super init];
if (self) { if (self) {
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
- (instancetype)initWithClient:(BUYClient *)client checkoutToken:(NSString *)checkoutToken token:(id<BUYPaymentToken>)token completion:(BUYCheckoutOperationCompletion)completion - (instancetype)initWithClient:(BUYClient *)client checkoutToken:(NSString *)checkoutToken token:(id<BUYPaymentToken>)token completion:(BUYCheckoutOperationCompletion)completion
{ {
self = [super initWithQueue:client.requestQueue operations:nil]; self = [super initWithRequestQueue:client.requestQueue operations:nil];
if (self) { if (self) {
_client = client; _client = client;
_token = token; _token = token;
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
- (instancetype)initWithClient:(BUYClient *)client checkoutToken:(NSString *)checkoutToken completion:(BUYCheckoutOperationCompletion)completion - (instancetype)initWithClient:(BUYClient *)client checkoutToken:(NSString *)checkoutToken completion:(BUYCheckoutOperationCompletion)completion
{ {
self = [super initWithQueue:client.requestQueue operations:nil]; self = [super initWithRequestQueue:client.requestQueue operations:nil];
if (self) { if (self) {
_client = client; _client = client;
_completion = completion; _completion = completion;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment