mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-15 13:43:43 +01:00
minor documentation updates
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// NSProgress+Convenience.swift
|
||||
// Progress+Convenience.swift
|
||||
// CoreStore
|
||||
//
|
||||
// Copyright © 2015 John Rommel Estropia
|
||||
@@ -26,12 +26,12 @@
|
||||
import Foundation
|
||||
|
||||
|
||||
// MARK: - NSProgress
|
||||
// MARK: - Progress
|
||||
|
||||
public extension Progress {
|
||||
|
||||
/**
|
||||
Sets a closure that the `NSProgress` calls whenever its `fractionCompleted` changes. You can use this instead of setting up KVO.
|
||||
Sets a closure that the `Progress` calls whenever its `fractionCompleted` changes. You can use this instead of setting up KVO.
|
||||
|
||||
- parameter closure: the closure to execute on progress change
|
||||
*/
|
||||
@@ -88,7 +88,7 @@ public extension CoreStore {
|
||||
```
|
||||
- parameter storeType: the local storage type
|
||||
- parameter completion: the closure to be executed on the main queue when the process completes, either due to success or failure. The closure's `SetupResult` argument indicates the result. Note that the `LocalStorage` associated to the `SetupResult.success` may not always be the same instance as the parameter argument if a previous `LocalStorage` was already added at the same URL and with the same configuration.
|
||||
- returns: an `NSProgress` instance if a migration has started, or `nil` if either no migrations are required or if a failure occured.
|
||||
- returns: a `Progress` instance if a migration has started, or `nil` if either no migrations are required or if a failure occured.
|
||||
*/
|
||||
public static func addStorage<T: LocalStorage>(_ storeType: T.Type, completion: @escaping (SetupResult<T>) -> Void) -> Progress? where T: DefaultInitializableStore {
|
||||
|
||||
@@ -110,7 +110,7 @@ public extension CoreStore {
|
||||
```
|
||||
- parameter storage: the local storage
|
||||
- parameter completion: the closure to be executed on the main queue when the process completes, either due to success or failure. The closure's `SetupResult` argument indicates the result. Note that the `LocalStorage` associated to the `SetupResult.success` may not always be the same instance as the parameter argument if a previous `LocalStorage` was already added at the same URL and with the same configuration.
|
||||
- returns: an `NSProgress` instance if a migration has started, or `nil` if either no migrations are required or if a failure occured.
|
||||
- returns: a `Progress` instance if a migration has started, or `nil` if either no migrations are required or if a failure occured.
|
||||
*/
|
||||
public static func addStorage<T: LocalStorage>(_ storage: T, completion: @escaping (SetupResult<T>) -> Void) -> Progress? {
|
||||
|
||||
@@ -155,7 +155,7 @@ public extension CoreStore {
|
||||
- parameter storage: the local storage
|
||||
- parameter completion: the closure to be executed on the main queue when the migration completes, either due to success or failure. The closure's `MigrationResult` argument indicates the result. This closure is NOT executed if an error is thrown, but will be executed with a `.failure` result if an error occurs asynchronously.
|
||||
- throws: a `CoreStoreError` value indicating the failure
|
||||
- returns: an `NSProgress` instance if a migration has started, or `nil` is no migrations are required
|
||||
- returns: a `Progress` instance if a migration has started, or `nil` is no migrations are required
|
||||
*/
|
||||
public static func upgradeStorageIfNeeded<T: LocalStorage>(_ storage: T, completion: @escaping (MigrationResult) -> Void) throws -> Progress? {
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ public extension DataStack {
|
||||
```
|
||||
- parameter storeType: the local storage type
|
||||
- parameter completion: the closure to be executed on the main queue when the process completes, either due to success or failure. The closure's `SetupResult` argument indicates the result. Note that the `LocalStorage` associated to the `SetupResult.success` may not always be the same instance as the parameter argument if a previous `LocalStorage` was already added at the same URL and with the same configuration.
|
||||
- returns: an `NSProgress` instance if a migration has started, or `nil` if either no migrations are required or if a failure occured.
|
||||
- returns: a `Progress` instance if a migration has started, or `nil` if either no migrations are required or if a failure occured.
|
||||
*/
|
||||
public func addStorage<T: LocalStorage>(_ storeType: T.Type, completion: @escaping (SetupResult<T>) -> Void) -> Progress? where T: DefaultInitializableStore {
|
||||
|
||||
@@ -146,7 +146,7 @@ public extension DataStack {
|
||||
```
|
||||
- parameter storage: the local storage
|
||||
- parameter completion: the closure to be executed on the main queue when the process completes, either due to success or failure. The closure's `SetupResult` argument indicates the result. Note that the `LocalStorage` associated to the `SetupResult.success` may not always be the same instance as the parameter argument if a previous `LocalStorage` was already added at the same URL and with the same configuration.
|
||||
- returns: an `NSProgress` instance if a migration has started, or `nil` if either no migrations are required or if a failure occured.
|
||||
- returns: a `Progress` instance if a migration has started, or `nil` if either no migrations are required or if a failure occured.
|
||||
*/
|
||||
public func addStorage<T: LocalStorage>(_ storage: T, completion: @escaping (SetupResult<T>) -> Void) -> Progress? {
|
||||
|
||||
@@ -429,7 +429,7 @@ public extension DataStack {
|
||||
- parameter storage: the local storage
|
||||
- parameter completion: the closure to be executed on the main queue when the migration completes, either due to success or failure. The closure's `MigrationResult` argument indicates the result.
|
||||
- throws: a `CoreStoreError` value indicating the failure
|
||||
- returns: an `NSProgress` instance if a migration has started, or `nil` is no migrations are required
|
||||
- returns: a `Progress` instance if a migration has started, or `nil` is no migrations are required
|
||||
*/
|
||||
public func upgradeStorageIfNeeded<T: LocalStorage>(_ storage: T, completion: @escaping (MigrationResult) -> Void) throws -> Progress? {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// NSProgress+ObjectiveC.swift
|
||||
// Progress+ObjectiveC.swift
|
||||
// CoreStore
|
||||
//
|
||||
// Copyright © 2016 John Rommel Estropia
|
||||
@@ -26,7 +26,7 @@
|
||||
import Foundation
|
||||
|
||||
|
||||
// MARK: - NSProgress
|
||||
// MARK: - Progress
|
||||
|
||||
public extension Progress {
|
||||
|
||||
Reference in New Issue
Block a user