This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MIT | |
// Alexey Grigorev, Ivan Oparin | |
import Foundation | |
@discardableResult | |
public func measure(_ action: () -> ()) -> Double { | |
let start = Date() | |
action() | |
let end = Date() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MIT | |
// Alexey Grigorev, Ivan Oparin | |
@MainActor | |
static private func configureIoC() { | |
ObjectFactory.initialize(with: DIContainerBuilder.container) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MIT | |
// by Alexey Grigorev, Ivan Oparin | |
import Swinject | |
class DIContainerBuilder { | |
public static func build() -> Container { | |
let container = Container() | |
return container |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MIT | |
// by Alexey Grigorev, Ivan Oparin | |
// A thread-safe service for subscribing to network status updates on Apple's platforms. It | |
// utilizes Apple's Network framework to monitor network conditions. The service | |
// uses the actor model for thread safety, protecting from data | |
// races. Updates are emitted via Combine publishers, for easy integration with | |
// reactive or async code. Updates include network connection status, if the | |
// connection is expensive, and if the status has changed." |
NewerOlder