Skip to content
Snippets Groups Projects
Select Git revision
  • f01aa47c42a205b7dfa6e315ed0a73c0b13b286a
  • main default protected
  • development
  • integration
  • v1.1.5
  • v1.1.4
  • v1.1.3
  • v1.1.2
  • v1.1.1
  • v1.1.0
  • v1.0.0
11 results

E2EAddPartnerCallback.swift

Blame
  • LoadReceptionIdentity.swift 780 B
    import Bindings
    import XCTestDynamicOverlay
    
    public struct LoadReceptionIdentity {
      public var run: (String, Int) throws -> Data
    
      public func callAsFunction(
        key: String,
        cmixId: Int
      ) throws -> Data {
        try run(key, cmixId)
      }
    }
    
    extension LoadReceptionIdentity {
      public static let live = LoadReceptionIdentity { key, cmixId in
        var error: NSError?
        let data = BindingsLoadReceptionIdentity(key, cmixId, &error)
        if let error = error {
          throw error
        }
        guard let data = data else {
          fatalError("BindingsLoadReceptionIdentity returned `nil` without providing error")
        }
        return data
      }
    }
    
    extension LoadReceptionIdentity {
      public static let unimplemented = LoadReceptionIdentity(
        run: XCTUnimplemented("\(Self.self)")
      )
    }