This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/iOS/Pod/Classes/Util/DoricAsyncResult.h

29 lines
661 B
C
Raw Normal View History

2019-07-26 14:19:42 +08:00
//
// DoricAsyncResult.h
// Doric
//
// Created by pengfei.zhou on 2019/7/26.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface DoricAsyncResult <R>: NSObject
typedef void(^DoricResultCallback)(R);
typedef void(^DoricExceptionCallback)(NSException *);
typedef void(^DoricFinishCallback)(void);
2019-07-30 15:20:11 +08:00
@property(nonatomic,strong) DoricResultCallback resultCallback;
@property(nonatomic,strong) DoricExceptionCallback exceptionCallback;
@property(nonatomic,strong) DoricFinishCallback finishCallback;
2019-07-29 13:48:27 +08:00
- (void)setupResult:(R)result;
- (void)setupError:(NSException*)exception;
- (BOOL)hasResult;
- (R)getResult;
2019-07-26 14:19:42 +08:00
@end
NS_ASSUME_NONNULL_END