CSSetupResult
@objc
public final class CSSetupResult : NSObject
The CSSetupResult serves as the Objective-C bridging type for SetupResult.
See also
SetupResult
-
YESif adding theCSStorageInterfaceto theCSDataStacksucceeded,NOotherwise.Declaration
Swift
@objc public var isSuccess: Bool { get } -
YESif adding theCSStorageInterfaceto theCSDataStackfailed,NOotherwise. WhenYES, theerrorproperty returns the actualNSErrorfor the failure.Declaration
Swift
@objc public var isFailure: Bool { get } -
A
CSStorageInterfaceinstance if thecommitoperation for the transaction succeeded. Returnsnilotherwise.Declaration
Swift
@objc public let storage: CSStorageInterface? -
The
NSErrorfor a failedcommitoperation, ornilif thecommitsucceededDeclaration
Swift
@objc public let error: NSError? -
If the result was a success, the
successblock is executed with theCSStorageInterfaceinstance that was added to theCSDataStack. If the result was a failure, thefailureblock is executed with anNSErrorargument pertaining to the actual error.The blocks are executed immediately as
@noescapeand will not be retained.Declaration
Swift
@objc public func handleSuccess(_ success: (_ storage: CSStorageInterface) -> Void, failure: (_ error: NSError) -> Void)Parameters
successthe block to execute on success. The block passes a
CSStorageInterfaceinstance that was added to theCSDataStack.failurethe block to execute on failure. The block passes an
NSErrorargument that pertains to the actual error. -
If the result was a success, the
successblock is executed with aBOOLargument that indicates if there were any changes made. If the result was a failure, this method does nothing.The block is executed immediately as
@noescapeand will not be retained.Declaration
Swift
@objc public func handleSuccess(_ success: (_ storage: CSStorageInterface) -> Void)Parameters
successthe block to execute on success. The block passes a
BOOLargument that indicates if there were any changes made. -
If the result was a failure, the
failureblock is executed with anNSErrorargument pertaining to the actual error. If the result was a success, this method does nothing.The block is executed immediately as
@noescapeand will not be retained.Declaration
Swift
@objc public func handleFailure(_ failure: (_ error: NSError) -> Void)Parameters
failurethe block to execute on failure. The block passes an
NSErrorargument that pertains to the actual error.
View on GitHub
CSSetupResult Class Reference