Skip to content

Commit

Permalink
Expose Observable2DArrayEvent constructors.
Browse files Browse the repository at this point in the history
  • Loading branch information
srdanrasic committed Jan 12, 2017
1 parent 12ac045 commit 43c2259
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Sources/Collections/Observable2DArray.swift
Expand Up @@ -52,6 +52,16 @@ public protocol Observable2DArrayEventProtocol {
public struct Observable2DArrayEvent<SectionMetadata, Item> {
public let change: Observable2DArrayChange
public let source: Observable2DArray<SectionMetadata, Item>

public init(change: Observable2DArrayChange, source: Observable2DArray<SectionMetadata, Item>) {
self.change = change
self.source = source
}

public init(change: Observable2DArrayChange, source: [Observable2DArraySection<SectionMetadata, Item>]) {
self.change = change
self.source = Observable2DArray(source)
}
}

/// Represents a section in 2D array.
Expand Down

0 comments on commit 43c2259

Please sign in to comment.