     public internal(set) var state: ResourceDataProviderState = .empty {
         didSet { whenStateChanges?(state) }
     }
-    var stateBeforeLoadingStarted: ResourceDataProviderState = .empty
-    var resource: Resource<Array<Object>>?
+    private var stateBeforeLoadingStarted: ResourceDataProviderState = .empty
+    private var resource: Resource<Array<Object>>?
     
     public var dataProviderDidUpdate: ProcessUpdatesCallback<Object>?
     /// Closure which gets called, when a data inside the provider changes and those changes should be propagated to the datasource.

     
     - parameter updates: The updates.
     */
    func dataProviderDidChangeContets(with updates: [DataProviderUpdate<Object>]?) {
        dataProviderDidUpdate?(updates)
        whenDataProviderChanged?(updates)
    }

    /// Handles errors which occur during fetching a resource.
    ///
    /// - Parameter error: the error which occurs.
    private func loadDidError(with error: DBNetworkStackError) {
        if case DBNetworkStackError.cancelled = error {
            state = stateBeforeLoadingStarted
            return
