TyphoonBlockComponentFactory

Objective-C

@interface TyphoonBlockComponentFactory : TyphoonComponentFactory

Swift

class TyphoonBlockComponentFactory : TyphoonComponentFactory

@ingroup Factory

  • Undocumented

    Declaration

    Objective-C

    + (id)factoryWithAssembly:(TyphoonAssembly *)assembly;

    Swift

    class func factory(with assembly: TyphoonAssembly!) -> Any!
  • Undocumented

    Declaration

    Objective-C

    + (id)factoryWithAssemblies:(NSArray *)assemblies;

    Swift

    class func factory(withAssemblies assemblies: [Any]!) -> Any!
  • Returns a factory by loading the assemblies specified in the bundle’s plist.

    Declaration

    Objective-C

    + (id)factoryFromPlistInBundle:(NSBundle *)bundle;

    Swift

    class func factoryFromPlist(in bundle: Bundle!) -> Any!
  • Undocumented

    Declaration

    Objective-C

    - (id)initWithAssembly:(TyphoonAssembly *)assembly;

    Swift

    init!(assembly: TyphoonAssembly!)
  • Undocumented

    Declaration

    Objective-C

    - (id)initWithAssemblies:(NSArray *)assemblies;

    Swift

    init!(assemblies: [Any]!)
    • Convenience method for casting the factory to an TyphoonAssembly sub-class. TyphoonBlockComponentFactory allows using a TyphoonAssembly
      • interface to pose in front of the factory, in order to resolve components. This avoids the requirement to use “magic strings” when
      • multiple components with the same class are configured in different ways. *
      • ##Example: “`

    MyAssemblyType* assembly = [factory asAssembly]; //Use the assembly interface instead of a ‘magic string’ AnalyticsService* service = [assembly analyticsService];

    Declaration

    Objective-C

    - (id)asAssembly;

    Swift

    func asAssembly() -> Any!