我有一种方法可以使用具有 4 个不同条件(2 个布尔参数)的块(比方说数据库事务)执行某些操作。好吧,在包括 Apple 在内的许多约定中,block 参数应该是最后一个,但我们也不应该把 bool 参数放在第一位。你觉得我应该给这个方法取什么名字?
- (void)performDatabaseTransactionWithSynchronously:(BOOL)synchronously
isWritterOperation:(BOOL)isWritter
transaction:(TransactionBlock)block
或者
- (void)performDatabaseTransactionWithSynchronously:(BOOL)synchronously
isWritterOperation:(BOOL)isWritter
withTransaction:(TransactionBlock)block
或者
- (void)performDatabaseTransaction:(TransactionBlock)block
synchronously:(BOOL)synchronously
isWritterOperation:(BOOL)isWritter
还是其他?