diff --git a/docs/data/documentation/factory.json b/docs/data/documentation/factory.json index 71e8d10a..bc61e257 100644 --- a/docs/data/documentation/factory.json +++ b/docs/data/documentation/factory.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory is strongly influenced by SwiftUI, and in my opinion is highly suited for use in that environment."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory is…"}]},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Adaptable"}]},{"type":"text","text":": Factory doesn’t tie you down to a single dependency injection strategy or technique."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Powerful"}]},{"type":"text","text":": Factory supports containers, scopes, passed parameters, contexts, decorators, unit tests, SwiftUI Previews, and much, much more."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Performant"}]},{"type":"text","text":": Little to no setup time is needed for the vast majority of your services, resolutions are extremely fast, and no compile-time scripts or build phases are needed."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Safe"}]},{"type":"text","text":": Factory is compile-time safe; a factory for a given type must exist or the code simply will not compile."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Concise"}]},{"type":"text","text":": Defining a registration usually takes just a single line of code. Same for resolution."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Flexible"}]},{"type":"text","text":": Working with UIKIt or SwiftUI? iOS or macOS? Using MVVM? MVP? Clean? VIPER? No problem. Factory works with all of these and more."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Documented"}]},{"type":"text","text":": Factory 2.0 has extensive DocC documentation and examples covering its classes, methods, and use cases."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Lightweight"}]},{"type":"text","text":": With all of that Factory is slim and trim, under 800 lines of executable code."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Tested"}]},{"type":"text","text":": Unit tests with 100% code coverage helps ensure correct operation of registrations, resolutions, and scopes."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Free"}]},{"type":"text","text":": Factory is free and open source under the MIT License."}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Ready to get started?"}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"kind":"symbol","metadata":{"roleHeading":"Framework","externalID":"Factory","title":"Factory","symbolKind":"module","role":"collection","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[[]]},"topicSections":[{"title":"The Basics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/GettingStarted","doc:\/\/Factory\/documentation\/Factory\/Containers","doc:\/\/Factory\/documentation\/Factory\/Scopes"]},{"title":"Development and Testing","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Previews","doc:\/\/Factory\/documentation\/Factory\/Testing","doc:\/\/Factory\/documentation\/Factory\/Contexts","doc:\/\/Factory\/documentation\/Factory\/Debugging","doc:\/\/Factory\/documentation\/Factory\/Chains"]},{"title":"Advanced Topics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Design","doc:\/\/Factory\/documentation\/Factory\/Modifiers","doc:\/\/Factory\/documentation\/Factory\/Modules","doc:\/\/Factory\/documentation\/Factory\/Cycle","doc:\/\/Factory\/documentation\/Factory\/Optionals","doc:\/\/Factory\/documentation\/Factory\/Functional","doc:\/\/Factory\/documentation\/Factory\/Tags"]},{"title":"Additional Topics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Migration"]},{"title":"Classes","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]},{"title":"Protocols","identifiers":["doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","doc:\/\/Factory\/documentation\/Factory\/SharedContainer"]},{"title":"Structures","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","doc:\/\/Factory\/documentation\/Factory\/Injected","doc:\/\/Factory\/documentation\/Factory\/InjectedObject","doc:\/\/Factory\/documentation\/Factory\/LazyInjected","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]},{"title":"Enumerations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContext","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]}],"references":{"doc://Factory/documentation/Factory/Optionals":{"role":"article","title":"Optionals and Dynamic Registration","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","kind":"article","type":"topic","url":"\/documentation\/factory\/optionals"},"doc://Factory/documentation/Factory/Migration":{"role":"article","title":"Migration","abstract":[{"type":"text","text":"Moving from 1.x to 2.0"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Migration","kind":"article","type":"topic","url":"\/documentation\/factory\/migration"},"doc://Factory/documentation/Factory/Modifiers":{"role":"article","title":"Factory Modifiers","abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","kind":"article","type":"topic","url":"\/documentation\/factory\/modifiers"},"doc://Factory/documentation/Factory/Debugging":{"role":"article","title":"Debugging","abstract":[{"type":"text","text":"Additional support for debugging resolution cycles, dependency chains and other issue."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","kind":"article","type":"topic","url":"\/documentation\/factory\/debugging"},"doc://Factory/documentation/Factory/Contexts":{"role":"article","title":"Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","kind":"article","type":"topic","url":"\/documentation\/factory\/contexts"},"doc://Factory/documentation/Factory/ManagedContainer":{"role":"symbol","title":"ManagedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory/SharedContainer":{"role":"symbol","title":"SharedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"abstract":[{"type":"text","text":"SharedContainer defines the protocol all Containers must adopt if they want to support Service Locator style injection or support any of the injection property wrappers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"url":"\/documentation\/factory\/sharedcontainer"},"doc://Factory/documentation/Factory/Chains":{"role":"article","title":"Circular Dependency Chains","abstract":[{"type":"text","text":"Detecting and solving Circular Dependency Chains."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","kind":"article","type":"topic","url":"\/documentation\/factory\/chains"},"doc://Factory/documentation/Factory/Previews":{"role":"article","title":"SwiftUI Previews","abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","kind":"article","type":"topic","url":"\/documentation\/factory\/previews"},"doc://Factory/documentation/Factory/GettingStarted":{"role":"collectionGroup","title":"Getting Started","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","kind":"article","type":"topic","url":"\/documentation\/factory\/gettingstarted"},"doc://Factory/documentation/Factory/FactoryRegistration":{"role":"symbol","title":"FactoryRegistration","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"url":"\/documentation\/factory\/factoryregistration"},"doc://Factory/documentation/Factory/Functional":{"role":"article","title":"Functional Injection","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","kind":"article","type":"topic","url":"\/documentation\/factory\/functional"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/Design":{"role":"article","title":"Designing Factory","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","kind":"article","type":"topic","url":"\/documentation\/factory\/design"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"url":"\/documentation\/factory\/weaklazyinjected"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/LazyInjected":{"role":"symbol","title":"LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"url":"\/documentation\/factory\/lazyinjected"},"doc://Factory/documentation/Factory/AutoRegistering":{"role":"symbol","title":"AutoRegistering","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"AutoRegistering"}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"AutoRegistering"}],"url":"\/documentation\/factory\/autoregistering"},"doc://Factory/documentation/Factory/Testing":{"role":"article","title":"Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","kind":"article","type":"topic","url":"\/documentation\/factory\/testing"},"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"},"doc://Factory/documentation/Factory/Tags":{"role":"article","title":"Tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","kind":"article","type":"topic","url":"\/documentation\/factory\/tags"},"doc://Factory/documentation/Factory/Cycle":{"role":"article","title":"Resolution Cycles","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","type":"topic","url":"\/documentation\/factory\/cycle"},"doc://Factory/documentation/Factory/Modules":{"role":"article","title":"Modular Development","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","kind":"article","type":"topic","url":"\/documentation\/factory\/modules"},"doc://Factory/documentation/Factory/Containers":{"role":"article","title":"Containers","abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","kind":"article","type":"topic","url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory is strongly influenced by SwiftUI, and in my opinion is highly suited for use in that environment."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory is…"}]},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Adaptable"}]},{"type":"text","text":": Factory doesn’t tie you down to a single dependency injection strategy or technique."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Powerful"}]},{"type":"text","text":": Factory supports containers, scopes, passed parameters, contexts, decorators, unit tests, SwiftUI Previews, and much, much more."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Performant"}]},{"type":"text","text":": Little to no setup time is needed for the vast majority of your services, resolutions are extremely fast, and no compile-time scripts or build phases are needed."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Safe"}]},{"type":"text","text":": Factory is compile-time safe; a factory for a given type must exist or the code simply will not compile."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Concise"}]},{"type":"text","text":": Defining a registration usually takes just a single line of code. Same for resolution."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Flexible"}]},{"type":"text","text":": Working with UIKIt or SwiftUI? iOS or macOS? Using MVVM? MVP? Clean? VIPER? No problem. Factory works with all of these and more."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Documented"}]},{"type":"text","text":": Factory 2.0 has extensive DocC documentation and examples covering its classes, methods, and use cases."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Lightweight"}]},{"type":"text","text":": With all of that Factory is slim and trim, under 800 lines of executable code."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Tested"}]},{"type":"text","text":": Unit tests with 100% code coverage helps ensure correct operation of registrations, resolutions, and scopes."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Free"}]},{"type":"text","text":": Factory is free and open source under the MIT License."}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Ready to get started?"}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"kind":"symbol","metadata":{"roleHeading":"Framework","externalID":"Factory","title":"Factory","symbolKind":"module","role":"collection","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[[]]},"topicSections":[{"title":"The Basics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/GettingStarted","doc:\/\/Factory\/documentation\/Factory\/Containers","doc:\/\/Factory\/documentation\/Factory\/Scopes"]},{"title":"Development and Testing","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Previews","doc:\/\/Factory\/documentation\/Factory\/Testing","doc:\/\/Factory\/documentation\/Factory\/Contexts","doc:\/\/Factory\/documentation\/Factory\/Debugging","doc:\/\/Factory\/documentation\/Factory\/Chains"]},{"title":"Advanced Topics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Design","doc:\/\/Factory\/documentation\/Factory\/Modifiers","doc:\/\/Factory\/documentation\/Factory\/Modules","doc:\/\/Factory\/documentation\/Factory\/Cycle","doc:\/\/Factory\/documentation\/Factory\/Optionals","doc:\/\/Factory\/documentation\/Factory\/Functional","doc:\/\/Factory\/documentation\/Factory\/Tags"]},{"title":"Additional Topics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Migration"]},{"title":"Classes","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]},{"title":"Protocols","identifiers":["doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","doc:\/\/Factory\/documentation\/Factory\/SharedContainer"]},{"title":"Structures","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","doc:\/\/Factory\/documentation\/Factory\/Injected","doc:\/\/Factory\/documentation\/Factory\/InjectedObject","doc:\/\/Factory\/documentation\/Factory\/LazyInjected","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]},{"title":"Enumerations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContext","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]}],"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/Testing":{"role":"article","title":"Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","kind":"article","type":"topic","url":"\/documentation\/factory\/testing"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"},"doc://Factory/documentation/Factory/Functional":{"role":"article","title":"Functional Injection","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","kind":"article","type":"topic","url":"\/documentation\/factory\/functional"},"doc://Factory/documentation/Factory/Optionals":{"role":"article","title":"Optionals and Dynamic Registration","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","kind":"article","type":"topic","url":"\/documentation\/factory\/optionals"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"},"doc://Factory/documentation/Factory/SharedContainer":{"role":"symbol","title":"SharedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"abstract":[{"type":"text","text":"SharedContainer defines the protocol all Containers must adopt if they want to support Service Locator style injection or support any of the injection property wrappers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"url":"\/documentation\/factory\/sharedcontainer"},"doc://Factory/documentation/Factory/Modifiers":{"role":"article","title":"Factory Modifiers","abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","kind":"article","type":"topic","url":"\/documentation\/factory\/modifiers"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Chains":{"role":"article","title":"Circular Dependency Chains","abstract":[{"type":"text","text":"Detecting and solving Circular Dependency Chains."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","kind":"article","type":"topic","url":"\/documentation\/factory\/chains"},"doc://Factory/documentation/Factory/GettingStarted":{"role":"collectionGroup","title":"Getting Started","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","kind":"article","type":"topic","url":"\/documentation\/factory\/gettingstarted"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory/Tags":{"role":"article","title":"Tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","kind":"article","type":"topic","url":"\/documentation\/factory\/tags"},"doc://Factory/documentation/Factory/ManagedContainer":{"role":"symbol","title":"ManagedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory/FactoryRegistration":{"role":"symbol","title":"FactoryRegistration","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"url":"\/documentation\/factory\/factoryregistration"},"doc://Factory/documentation/Factory/LazyInjected":{"role":"symbol","title":"LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"url":"\/documentation\/factory\/lazyinjected"},"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"},"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"},"doc://Factory/documentation/Factory/Debugging":{"role":"article","title":"Debugging","abstract":[{"type":"text","text":"Additional support for debugging resolution cycles, dependency chains and other issue."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","kind":"article","type":"topic","url":"\/documentation\/factory\/debugging"},"doc://Factory/documentation/Factory/AutoRegistering":{"role":"symbol","title":"AutoRegistering","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"AutoRegistering"}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"AutoRegistering"}],"url":"\/documentation\/factory\/autoregistering"},"doc://Factory/documentation/Factory/Design":{"role":"article","title":"Designing Factory","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","kind":"article","type":"topic","url":"\/documentation\/factory\/design"},"doc://Factory/documentation/Factory/Modules":{"role":"article","title":"Modular Development","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","kind":"article","type":"topic","url":"\/documentation\/factory\/modules"},"doc://Factory/documentation/Factory/Migration":{"role":"article","title":"Migration","abstract":[{"type":"text","text":"Moving from 1.x to 2.0"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Migration","kind":"article","type":"topic","url":"\/documentation\/factory\/migration"},"doc://Factory/documentation/Factory/Previews":{"role":"article","title":"SwiftUI Previews","abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","kind":"article","type":"topic","url":"\/documentation\/factory\/previews"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/Contexts":{"role":"article","title":"Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","kind":"article","type":"topic","url":"\/documentation\/factory\/contexts"},"doc://Factory/documentation/Factory/Containers":{"role":"article","title":"Containers","abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","kind":"article","type":"topic","url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory/Cycle":{"role":"article","title":"Resolution Cycles","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","type":"topic","url":"\/documentation\/factory\/cycle"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"url":"\/documentation\/factory\/weaklazyinjected"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/autoregistering.json b/docs/data/documentation/factory/autoregistering.json index cfd7b83a..b4f654e6 100644 --- a/docs/data/documentation/factory/autoregistering.json +++ b/docs/data/documentation/factory/autoregistering.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"AutoRegistering"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Add this protocol to a container to support first-time registration of needed dependencies prior to first resolution"},{"type":"text","text":" "},{"type":"text","text":"of a dependency on that container."}]},{"type":"codeListing","syntax":"swift","code":["extension Container: AutoRegistering {"," func autoRegister() {"," someService.register {"," CrossModuleService()"," }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"autoRegister"},{"type":"text","text":" function is called on each instantiated container prior to"},{"type":"text","text":" "},{"type":"text","text":"the first resolution of a Factory on that container."}]},{"style":"warning","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Calling "},{"type":"codeVoice","code":"container.manager.reset(options: .all)"},{"type":"text","text":" restores the container to it’s initial state"},{"type":"text","text":" "},{"type":"text","text":"and autoRegister will be called again if it exists."}]}],"type":"aside","name":"Warning"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/autoregistering"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"AutoRegistering"}],"title":"AutoRegistering","roleHeading":"Protocol","role":"symbol","symbolKind":"protocol","externalID":"s:7Factory15AutoRegisteringP","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"AutoRegistering"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/AutoRegistering\/autoRegister()"]}],"references":{"doc://Factory/documentation/Factory/AutoRegistering/autoRegister()":{"role":"symbol","title":"autoRegister()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"autoRegister"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"User provided function that supports first-time registration of needed dependencies prior to first resolution"},{"type":"text","text":" "},{"type":"text","text":"of a dependency on that container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering\/autoRegister()","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/autoregistering\/autoregister()"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/AutoRegistering":{"role":"symbol","title":"AutoRegistering","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"AutoRegistering"}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"AutoRegistering"}],"url":"\/documentation\/factory\/autoregistering"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"AutoRegistering"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Add this protocol to a container to support first-time registration of needed dependencies prior to first resolution"},{"type":"text","text":" "},{"type":"text","text":"of a dependency on that container."}]},{"type":"codeListing","syntax":"swift","code":["extension Container: AutoRegistering {"," func autoRegister() {"," someService.register {"," CrossModuleService()"," }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"autoRegister"},{"type":"text","text":" function is called on each instantiated container prior to"},{"type":"text","text":" "},{"type":"text","text":"the first resolution of a Factory on that container."}]},{"style":"warning","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Calling "},{"type":"codeVoice","code":"container.manager.reset(options: .all)"},{"type":"text","text":" restores the container to it’s initial state"},{"type":"text","text":" "},{"type":"text","text":"and autoRegister will be called again if it exists."}]}],"type":"aside","name":"Warning"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/autoregistering"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"AutoRegistering"}],"title":"AutoRegistering","roleHeading":"Protocol","role":"symbol","symbolKind":"protocol","externalID":"s:7Factory15AutoRegisteringP","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"AutoRegistering"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/AutoRegistering\/autoRegister()"]}],"references":{"doc://Factory/documentation/Factory/AutoRegistering/autoRegister()":{"role":"symbol","title":"autoRegister()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"autoRegister"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"User provided function that supports first-time registration of needed dependencies prior to first resolution"},{"type":"text","text":" "},{"type":"text","text":"of a dependency on that container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering\/autoRegister()","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/autoregistering\/autoregister()"},"doc://Factory/documentation/Factory/AutoRegistering":{"role":"symbol","title":"AutoRegistering","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"AutoRegistering"}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"AutoRegistering"}],"url":"\/documentation\/factory\/autoregistering"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/autoregistering/autoregister().json b/docs/data/documentation/factory/autoregistering/autoregister().json index 74beead1..d1516517 100644 --- a/docs/data/documentation/factory/autoregistering/autoregister().json +++ b/docs/data/documentation/factory/autoregistering/autoregister().json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"autoRegister"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/autoregistering\/autoregister()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering\/autoRegister()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"User provided function that supports first-time registration of needed dependencies prior to first resolution"},{"type":"text","text":" "},{"type":"text","text":"of a dependency on that container."}],"kind":"symbol","metadata":{"role":"symbol","title":"autoRegister()","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"autoRegister"},{"kind":"text","text":"()"}],"symbolKind":"method","externalID":"s:7Factory15AutoRegisteringP12autoRegisteryyF","required":true,"modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/AutoRegistering"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/AutoRegistering":{"role":"symbol","title":"AutoRegistering","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"AutoRegistering"}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"AutoRegistering"}],"url":"\/documentation\/factory\/autoregistering"},"doc://Factory/documentation/Factory/AutoRegistering/autoRegister()":{"role":"symbol","title":"autoRegister()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"autoRegister"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"User provided function that supports first-time registration of needed dependencies prior to first resolution"},{"type":"text","text":" "},{"type":"text","text":"of a dependency on that container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering\/autoRegister()","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/autoregistering\/autoregister()"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"autoRegister"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/autoregistering\/autoregister()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering\/autoRegister()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"User provided function that supports first-time registration of needed dependencies prior to first resolution"},{"type":"text","text":" "},{"type":"text","text":"of a dependency on that container."}],"kind":"symbol","metadata":{"role":"symbol","title":"autoRegister()","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"autoRegister"},{"kind":"text","text":"()"}],"symbolKind":"method","externalID":"s:7Factory15AutoRegisteringP12autoRegisteryyF","required":true,"modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/AutoRegistering"]]},"references":{"doc://Factory/documentation/Factory/AutoRegistering":{"role":"symbol","title":"AutoRegistering","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"AutoRegistering"}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"AutoRegistering"}],"url":"\/documentation\/factory\/autoregistering"},"doc://Factory/documentation/Factory/AutoRegistering/autoRegister()":{"role":"symbol","title":"autoRegister()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"autoRegister"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"User provided function that supports first-time registration of needed dependencies prior to first resolution"},{"type":"text","text":" "},{"type":"text","text":"of a dependency on that container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering\/autoRegister()","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/autoregistering\/autoregister()"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/chains.json b/docs/data/documentation/factory/chains.json index 8c8af072..c7cf2533 100644 --- a/docs/data/documentation/factory/chains.json +++ b/docs/data/documentation/factory/chains.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Circular-Dependency-Chain-Detection","level":2,"type":"heading","text":"Circular Dependency Chain Detection"},{"type":"paragraph","inlineContent":[{"type":"text","text":"What’s a circular dependency? Let’s say that A needs B to be constructed, and B needs a C. But what happens if C needs an A?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Examine the following class definitions."}]},{"type":"codeListing","syntax":"swift","code":["class CircularA {"," @Injected(\\.circularB) var circularB","}","","class CircularB {"," @Injected(\\.circularC) var circularC","}","","class CircularC {"," @Injected(\\.circularA) var circularA","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Attempting make an instance of "},{"type":"codeVoice","code":"CircularA"},{"type":"text","text":" is going to result in an infinite loop."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Why? Well, A’s injected property wrapper needs a B in to construct an A. Okay, fine. Let’s make one. But B’s wrapper needs a C, which can’t be made without injecting an A, which once more needs a B… and so on. Ad infinitum."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This is a circular dependency chain."}]},{"anchor":"Resolution","level":2,"type":"heading","text":"Resolution"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Unfortunately, by the time this code is compiled and run it’s too late to break the cycle. We’ve effectively coded an infinite loop into our program."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"All Factory can do in this case is die gracefully and in the process dump the dependency chain that indicates where the problem lies."}]},{"type":"codeListing","syntax":null,"code":["2022-12-23 14:57:23.512032-0600 FactoryDemo[47546:6946786] Factory\/Factory.swift:393: ","Fatal error: circular dependency chain - CircularA > CircularB > CircularC > CircularA"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"With the above information in hand we should be able to find the problem and fix it."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We could fix things by changing CircularC’s injection wrapper to "},{"type":"codeVoice","code":"LazyInjected"},{"type":"text","text":" or, better yet, "},{"type":"codeVoice","code":"WeakLazyInjected"},{"type":"text","text":" in order to avoid a retain cycle."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But a better solution would probably entail finding and breaking out the functionality that "},{"type":"codeVoice","code":"CircularA"},{"type":"text","text":" and "},{"type":"codeVoice","code":"CircularC"},{"type":"text","text":" are depending upon into a "},{"type":"emphasis","inlineContent":[{"type":"text","text":"third"}]},{"type":"text","text":" object they both could include."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Circular dependencies such as this are usually a violation of the Single Responsibility Principle, and should be avoided."}]},{"style":"important","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Due to the overhead involved, circular dependency detection only occurs when running the application in DEBUG mode. The code is stripped out of production builds for improved performance."}]}],"type":"aside","name":"Important"},{"anchor":"Disabling-CDC-Detection","level":2,"type":"heading","text":"Disabling CDC Detection"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If needed circular dependency chain detecting can be disabled by setting the detection limit to zero."}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.manager.dependencyChainTestMax = 0"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The default value for "},{"type":"codeVoice","code":"dependencyChainTestMax"},{"type":"text","text":" is 10. That means the detector fires if the same class type appears during a single resolution cycle more than 10 times."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This value can be increased (or decreased) as needed."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/chains"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Chains","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Detecting and solving Circular Dependency Chains."}],"kind":"article","metadata":{"roleHeading":"Article","title":"Circular Dependency Chains","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Development and Testing","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Previews","doc:\/\/Factory\/documentation\/Factory\/Testing","doc:\/\/Factory\/documentation\/Factory\/Contexts","doc:\/\/Factory\/documentation\/Factory\/Debugging"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Previews":{"role":"article","title":"SwiftUI Previews","abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","kind":"article","type":"topic","url":"\/documentation\/factory\/previews"},"doc://Factory/documentation/Factory/Testing":{"role":"article","title":"Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","kind":"article","type":"topic","url":"\/documentation\/factory\/testing"},"doc://Factory/documentation/Factory/Contexts":{"role":"article","title":"Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","kind":"article","type":"topic","url":"\/documentation\/factory\/contexts"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Debugging":{"role":"article","title":"Debugging","abstract":[{"type":"text","text":"Additional support for debugging resolution cycles, dependency chains and other issue."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","kind":"article","type":"topic","url":"\/documentation\/factory\/debugging"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Circular-Dependency-Chain-Detection","level":2,"type":"heading","text":"Circular Dependency Chain Detection"},{"type":"paragraph","inlineContent":[{"type":"text","text":"What’s a circular dependency? Let’s say that A needs B to be constructed, and B needs a C. But what happens if C needs an A?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Examine the following class definitions."}]},{"type":"codeListing","syntax":"swift","code":["class CircularA {"," @Injected(\\.circularB) var circularB","}","","class CircularB {"," @Injected(\\.circularC) var circularC","}","","class CircularC {"," @Injected(\\.circularA) var circularA","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Attempting make an instance of "},{"type":"codeVoice","code":"CircularA"},{"type":"text","text":" is going to result in an infinite loop."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Why? Well, A’s injected property wrapper needs a B in to construct an A. Okay, fine. Let’s make one. But B’s wrapper needs a C, which can’t be made without injecting an A, which once more needs a B… and so on. Ad infinitum."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This is a circular dependency chain."}]},{"anchor":"Resolution","level":2,"type":"heading","text":"Resolution"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Unfortunately, by the time this code is compiled and run it’s too late to break the cycle. We’ve effectively coded an infinite loop into our program."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"All Factory can do in this case is die gracefully and in the process dump the dependency chain that indicates where the problem lies."}]},{"type":"codeListing","syntax":null,"code":["2022-12-23 14:57:23.512032-0600 FactoryDemo[47546:6946786] Factory\/Factory.swift:393: ","Fatal error: circular dependency chain - CircularA > CircularB > CircularC > CircularA"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"With the above information in hand we should be able to find the problem and fix it."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We could fix things by changing CircularC’s injection wrapper to "},{"type":"codeVoice","code":"LazyInjected"},{"type":"text","text":" or, better yet, "},{"type":"codeVoice","code":"WeakLazyInjected"},{"type":"text","text":" in order to avoid a retain cycle."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But a better solution would probably entail finding and breaking out the functionality that "},{"type":"codeVoice","code":"CircularA"},{"type":"text","text":" and "},{"type":"codeVoice","code":"CircularC"},{"type":"text","text":" are depending upon into a "},{"type":"emphasis","inlineContent":[{"type":"text","text":"third"}]},{"type":"text","text":" object they both could include."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Circular dependencies such as this are usually a violation of the Single Responsibility Principle, and should be avoided."}]},{"style":"important","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Due to the overhead involved, circular dependency detection only occurs when running the application in DEBUG mode. The code is stripped out of production builds for improved performance."}]}],"type":"aside","name":"Important"},{"anchor":"Disabling-CDC-Detection","level":2,"type":"heading","text":"Disabling CDC Detection"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If needed circular dependency chain detecting can be disabled by setting the detection limit to zero."}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.manager.dependencyChainTestMax = 0"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The default value for "},{"type":"codeVoice","code":"dependencyChainTestMax"},{"type":"text","text":" is 10. That means the detector fires if the same class type appears during a single resolution cycle more than 10 times."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This value can be increased (or decreased) as needed."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/chains"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Chains","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Detecting and solving Circular Dependency Chains."}],"kind":"article","metadata":{"roleHeading":"Article","title":"Circular Dependency Chains","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Development and Testing","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Previews","doc:\/\/Factory\/documentation\/Factory\/Testing","doc:\/\/Factory\/documentation\/Factory\/Contexts","doc:\/\/Factory\/documentation\/Factory\/Debugging"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Debugging":{"role":"article","title":"Debugging","abstract":[{"type":"text","text":"Additional support for debugging resolution cycles, dependency chains and other issue."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","kind":"article","type":"topic","url":"\/documentation\/factory\/debugging"},"doc://Factory/documentation/Factory/Contexts":{"role":"article","title":"Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","kind":"article","type":"topic","url":"\/documentation\/factory\/contexts"},"doc://Factory/documentation/Factory/Previews":{"role":"article","title":"SwiftUI Previews","abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","kind":"article","type":"topic","url":"\/documentation\/factory\/previews"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Testing":{"role":"article","title":"Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","kind":"article","type":"topic","url":"\/documentation\/factory\/testing"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/container.json b/docs/data/documentation/factory/container.json index 68d7e37c..67cbc046 100644 --- a/docs/data/documentation/factory/container.json +++ b/docs/data/documentation/factory/container.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"final"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Containers are used by Factory to manage object creation, object resolution, and object lifecycles in general."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Registrations and scope caches will persist as long as the associated container remains in scope."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers"},{"type":"text","text":" for more information."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/container"],"traits":[{"interfaceLanguage":"swift"}]}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","doc:\/\/Factory\/documentation\/Factory\/SharedContainer"],"kind":"relationships","title":"Conforms To","type":"conformsTo"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"title":"Container","roleHeading":"Class","role":"symbol","symbolKind":"class","externalID":"s:7Factory9ContainerC","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"Container"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container\/init()"]},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container\/manager"]},{"title":"Type Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container\/shared"]},{"title":"Default Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Containers":{"role":"article","title":"Containers","abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","kind":"article","type":"topic","url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"role":"collectionGroup","title":"ManagedContainer Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/container\/managedcontainer-implementations"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/Container/shared":{"role":"symbol","title":"shared","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"}],"abstract":[{"type":"text","text":"Define the default shared container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/shared","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/shared"},"doc://Factory/documentation/Factory/SharedContainer":{"role":"symbol","title":"SharedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"abstract":[{"type":"text","text":"SharedContainer defines the protocol all Containers must adopt if they want to support Service Locator style injection or support any of the injection property wrappers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"url":"\/documentation\/factory\/sharedcontainer"},"doc://Factory/documentation/Factory/Container/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"Public initializer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/init()"},"doc://Factory/documentation/Factory/ManagedContainer":{"role":"symbol","title":"ManagedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory/Container/manager":{"role":"symbol","title":"manager","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC"}],"abstract":[{"type":"text","text":"Define the container’s manager."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/manager","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/manager"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"final"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Containers are used by Factory to manage object creation, object resolution, and object lifecycles in general."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Registrations and scope caches will persist as long as the associated container remains in scope."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers"},{"type":"text","text":" for more information."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/container"],"traits":[{"interfaceLanguage":"swift"}]}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","doc:\/\/Factory\/documentation\/Factory\/SharedContainer"],"kind":"relationships","title":"Conforms To","type":"conformsTo"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"title":"Container","roleHeading":"Class","role":"symbol","symbolKind":"class","externalID":"s:7Factory9ContainerC","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"Container"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container\/init()"]},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container\/manager"]},{"title":"Type Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container\/shared"]},{"title":"Default Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/SharedContainer":{"role":"symbol","title":"SharedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"abstract":[{"type":"text","text":"SharedContainer defines the protocol all Containers must adopt if they want to support Service Locator style injection or support any of the injection property wrappers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"url":"\/documentation\/factory\/sharedcontainer"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Container/shared":{"role":"symbol","title":"shared","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"}],"abstract":[{"type":"text","text":"Define the default shared container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/shared","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/shared"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"role":"collectionGroup","title":"ManagedContainer Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/container\/managedcontainer-implementations"},"doc://Factory/documentation/Factory/Containers":{"role":"article","title":"Containers","abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","kind":"article","type":"topic","url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory/ManagedContainer":{"role":"symbol","title":"ManagedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory/Container/manager":{"role":"symbol","title":"manager","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC"}],"abstract":[{"type":"text","text":"Define the container’s manager."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/manager","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/manager"},"doc://Factory/documentation/Factory/Container/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"Public initializer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/init()"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/container/callasfunction(key:_:)-25yop.json b/docs/data/documentation/factory/container/callasfunction(key:_:)-25yop.json index 20813cd8..03384ee4 100644 --- a/docs/data/documentation/factory/container/callasfunction(key:_:)-25yop.json +++ b/docs/data/documentation/factory/container/callasfunction(key:_:)-25yop.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":" = "},{"kind":"keyword","text":"#function"},{"kind":"text","text":", "},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/container\/callasfunction(key:_:)-25yop"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-25yop","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound ParameterFactory."}],"kind":"symbol","metadata":{"role":"symbol","title":"callAsFunction(key:_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"symbolKind":"method","externalID":"s:7Factory16ManagedContainerPAAE14callAsFunction3key_AA09ParameterA0Vyqd__qd_0_GSS_qd_0_qd__ctr0_lF::SYNTHESIZED::s:7Factory9ContainerC","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/Container/callAsFunction(key:_:)-25yop":{"role":"symbol","title":"callAsFunction(key:_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound ParameterFactory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-25yop","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/callasfunction(key:_:)-25yop"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"role":"collectionGroup","title":"ManagedContainer Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/container\/managedcontainer-implementations"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":" = "},{"kind":"keyword","text":"#function"},{"kind":"text","text":", "},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/container\/callasfunction(key:_:)-25yop"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-25yop","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound ParameterFactory."}],"kind":"symbol","metadata":{"role":"symbol","title":"callAsFunction(key:_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"symbolKind":"method","externalID":"s:7Factory16ManagedContainerPAAE14callAsFunction3key_AA09ParameterA0Vyqd__qd_0_GSS_qd_0_qd__ctr0_lF::SYNTHESIZED::s:7Factory9ContainerC","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"role":"collectionGroup","title":"ManagedContainer Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/container\/managedcontainer-implementations"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/Container/callAsFunction(key:_:)-25yop":{"role":"symbol","title":"callAsFunction(key:_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound ParameterFactory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-25yop","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/callasfunction(key:_:)-25yop"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/container/callasfunction(key:_:)-5d81k.json b/docs/data/documentation/factory/container/callasfunction(key:_:)-5d81k.json index 0a01f9b7..e56c02b8 100644 --- a/docs/data/documentation/factory/container/callasfunction(key:_:)-5d81k.json +++ b/docs/data/documentation/factory/container/callasfunction(key:_:)-5d81k.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":" = "},{"kind":"keyword","text":"#function"},{"kind":"text","text":", "},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/container\/callasfunction(key:_:)-5d81k"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-5d81k","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound Factory."}],"kind":"symbol","metadata":{"role":"symbol","title":"callAsFunction(key:_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"symbolKind":"method","externalID":"s:7Factory16ManagedContainerPAAE14callAsFunction3key_A2AVyqd__GSS_qd__yctlF::SYNTHESIZED::s:7Factory9ContainerC","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"role":"collectionGroup","title":"ManagedContainer Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/container\/managedcontainer-implementations"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Container/callAsFunction(key:_:)-5d81k":{"role":"symbol","title":"callAsFunction(key:_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-5d81k","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/callasfunction(key:_:)-5d81k"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":" = "},{"kind":"keyword","text":"#function"},{"kind":"text","text":", "},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/container\/callasfunction(key:_:)-5d81k"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-5d81k","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound Factory."}],"kind":"symbol","metadata":{"role":"symbol","title":"callAsFunction(key:_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"symbolKind":"method","externalID":"s:7Factory16ManagedContainerPAAE14callAsFunction3key_A2AVyqd__GSS_qd__yctlF::SYNTHESIZED::s:7Factory9ContainerC","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Container/callAsFunction(key:_:)-5d81k":{"role":"symbol","title":"callAsFunction(key:_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-5d81k","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/callasfunction(key:_:)-5d81k"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"role":"collectionGroup","title":"ManagedContainer Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/container\/managedcontainer-implementations"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/container/decorator(_:).json b/docs/data/documentation/factory/container/decorator(_:).json index 2154298e..66f05dfe 100644 --- a/docs/data/documentation/factory/container/decorator(_:).json +++ b/docs/data/documentation/factory/container/decorator(_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"decorator"},{"kind":"text","text":": (("},{"kind":"keyword","text":"Any"},{"kind":"text","text":") -> ())?)"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/container\/decorator(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/decorator(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container."}],"kind":"symbol","metadata":{"role":"symbol","title":"decorator(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"((("},{"kind":"keyword","text":"Any"},{"kind":"text","text":") -> ())?)"}],"symbolKind":"method","externalID":"s:7Factory16ManagedContainerPAAE9decoratoryyyypcSgF::SYNTHESIZED::s:7Factory9ContainerC","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"role":"collectionGroup","title":"ManagedContainer Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/container\/managedcontainer-implementations"},"doc://Factory/documentation/Factory/Container/decorator(_:)":{"role":"symbol","title":"decorator(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"((("},{"kind":"keyword","text":"Any"},{"kind":"text","text":") -> ())?)"}],"abstract":[{"type":"text","text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/decorator(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/decorator(_:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"decorator"},{"kind":"text","text":": (("},{"kind":"keyword","text":"Any"},{"kind":"text","text":") -> ())?)"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/container\/decorator(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/decorator(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container."}],"kind":"symbol","metadata":{"role":"symbol","title":"decorator(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"((("},{"kind":"keyword","text":"Any"},{"kind":"text","text":") -> ())?)"}],"symbolKind":"method","externalID":"s:7Factory16ManagedContainerPAAE9decoratoryyyypcSgF::SYNTHESIZED::s:7Factory9ContainerC","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Container/decorator(_:)":{"role":"symbol","title":"decorator(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"((("},{"kind":"keyword","text":"Any"},{"kind":"text","text":") -> ())?)"}],"abstract":[{"type":"text","text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/decorator(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/decorator(_:)"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"role":"collectionGroup","title":"ManagedContainer Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/container\/managedcontainer-implementations"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/container/init().json b/docs/data/documentation/factory/container/init().json index 04bc7d53..ba3b89f2 100644 --- a/docs/data/documentation/factory/container/init().json +++ b/docs/data/documentation/factory/container/init().json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/container\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/init()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Public initializer"}],"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"title":"init()","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory9ContainerCACycfc","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container"]]},"references":{"doc://Factory/documentation/Factory/Container/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"Public initializer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/init()"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/container\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/init()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Public initializer"}],"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"title":"init()","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory9ContainerCACycfc","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Container/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"Public initializer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/init()"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/container/managedcontainer-implementations.json b/docs/data/documentation/factory/container/managedcontainer-implementations.json index e9961b4a..49ea6fe3 100644 --- a/docs/data/documentation/factory/container/managedcontainer-implementations.json +++ b/docs/data/documentation/factory/container/managedcontainer-implementations.json @@ -1 +1 @@ -{"variants":[{"paths":["\/documentation\/factory\/container\/managedcontainer-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","interfaceLanguage":"swift"},"topicSections":[{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-25yop","doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-5d81k","doc:\/\/Factory\/documentation\/Factory\/Container\/decorator(_:)","doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)","doc:\/\/Factory\/documentation\/Factory\/Container\/with(_:)"],"generated":true}],"kind":"article","metadata":{"modules":[{"name":"Factory"}],"role":"collectionGroup","title":"ManagedContainer Implementations"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container"]]},"references":{"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/Container/decorator(_:)":{"role":"symbol","title":"decorator(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"((("},{"kind":"keyword","text":"Any"},{"kind":"text","text":") -> ())?)"}],"abstract":[{"type":"text","text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/decorator(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/decorator(_:)"},"doc://Factory/documentation/Factory/Container/with(_:)":{"role":"symbol","title":"with(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"with"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Defines a with function to allow container transformation on assignment."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/with(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/with(_:)"},"doc://Factory/documentation/Factory/Container/callAsFunction(key:_:)-5d81k":{"role":"symbol","title":"callAsFunction(key:_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-5d81k","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/callasfunction(key:_:)-5d81k"},"doc://Factory/documentation/Factory/Container/callAsFunction(key:_:)-25yop":{"role":"symbol","title":"callAsFunction(key:_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound ParameterFactory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-25yop","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/callasfunction(key:_:)-25yop"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Container/promised(key:)":{"role":"symbol","title":"promised(key:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory where registration is promised before resolution."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/promised(key:)"}}} \ No newline at end of file +{"variants":[{"paths":["\/documentation\/factory\/container\/managedcontainer-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","interfaceLanguage":"swift"},"topicSections":[{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-25yop","doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-5d81k","doc:\/\/Factory\/documentation\/Factory\/Container\/decorator(_:)","doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)","doc:\/\/Factory\/documentation\/Factory\/Container\/with(_:)"],"generated":true}],"kind":"article","metadata":{"modules":[{"name":"Factory"}],"role":"collectionGroup","title":"ManagedContainer Implementations"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container"]]},"references":{"doc://Factory/documentation/Factory/Container/promised(key:)":{"role":"symbol","title":"promised(key:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory where registration is promised before resolution."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/promised(key:)"},"doc://Factory/documentation/Factory/Container/callAsFunction(key:_:)-25yop":{"role":"symbol","title":"callAsFunction(key:_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound ParameterFactory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-25yop","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/callasfunction(key:_:)-25yop"},"doc://Factory/documentation/Factory/Container/decorator(_:)":{"role":"symbol","title":"decorator(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"((("},{"kind":"keyword","text":"Any"},{"kind":"text","text":") -> ())?)"}],"abstract":[{"type":"text","text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/decorator(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/decorator(_:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Container/with(_:)":{"role":"symbol","title":"with(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"with"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Defines a with function to allow container transformation on assignment."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/with(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/with(_:)"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/Container/callAsFunction(key:_:)-5d81k":{"role":"symbol","title":"callAsFunction(key:_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-5d81k","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/callasfunction(key:_:)-5d81k"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/container/manager.json b/docs/data/documentation/factory/container/manager.json index 7b8d1d93..faa69c02 100644 --- a/docs/data/documentation/factory/container/manager.json +++ b/docs/data/documentation/factory/container/manager.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC","text":"ContainerManager"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/container\/manager"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/manager","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Define the container’s manager."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC"}],"title":"manager","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory9ContainerC7managerAA0B7ManagerCvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Container/manager":{"role":"symbol","title":"manager","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC"}],"abstract":[{"type":"text","text":"Define the container’s manager."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/manager","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/manager"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC","text":"ContainerManager"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/container\/manager"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/manager","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Define the container’s manager."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC"}],"title":"manager","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory9ContainerC7managerAA0B7ManagerCvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container"]]},"references":{"doc://Factory/documentation/Factory/Container/manager":{"role":"symbol","title":"manager","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC"}],"abstract":[{"type":"text","text":"Define the container’s manager."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/manager","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/manager"},"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/container/promised(key:).json b/docs/data/documentation/factory/container/promised(key:).json index 73ab9423..68005ab6 100644 --- a/docs/data/documentation/factory/container/promised(key:).json +++ b/docs/data/documentation/factory/container/promised(key:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":" = "},{"kind":"keyword","text":"#function"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/container\/promised(key:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory where registration is promised before resolution."}],"kind":"symbol","metadata":{"role":"symbol","title":"promised(key:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"symbolKind":"method","externalID":"s:7Factory16ManagedContainerPAAE8promised3keyA2AVyqd__SgGSS_tlF::SYNTHESIZED::s:7Factory9ContainerC","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Container/promised(key:)":{"role":"symbol","title":"promised(key:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory where registration is promised before resolution."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/promised(key:)"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"role":"collectionGroup","title":"ManagedContainer Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/container\/managedcontainer-implementations"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":" = "},{"kind":"keyword","text":"#function"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/container\/promised(key:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory where registration is promised before resolution."}],"kind":"symbol","metadata":{"role":"symbol","title":"promised(key:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"symbolKind":"method","externalID":"s:7Factory16ManagedContainerPAAE8promised3keyA2AVyqd__SgGSS_tlF::SYNTHESIZED::s:7Factory9ContainerC","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"role":"collectionGroup","title":"ManagedContainer Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/container\/managedcontainer-implementations"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/Container/promised(key:)":{"role":"symbol","title":"promised(key:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory where registration is promised before resolution."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/promised(key:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/container/with(_:).json b/docs/data/documentation/factory/container/with(_:).json index c9091c87..b1ff398c 100644 --- a/docs/data/documentation/factory/container/with(_:).json +++ b/docs/data/documentation/factory/container/with(_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"with"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"transform"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/container\/with(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/with(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Defines a with function to allow container transformation on assignment."}],"kind":"symbol","metadata":{"role":"symbol","title":"with(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"with"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory16ManagedContainerPAAE4withyxyxXEF::SYNTHESIZED::s:7Factory9ContainerC","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Container/with(_:)":{"role":"symbol","title":"with(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"with"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Defines a with function to allow container transformation on assignment."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/with(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/with(_:)"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"role":"collectionGroup","title":"ManagedContainer Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/container\/managedcontainer-implementations"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"with"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"transform"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/container\/with(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/with(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Defines a with function to allow container transformation on assignment."}],"kind":"symbol","metadata":{"role":"symbol","title":"with(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"with"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory16ManagedContainerPAAE4withyxyxXEF::SYNTHESIZED::s:7Factory9ContainerC","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"role":"collectionGroup","title":"ManagedContainer Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/container\/managedcontainer-implementations"},"doc://Factory/documentation/Factory/Container/with(_:)":{"role":"symbol","title":"with(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"with"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Defines a with function to allow container transformation on assignment."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/with(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/container\/with(_:)"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/containermanager.json b/docs/data/documentation/factory/containermanager.json index 4bee7af0..25020530 100644 --- a/docs/data/documentation/factory/containermanager.json +++ b/docs/data/documentation/factory/containermanager.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"final"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Every container requires a ContainerManager."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"ContainerManager also implements several functions that can be used to reset the container"},{"type":"text","text":" "},{"type":"text","text":"to a pristine state, as well as push\/pop methods that can save and restore the current state."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Those functions are designed primarily for testing."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"title":"ContainerManager","roleHeading":"Class","role":"symbol","symbolKind":"class","externalID":"s:7Factory16ContainerManagerC","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/init()"]},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/defaultScope","doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/dependencyChainTestMax","doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/logger","doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/promiseTriggersError","doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/trace"]},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/pop()","doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/push()","doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(options:)","doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(scope:)"]}],"references":{"doc://Factory/documentation/Factory/ContainerManager/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"Public initializer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/init()"},"doc://Factory/documentation/Factory/ContainerManager/dependencyChainTestMax":{"role":"symbol","title":"dependencyChainTestMax","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"dependencyChainTestMax"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"}],"abstract":[{"type":"text","text":"Public variable exposing dependency chain test maximum"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/dependencyChainTestMax","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/dependencychaintestmax"},"doc://Factory/documentation/Factory/ContainerManager/trace":{"role":"symbol","title":"trace","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"trace"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"abstract":[{"type":"text","text":"Public var enabling factory resolution trace statements in debug mode for ALL containers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/trace","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/trace"},"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"},"doc://Factory/documentation/Factory/ContainerManager/logger":{"role":"symbol","title":"logger","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"logger"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"}],"abstract":[{"type":"text","text":"Public access to logging facility in debug mode for ALL containers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/logger","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/logger"},"doc://Factory/documentation/Factory/ContainerManager/pop()":{"role":"symbol","title":"pop()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"pop"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"Test function pops and restores a previously pushed registration and cache state"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/pop()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/pop()"},"doc://Factory/documentation/Factory/ContainerManager/reset(options:)":{"role":"symbol","title":"reset(options:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"options"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Resets the Container to its original state, removing all registrations and clearing all scope caches."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(options:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/reset(options:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ContainerManager/promiseTriggersError":{"role":"symbol","title":"promiseTriggersError","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"promiseTriggersError"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"abstract":[{"type":"text","text":"Public variable promise behavior"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/promiseTriggersError","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/promisetriggerserror"},"doc://Factory/documentation/Factory/ContainerManager/push()":{"role":"symbol","title":"push()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"push"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"Test function pushes the current registration and cache states"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/push()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/push()"},"doc://Factory/documentation/Factory/ContainerManager/reset(scope:)":{"role":"symbol","title":"reset(scope:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Clears any cached values associated with a specific scope, leaving the other scope caches intact."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(scope:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/reset(scope:)"},"doc://Factory/documentation/Factory/ContainerManager/defaultScope":{"role":"symbol","title":"defaultScope","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"defaultScope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?"}],"abstract":[{"type":"text","text":"Default scope"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/defaultScope","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/defaultscope"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"final"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Every container requires a ContainerManager."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"ContainerManager also implements several functions that can be used to reset the container"},{"type":"text","text":" "},{"type":"text","text":"to a pristine state, as well as push\/pop methods that can save and restore the current state."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Those functions are designed primarily for testing."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"title":"ContainerManager","roleHeading":"Class","role":"symbol","symbolKind":"class","externalID":"s:7Factory16ContainerManagerC","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/init()"]},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/defaultScope","doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/dependencyChainTestMax","doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/logger","doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/promiseTriggersError","doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/trace"]},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/pop()","doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/push()","doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(options:)","doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(scope:)"]}],"references":{"doc://Factory/documentation/Factory/ContainerManager/push()":{"role":"symbol","title":"push()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"push"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"Test function pushes the current registration and cache states"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/push()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/push()"},"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"},"doc://Factory/documentation/Factory/ContainerManager/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"Public initializer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/init()"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ContainerManager/promiseTriggersError":{"role":"symbol","title":"promiseTriggersError","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"promiseTriggersError"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"abstract":[{"type":"text","text":"Public variable promise behavior"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/promiseTriggersError","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/promisetriggerserror"},"doc://Factory/documentation/Factory/ContainerManager/reset(scope:)":{"role":"symbol","title":"reset(scope:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Clears any cached values associated with a specific scope, leaving the other scope caches intact."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(scope:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/reset(scope:)"},"doc://Factory/documentation/Factory/ContainerManager/trace":{"role":"symbol","title":"trace","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"trace"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"abstract":[{"type":"text","text":"Public var enabling factory resolution trace statements in debug mode for ALL containers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/trace","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/trace"},"doc://Factory/documentation/Factory/ContainerManager/dependencyChainTestMax":{"role":"symbol","title":"dependencyChainTestMax","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"dependencyChainTestMax"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"}],"abstract":[{"type":"text","text":"Public variable exposing dependency chain test maximum"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/dependencyChainTestMax","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/dependencychaintestmax"},"doc://Factory/documentation/Factory/ContainerManager/defaultScope":{"role":"symbol","title":"defaultScope","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"defaultScope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?"}],"abstract":[{"type":"text","text":"Default scope"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/defaultScope","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/defaultscope"},"doc://Factory/documentation/Factory/ContainerManager/pop()":{"role":"symbol","title":"pop()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"pop"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"Test function pops and restores a previously pushed registration and cache state"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/pop()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/pop()"},"doc://Factory/documentation/Factory/ContainerManager/logger":{"role":"symbol","title":"logger","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"logger"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"}],"abstract":[{"type":"text","text":"Public access to logging facility in debug mode for ALL containers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/logger","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/logger"},"doc://Factory/documentation/Factory/ContainerManager/reset(options:)":{"role":"symbol","title":"reset(options:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"options"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Resets the Container to its original state, removing all registrations and clearing all scope caches."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(options:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/reset(options:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/containermanager/defaultscope.json b/docs/data/documentation/factory/containermanager/defaultscope.json index 193e0c0e..44565d9c 100644 --- a/docs/data/documentation/factory/containermanager/defaultscope.json +++ b/docs/data/documentation/factory/containermanager/defaultscope.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"defaultScope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":"?"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager\/defaultscope"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/defaultScope","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Default scope"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"defaultScope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?"}],"title":"defaultScope","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory16ContainerManagerC12defaultScopeAA0E0CSgvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"references":{"doc://Factory/documentation/Factory/ContainerManager/defaultScope":{"role":"symbol","title":"defaultScope","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"defaultScope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?"}],"abstract":[{"type":"text","text":"Default scope"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/defaultScope","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/defaultscope"},"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"defaultScope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":"?"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager\/defaultscope"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/defaultScope","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Default scope"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"defaultScope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?"}],"title":"defaultScope","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory16ContainerManagerC12defaultScopeAA0E0CSgvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"references":{"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ContainerManager/defaultScope":{"role":"symbol","title":"defaultScope","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"defaultScope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?"}],"abstract":[{"type":"text","text":"Default scope"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/defaultScope","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/defaultscope"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/containermanager/dependencychaintestmax.json b/docs/data/documentation/factory/containermanager/dependencychaintestmax.json index 52afca2a..b3fea1f3 100644 --- a/docs/data/documentation/factory/containermanager/dependencychaintestmax.json +++ b/docs/data/documentation/factory/containermanager/dependencychaintestmax.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"dependencyChainTestMax"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager\/dependencychaintestmax"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/dependencyChainTestMax","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Public variable exposing dependency chain test maximum"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"dependencyChainTestMax"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"}],"title":"dependencyChainTestMax","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory16ContainerManagerC22dependencyChainTestMaxSivp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"references":{"doc://Factory/documentation/Factory/ContainerManager/dependencyChainTestMax":{"role":"symbol","title":"dependencyChainTestMax","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"dependencyChainTestMax"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"}],"abstract":[{"type":"text","text":"Public variable exposing dependency chain test maximum"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/dependencyChainTestMax","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/dependencychaintestmax"},"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"dependencyChainTestMax"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager\/dependencychaintestmax"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/dependencyChainTestMax","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Public variable exposing dependency chain test maximum"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"dependencyChainTestMax"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"}],"title":"dependencyChainTestMax","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory16ContainerManagerC22dependencyChainTestMaxSivp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ContainerManager/dependencyChainTestMax":{"role":"symbol","title":"dependencyChainTestMax","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"dependencyChainTestMax"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"}],"abstract":[{"type":"text","text":"Public variable exposing dependency chain test maximum"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/dependencyChainTestMax","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/dependencychaintestmax"},"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/containermanager/logger.json b/docs/data/documentation/factory/containermanager/logger.json index d626c8bb..7ff42d71 100644 --- a/docs/data/documentation/factory/containermanager/logger.json +++ b/docs/data/documentation/factory/containermanager/logger.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"logger"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager\/logger"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/logger","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Public access to logging facility in debug mode for ALL containers."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"logger"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"}],"title":"logger","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory16ContainerManagerC6loggeryySScvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"references":{"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ContainerManager/logger":{"role":"symbol","title":"logger","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"logger"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"}],"abstract":[{"type":"text","text":"Public access to logging facility in debug mode for ALL containers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/logger","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/logger"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"logger"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager\/logger"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/logger","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Public access to logging facility in debug mode for ALL containers."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"logger"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"}],"title":"logger","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory16ContainerManagerC6loggeryySScvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"references":{"doc://Factory/documentation/Factory/ContainerManager/logger":{"role":"symbol","title":"logger","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"logger"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"}],"abstract":[{"type":"text","text":"Public access to logging facility in debug mode for ALL containers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/logger","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/logger"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/containermanager/pop().json b/docs/data/documentation/factory/containermanager/pop().json index 80038ab2..d2ee8279 100644 --- a/docs/data/documentation/factory/containermanager/pop().json +++ b/docs/data/documentation/factory/containermanager/pop().json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"pop"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager\/pop()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/pop()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Test function pops and restores a previously pushed registration and cache state"}],"kind":"symbol","metadata":{"role":"symbol","title":"pop()","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"pop"},{"kind":"text","text":"()"}],"symbolKind":"method","externalID":"s:7Factory16ContainerManagerC3popyyF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"references":{"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ContainerManager/pop()":{"role":"symbol","title":"pop()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"pop"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"Test function pops and restores a previously pushed registration and cache state"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/pop()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/pop()"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"pop"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager\/pop()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/pop()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Test function pops and restores a previously pushed registration and cache state"}],"kind":"symbol","metadata":{"role":"symbol","title":"pop()","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"pop"},{"kind":"text","text":"()"}],"symbolKind":"method","externalID":"s:7Factory16ContainerManagerC3popyyF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"},"doc://Factory/documentation/Factory/ContainerManager/pop()":{"role":"symbol","title":"pop()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"pop"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"Test function pops and restores a previously pushed registration and cache state"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/pop()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/pop()"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/containermanager/promisetriggerserror.json b/docs/data/documentation/factory/containermanager/promisetriggerserror.json index 28cd09e5..7d93b16f 100644 --- a/docs/data/documentation/factory/containermanager/promisetriggerserror.json +++ b/docs/data/documentation/factory/containermanager/promisetriggerserror.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"promiseTriggersError"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager\/promisetriggerserror"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/promiseTriggersError","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Public variable promise behavior"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"promiseTriggersError"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"title":"promiseTriggersError","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory16ContainerManagerC20promiseTriggersErrorSbvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ContainerManager/promiseTriggersError":{"role":"symbol","title":"promiseTriggersError","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"promiseTriggersError"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"abstract":[{"type":"text","text":"Public variable promise behavior"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/promiseTriggersError","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/promisetriggerserror"},"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"promiseTriggersError"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager\/promisetriggerserror"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/promiseTriggersError","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Public variable promise behavior"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"promiseTriggersError"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"title":"promiseTriggersError","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory16ContainerManagerC20promiseTriggersErrorSbvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"references":{"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"},"doc://Factory/documentation/Factory/ContainerManager/promiseTriggersError":{"role":"symbol","title":"promiseTriggersError","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"promiseTriggersError"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"abstract":[{"type":"text","text":"Public variable promise behavior"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/promiseTriggersError","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/promisetriggerserror"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/containermanager/push().json b/docs/data/documentation/factory/containermanager/push().json index 59daba32..c7355525 100644 --- a/docs/data/documentation/factory/containermanager/push().json +++ b/docs/data/documentation/factory/containermanager/push().json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"push"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager\/push()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/push()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Test function pushes the current registration and cache states"}],"kind":"symbol","metadata":{"role":"symbol","title":"push()","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"push"},{"kind":"text","text":"()"}],"symbolKind":"method","externalID":"s:7Factory16ContainerManagerC4pushyyF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"references":{"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"},"doc://Factory/documentation/Factory/ContainerManager/push()":{"role":"symbol","title":"push()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"push"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"Test function pushes the current registration and cache states"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/push()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/push()"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"push"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager\/push()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/push()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Test function pushes the current registration and cache states"}],"kind":"symbol","metadata":{"role":"symbol","title":"push()","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"push"},{"kind":"text","text":"()"}],"symbolKind":"method","externalID":"s:7Factory16ContainerManagerC4pushyyF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"references":{"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ContainerManager/push()":{"role":"symbol","title":"push()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"push"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"Test function pushes the current registration and cache states"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/push()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/push()"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/containermanager/reset(options:).json b/docs/data/documentation/factory/containermanager/reset(options:).json index 5661ffa0..96c3cb6b 100644 --- a/docs/data/documentation/factory/containermanager/reset(options:).json +++ b/docs/data/documentation/factory/containermanager/reset(options:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"options"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":" = .all)"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager\/reset(options:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(options:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Resets the Container to its original state, removing all registrations and clearing all scope caches."}],"kind":"symbol","metadata":{"role":"symbol","title":"reset(options:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"options"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"symbolKind":"method","externalID":"s:7Factory16ContainerManagerC5reset7optionsyAA0A12ResetOptionsO_tF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"references":{"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"},"doc://Factory/documentation/Factory/ContainerManager/reset(options:)":{"role":"symbol","title":"reset(options:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"options"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Resets the Container to its original state, removing all registrations and clearing all scope caches."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(options:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/reset(options:)"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"options"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":" = .all)"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager\/reset(options:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(options:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Resets the Container to its original state, removing all registrations and clearing all scope caches."}],"kind":"symbol","metadata":{"role":"symbol","title":"reset(options:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"options"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"symbolKind":"method","externalID":"s:7Factory16ContainerManagerC5reset7optionsyAA0A12ResetOptionsO_tF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"},"doc://Factory/documentation/Factory/ContainerManager/reset(options:)":{"role":"symbol","title":"reset(options:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"options"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Resets the Container to its original state, removing all registrations and clearing all scope caches."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(options:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/reset(options:)"},"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/containermanager/reset(scope:).json b/docs/data/documentation/factory/containermanager/reset(scope:).json index 16a08acd..059b15f8 100644 --- a/docs/data/documentation/factory/containermanager/reset(scope:).json +++ b/docs/data/documentation/factory/containermanager/reset(scope:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":")"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager\/reset(scope:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(scope:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Clears any cached values associated with a specific scope, leaving the other scope caches intact."}],"kind":"symbol","metadata":{"role":"symbol","title":"reset(scope:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":")"}],"symbolKind":"method","externalID":"s:7Factory16ContainerManagerC5reset5scopeyAA5ScopeC_tF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"references":{"doc://Factory/documentation/Factory/ContainerManager/reset(scope:)":{"role":"symbol","title":"reset(scope:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Clears any cached values associated with a specific scope, leaving the other scope caches intact."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(scope:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/reset(scope:)"},"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":")"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager\/reset(scope:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(scope:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Clears any cached values associated with a specific scope, leaving the other scope caches intact."}],"kind":"symbol","metadata":{"role":"symbol","title":"reset(scope:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":")"}],"symbolKind":"method","externalID":"s:7Factory16ContainerManagerC5reset5scopeyAA5ScopeC_tF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"},"doc://Factory/documentation/Factory/ContainerManager/reset(scope:)":{"role":"symbol","title":"reset(scope:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Clears any cached values associated with a specific scope, leaving the other scope caches intact."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(scope:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/reset(scope:)"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/containermanager/trace.json b/docs/data/documentation/factory/containermanager/trace.json index f36574cc..017d8c9d 100644 --- a/docs/data/documentation/factory/containermanager/trace.json +++ b/docs/data/documentation/factory/containermanager/trace.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"trace"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager\/trace"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/trace","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Public var enabling factory resolution trace statements in debug mode for ALL containers."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"trace"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"title":"trace","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory16ContainerManagerC5traceSbvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"references":{"doc://Factory/documentation/Factory/ContainerManager/trace":{"role":"symbol","title":"trace","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"trace"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"abstract":[{"type":"text","text":"Public var enabling factory resolution trace statements in debug mode for ALL containers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/trace","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/trace"},"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"trace"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager\/trace"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/trace","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Public var enabling factory resolution trace statements in debug mode for ALL containers."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"trace"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"title":"trace","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory16ContainerManagerC5traceSbvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"},"doc://Factory/documentation/Factory/ContainerManager/trace":{"role":"symbol","title":"trace","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"trace"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"abstract":[{"type":"text","text":"Public var enabling factory resolution trace statements in debug mode for ALL containers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/trace","kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/trace"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/containers.json b/docs/data/documentation/factory/containers.json index a57703ea..c9d0dc7d 100644 --- a/docs/data/documentation/factory/containers.json +++ b/docs/data/documentation/factory/containers.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Containers are used by Factory to manage object creation, object resolution, and object lifecycles in general."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"In Factory 1.0 with its statically defined Factory’s a “container” was really just a convenient namespace. But in Factory 2.0 a container is a distinct object that can be referenced, passed around, and deallocated as needed."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can even create separate instances of the same container type, each with its own registrations and scope caches."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory 2.0 supports true container-based dependency injection."}]},{"anchor":"Containers-and-Factories","level":2,"type":"heading","text":"Containers and Factories"},{"type":"paragraph","inlineContent":[{"type":"text","text":"A Factory definition is a computed property defined within a container extension. Each Factory needs a reference to its container, a scope, and it also requires a factory closure that will produce our dependency when asked to do so."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That’s a lot of code, so we usually just ask the enclosing container to make our Factory for us…"}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This process is covered in greater detail in "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted"},{"type":"text","text":"."}]},{"anchor":"Resolving-a-Dependency","level":2,"type":"heading","text":"Resolving a Dependency"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Once you’ve added a Factory to a container you can resolve it."}]},{"type":"codeListing","syntax":"swift","code":["let service = Container.shared.service()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Bingo. You now have your dependency."}]},{"anchor":"The-Default-Container","level":2,"type":"heading","text":"The Default Container"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory ships with a single "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container"},{"type":"text","text":" already constructed for your convenience."}]},{"type":"codeListing","syntax":"swift","code":["public final class Container: SharedContainer {"," public static var shared = MyContainer()"," public var manager = ContainerManager()","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You’ve seen it used and extended in all of the examples we’ve seen thus far, and most projects can simply extend it and go."}]},{"anchor":"Containershared","level":2,"type":"heading","text":"Container.shared"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As the default Container definition shows, each container class defined has a statically allocated "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" instance associated with it."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This instance can be referenced directly if you’re using a Service Locator-style pattern."}]},{"type":"codeListing","syntax":"swift","code":["let service = Container.shared.service()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or you can use the “shared” container as an application root container and pass it along to wherever it’s needed. Let’s take a look."}]},{"anchor":"Passing-Containers","level":2,"type":"heading","text":"Passing Containers"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s an example of passing an instance of a container to a view model and then initializing a service from that container."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel {"," let service2: MyServiceType"," init(container: Container) {"," service2 = container.service()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Additional examples and methods can be seen on the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions"},{"type":"text","text":" page."}]},{"anchor":"SharedContainer","level":2,"type":"heading","text":"SharedContainer"},{"type":"paragraph","inlineContent":[{"type":"text","text":"All containers conform to the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer"},{"type":"text","text":" protocol. That basically means that each one must have its own "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager"},{"type":"text","text":" and implement a static "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" instance."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"SharedContainer also defines some common functionality for each container, like the "},{"type":"codeVoice","code":"unique"},{"type":"text","text":" convenience function we’ve seen used throughout."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that you can extend SharedContainer with your own Factories."}]},{"type":"codeListing","syntax":"swift","code":["extension SharedContainer {"," var commonService: Factory {"," self { MyService() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"commonService"},{"type":"text","text":" Factory will now be available on every container created."}]},{"type":"codeListing","syntax":"swift","code":["let common1 = Container.shared.commonService()","let common2 = MyContainer.shared.commonService()"]},{"anchor":"Custom-Containers","level":2,"type":"heading","text":"Custom Containers"},{"type":"paragraph","inlineContent":[{"type":"text","text":"In a large project you might want to segregate factories into additional, smaller containers."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Defining your own container class is simple. Just use the following as a template."}]},{"type":"codeListing","syntax":"swift","code":["public final class MyContainer: SharedContainer {"," public static var shared = MyContainer()"," public var manager = ContainerManager()","}","","extension MyContainer {"," var cachedService: Factory {"," self { MyService() }.cached"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As mentioned, a container must derive from "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer"},{"type":"text","text":", have its own "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager"},{"type":"text","text":", and implement a static "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" instance. It also must be marked "},{"type":"codeVoice","code":"final"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Don’t forget that if need be you can reach across containers simply by specifying the full "},{"type":"codeVoice","code":"container.factory"},{"type":"text","text":" path."}]},{"type":"codeListing","syntax":"swift","code":["extension PaymentsContainer {"," let anotherService = Factory { "," self { AnotherService(using: Container.shared.optionalService()) }"," }","}"]},{"anchor":"Injected-Property-Wrappers","level":2,"type":"heading","text":"Injected Property Wrappers"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Property wrappers like "},{"type":"codeVoice","code":"@Injected"},{"type":"text","text":" and "},{"type":"codeVoice","code":"@LazyInjected"},{"type":"text","text":" always reference the "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" container for that class type. Let’s get an instance of the "},{"type":"codeVoice","code":"cachedService"},{"type":"text","text":" object we defined above by providing a keypath to the desired class and service."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {"," @Injected(\\MyContainer.cachedService) var cachedService","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We now have an instance of "},{"type":"codeVoice","code":"cachedService"},{"type":"text","text":" in our view model, as well as a reference to the same instance cached in "},{"type":"codeVoice","code":"MyContainer.shared.manager"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected"},{"type":"text","text":", "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected"},{"type":"text","text":", "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"},{"type":"text","text":", and "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject"},{"type":"text","text":" for more."}]},{"anchor":"Registration-and-Scope-Management","level":2,"type":"heading","text":"Registration and Scope Management"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As mentioned earlier, factory registrations and scopes are managed by the container on which the dependency was created. Adding a registration or clearing a scope cache on one container has no effect on any other container."}]},{"type":"codeListing","syntax":"swift","code":["let containerA = MyContainer()","containerA.register.cachedService { MockService() }","","\/\/ Will have a MockService","let service1 = containerA.cachedService() ","","\/\/ Will have a new or previously cached instance of ServiceType","let service2 = MyContainer.shared.cachedService() "]},{"anchor":"AutoRegister","level":2,"type":"heading","text":"AutoRegister"},{"type":"paragraph","inlineContent":[{"type":"text","text":"From time to time you may find that you need to register or change some instances prior to application initialization. If so you can do the following."}]},{"type":"codeListing","syntax":"swift","code":["extension Container: AutoRegistering {"," func autoRegister() {"," someService.register { ModuleB.SomeService() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Just make your container conform to "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering"},{"type":"text","text":" and provide the "},{"type":"codeVoice","code":"autoRegister"},{"type":"text","text":" function. This function will be called "},{"type":"emphasis","inlineContent":[{"type":"text","text":"once"}]},{"type":"text","text":" prior to the very first Factory service resolution on that container."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that this can come in handy when you want to register instances of objects obtained across different modules, or change settings in the container manager."}]},{"anchor":"Resetting-a-Container","level":2,"type":"heading","text":"Resetting a Container"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Using "},{"type":"codeVoice","code":"register"},{"type":"text","text":" on a factory lets us change the state of the system. But what if we need to revert back to the original behavior?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Simple. Just reset it to bring back the original factory closure. Or, if desired, you can reset "},{"type":"emphasis","inlineContent":[{"type":"text","text":"everything"}]},{"type":"text","text":" back to square one with a single command."}]},{"type":"codeListing","syntax":"Swift","code":["container.myService.reset() \/\/ resets this factory only","container.manager.reset() \/\/ clears all registrations and caches"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We can also reset registrations and scope caches specifically, leaving the other intact."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ Reset all registrations, restoring original factories but leaving caches intact","Container.shared.manager.reset(options: .registration)","","\/\/ Reset all scope caches, leaving registrations intact","Container.shared.manager.reset(options: .scope)"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can also reset a specific scope cache while leaving the others intact."}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.manager.reset(scope: .cached)"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that resetting registrations also resets the container’s auto registration flag."}]},{"style":"important","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Resetting a container or scope has no effect whatsoever on anything that’s already been resolved by Factory. It only ensures that the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"next"}]},{"type":"text","text":" time a Factory is asked to resolve a dependency that dependency will be a new instance."}]}],"type":"aside","name":"Important"},{"anchor":"Pushing-and-Popping-State","level":2,"type":"heading","text":"Pushing and Popping State"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As with Factory 1.0, the state of a container’s registrations and scope caches can be saved (pushed), and then restored (popped). See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing"},{"type":"text","text":" for more information on this."}]},{"anchor":"Releasing-a-Container","level":2,"type":"heading","text":"Releasing a Container"},{"style":"warning","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"If a container ever goes out of scope, so will all of its registrations and cached objects."}]}],"type":"aside","name":"Warning"},{"type":"paragraph","inlineContent":[{"type":"text","text":"To demonstrate, let’s see what happens when we create and assign a new container to "},{"type":"codeVoice","code":"MyContainer.shared"},{"type":"text","text":". Doing so releases the previous container, along with any registrations or objects that container may have cached. We’ll use the "},{"type":"codeVoice","code":"cachedService"},{"type":"text","text":" Factory we defined above."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ Create an instance of our cached service.","let service1 = MyContainer.shared.cachedService()","","\/\/ Repeat, which returns the same cached instance we obtained in service1.","let service2 = MyContainer.shared.cachedService()","assert(service1.id == service2.id)","","\/\/ Replace the existing shared container with a new one.","MyContainer.shared = MyContainer()","","\/\/ Trying again gets a new instance since the old container and cache was released.","let service3 = MyContainer.shared.cachedService()","assert(service1.id != service3.id)","","\/\/ Repeat and receive the same cached instance we obtained in service3.","let service4 = MyContainer.shared.cachedService()","assert(service3.id == service4.id)"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"From a certain point of view, replacing a container with a new one is the ultimate reset mechanism."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containers"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Containers","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"kind":"article","metadata":{"roleHeading":"Article","title":"Containers","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"The Basics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/GettingStarted","doc:\/\/Factory\/documentation\/Factory\/Scopes"],"generated":true}],"references":{"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"},"doc://Factory/documentation/Factory/SharedContainer":{"role":"symbol","title":"SharedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"abstract":[{"type":"text","text":"SharedContainer defines the protocol all Containers must adopt if they want to support Service Locator style injection or support any of the injection property wrappers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"url":"\/documentation\/factory\/sharedcontainer"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"},"doc://Factory/documentation/Factory/Testing":{"role":"article","title":"Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","kind":"article","type":"topic","url":"\/documentation\/factory\/testing"},"doc://Factory/documentation/Factory/LazyInjected":{"role":"symbol","title":"LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"url":"\/documentation\/factory\/lazyinjected"},"doc://Factory/documentation/Factory/GettingStarted":{"role":"collectionGroup","title":"Getting Started","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","kind":"article","type":"topic","url":"\/documentation\/factory\/gettingstarted"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/AutoRegistering":{"role":"symbol","title":"AutoRegistering","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"AutoRegistering"}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"AutoRegistering"}],"url":"\/documentation\/factory\/autoregistering"},"doc://Factory/documentation/Factory/Resolutions":{"role":"article","title":"Sample Resolutions","abstract":[{"type":"text","text":"There are many ways to use Factory to resolve dependencies. Here are a few examples."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","kind":"article","type":"topic","url":"\/documentation\/factory\/resolutions"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"url":"\/documentation\/factory\/weaklazyinjected"},"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Containers are used by Factory to manage object creation, object resolution, and object lifecycles in general."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"In Factory 1.0 with its statically defined Factory’s a “container” was really just a convenient namespace. But in Factory 2.0 a container is a distinct object that can be referenced, passed around, and deallocated as needed."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can even create separate instances of the same container type, each with its own registrations and scope caches."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory 2.0 supports true container-based dependency injection."}]},{"anchor":"Containers-and-Factories","level":2,"type":"heading","text":"Containers and Factories"},{"type":"paragraph","inlineContent":[{"type":"text","text":"A Factory definition is a computed property defined within a container extension. Each Factory needs a reference to its container, a scope, and it also requires a factory closure that will produce our dependency when asked to do so."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That’s a lot of code, so we usually just ask the enclosing container to make our Factory for us…"}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This process is covered in greater detail in "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted"},{"type":"text","text":"."}]},{"anchor":"Resolving-a-Dependency","level":2,"type":"heading","text":"Resolving a Dependency"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Once you’ve added a Factory to a container you can resolve it."}]},{"type":"codeListing","syntax":"swift","code":["let service = Container.shared.service()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Bingo. You now have your dependency."}]},{"anchor":"The-Default-Container","level":2,"type":"heading","text":"The Default Container"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory ships with a single "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container"},{"type":"text","text":" already constructed for your convenience."}]},{"type":"codeListing","syntax":"swift","code":["public final class Container: SharedContainer {"," public static var shared = MyContainer()"," public var manager = ContainerManager()","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You’ve seen it used and extended in all of the examples we’ve seen thus far, and most projects can simply extend it and go."}]},{"anchor":"Containershared","level":2,"type":"heading","text":"Container.shared"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As the default Container definition shows, each container class defined has a statically allocated "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" instance associated with it."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This instance can be referenced directly if you’re using a Service Locator-style pattern."}]},{"type":"codeListing","syntax":"swift","code":["let service = Container.shared.service()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or you can use the “shared” container as an application root container and pass it along to wherever it’s needed. Let’s take a look."}]},{"anchor":"Passing-Containers","level":2,"type":"heading","text":"Passing Containers"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s an example of passing an instance of a container to a view model and then initializing a service from that container."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel {"," let service2: MyServiceType"," init(container: Container) {"," service2 = container.service()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Additional examples and methods can be seen on the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions"},{"type":"text","text":" page."}]},{"anchor":"SharedContainer","level":2,"type":"heading","text":"SharedContainer"},{"type":"paragraph","inlineContent":[{"type":"text","text":"All containers conform to the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer"},{"type":"text","text":" protocol. That basically means that each one must have its own "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager"},{"type":"text","text":" and implement a static "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" instance."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"SharedContainer also defines some common functionality for each container, like the "},{"type":"codeVoice","code":"unique"},{"type":"text","text":" convenience function we’ve seen used throughout."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that you can extend SharedContainer with your own Factories."}]},{"type":"codeListing","syntax":"swift","code":["extension SharedContainer {"," var commonService: Factory {"," self { MyService() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"commonService"},{"type":"text","text":" Factory will now be available on every container created."}]},{"type":"codeListing","syntax":"swift","code":["let common1 = Container.shared.commonService()","let common2 = MyContainer.shared.commonService()"]},{"anchor":"Custom-Containers","level":2,"type":"heading","text":"Custom Containers"},{"type":"paragraph","inlineContent":[{"type":"text","text":"In a large project you might want to segregate factories into additional, smaller containers."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Defining your own container class is simple. Just use the following as a template."}]},{"type":"codeListing","syntax":"swift","code":["public final class MyContainer: SharedContainer {"," public static var shared = MyContainer()"," public var manager = ContainerManager()","}","","extension MyContainer {"," var cachedService: Factory {"," self { MyService() }.cached"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As mentioned, a container must derive from "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer"},{"type":"text","text":", have its own "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager"},{"type":"text","text":", and implement a static "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" instance. It also must be marked "},{"type":"codeVoice","code":"final"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Don’t forget that if need be you can reach across containers simply by specifying the full "},{"type":"codeVoice","code":"container.factory"},{"type":"text","text":" path."}]},{"type":"codeListing","syntax":"swift","code":["extension PaymentsContainer {"," let anotherService = Factory { "," self { AnotherService(using: Container.shared.optionalService()) }"," }","}"]},{"anchor":"Injected-Property-Wrappers","level":2,"type":"heading","text":"Injected Property Wrappers"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Property wrappers like "},{"type":"codeVoice","code":"@Injected"},{"type":"text","text":" and "},{"type":"codeVoice","code":"@LazyInjected"},{"type":"text","text":" always reference the "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" container for that class type. Let’s get an instance of the "},{"type":"codeVoice","code":"cachedService"},{"type":"text","text":" object we defined above by providing a keypath to the desired class and service."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {"," @Injected(\\MyContainer.cachedService) var cachedService","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We now have an instance of "},{"type":"codeVoice","code":"cachedService"},{"type":"text","text":" in our view model, as well as a reference to the same instance cached in "},{"type":"codeVoice","code":"MyContainer.shared.manager"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected"},{"type":"text","text":", "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected"},{"type":"text","text":", "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"},{"type":"text","text":", and "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject"},{"type":"text","text":" for more."}]},{"anchor":"Registration-and-Scope-Management","level":2,"type":"heading","text":"Registration and Scope Management"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As mentioned earlier, factory registrations and scopes are managed by the container on which the dependency was created. Adding a registration or clearing a scope cache on one container has no effect on any other container."}]},{"type":"codeListing","syntax":"swift","code":["let containerA = MyContainer()","containerA.register.cachedService { MockService() }","","\/\/ Will have a MockService","let service1 = containerA.cachedService() ","","\/\/ Will have a new or previously cached instance of ServiceType","let service2 = MyContainer.shared.cachedService() "]},{"anchor":"AutoRegister","level":2,"type":"heading","text":"AutoRegister"},{"type":"paragraph","inlineContent":[{"type":"text","text":"From time to time you may find that you need to register or change some instances prior to application initialization. If so you can do the following."}]},{"type":"codeListing","syntax":"swift","code":["extension Container: AutoRegistering {"," func autoRegister() {"," someService.register { ModuleB.SomeService() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Just make your container conform to "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering"},{"type":"text","text":" and provide the "},{"type":"codeVoice","code":"autoRegister"},{"type":"text","text":" function. This function will be called "},{"type":"emphasis","inlineContent":[{"type":"text","text":"once"}]},{"type":"text","text":" prior to the very first Factory service resolution on that container."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that this can come in handy when you want to register instances of objects obtained across different modules, or change settings in the container manager."}]},{"anchor":"Resetting-a-Container","level":2,"type":"heading","text":"Resetting a Container"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Using "},{"type":"codeVoice","code":"register"},{"type":"text","text":" on a factory lets us change the state of the system. But what if we need to revert back to the original behavior?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Simple. Just reset it to bring back the original factory closure. Or, if desired, you can reset "},{"type":"emphasis","inlineContent":[{"type":"text","text":"everything"}]},{"type":"text","text":" back to square one with a single command."}]},{"type":"codeListing","syntax":"Swift","code":["container.myService.reset() \/\/ resets this factory only","container.manager.reset() \/\/ clears all registrations and caches"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We can also reset registrations and scope caches specifically, leaving the other intact."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ Reset all registrations, restoring original factories but leaving caches intact","Container.shared.manager.reset(options: .registration)","","\/\/ Reset all scope caches, leaving registrations intact","Container.shared.manager.reset(options: .scope)"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can also reset a specific scope cache while leaving the others intact."}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.manager.reset(scope: .cached)"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that resetting registrations also resets the container’s auto registration flag."}]},{"style":"important","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Resetting a container or scope has no effect whatsoever on anything that’s already been resolved by Factory. It only ensures that the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"next"}]},{"type":"text","text":" time a Factory is asked to resolve a dependency that dependency will be a new instance."}]}],"type":"aside","name":"Important"},{"anchor":"Pushing-and-Popping-State","level":2,"type":"heading","text":"Pushing and Popping State"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As with Factory 1.0, the state of a container’s registrations and scope caches can be saved (pushed), and then restored (popped). See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing"},{"type":"text","text":" for more information on this."}]},{"anchor":"Releasing-a-Container","level":2,"type":"heading","text":"Releasing a Container"},{"style":"warning","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"If a container ever goes out of scope, so will all of its registrations and cached objects."}]}],"type":"aside","name":"Warning"},{"type":"paragraph","inlineContent":[{"type":"text","text":"To demonstrate, let’s see what happens when we create and assign a new container to "},{"type":"codeVoice","code":"MyContainer.shared"},{"type":"text","text":". Doing so releases the previous container, along with any registrations or objects that container may have cached. We’ll use the "},{"type":"codeVoice","code":"cachedService"},{"type":"text","text":" Factory we defined above."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ Create an instance of our cached service.","let service1 = MyContainer.shared.cachedService()","","\/\/ Repeat, which returns the same cached instance we obtained in service1.","let service2 = MyContainer.shared.cachedService()","assert(service1.id == service2.id)","","\/\/ Replace the existing shared container with a new one.","MyContainer.shared = MyContainer()","","\/\/ Trying again gets a new instance since the old container and cache was released.","let service3 = MyContainer.shared.cachedService()","assert(service1.id != service3.id)","","\/\/ Repeat and receive the same cached instance we obtained in service3.","let service4 = MyContainer.shared.cachedService()","assert(service3.id == service4.id)"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"From a certain point of view, replacing a container with a new one is the ultimate reset mechanism."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containers"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Containers","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"kind":"article","metadata":{"roleHeading":"Article","title":"Containers","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"The Basics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/GettingStarted","doc:\/\/Factory\/documentation\/Factory\/Scopes"],"generated":true}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/Testing":{"role":"article","title":"Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","kind":"article","type":"topic","url":"\/documentation\/factory\/testing"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"url":"\/documentation\/factory\/weaklazyinjected"},"doc://Factory/documentation/Factory/AutoRegistering":{"role":"symbol","title":"AutoRegistering","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"AutoRegistering"}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"AutoRegistering"}],"url":"\/documentation\/factory\/autoregistering"},"doc://Factory/documentation/Factory/LazyInjected":{"role":"symbol","title":"LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"url":"\/documentation\/factory\/lazyinjected"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"},"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Resolutions":{"role":"article","title":"Sample Resolutions","abstract":[{"type":"text","text":"There are many ways to use Factory to resolve dependencies. Here are a few examples."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","kind":"article","type":"topic","url":"\/documentation\/factory\/resolutions"},"doc://Factory/documentation/Factory/GettingStarted":{"role":"collectionGroup","title":"Getting Started","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","kind":"article","type":"topic","url":"\/documentation\/factory\/gettingstarted"},"doc://Factory/documentation/Factory/SharedContainer":{"role":"symbol","title":"SharedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"abstract":[{"type":"text","text":"SharedContainer defines the protocol all Containers must adopt if they want to support Service Locator style injection or support any of the injection property wrappers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"url":"\/documentation\/factory\/sharedcontainer"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/contexts.json b/docs/data/documentation/factory/contexts.json index eca6ed4d..fa121b6c 100644 --- a/docs/data/documentation/factory/contexts.json +++ b/docs/data/documentation/factory/contexts.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Developers often use Factory to mock data for previews and unit tests. Now Factory 2.1 extends these capabilities by allowing them to specify dependencies based on the application’s current "},{"type":"emphasis","inlineContent":[{"type":"text","text":"context"}]},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"What if, for example, you "},{"type":"strong","inlineContent":[{"type":"text","text":"never"}]},{"type":"text","text":" want your application’s analytics library to be called when running unit tests?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Piece of cake. Just register a new override for that particular context."}]},{"type":"codeListing","syntax":"swift","code":["extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," container.analytics"," .context(.test) { MockAnalyticsEngine() }"," #endif"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory makes it easy."}]},{"anchor":"Contexts","level":2,"type":"heading","text":"Contexts"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory 2.1 provides quite a few predefined contexts for your use. They are:"}]},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"arg(String)"}]},{"type":"text","text":" - application is launched with a particular argument."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"args([String])"}]},{"type":"text","text":" - application is launched with one of several arguments."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"preview"}]},{"type":"text","text":" - application is running in Xcode Preview mode"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"test"}]},{"type":"text","text":" - application is running in Xcode Unit Test mode"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"debug"}]},{"type":"text","text":" - application is running in Xcode DEBUG mode"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"simulator"}]},{"type":"text","text":" - application is running within an Xcode simulator"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"device"}]},{"type":"text","text":" - application is running on an actual device"}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s dive in."}]},{"anchor":"Some-Examples","level":2,"type":"heading","text":"Some Examples"},{"anchor":"-onTest","level":3,"type":"heading","text":"• onTest"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As mentioned, the Factory closure associated with this context is used whenever your application or library is running unit tests using XCTest."}]},{"type":"codeListing","syntax":"swift","code":["container.analytics"," .context(.test) { MockAnalyticsEngine() }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"There’s also a shortcut version:"}]},{"type":"codeListing","syntax":"swift","code":["container.analytics"," .onTest { MockAnalyticsEngine() }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Having contexts built into Factory saves you from having to go to StackOverflow in an attempt to figure out how to do the same thing for yourself."}]},{"type":"codeListing","syntax":"swift","code":["if ProcessInfo.processInfo.environment[\"XCTestConfigurationFilePath\"] != nil {"," container.analytics.register { MockAnalyticsEngine() }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Using onTest is much easier."}]},{"type":"paragraph","inlineContent":[{"type":"emphasis","inlineContent":[{"type":"text","text":"By the way, checking the environment for XCTestConfigurationFilePath doesn’t work if your tests are launched from the command line using swift test. So much for StackOverflow."}]}]},{"anchor":"-onPreview","level":3,"type":"heading","text":"• onPreview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This specifies a dependency that will be used whenever your app or module is running SwiftUI Previews."}]},{"type":"codeListing","syntax":"swift","code":["container.myServiceType"," .onPreview { MockService() }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Which obviously makes your preview code itself much simpler."}]},{"type":"codeListing","syntax":"swift","code":["struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," ContentView()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can, of course, still use the mechanisms shown in "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews"},{"type":"text","text":"."}]},{"anchor":"-onDebug","level":3,"type":"heading","text":"• onDebug"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Triggered whenever your application is running in debug mode in simulators, on a device, or when running unit tests."}]},{"style":"note","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"that there’s no "},{"type":"codeVoice","code":"release"},{"type":"text","text":" context. Just use the standard "},{"type":"codeVoice","code":"register"},{"type":"text","text":" syntax in that case."}]}],"type":"aside","name":"Note"},{"anchor":"-onSimulator--onDevice","level":3,"type":"heading","text":"• onSimulator \/ onDevice"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Pretty apparent. What may not be so apparent, however, is that unlike all of the above these two contexts are also available in release builds."}]},{"anchor":"-onArg","level":3,"type":"heading","text":"• onArg"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"arg"},{"type":"text","text":" context is a powerful tool to have when you want to UITest your application and you want to change it’s behavior."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As shown in the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing"},{"type":"text","text":" section the test case itself is pretty standard."}]},{"type":"codeListing","syntax":"swift","code":["import XCTest","","final class FactoryDemoUITests: XCTestCase {"," func testExample() throws {"," let app = XCUIApplication()"," app.launchArguments.append(\"mock1\")"," app.launch()",""," let welcome = app.staticTexts[\"Mock Number 1! for Michael\"]"," XCTAssert(welcome.exists)"," }","} "]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The shortcut comes in the application itself when we want to check the launch arguments to see what registrations we might want to change."}]},{"type":"codeListing","syntax":"swift","code":["import Foundation","import Factory","","extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," myServiceType"," .onArg(\"mock0\") { EmptyService() }"," .onArg(\"mock1\") { MockServiceN(1) }"," .onArg(\"error\") { MockError(404) }"," #endif"," }","}"]},{"anchor":"-onArgs","level":3,"type":"heading","text":"• onArgs"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Similar to arg, but let’s you use the same factory when any of several arguments are passed."}]},{"type":"codeListing","syntax":"swift","code":["myServiceType"," .onArgs([\"mock0\", \"mock1\", \"mock3\"]) { "," EmptyService()"," }"]},{"anchor":"Runtime-Arguments","level":2,"type":"heading","text":"Runtime Arguments"},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can also add and remove your own arguments at runtime. Consider this…"}]},{"type":"codeListing","syntax":"swift","code":["FactoryContext.setArg(\"light\", forKey: \"theme\")","FactoryContext.removeArg(forKey: \"theme\")","","myStyleSystem { StandardTheme() }"," .onArg(\"light\") { LightTheme() }"," .onArg(\"dark\") { DarkTheme() }"]},{"anchor":"Multiple-Contexts","level":2,"type":"heading","text":"Multiple Contexts"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As you may have noticed above in the "},{"type":"codeVoice","code":"arg"},{"type":"text","text":" example, chaining multiple contexts together work just as you’d expect and are specified using Factory’s modifier syntax."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s an example of specifying separate services depending on context."}]},{"type":"codeListing","syntax":"swift","code":["container.myServiceType"," .onPreview { MockService() }"," .onTest { UnitTestMockService() }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And here’s an example saying we want the same dependency under multiple contexts."}]},{"type":"codeListing","syntax":"swift","code":["container.myServiceType"," .context(.simulator, .test) { MockService() }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Which brings us to…"}]},{"anchor":"Context-Precedence","level":2,"type":"heading","text":"Context Precedence"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Registering multiple contexts could lead one to wonder just which one will be used in a situation where multiple contexts apply. Here’s the order of evaluation."}]},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"arg[s]"}]}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"preview"}]},{"type":"text","text":" *"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"test"}]},{"type":"text","text":" *"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"simulator"}]}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"device"}]}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"debug"}]},{"type":"text","text":" *"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"registered factory"}]},{"type":"text","text":" (if any)"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"original factory"}]}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that any context marked with an asterisk (*) is only available in a DEBUG build. The executable functionality is stripped from release builds."}]},{"anchor":"Global-Context","level":2,"type":"heading","text":"Global Context"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Keep in mind that contexts are global. The entire app is running in debug more or it’s not. It was passed a “mock0” argument at runtime or it wasn’t."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"onArg"},{"type":"text","text":" and "},{"type":"codeVoice","code":"onDebug"},{"type":"text","text":" and other context modifiers basically define how the app should respond to that particular context."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/contexts"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Contexts","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"kind":"article","metadata":{"roleHeading":"Article","title":"Contexts","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Development and Testing","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Previews","doc:\/\/Factory\/documentation\/Factory\/Testing","doc:\/\/Factory\/documentation\/Factory\/Debugging","doc:\/\/Factory\/documentation\/Factory\/Chains"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Chains":{"role":"article","title":"Circular Dependency Chains","abstract":[{"type":"text","text":"Detecting and solving Circular Dependency Chains."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","kind":"article","type":"topic","url":"\/documentation\/factory\/chains"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Debugging":{"role":"article","title":"Debugging","abstract":[{"type":"text","text":"Additional support for debugging resolution cycles, dependency chains and other issue."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","kind":"article","type":"topic","url":"\/documentation\/factory\/debugging"},"doc://Factory/documentation/Factory/Previews":{"role":"article","title":"SwiftUI Previews","abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","kind":"article","type":"topic","url":"\/documentation\/factory\/previews"},"doc://Factory/documentation/Factory/Testing":{"role":"article","title":"Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","kind":"article","type":"topic","url":"\/documentation\/factory\/testing"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Developers often use Factory to mock data for previews and unit tests. Now Factory 2.1 extends these capabilities by allowing them to specify dependencies based on the application’s current "},{"type":"emphasis","inlineContent":[{"type":"text","text":"context"}]},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"What if, for example, you "},{"type":"strong","inlineContent":[{"type":"text","text":"never"}]},{"type":"text","text":" want your application’s analytics library to be called when running unit tests?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Piece of cake. Just register a new override for that particular context."}]},{"type":"codeListing","syntax":"swift","code":["extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," container.analytics"," .context(.test) { MockAnalyticsEngine() }"," #endif"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory makes it easy."}]},{"anchor":"Contexts","level":2,"type":"heading","text":"Contexts"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory 2.1 provides quite a few predefined contexts for your use. They are:"}]},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"arg(String)"}]},{"type":"text","text":" - application is launched with a particular argument."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"args([String])"}]},{"type":"text","text":" - application is launched with one of several arguments."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"preview"}]},{"type":"text","text":" - application is running in Xcode Preview mode"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"test"}]},{"type":"text","text":" - application is running in Xcode Unit Test mode"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"debug"}]},{"type":"text","text":" - application is running in Xcode DEBUG mode"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"simulator"}]},{"type":"text","text":" - application is running within an Xcode simulator"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"device"}]},{"type":"text","text":" - application is running on an actual device"}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s dive in."}]},{"anchor":"Some-Examples","level":2,"type":"heading","text":"Some Examples"},{"anchor":"-onTest","level":3,"type":"heading","text":"• onTest"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As mentioned, the Factory closure associated with this context is used whenever your application or library is running unit tests using XCTest."}]},{"type":"codeListing","syntax":"swift","code":["container.analytics"," .context(.test) { MockAnalyticsEngine() }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"There’s also a shortcut version:"}]},{"type":"codeListing","syntax":"swift","code":["container.analytics"," .onTest { MockAnalyticsEngine() }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Having contexts built into Factory saves you from having to go to StackOverflow in an attempt to figure out how to do the same thing for yourself."}]},{"type":"codeListing","syntax":"swift","code":["if ProcessInfo.processInfo.environment[\"XCTestConfigurationFilePath\"] != nil {"," container.analytics.register { MockAnalyticsEngine() }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Using onTest is much easier."}]},{"type":"paragraph","inlineContent":[{"type":"emphasis","inlineContent":[{"type":"text","text":"By the way, checking the environment for XCTestConfigurationFilePath doesn’t work if your tests are launched from the command line using swift test. So much for StackOverflow."}]}]},{"anchor":"-onPreview","level":3,"type":"heading","text":"• onPreview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This specifies a dependency that will be used whenever your app or module is running SwiftUI Previews."}]},{"type":"codeListing","syntax":"swift","code":["container.myServiceType"," .onPreview { MockService() }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Which obviously makes your preview code itself much simpler."}]},{"type":"codeListing","syntax":"swift","code":["struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," ContentView()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can, of course, still use the mechanisms shown in "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews"},{"type":"text","text":"."}]},{"anchor":"-onDebug","level":3,"type":"heading","text":"• onDebug"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Triggered whenever your application is running in debug mode in simulators, on a device, or when running unit tests."}]},{"style":"note","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"that there’s no "},{"type":"codeVoice","code":"release"},{"type":"text","text":" context. Just use the standard "},{"type":"codeVoice","code":"register"},{"type":"text","text":" syntax in that case."}]}],"type":"aside","name":"Note"},{"anchor":"-onSimulator--onDevice","level":3,"type":"heading","text":"• onSimulator \/ onDevice"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Pretty apparent. What may not be so apparent, however, is that unlike all of the above these two contexts are also available in release builds."}]},{"anchor":"-onArg","level":3,"type":"heading","text":"• onArg"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"arg"},{"type":"text","text":" context is a powerful tool to have when you want to UITest your application and you want to change it’s behavior."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As shown in the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing"},{"type":"text","text":" section the test case itself is pretty standard."}]},{"type":"codeListing","syntax":"swift","code":["import XCTest","","final class FactoryDemoUITests: XCTestCase {"," func testExample() throws {"," let app = XCUIApplication()"," app.launchArguments.append(\"mock1\")"," app.launch()",""," let welcome = app.staticTexts[\"Mock Number 1! for Michael\"]"," XCTAssert(welcome.exists)"," }","} "]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The shortcut comes in the application itself when we want to check the launch arguments to see what registrations we might want to change."}]},{"type":"codeListing","syntax":"swift","code":["import Foundation","import Factory","","extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," myServiceType"," .onArg(\"mock0\") { EmptyService() }"," .onArg(\"mock1\") { MockServiceN(1) }"," .onArg(\"error\") { MockError(404) }"," #endif"," }","}"]},{"anchor":"-onArgs","level":3,"type":"heading","text":"• onArgs"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Similar to arg, but let’s you use the same factory when any of several arguments are passed."}]},{"type":"codeListing","syntax":"swift","code":["myServiceType"," .onArgs([\"mock0\", \"mock1\", \"mock3\"]) { "," EmptyService()"," }"]},{"anchor":"Runtime-Arguments","level":2,"type":"heading","text":"Runtime Arguments"},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can also add and remove your own arguments at runtime. Consider this…"}]},{"type":"codeListing","syntax":"swift","code":["FactoryContext.setArg(\"light\", forKey: \"theme\")","FactoryContext.removeArg(forKey: \"theme\")","","myStyleSystem { StandardTheme() }"," .onArg(\"light\") { LightTheme() }"," .onArg(\"dark\") { DarkTheme() }"]},{"anchor":"Multiple-Contexts","level":2,"type":"heading","text":"Multiple Contexts"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As you may have noticed above in the "},{"type":"codeVoice","code":"arg"},{"type":"text","text":" example, chaining multiple contexts together work just as you’d expect and are specified using Factory’s modifier syntax."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s an example of specifying separate services depending on context."}]},{"type":"codeListing","syntax":"swift","code":["container.myServiceType"," .onPreview { MockService() }"," .onTest { UnitTestMockService() }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And here’s an example saying we want the same dependency under multiple contexts."}]},{"type":"codeListing","syntax":"swift","code":["container.myServiceType"," .context(.simulator, .test) { MockService() }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Which brings us to…"}]},{"anchor":"Context-Precedence","level":2,"type":"heading","text":"Context Precedence"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Registering multiple contexts could lead one to wonder just which one will be used in a situation where multiple contexts apply. Here’s the order of evaluation."}]},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"arg[s]"}]}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"preview"}]},{"type":"text","text":" *"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"test"}]},{"type":"text","text":" *"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"simulator"}]}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"device"}]}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"debug"}]},{"type":"text","text":" *"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"registered factory"}]},{"type":"text","text":" (if any)"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"original factory"}]}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that any context marked with an asterisk (*) is only available in a DEBUG build. The executable functionality is stripped from release builds."}]},{"anchor":"Global-Context","level":2,"type":"heading","text":"Global Context"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Keep in mind that contexts are global. The entire app is running in debug more or it’s not. It was passed a “mock0” argument at runtime or it wasn’t."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"onArg"},{"type":"text","text":" and "},{"type":"codeVoice","code":"onDebug"},{"type":"text","text":" and other context modifiers basically define how the app should respond to that particular context."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/contexts"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Contexts","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"kind":"article","metadata":{"roleHeading":"Article","title":"Contexts","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Development and Testing","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Previews","doc:\/\/Factory\/documentation\/Factory\/Testing","doc:\/\/Factory\/documentation\/Factory\/Debugging","doc:\/\/Factory\/documentation\/Factory\/Chains"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Chains":{"role":"article","title":"Circular Dependency Chains","abstract":[{"type":"text","text":"Detecting and solving Circular Dependency Chains."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","kind":"article","type":"topic","url":"\/documentation\/factory\/chains"},"doc://Factory/documentation/Factory/Debugging":{"role":"article","title":"Debugging","abstract":[{"type":"text","text":"Additional support for debugging resolution cycles, dependency chains and other issue."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","kind":"article","type":"topic","url":"\/documentation\/factory\/debugging"},"doc://Factory/documentation/Factory/Testing":{"role":"article","title":"Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","kind":"article","type":"topic","url":"\/documentation\/factory\/testing"},"doc://Factory/documentation/Factory/Previews":{"role":"article","title":"SwiftUI Previews","abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","kind":"article","type":"topic","url":"\/documentation\/factory\/previews"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/cycle.json b/docs/data/documentation/factory/cycle.json index cc69ec77..700b657f 100644 --- a/docs/data/documentation/factory/cycle.json +++ b/docs/data/documentation/factory/cycle.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"A resolution cycle is kicked off the instant you ask a Factory to resolve its dependency and return an instance of the desired object."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You ask for a dependency, and in the process it asks for it’s dependencies, and so on, until everyone has what it needs to do its job."}]},{"type":"codeListing","syntax":"swift","code":["let demo = Container.shared.cycleDemo()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So we asked, and Factory was more than happy to make a demo object for us. But let’s consider what happened under the hood."}]},{"anchor":"The-Players","level":2,"type":"heading","text":"The Players"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Consider the following set of classes and protocols:"}]},{"type":"codeListing","syntax":"swift","code":["class CycleDemo {"," @Injected(\\.aService) var aService: AServiceType"," @Injected(\\.bService) var bService: BServiceType","}","","public protocol AServiceType: AnyObject {"," var id: UUID { get }","}","","public protocol BServiceType: AnyObject {"," var text: String","}","","class ImplementsAB: AServiceType, BServiceType {"," @Injected(\\.networkService) var networkService"," var id: UUID = UUID()"," var text: String = \"AB\"","}","","class NetworkService {"," @LazyInjected(\\.preferences) var preferences","}","","class Preferences {"," \/\/ just a demo class","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"CycleDemo is a class that depends on two protocols, both of which are implemented in ImplementsAB. That class, in turn, requires a NetworkService. And that service wants a preferences object."}]},{"anchor":"The-Registrations","level":2,"type":"heading","text":"The Registrations"},{"type":"paragraph","inlineContent":[{"type":"text","text":"So let’s look next at the Factory registrations."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var cycleDemo: Factory {"," self { CycleDemo() }"," }"," var aService: Factory {"," self { self.implementsAB() }"," }"," var bService: Factory {"," self { self.implementsAB() }"," }"," private var implementsAB: Factory {"," self { ImplementsAB() }"," .graph"," }"," var networkService: Factory {"," self { NetworkService() }"," }"," var preferences: Factory {"," self { Preferences() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So when we ask Factory to make an instance of CycleDemo it calls the factory closure and asks Swift to make an instance of the object. But in order for that object to complete initialization it first needs resolve the two injected property wrappers, starting with aService."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So Factory is called again to make an aService. But that Factory punts and calls "},{"type":"emphasis","inlineContent":[{"type":"text","text":"another"}]},{"type":"text","text":" Factory to get an instance of implementsAB."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That Factory, in turn, asks Swift to make ImplementsAB, but again, "},{"type":"emphasis","inlineContent":[{"type":"text","text":"that"}]},{"type":"text","text":" object needs to initialize with a NetworkService. Another call through Factory."}]},{"anchor":"Tracing-the-Resolution-Cycle","level":2,"type":"heading","text":"Tracing the Resolution Cycle"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s turn on Factory’s trace function and see what we get. (Trace was edited for clarity.)"}]},{"type":"codeListing","syntax":null,"code":["0: Container.cycleDemo = N:105553131389696","1: Container.aService = N:105553119821680","2: Container.implementsAB = N:105553119821680","3: Container.networkService = N:105553119770688","1: Container.bService = N:105553119821680","2: Container.implementsAB = C:105553119821680"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Again, cycleDemo wants an aService from implementsAB, which wants a networkService. That’s created and returned, and now cycleDemo wants an bService from implementsAB."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But implementsAB was cached in the graph scope, and so the same instance (105553119821680) is returned (and which is why we don’t see networkService resolved again)."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And with that Swift provides us with a fully initialized instance of CycleDemo and its dependencies."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That’s a resolution cycle."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You ask for a dependency, and in the process it asks for its dependencies, and so on, until everyone has what it needs to do its job."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"When the initial result is returned that resolution cycle is over."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Until next time."}]},{"anchor":"Missing-Preferences","level":2,"type":"heading","text":"Missing Preferences"},{"type":"paragraph","inlineContent":[{"type":"text","text":"You might be wondering why the Preferences object used by NetworkService didn’t appear. That’s because it’s using a LazyInjected property wrapper, and as such the Preferences object won’t be created until it’s accessed for the first time."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Kicking off its own resolution cycle."}]},{"anchor":"The-Missing-Graph","level":2,"type":"heading","text":"The Missing Graph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Just for fun, let’s consider what we’d see if we did:"}]},{"type":"codeListing","syntax":"swift","code":["let demo = CycleDemo()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s the trace."}]},{"type":"codeListing","syntax":null,"code":["0: Container.aService = N:105553119775792","1: Container.implementsAB = N:105553119775792","2: Container.networkService = N:105553119821280","0: Container.bService = N:105553119821360","1: Container.implementsAB = N:105553119821360","2: Container.networkService = N:105553119821600"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Since we didn’t ask Factory to make CycleDemo for us we’re not going to see it on the trace. But what we do see are "},{"type":"strong","inlineContent":[{"type":"text","text":"two"}]},{"type":"text","text":" instances of networkService being resolved and two distinct instances of implementsAB. What gives?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That’s because aService and bService are two distinct property wrappers, and each one is going to be initialized separately. (Note the “0:” prefix which indicates the start of a new resolution cycle.)"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Why? Let’s look at the class again."}]},{"type":"codeListing","syntax":"swift","code":["class CycleDemo {"," @Injected(\\.aService) var aService: AServiceType"," @Injected(\\.bService) var bService: BServiceType","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"When we ask Swift to make an instance of CycleDemo that object needs to initialize its properties. So Swift first asks the aService property wrapper to initialize and it does. But this is the first time Factory was involved, so a resolution cycle starts… and ends."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And then Swift asks the bService property wrapper to initialize and it does. And so a second resolution cycle starts… and ends."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Since a graph scope only caches object for the length of a single resolution cycle, a new instance of ImplementsAB is created for each cycle, which means that a new network service was created for each one as well."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Swap out implementsAB’s graph scope for, say, singleton, and you’d see the following:"}]},{"type":"codeListing","syntax":null,"code":["0: Container.aService = N:105553118258000","1: Container.implementsAB = N:105553118258000","2: Container.networkService = N:105553118258480","0: Container.bService = N:105553118258000","1: Container.implementsAB = C:105553118258000"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Which is what we’d expect. (Note that now aService and bService are the same instance.)"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Our initial example worked because we asked Factory to make CycleDemo for us, and so everything after the fact occurred within a single resolution cycle launched from a single Factory."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Graph scopes are powerful tools, and well-suited to a specific type of problem. That said, they’re also tricky to get right. Use them with caution."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/cycle"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Cycle","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"kind":"article","metadata":{"roleHeading":"Article","title":"Resolution Cycles","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Advanced Topics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Design","doc:\/\/Factory\/documentation\/Factory\/Modifiers","doc:\/\/Factory\/documentation\/Factory\/Modules","doc:\/\/Factory\/documentation\/Factory\/Optionals","doc:\/\/Factory\/documentation\/Factory\/Functional","doc:\/\/Factory\/documentation\/Factory\/Tags"],"generated":true}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Modules":{"role":"article","title":"Modular Development","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","kind":"article","type":"topic","url":"\/documentation\/factory\/modules"},"doc://Factory/documentation/Factory/Design":{"role":"article","title":"Designing Factory","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","kind":"article","type":"topic","url":"\/documentation\/factory\/design"},"doc://Factory/documentation/Factory/Modifiers":{"role":"article","title":"Factory Modifiers","abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","kind":"article","type":"topic","url":"\/documentation\/factory\/modifiers"},"doc://Factory/documentation/Factory/Functional":{"role":"article","title":"Functional Injection","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","kind":"article","type":"topic","url":"\/documentation\/factory\/functional"},"doc://Factory/documentation/Factory/Optionals":{"role":"article","title":"Optionals and Dynamic Registration","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","kind":"article","type":"topic","url":"\/documentation\/factory\/optionals"},"doc://Factory/documentation/Factory/Tags":{"role":"article","title":"Tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","kind":"article","type":"topic","url":"\/documentation\/factory\/tags"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"A resolution cycle is kicked off the instant you ask a Factory to resolve its dependency and return an instance of the desired object."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You ask for a dependency, and in the process it asks for it’s dependencies, and so on, until everyone has what it needs to do its job."}]},{"type":"codeListing","syntax":"swift","code":["let demo = Container.shared.cycleDemo()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So we asked, and Factory was more than happy to make a demo object for us. But let’s consider what happened under the hood."}]},{"anchor":"The-Players","level":2,"type":"heading","text":"The Players"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Consider the following set of classes and protocols:"}]},{"type":"codeListing","syntax":"swift","code":["class CycleDemo {"," @Injected(\\.aService) var aService: AServiceType"," @Injected(\\.bService) var bService: BServiceType","}","","public protocol AServiceType: AnyObject {"," var id: UUID { get }","}","","public protocol BServiceType: AnyObject {"," var text: String","}","","class ImplementsAB: AServiceType, BServiceType {"," @Injected(\\.networkService) var networkService"," var id: UUID = UUID()"," var text: String = \"AB\"","}","","class NetworkService {"," @LazyInjected(\\.preferences) var preferences","}","","class Preferences {"," \/\/ just a demo class","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"CycleDemo is a class that depends on two protocols, both of which are implemented in ImplementsAB. That class, in turn, requires a NetworkService. And that service wants a preferences object."}]},{"anchor":"The-Registrations","level":2,"type":"heading","text":"The Registrations"},{"type":"paragraph","inlineContent":[{"type":"text","text":"So let’s look next at the Factory registrations."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var cycleDemo: Factory {"," self { CycleDemo() }"," }"," var aService: Factory {"," self { self.implementsAB() }"," }"," var bService: Factory {"," self { self.implementsAB() }"," }"," private var implementsAB: Factory {"," self { ImplementsAB() }"," .graph"," }"," var networkService: Factory {"," self { NetworkService() }"," }"," var preferences: Factory {"," self { Preferences() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So when we ask Factory to make an instance of CycleDemo it calls the factory closure and asks Swift to make an instance of the object. But in order for that object to complete initialization it first needs resolve the two injected property wrappers, starting with aService."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So Factory is called again to make an aService. But that Factory punts and calls "},{"type":"emphasis","inlineContent":[{"type":"text","text":"another"}]},{"type":"text","text":" Factory to get an instance of implementsAB."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That Factory, in turn, asks Swift to make ImplementsAB, but again, "},{"type":"emphasis","inlineContent":[{"type":"text","text":"that"}]},{"type":"text","text":" object needs to initialize with a NetworkService. Another call through Factory."}]},{"anchor":"Tracing-the-Resolution-Cycle","level":2,"type":"heading","text":"Tracing the Resolution Cycle"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s turn on Factory’s trace function and see what we get. (Trace was edited for clarity.)"}]},{"type":"codeListing","syntax":null,"code":["0: Container.cycleDemo = N:105553131389696","1: Container.aService = N:105553119821680","2: Container.implementsAB = N:105553119821680","3: Container.networkService = N:105553119770688","1: Container.bService = N:105553119821680","2: Container.implementsAB = C:105553119821680"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Again, cycleDemo wants an aService from implementsAB, which wants a networkService. That’s created and returned, and now cycleDemo wants an bService from implementsAB."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But implementsAB was cached in the graph scope, and so the same instance (105553119821680) is returned (and which is why we don’t see networkService resolved again)."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And with that Swift provides us with a fully initialized instance of CycleDemo and its dependencies."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That’s a resolution cycle."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You ask for a dependency, and in the process it asks for its dependencies, and so on, until everyone has what it needs to do its job."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"When the initial result is returned that resolution cycle is over."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Until next time."}]},{"anchor":"Missing-Preferences","level":2,"type":"heading","text":"Missing Preferences"},{"type":"paragraph","inlineContent":[{"type":"text","text":"You might be wondering why the Preferences object used by NetworkService didn’t appear. That’s because it’s using a LazyInjected property wrapper, and as such the Preferences object won’t be created until it’s accessed for the first time."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Kicking off its own resolution cycle."}]},{"anchor":"The-Missing-Graph","level":2,"type":"heading","text":"The Missing Graph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Just for fun, let’s consider what we’d see if we did:"}]},{"type":"codeListing","syntax":"swift","code":["let demo = CycleDemo()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s the trace."}]},{"type":"codeListing","syntax":null,"code":["0: Container.aService = N:105553119775792","1: Container.implementsAB = N:105553119775792","2: Container.networkService = N:105553119821280","0: Container.bService = N:105553119821360","1: Container.implementsAB = N:105553119821360","2: Container.networkService = N:105553119821600"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Since we didn’t ask Factory to make CycleDemo for us we’re not going to see it on the trace. But what we do see are "},{"type":"strong","inlineContent":[{"type":"text","text":"two"}]},{"type":"text","text":" instances of networkService being resolved and two distinct instances of implementsAB. What gives?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That’s because aService and bService are two distinct property wrappers, and each one is going to be initialized separately. (Note the “0:” prefix which indicates the start of a new resolution cycle.)"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Why? Let’s look at the class again."}]},{"type":"codeListing","syntax":"swift","code":["class CycleDemo {"," @Injected(\\.aService) var aService: AServiceType"," @Injected(\\.bService) var bService: BServiceType","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"When we ask Swift to make an instance of CycleDemo that object needs to initialize its properties. So Swift first asks the aService property wrapper to initialize and it does. But this is the first time Factory was involved, so a resolution cycle starts… and ends."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And then Swift asks the bService property wrapper to initialize and it does. And so a second resolution cycle starts… and ends."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Since a graph scope only caches object for the length of a single resolution cycle, a new instance of ImplementsAB is created for each cycle, which means that a new network service was created for each one as well."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Swap out implementsAB’s graph scope for, say, singleton, and you’d see the following:"}]},{"type":"codeListing","syntax":null,"code":["0: Container.aService = N:105553118258000","1: Container.implementsAB = N:105553118258000","2: Container.networkService = N:105553118258480","0: Container.bService = N:105553118258000","1: Container.implementsAB = C:105553118258000"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Which is what we’d expect. (Note that now aService and bService are the same instance.)"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Our initial example worked because we asked Factory to make CycleDemo for us, and so everything after the fact occurred within a single resolution cycle launched from a single Factory."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Graph scopes are powerful tools, and well-suited to a specific type of problem. That said, they’re also tricky to get right. Use them with caution."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/cycle"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Cycle","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"kind":"article","metadata":{"roleHeading":"Article","title":"Resolution Cycles","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Advanced Topics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Design","doc:\/\/Factory\/documentation\/Factory\/Modifiers","doc:\/\/Factory\/documentation\/Factory\/Modules","doc:\/\/Factory\/documentation\/Factory\/Optionals","doc:\/\/Factory\/documentation\/Factory\/Functional","doc:\/\/Factory\/documentation\/Factory\/Tags"],"generated":true}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Optionals":{"role":"article","title":"Optionals and Dynamic Registration","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","kind":"article","type":"topic","url":"\/documentation\/factory\/optionals"},"doc://Factory/documentation/Factory/Tags":{"role":"article","title":"Tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","kind":"article","type":"topic","url":"\/documentation\/factory\/tags"},"doc://Factory/documentation/Factory/Design":{"role":"article","title":"Designing Factory","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","kind":"article","type":"topic","url":"\/documentation\/factory\/design"},"doc://Factory/documentation/Factory/Modules":{"role":"article","title":"Modular Development","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","kind":"article","type":"topic","url":"\/documentation\/factory\/modules"},"doc://Factory/documentation/Factory/Functional":{"role":"article","title":"Functional Injection","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","kind":"article","type":"topic","url":"\/documentation\/factory\/functional"},"doc://Factory/documentation/Factory/Modifiers":{"role":"article","title":"Factory Modifiers","abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","kind":"article","type":"topic","url":"\/documentation\/factory\/modifiers"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/debugging.json b/docs/data/documentation/factory/debugging.json index 2d0a4c99..6335290f 100644 --- a/docs/data/documentation/factory/debugging.json +++ b/docs/data/documentation/factory/debugging.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Tracing-the-Resolution-Cycle","level":2,"type":"heading","text":"Tracing the Resolution Cycle"},{"type":"paragraph","inlineContent":[{"type":"text","text":"When running in DEBUG mode Factory allows you to trace the injection process and see every object instantiated or returned from a cache during a given "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle"},{"type":"text","text":"."}]},{"type":"codeListing","syntax":null,"code":["0: Factory.Container.cycleDemo = N:105553131389696","1: Factory.Container.aService = N:105553119821680","2: Factory.Container.implementsAB = N:105553119821680","3: Factory.Container.networkService = N:105553119770688","1: Factory.Container.bService = N:105553119821680","2: Factory.Container.implementsAB = C:105553119821680"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Each line in the trace shows the depth (with 0 as the root), the factory called, the type of the service created, and the id\/address of the object itself."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Each address has a prefix indicating whether or not a new object was created (N:) or if an existing object was returned from a scope cache (C:)."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Just toggle the trace flag to enable\/disable logging."}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.manager.trace.toggle()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Turning on a trace can be helpful in testing when you want to get an idea of an object’s dependency tree."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that enabling trace logging enables it for "},{"type":"emphasis","inlineContent":[{"type":"text","text":"all"}]},{"type":"text","text":" containers."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"One final consideration is that logging the construction of an object will show everything initialized as part of that resolution cycle. Anything created lazily after the fact may not appear in the trace."}]},{"anchor":"Logging","level":2,"type":"heading","text":"Logging"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Trace logs are usually just printed to the system log, but you can change that behavior if needed."}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.manager.logger = {"," MyLogger.debug(\"Factory: \\($0)\")","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note this changes the logging behavior for "},{"type":"emphasis","inlineContent":[{"type":"text","text":"all"}]},{"type":"text","text":" containers."}]},{"anchor":"Circular-Dependency-Chain-Detection","level":2,"type":"heading","text":"Circular Dependency Chain Detection"},{"type":"paragraph","inlineContent":[{"type":"text","text":"What’s a circular dependency? Let’s say that A needs B to be constructed, and B needs a C. But what happens if C was defined such that it needs an A?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That’s a Circular Dependency Chain."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory can detect such things and warn you about them during the development process."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The subject’s a bit involved, so there’s an entire page devoted to it."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains"},{"type":"text","text":"."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/debugging"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Debugging","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Additional support for debugging resolution cycles, dependency chains and other issue."}],"kind":"article","metadata":{"roleHeading":"Article","title":"Debugging","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Development and Testing","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Previews","doc:\/\/Factory\/documentation\/Factory\/Testing","doc:\/\/Factory\/documentation\/Factory\/Contexts","doc:\/\/Factory\/documentation\/Factory\/Chains"],"generated":true}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Chains":{"role":"article","title":"Circular Dependency Chains","abstract":[{"type":"text","text":"Detecting and solving Circular Dependency Chains."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","kind":"article","type":"topic","url":"\/documentation\/factory\/chains"},"doc://Factory/documentation/Factory/Previews":{"role":"article","title":"SwiftUI Previews","abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","kind":"article","type":"topic","url":"\/documentation\/factory\/previews"},"doc://Factory/documentation/Factory/Cycle":{"role":"article","title":"Resolution Cycles","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","type":"topic","url":"\/documentation\/factory\/cycle"},"doc://Factory/documentation/Factory/Contexts":{"role":"article","title":"Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","kind":"article","type":"topic","url":"\/documentation\/factory\/contexts"},"doc://Factory/documentation/Factory/Testing":{"role":"article","title":"Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","kind":"article","type":"topic","url":"\/documentation\/factory\/testing"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Tracing-the-Resolution-Cycle","level":2,"type":"heading","text":"Tracing the Resolution Cycle"},{"type":"paragraph","inlineContent":[{"type":"text","text":"When running in DEBUG mode Factory allows you to trace the injection process and see every object instantiated or returned from a cache during a given "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle"},{"type":"text","text":"."}]},{"type":"codeListing","syntax":null,"code":["0: Factory.Container.cycleDemo = N:105553131389696","1: Factory.Container.aService = N:105553119821680","2: Factory.Container.implementsAB = N:105553119821680","3: Factory.Container.networkService = N:105553119770688","1: Factory.Container.bService = N:105553119821680","2: Factory.Container.implementsAB = C:105553119821680"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Each line in the trace shows the depth (with 0 as the root), the factory called, the type of the service created, and the id\/address of the object itself."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Each address has a prefix indicating whether or not a new object was created (N:) or if an existing object was returned from a scope cache (C:)."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Just toggle the trace flag to enable\/disable logging."}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.manager.trace.toggle()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Turning on a trace can be helpful in testing when you want to get an idea of an object’s dependency tree."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that enabling trace logging enables it for "},{"type":"emphasis","inlineContent":[{"type":"text","text":"all"}]},{"type":"text","text":" containers."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"One final consideration is that logging the construction of an object will show everything initialized as part of that resolution cycle. Anything created lazily after the fact may not appear in the trace."}]},{"anchor":"Logging","level":2,"type":"heading","text":"Logging"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Trace logs are usually just printed to the system log, but you can change that behavior if needed."}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.manager.logger = {"," MyLogger.debug(\"Factory: \\($0)\")","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note this changes the logging behavior for "},{"type":"emphasis","inlineContent":[{"type":"text","text":"all"}]},{"type":"text","text":" containers."}]},{"anchor":"Circular-Dependency-Chain-Detection","level":2,"type":"heading","text":"Circular Dependency Chain Detection"},{"type":"paragraph","inlineContent":[{"type":"text","text":"What’s a circular dependency? Let’s say that A needs B to be constructed, and B needs a C. But what happens if C was defined such that it needs an A?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That’s a Circular Dependency Chain."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory can detect such things and warn you about them during the development process."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The subject’s a bit involved, so there’s an entire page devoted to it."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains"},{"type":"text","text":"."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/debugging"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Debugging","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Additional support for debugging resolution cycles, dependency chains and other issue."}],"kind":"article","metadata":{"roleHeading":"Article","title":"Debugging","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Development and Testing","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Previews","doc:\/\/Factory\/documentation\/Factory\/Testing","doc:\/\/Factory\/documentation\/Factory\/Contexts","doc:\/\/Factory\/documentation\/Factory\/Chains"],"generated":true}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Cycle":{"role":"article","title":"Resolution Cycles","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","type":"topic","url":"\/documentation\/factory\/cycle"},"doc://Factory/documentation/Factory/Chains":{"role":"article","title":"Circular Dependency Chains","abstract":[{"type":"text","text":"Detecting and solving Circular Dependency Chains."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","kind":"article","type":"topic","url":"\/documentation\/factory\/chains"},"doc://Factory/documentation/Factory/Testing":{"role":"article","title":"Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","kind":"article","type":"topic","url":"\/documentation\/factory\/testing"},"doc://Factory/documentation/Factory/Contexts":{"role":"article","title":"Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","kind":"article","type":"topic","url":"\/documentation\/factory\/contexts"},"doc://Factory/documentation/Factory/Previews":{"role":"article","title":"SwiftUI Previews","abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","kind":"article","type":"topic","url":"\/documentation\/factory\/previews"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/design.json b/docs/data/documentation/factory/design.json index 57c91937..8172a242 100644 --- a/docs/data/documentation/factory/design.json +++ b/docs/data/documentation/factory/design.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Factory-10","level":2,"type":"heading","text":"Factory 1.0"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The first dependency injection system I wrote was "},{"type":"reference","isActive":true,"identifier":"https:\/\/github.com\/hmlongco\/Resolver"},{"type":"text","text":". That open source project, while quite powerful and still in use in many applications, suffered from a few drawbacks."}]},{"type":"orderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Resolver required pre-registration of all services up front."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Resolver uses type inference to dynamically find and return registered services from a container."}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The first drawback is relatively minor. While preregistration could lead to a performance hit on application launch, in practice the process is usually quick and not normally noticeable."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The second issue, however, is more problematic since failure to find a matching registration for that type can lead to an application crash. In real life that isn’t usually a problem as such a thing tends to be noticed and fixed the first time you run a unit test or the second you run the application to see if your newest feature works."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But still… could we do better? That question lead me on a quest for compile-time type safety. Several other systems have attempted to solve this, but I didn’t want to have to add a source code scanning and generation step to my build process, nor did I want to give up a lot of the control and flexibility inherent in a run-time-based system."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"I also wanted something simple, fast, clean, and easy to use."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Could I have my cake and eat it too?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Turns out I could."}]},{"anchor":"A-Simple-Example","level":2,"type":"heading","text":"A Simple Example"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Most container-based dependency injection systems require you to define in some way that a given service type is available for injection and many require some sort of factory or mechanism that will provide a new instance of the service when needed."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory is no exception. Here’s a simple dependency registration as defined for Factory 1.0."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," static let myService = Factory { "," MyService()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Unlike Resolver which often requires defining a plethora of nested registration functions, or SwiftUI, where defining a new environment variable requires creating a new EnvironmentKey and adding additional getters and setters, here we simply add a new "},{"type":"codeVoice","code":"Factory"},{"type":"text","text":" to the default container. When called, the factory closure is evaluated and returns an instance of our dependency. That’s it."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Injecting and using the service where needed is equally straightforward. Here’s one way to do it."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {"," @Injected(Container.myService) private var myService"," ...","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here our view model uses one of Factory 1.0’s "},{"type":"codeVoice","code":"@Injected"},{"type":"text","text":" property wrappers to request the desired dependency. Similar to "},{"type":"codeVoice","code":"@Environment"},{"type":"text","text":" in SwiftUI, we provide the property wrapper with a reference to a factory of the desired type and it resolves that type the moment "},{"type":"codeVoice","code":"ContentViewModel"},{"type":"text","text":" is created."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And that’s the core mechanism. In order to use the property wrapper you "},{"type":"emphasis","inlineContent":[{"type":"text","text":"must"}]},{"type":"text","text":" define a factory. That factory "},{"type":"emphasis","inlineContent":[{"type":"text","text":"must"}]},{"type":"text","text":" return the desired type when asked. Fail to do either one and the code will simply not compile."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As such, Factory is compile-time safe."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But there was still a problem…"}]},{"anchor":"Service-Locator","level":2,"type":"heading","text":"Service Locator"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Containers in Factory 1.X were essentially namespaces, and not actual object instances that could be passed around. That made the overall syntax a lot cleaner, but that tradeoff resulted in a lack of functionality and the static class definitions prevented Factory from being used in anything other than a Service Locator role."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {"," var myService = Container.myService()"," ...","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"While that sufficed for many projects, it prevented Factory from being used or considered in projects that wanted or needed a true container-based Dependency Injection system."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So that changed in Factory 2.0. Instead of defining Factory’s as static variables on a class, they’re now defined and returned as computed variables on the container itself. And instances of a given container can be created, shared, and passed around as needed."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s take a look."}]},{"anchor":"Factory-20","level":2,"type":"heading","text":"Factory 2.0"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s our earlier example, rebuilt for Factory 2.0."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var myService: Factory {"," Factory(self) { "," MyService()"," }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Instead of a static on the container class, this Factory is a computed variable on the container itself. Inside we define and return a Factory that matches the value promised by the computed variable."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This double-definition mechanism is required primarily because Swift doesn’t allow extensions to define new variables on an existing objects. As such, a computed variable was really the only choice."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that when we create the actual Factory we pass it a reference to the enclosing container."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Unlike Factory 1.0 which maintained a global store, each Factory 2.0 container stores its own registrations and manages its own scope caches. This means that we can create multiple instances of the same container type, each with their own distinct registrations and caches."}]},{"anchor":"Convenience","level":2,"type":"heading","text":"Convenience"},{"type":"paragraph","inlineContent":[{"type":"text","text":"While the formal definition does the trick, most of the time it’s easier to use some syntactic sugar and just ask the container to make our Factory for us."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var myService: Factory {"," self { MyService() }"," }","}"]},{"anchor":"Scopes","level":2,"type":"heading","text":"Scopes"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory scopes work just as they did before, only now they’re defined using a SwiftUI-like modifier syntax."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var myService: Factory {"," self { MyService() }"," .singleton"," }","}"]},{"anchor":"Containershared","level":2,"type":"heading","text":"Container.shared"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Each container class defined has a statically allocated "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" instance associated with it."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This instance can be referenced directly if you still want to use a Service Locator-style pattern."}]},{"type":"codeListing","syntax":"swift","code":["let service = Container.shared.service()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or you can use the “shared” container as an application root container and pass it along to wherever it’s needed. Let’s take a look."}]},{"anchor":"Passing-Containers","level":2,"type":"heading","text":"Passing Containers"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s an example of passing an instance of a container to a view model and then initializing a service from that container. Doing this sort of thing is the primary rationale behind the changes to Factory for 2.0."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel {"," let myService: MyServiceType"," init(container: Container) {"," myService = container.myService()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Additional examples and methods can be seen on the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions"},{"type":"text","text":" page."}]},{"anchor":"Injected-Property-Wrappers","level":2,"type":"heading","text":"Injected Property Wrappers"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Property wrappers like @Injected and @LazyInjected always reference the "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" container for that class type."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {"," @Injected(\\.myService) var myService","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory 2.0 also updates the syntax to use keyPaths, much like SwiftUI environment variables."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected"},{"type":"text","text":", "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected"},{"type":"text","text":", "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"},{"type":"text","text":", and "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject"},{"type":"text","text":" for more."}]},{"anchor":"Breaking-Changes","level":2,"type":"heading","text":"Breaking Changes"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Unfortunately, supporting true container-based DI required some major surgery on Factory 1.0’s syntax across the board. That’s why it’s version 2.0."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But under the hood Factory 2.0 still gives you the same feature set provided by 1.0, while adding and supporting new functionality and use cases."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"I think it’s worth it."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/design"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Design","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"kind":"article","metadata":{"roleHeading":"Article","title":"Designing Factory","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Advanced Topics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Modifiers","doc:\/\/Factory\/documentation\/Factory\/Modules","doc:\/\/Factory\/documentation\/Factory\/Cycle","doc:\/\/Factory\/documentation\/Factory\/Optionals","doc:\/\/Factory\/documentation\/Factory\/Functional","doc:\/\/Factory\/documentation\/Factory\/Tags"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Resolutions":{"role":"article","title":"Sample Resolutions","abstract":[{"type":"text","text":"There are many ways to use Factory to resolve dependencies. Here are a few examples."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","kind":"article","type":"topic","url":"\/documentation\/factory\/resolutions"},"doc://Factory/documentation/Factory/LazyInjected":{"role":"symbol","title":"LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"url":"\/documentation\/factory\/lazyinjected"},"doc://Factory/documentation/Factory/Optionals":{"role":"article","title":"Optionals and Dynamic Registration","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","kind":"article","type":"topic","url":"\/documentation\/factory\/optionals"},"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"},"doc://Factory/documentation/Factory/Cycle":{"role":"article","title":"Resolution Cycles","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","type":"topic","url":"\/documentation\/factory\/cycle"},"doc://Factory/documentation/Factory/Modifiers":{"role":"article","title":"Factory Modifiers","abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","kind":"article","type":"topic","url":"\/documentation\/factory\/modifiers"},"https://github.com/hmlongco/Resolver":{"title":"Resolver","titleInlineContent":[{"type":"text","text":"Resolver"}],"type":"link","identifier":"https:\/\/github.com\/hmlongco\/Resolver","url":"https:\/\/github.com\/hmlongco\/Resolver"},"doc://Factory/documentation/Factory/Tags":{"role":"article","title":"Tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","kind":"article","type":"topic","url":"\/documentation\/factory\/tags"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Functional":{"role":"article","title":"Functional Injection","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","kind":"article","type":"topic","url":"\/documentation\/factory\/functional"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"url":"\/documentation\/factory\/weaklazyinjected"},"doc://Factory/documentation/Factory/Modules":{"role":"article","title":"Modular Development","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","kind":"article","type":"topic","url":"\/documentation\/factory\/modules"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Factory-10","level":2,"type":"heading","text":"Factory 1.0"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The first dependency injection system I wrote was "},{"type":"reference","isActive":true,"identifier":"https:\/\/github.com\/hmlongco\/Resolver"},{"type":"text","text":". That open source project, while quite powerful and still in use in many applications, suffered from a few drawbacks."}]},{"type":"orderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Resolver required pre-registration of all services up front."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Resolver uses type inference to dynamically find and return registered services from a container."}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The first drawback is relatively minor. While preregistration could lead to a performance hit on application launch, in practice the process is usually quick and not normally noticeable."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The second issue, however, is more problematic since failure to find a matching registration for that type can lead to an application crash. In real life that isn’t usually a problem as such a thing tends to be noticed and fixed the first time you run a unit test or the second you run the application to see if your newest feature works."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But still… could we do better? That question lead me on a quest for compile-time type safety. Several other systems have attempted to solve this, but I didn’t want to have to add a source code scanning and generation step to my build process, nor did I want to give up a lot of the control and flexibility inherent in a run-time-based system."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"I also wanted something simple, fast, clean, and easy to use."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Could I have my cake and eat it too?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Turns out I could."}]},{"anchor":"A-Simple-Example","level":2,"type":"heading","text":"A Simple Example"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Most container-based dependency injection systems require you to define in some way that a given service type is available for injection and many require some sort of factory or mechanism that will provide a new instance of the service when needed."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory is no exception. Here’s a simple dependency registration as defined for Factory 1.0."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," static let myService = Factory { "," MyService()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Unlike Resolver which often requires defining a plethora of nested registration functions, or SwiftUI, where defining a new environment variable requires creating a new EnvironmentKey and adding additional getters and setters, here we simply add a new "},{"type":"codeVoice","code":"Factory"},{"type":"text","text":" to the default container. When called, the factory closure is evaluated and returns an instance of our dependency. That’s it."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Injecting and using the service where needed is equally straightforward. Here’s one way to do it."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {"," @Injected(Container.myService) private var myService"," ...","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here our view model uses one of Factory 1.0’s "},{"type":"codeVoice","code":"@Injected"},{"type":"text","text":" property wrappers to request the desired dependency. Similar to "},{"type":"codeVoice","code":"@Environment"},{"type":"text","text":" in SwiftUI, we provide the property wrapper with a reference to a factory of the desired type and it resolves that type the moment "},{"type":"codeVoice","code":"ContentViewModel"},{"type":"text","text":" is created."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And that’s the core mechanism. In order to use the property wrapper you "},{"type":"emphasis","inlineContent":[{"type":"text","text":"must"}]},{"type":"text","text":" define a factory. That factory "},{"type":"emphasis","inlineContent":[{"type":"text","text":"must"}]},{"type":"text","text":" return the desired type when asked. Fail to do either one and the code will simply not compile."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As such, Factory is compile-time safe."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But there was still a problem…"}]},{"anchor":"Service-Locator","level":2,"type":"heading","text":"Service Locator"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Containers in Factory 1.X were essentially namespaces, and not actual object instances that could be passed around. That made the overall syntax a lot cleaner, but that tradeoff resulted in a lack of functionality and the static class definitions prevented Factory from being used in anything other than a Service Locator role."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {"," var myService = Container.myService()"," ...","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"While that sufficed for many projects, it prevented Factory from being used or considered in projects that wanted or needed a true container-based Dependency Injection system."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So that changed in Factory 2.0. Instead of defining Factory’s as static variables on a class, they’re now defined and returned as computed variables on the container itself. And instances of a given container can be created, shared, and passed around as needed."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s take a look."}]},{"anchor":"Factory-20","level":2,"type":"heading","text":"Factory 2.0"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s our earlier example, rebuilt for Factory 2.0."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var myService: Factory {"," Factory(self) { "," MyService()"," }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Instead of a static on the container class, this Factory is a computed variable on the container itself. Inside we define and return a Factory that matches the value promised by the computed variable."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This double-definition mechanism is required primarily because Swift doesn’t allow extensions to define new variables on an existing objects. As such, a computed variable was really the only choice."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that when we create the actual Factory we pass it a reference to the enclosing container."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Unlike Factory 1.0 which maintained a global store, each Factory 2.0 container stores its own registrations and manages its own scope caches. This means that we can create multiple instances of the same container type, each with their own distinct registrations and caches."}]},{"anchor":"Convenience","level":2,"type":"heading","text":"Convenience"},{"type":"paragraph","inlineContent":[{"type":"text","text":"While the formal definition does the trick, most of the time it’s easier to use some syntactic sugar and just ask the container to make our Factory for us."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var myService: Factory {"," self { MyService() }"," }","}"]},{"anchor":"Scopes","level":2,"type":"heading","text":"Scopes"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory scopes work just as they did before, only now they’re defined using a SwiftUI-like modifier syntax."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var myService: Factory {"," self { MyService() }"," .singleton"," }","}"]},{"anchor":"Containershared","level":2,"type":"heading","text":"Container.shared"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Each container class defined has a statically allocated "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" instance associated with it."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This instance can be referenced directly if you still want to use a Service Locator-style pattern."}]},{"type":"codeListing","syntax":"swift","code":["let service = Container.shared.service()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or you can use the “shared” container as an application root container and pass it along to wherever it’s needed. Let’s take a look."}]},{"anchor":"Passing-Containers","level":2,"type":"heading","text":"Passing Containers"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s an example of passing an instance of a container to a view model and then initializing a service from that container. Doing this sort of thing is the primary rationale behind the changes to Factory for 2.0."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel {"," let myService: MyServiceType"," init(container: Container) {"," myService = container.myService()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Additional examples and methods can be seen on the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions"},{"type":"text","text":" page."}]},{"anchor":"Injected-Property-Wrappers","level":2,"type":"heading","text":"Injected Property Wrappers"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Property wrappers like @Injected and @LazyInjected always reference the "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" container for that class type."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {"," @Injected(\\.myService) var myService","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory 2.0 also updates the syntax to use keyPaths, much like SwiftUI environment variables."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected"},{"type":"text","text":", "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected"},{"type":"text","text":", "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"},{"type":"text","text":", and "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject"},{"type":"text","text":" for more."}]},{"anchor":"Breaking-Changes","level":2,"type":"heading","text":"Breaking Changes"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Unfortunately, supporting true container-based DI required some major surgery on Factory 1.0’s syntax across the board. That’s why it’s version 2.0."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But under the hood Factory 2.0 still gives you the same feature set provided by 1.0, while adding and supporting new functionality and use cases."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"I think it’s worth it."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/design"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Design","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"kind":"article","metadata":{"roleHeading":"Article","title":"Designing Factory","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Advanced Topics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Modifiers","doc:\/\/Factory\/documentation\/Factory\/Modules","doc:\/\/Factory\/documentation\/Factory\/Cycle","doc:\/\/Factory\/documentation\/Factory\/Optionals","doc:\/\/Factory\/documentation\/Factory\/Functional","doc:\/\/Factory\/documentation\/Factory\/Tags"],"generated":true}],"references":{"https://github.com/hmlongco/Resolver":{"title":"Resolver","titleInlineContent":[{"type":"text","text":"Resolver"}],"type":"link","identifier":"https:\/\/github.com\/hmlongco\/Resolver","url":"https:\/\/github.com\/hmlongco\/Resolver"},"doc://Factory/documentation/Factory/Cycle":{"role":"article","title":"Resolution Cycles","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","type":"topic","url":"\/documentation\/factory\/cycle"},"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"},"doc://Factory/documentation/Factory/Optionals":{"role":"article","title":"Optionals and Dynamic Registration","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","kind":"article","type":"topic","url":"\/documentation\/factory\/optionals"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"},"doc://Factory/documentation/Factory/Tags":{"role":"article","title":"Tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","kind":"article","type":"topic","url":"\/documentation\/factory\/tags"},"doc://Factory/documentation/Factory/Resolutions":{"role":"article","title":"Sample Resolutions","abstract":[{"type":"text","text":"There are many ways to use Factory to resolve dependencies. Here are a few examples."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","kind":"article","type":"topic","url":"\/documentation\/factory\/resolutions"},"doc://Factory/documentation/Factory/LazyInjected":{"role":"symbol","title":"LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"url":"\/documentation\/factory\/lazyinjected"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Modules":{"role":"article","title":"Modular Development","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","kind":"article","type":"topic","url":"\/documentation\/factory\/modules"},"doc://Factory/documentation/Factory/Functional":{"role":"article","title":"Functional Injection","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","kind":"article","type":"topic","url":"\/documentation\/factory\/functional"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"url":"\/documentation\/factory\/weaklazyinjected"},"doc://Factory/documentation/Factory/Modifiers":{"role":"article","title":"Factory Modifiers","abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","kind":"article","type":"topic","url":"\/documentation\/factory\/modifiers"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory.json b/docs/data/documentation/factory/factory.json index 7c6a253a..42caf93e 100644 --- a/docs/data/documentation/factory/factory.json +++ b/docs/data/documentation/factory/factory.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"It’s used to produce an object of the desired type when required. This may be a brand new instance or Factory may"},{"type":"text","text":" "},{"type":"text","text":"return a previously cached value from the specified scope."}]},{"anchor":"Defining-a-Factory","level":2,"type":"heading","text":"Defining a Factory"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s define a Factory that returns an instance of "},{"type":"codeVoice","code":"ServiceType"},{"type":"text","text":". To do that we need to extend a Factory "},{"type":"codeVoice","code":"Container"},{"type":"text","text":" and within"},{"type":"text","text":" "},{"type":"text","text":"that container we define a new computed variable of type "},{"type":"codeVoice","code":"Factory"},{"type":"text","text":". The type must be explicitly defined, and is usually a"},{"type":"text","text":" "},{"type":"text","text":"protocol to which the returned dependency conforms."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," Factory(self) { MyService() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Inside the computed variable we define our Factory, passing it a reference to the enclosing container. We also provide it with"},{"type":"text","text":" "},{"type":"text","text":"a closure that creates an instance of our dependency when required. That Factory is then returned to the caller, usually to be evaluated"},{"type":"text","text":" "},{"type":"text","text":"(see "},{"type":"codeVoice","code":"callAsFunction()"},{"type":"text","text":" below). Every time we resolve this factory we’ll get a new, unique instance of our object."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory also provides a bit of syntactic sugar that lets us do the same thing in a more convenient form,"}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"]},{"anchor":"Transient","level":2,"type":"heading","text":"Transient"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you’re concerned about building Factory’s on the fly, don’t be. Like SwiftUI Views, Factory structs and modifiers"},{"type":"text","text":" "},{"type":"text","text":"are lightweight and transitory. They’re created when needed and then immediately discarded once their purpose has"},{"type":"text","text":" "},{"type":"text","text":"been served."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Other operations exist for Factory. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"},{"type":"text","text":"."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory"],"traits":[{"interfaceLanguage":"swift"}]}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"],"kind":"relationships","title":"Conforms To","type":"conformsTo"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"title":"Factory","roleHeading":"Structure","role":"symbol","symbolKind":"struct","externalID":"s:7FactoryAAV","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory\/init(_:key:_:)"]},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory\/registration"]},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","doc:\/\/Factory\/documentation\/Factory\/Factory\/register(factory:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/resolve()"]},{"title":"Default Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Factory/register(factory:)":{"role":"symbol","title":"register(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Registers a new factory closure capable of producing an object or service of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/register(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/register(factory:)"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/Factory/resolve()":{"role":"symbol","title":"resolve()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Unsugared resolution function."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/resolve()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/resolve()"},"doc://Factory/documentation/Factory/Factory/callAsFunction()":{"role":"symbol","title":"callAsFunction()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Evaluates the factory and returns an object or service of the desired type. The resolved instance may be brand new or Factory may"},{"type":"text","text":" "},{"type":"text","text":"return a cached value from the specified scope."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/callasfunction()"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory/registration":{"role":"symbol","title":"registration","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Internal parameters for this Factory including id, container, the factory closure itself, the scope,"},{"type":"text","text":" "},{"type":"text","text":"and others."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/registration","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/registration"},"doc://Factory/documentation/Factory/Factory/init(_:key:_:)":{"role":"symbol","title":"init(_:key:_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP"},{"kind":"text","text":", "},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Public initializer creates a Factory capable of managing dependencies of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/init(_:key:_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/init(_:key:_:)"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"It’s used to produce an object of the desired type when required. This may be a brand new instance or Factory may"},{"type":"text","text":" "},{"type":"text","text":"return a previously cached value from the specified scope."}]},{"anchor":"Defining-a-Factory","level":2,"type":"heading","text":"Defining a Factory"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s define a Factory that returns an instance of "},{"type":"codeVoice","code":"ServiceType"},{"type":"text","text":". To do that we need to extend a Factory "},{"type":"codeVoice","code":"Container"},{"type":"text","text":" and within"},{"type":"text","text":" "},{"type":"text","text":"that container we define a new computed variable of type "},{"type":"codeVoice","code":"Factory"},{"type":"text","text":". The type must be explicitly defined, and is usually a"},{"type":"text","text":" "},{"type":"text","text":"protocol to which the returned dependency conforms."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," Factory(self) { MyService() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Inside the computed variable we define our Factory, passing it a reference to the enclosing container. We also provide it with"},{"type":"text","text":" "},{"type":"text","text":"a closure that creates an instance of our dependency when required. That Factory is then returned to the caller, usually to be evaluated"},{"type":"text","text":" "},{"type":"text","text":"(see "},{"type":"codeVoice","code":"callAsFunction()"},{"type":"text","text":" below). Every time we resolve this factory we’ll get a new, unique instance of our object."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory also provides a bit of syntactic sugar that lets us do the same thing in a more convenient form,"}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"]},{"anchor":"Transient","level":2,"type":"heading","text":"Transient"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you’re concerned about building Factory’s on the fly, don’t be. Like SwiftUI Views, Factory structs and modifiers"},{"type":"text","text":" "},{"type":"text","text":"are lightweight and transitory. They’re created when needed and then immediately discarded once their purpose has"},{"type":"text","text":" "},{"type":"text","text":"been served."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Other operations exist for Factory. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"},{"type":"text","text":"."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory"],"traits":[{"interfaceLanguage":"swift"}]}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"],"kind":"relationships","title":"Conforms To","type":"conformsTo"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"title":"Factory","roleHeading":"Structure","role":"symbol","symbolKind":"struct","externalID":"s:7FactoryAAV","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory\/init(_:key:_:)"]},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory\/registration"]},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","doc:\/\/Factory\/documentation\/Factory\/Factory\/register(factory:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/resolve()"]},{"title":"Default Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Factory/register(factory:)":{"role":"symbol","title":"register(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Registers a new factory closure capable of producing an object or service of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/register(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/register(factory:)"},"doc://Factory/documentation/Factory/Factory/callAsFunction()":{"role":"symbol","title":"callAsFunction()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Evaluates the factory and returns an object or service of the desired type. The resolved instance may be brand new or Factory may"},{"type":"text","text":" "},{"type":"text","text":"return a cached value from the specified scope."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/callasfunction()"},"doc://Factory/documentation/Factory/Factory/resolve()":{"role":"symbol","title":"resolve()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Unsugared resolution function."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/resolve()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/resolve()"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/Factory/init(_:key:_:)":{"role":"symbol","title":"init(_:key:_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP"},{"kind":"text","text":", "},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Public initializer creates a Factory capable of managing dependencies of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/init(_:key:_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/init(_:key:_:)"},"doc://Factory/documentation/Factory/Factory/registration":{"role":"symbol","title":"registration","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Internal parameters for this Factory including id, container, the factory closure itself, the scope,"},{"type":"text","text":" "},{"type":"text","text":"and others."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/registration","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/registration"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/cached.json b/docs/data/documentation/factory/factory/cached.json index 55eda161..32470f41 100644 --- a/docs/data/documentation/factory/factory/cached.json +++ b/docs/data/documentation/factory/factory/cached.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .cached","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/cached"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/cached","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"cached","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE6cachedxvp::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Factory/cached":{"role":"symbol","title":"cached","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/cached","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/cached"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .cached","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/cached"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/cached","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"cached","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE6cachedxvp::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory/cached":{"role":"symbol","title":"cached","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/cached","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/cached"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/callasfunction().json b/docs/data/documentation/factory/factory/callasfunction().json index 17e3301c..4ef267e2 100644 --- a/docs/data/documentation/factory/factory/callasfunction().json +++ b/docs/data/documentation/factory/factory/callasfunction().json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"return-value","level":2,"type":"heading","text":"Return Value"},{"type":"paragraph","inlineContent":[{"type":"text","text":"An object or service of the desired type."}]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"To resolve the Factory one simply calls the Factory as a function. Here we use the "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" container that’s provided for each"},{"type":"text","text":" "},{"type":"text","text":"and every container type."}]},{"type":"codeListing","syntax":"swift","code":["let service = Container.shared.service()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The resolved instance may be brand new or Factory may return a cached value from the specified "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you’re passing an instance of a container around to your views or view models, just call it directly."}]},{"type":"codeListing","syntax":"swift","code":["let service = container.service()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Finally, you can also use the @Injected property wrapper and specify a keyPaths to the desired dependency."}]},{"type":"codeListing","syntax":"swift","code":["@Injected(\\.service) var service: ServiceType"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Unless otherwise specified, the @Injected property wrapper looks for dependencies in the standard shared container provided by Factory,"},{"type":"text","text":" "},{"type":"text","text":"so the above example is functionally identical to the "},{"type":"codeVoice","code":"Container.shared.service()"},{"type":"text","text":" example shown earlier. Here’s one pointing to"},{"type":"text","text":" "},{"type":"text","text":"your own container."}]},{"type":"codeListing","syntax":"swift","code":["@Injected(\\MyCustomContainer.service) var service: ServiceType"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/callasfunction()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Evaluates the factory and returns an object or service of the desired type. The resolved instance may be brand new or Factory may"},{"type":"text","text":" "},{"type":"text","text":"return a cached value from the specified scope."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"title":"callAsFunction()","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:7FactoryAAV14callAsFunctionxyF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"references":{"doc://Factory/documentation/Factory/Factory/callAsFunction()":{"role":"symbol","title":"callAsFunction()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Evaluates the factory and returns an object or service of the desired type. The resolved instance may be brand new or Factory may"},{"type":"text","text":" "},{"type":"text","text":"return a cached value from the specified scope."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/callasfunction()"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"return-value","level":2,"type":"heading","text":"Return Value"},{"type":"paragraph","inlineContent":[{"type":"text","text":"An object or service of the desired type."}]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"To resolve the Factory one simply calls the Factory as a function. Here we use the "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" container that’s provided for each"},{"type":"text","text":" "},{"type":"text","text":"and every container type."}]},{"type":"codeListing","syntax":"swift","code":["let service = Container.shared.service()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The resolved instance may be brand new or Factory may return a cached value from the specified "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you’re passing an instance of a container around to your views or view models, just call it directly."}]},{"type":"codeListing","syntax":"swift","code":["let service = container.service()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Finally, you can also use the @Injected property wrapper and specify a keyPaths to the desired dependency."}]},{"type":"codeListing","syntax":"swift","code":["@Injected(\\.service) var service: ServiceType"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Unless otherwise specified, the @Injected property wrapper looks for dependencies in the standard shared container provided by Factory,"},{"type":"text","text":" "},{"type":"text","text":"so the above example is functionally identical to the "},{"type":"codeVoice","code":"Container.shared.service()"},{"type":"text","text":" example shown earlier. Here’s one pointing to"},{"type":"text","text":" "},{"type":"text","text":"your own container."}]},{"type":"codeListing","syntax":"swift","code":["@Injected(\\MyCustomContainer.service) var service: ServiceType"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/callasfunction()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Evaluates the factory and returns an object or service of the desired type. The resolved instance may be brand new or Factory may"},{"type":"text","text":" "},{"type":"text","text":"return a cached value from the specified scope."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"title":"callAsFunction()","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:7FactoryAAV14callAsFunctionxyF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"references":{"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory/callAsFunction()":{"role":"symbol","title":"callAsFunction()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Evaluates the factory and returns an object or service of the desired type. The resolved instance may be brand new or Factory may"},{"type":"text","text":" "},{"type":"text","text":"return a cached value from the specified scope."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/callasfunction()"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/context(_:factory:).json b/docs/data/documentation/factory/factory/context(_:factory:).json index 423db95e..39b13c72 100644 --- a/docs/data/documentation/factory/factory/context(_:factory:).json +++ b/docs/data/documentation/factory/factory/context(_:factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"contexts"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","preciseIdentifier":"s:7Factory0A7ContextO","text":"FactoryContext"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"A context might be be when running in SwiftUI preview mode, or when running unit tests."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/context(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/context(_:factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"kind":"symbol","metadata":{"role":"symbol","title":"context(_:factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryContext","preciseIdentifier":"s:7Factory0A7ContextO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE7context_7factoryxAA0A7ContextOd_1TQz1PQzctF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory/context(_:factory:)":{"role":"symbol","title":"context(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryContext","preciseIdentifier":"s:7Factory0A7ContextO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/context(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/context(_:factory:)"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Contexts":{"role":"article","title":"Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","kind":"article","type":"topic","url":"\/documentation\/factory\/contexts"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"contexts"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","preciseIdentifier":"s:7Factory0A7ContextO","text":"FactoryContext"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"A context might be be when running in SwiftUI preview mode, or when running unit tests."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/context(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/context(_:factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"kind":"symbol","metadata":{"role":"symbol","title":"context(_:factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryContext","preciseIdentifier":"s:7Factory0A7ContextO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE7context_7factoryxAA0A7ContextOd_1TQz1PQzctF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Contexts":{"role":"article","title":"Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","kind":"article","type":"topic","url":"\/documentation\/factory\/contexts"},"doc://Factory/documentation/Factory/Factory/context(_:factory:)":{"role":"symbol","title":"context(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryContext","preciseIdentifier":"s:7Factory0A7ContextO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/context(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/context(_:factory:)"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/decorator(_:).json b/docs/data/documentation/factory/factory/decorator(_:).json index 4924b57a..3ac9c4ab 100644 --- a/docs/data/documentation/factory/factory/decorator(_:).json +++ b/docs/data/documentation/factory/factory/decorator(_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"decorator"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This includes previously created items that may have been cached by a scope."}]},{"type":"codeListing","syntax":"swift","code":["var decoratedService: Factory {"," self { ParentChildService() }"," .decorated {"," $0.child.parent = $0"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As shown, decorator can come in handy when you need to perform some operation or manipulation after the fact."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/decorator(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/decorator(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"type":"emphasis","inlineContent":[{"type":"text","text":"always"}]},{"type":"text","text":" be called with the resolved dependency"},{"type":"text","text":" "},{"type":"text","text":"for further examination or manipulation."}],"kind":"symbol","metadata":{"role":"symbol","title":"decorator(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE9decoratoryxy1TQzcF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory/decorator(_:)":{"role":"symbol","title":"decorator(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"type":"emphasis","inlineContent":[{"type":"text","text":"always"}]},{"type":"text","text":" be called with the resolved dependency"},{"type":"text","text":" "},{"type":"text","text":"for further examination or manipulation."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/decorator(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/decorator(_:)"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"decorator"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This includes previously created items that may have been cached by a scope."}]},{"type":"codeListing","syntax":"swift","code":["var decoratedService: Factory {"," self { ParentChildService() }"," .decorated {"," $0.child.parent = $0"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As shown, decorator can come in handy when you need to perform some operation or manipulation after the fact."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/decorator(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/decorator(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"type":"emphasis","inlineContent":[{"type":"text","text":"always"}]},{"type":"text","text":" be called with the resolved dependency"},{"type":"text","text":" "},{"type":"text","text":"for further examination or manipulation."}],"kind":"symbol","metadata":{"role":"symbol","title":"decorator(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE9decoratoryxy1TQzcF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory/decorator(_:)":{"role":"symbol","title":"decorator(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"type":"emphasis","inlineContent":[{"type":"text","text":"always"}]},{"type":"text","text":" be called with the resolved dependency"},{"type":"text","text":" "},{"type":"text","text":"for further examination or manipulation."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/decorator(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/decorator(_:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/factorymodifying-implementations.json b/docs/data/documentation/factory/factory/factorymodifying-implementations.json index daa0e7d9..f916b482 100644 --- a/docs/data/documentation/factory/factory/factorymodifying-implementations.json +++ b/docs/data/documentation/factory/factory/factorymodifying-implementations.json @@ -1 +1 @@ -{"variants":[{"paths":["\/documentation\/factory\/factory\/factorymodifying-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","interfaceLanguage":"swift"},"topicSections":[{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory\/cached","doc:\/\/Factory\/documentation\/Factory\/Factory\/graph","doc:\/\/Factory\/documentation\/Factory\/Factory\/shared","doc:\/\/Factory\/documentation\/Factory\/Factory\/singleton","doc:\/\/Factory\/documentation\/Factory\/Factory\/unique"],"generated":true},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory\/context(_:factory:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/decorator(_:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/onArg(_:factory:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/onArgs(_:factory:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/onDebug(factory:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/onDevice(factory:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/onPreview(factory:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/onSimulator(factory:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/onTest(factory:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/once()","doc:\/\/Factory\/documentation\/Factory\/Factory\/register(scope:factory:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/reset(_:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/scope(_:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/timeToLive(_:)"],"generated":true}],"kind":"article","metadata":{"modules":[{"name":"Factory"}],"role":"collectionGroup","title":"FactoryModifying Implementations"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"references":{"doc://Factory/documentation/Factory/Factory/onDevice(factory:)":{"role":"symbol","title":"onDevice(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDevice(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/ondevice(factory:)"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Factory/register(scope:factory:)":{"role":"symbol","title":"register(scope:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Allows registering new factory closure and updating scope used after the fact."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/register(scope:factory:)","kind":"symbol","type":"topic","deprecated":true,"url":"\/documentation\/factory\/factory\/register(scope:factory:)"},"doc://Factory/documentation/Factory/Factory/context(_:factory:)":{"role":"symbol","title":"context(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryContext","preciseIdentifier":"s:7Factory0A7ContextO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/context(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/context(_:factory:)"},"doc://Factory/documentation/Factory/Factory/shared":{"role":"symbol","title":"shared","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/shared","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/shared"},"doc://Factory/documentation/Factory/Factory/scope(_:)":{"role":"symbol","title":"scope(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/scope(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/scope(_:)"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/Factory/unique":{"role":"symbol","title":"unique","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/unique","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/unique"},"doc://Factory/documentation/Factory/Factory/cached":{"role":"symbol","title":"cached","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/cached","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/cached"},"doc://Factory/documentation/Factory/Factory/onTest(factory:)":{"role":"symbol","title":"onTest(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onTest(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/ontest(factory:)"},"doc://Factory/documentation/Factory/Factory/graph":{"role":"symbol","title":"graph","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/graph","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/graph"},"doc://Factory/documentation/Factory/Factory/once()":{"role":"symbol","title":"once()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/once()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/once()"},"doc://Factory/documentation/Factory/Factory/onSimulator(factory:)":{"role":"symbol","title":"onSimulator(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onSimulator(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/onsimulator(factory:)"},"doc://Factory/documentation/Factory/Factory/singleton":{"role":"symbol","title":"singleton","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/singleton","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/singleton"},"doc://Factory/documentation/Factory/Factory/onPreview(factory:)":{"role":"symbol","title":"onPreview(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onPreview(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/onpreview(factory:)"},"doc://Factory/documentation/Factory/Factory/reset(_:)":{"role":"symbol","title":"reset(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/reset(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/reset(_:)"},"doc://Factory/documentation/Factory/Factory/decorator(_:)":{"role":"symbol","title":"decorator(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"type":"emphasis","inlineContent":[{"type":"text","text":"always"}]},{"type":"text","text":" be called with the resolved dependency"},{"type":"text","text":" "},{"type":"text","text":"for further examination or manipulation."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/decorator(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/decorator(_:)"},"doc://Factory/documentation/Factory/Factory/onDebug(factory:)":{"role":"symbol","title":"onDebug(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDebug(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/ondebug(factory:)"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Factory/onArgs(_:factory:)":{"role":"symbol","title":"onArgs(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArgs(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/onargs(_:factory:)"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory/Factory/onArg(_:factory:)":{"role":"symbol","title":"onArg(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArg(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/onarg(_:factory:)"},"doc://Factory/documentation/Factory/Factory/timeToLive(_:)":{"role":"symbol","title":"timeToLive(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds time to live option for scopes. If the dependency has been cached for longer than the timeToLive period the"},{"type":"text","text":" "},{"type":"text","text":"cached item will be discarded and a new instance created."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/timeToLive(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/timetolive(_:)"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"variants":[{"paths":["\/documentation\/factory\/factory\/factorymodifying-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","interfaceLanguage":"swift"},"topicSections":[{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory\/cached","doc:\/\/Factory\/documentation\/Factory\/Factory\/graph","doc:\/\/Factory\/documentation\/Factory\/Factory\/shared","doc:\/\/Factory\/documentation\/Factory\/Factory\/singleton","doc:\/\/Factory\/documentation\/Factory\/Factory\/unique"],"generated":true},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory\/context(_:factory:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/decorator(_:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/onArg(_:factory:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/onArgs(_:factory:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/onDebug(factory:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/onDevice(factory:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/onPreview(factory:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/onSimulator(factory:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/onTest(factory:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/once()","doc:\/\/Factory\/documentation\/Factory\/Factory\/register(scope:factory:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/reset(_:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/scope(_:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/timeToLive(_:)"],"generated":true}],"kind":"article","metadata":{"modules":[{"name":"Factory"}],"role":"collectionGroup","title":"FactoryModifying Implementations"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"references":{"doc://Factory/documentation/Factory/Factory/cached":{"role":"symbol","title":"cached","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/cached","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/cached"},"doc://Factory/documentation/Factory/Factory/onSimulator(factory:)":{"role":"symbol","title":"onSimulator(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onSimulator(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/onsimulator(factory:)"},"doc://Factory/documentation/Factory/Factory/onArg(_:factory:)":{"role":"symbol","title":"onArg(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArg(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/onarg(_:factory:)"},"doc://Factory/documentation/Factory/Factory/singleton":{"role":"symbol","title":"singleton","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/singleton","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/singleton"},"doc://Factory/documentation/Factory/Factory/onPreview(factory:)":{"role":"symbol","title":"onPreview(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onPreview(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/onpreview(factory:)"},"doc://Factory/documentation/Factory/Factory/scope(_:)":{"role":"symbol","title":"scope(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/scope(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/scope(_:)"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory/Factory/onDebug(factory:)":{"role":"symbol","title":"onDebug(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDebug(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/ondebug(factory:)"},"doc://Factory/documentation/Factory/Factory/onArgs(_:factory:)":{"role":"symbol","title":"onArgs(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArgs(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/onargs(_:factory:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"role":"symbol","title":"Scope.Shared","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"url":"\/documentation\/factory\/scope\/shared-swift.class"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/Factory/onTest(factory:)":{"role":"symbol","title":"onTest(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onTest(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/ontest(factory:)"},"doc://Factory/documentation/Factory/Factory/context(_:factory:)":{"role":"symbol","title":"context(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryContext","preciseIdentifier":"s:7Factory0A7ContextO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/context(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/context(_:factory:)"},"doc://Factory/documentation/Factory/Factory/timeToLive(_:)":{"role":"symbol","title":"timeToLive(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds time to live option for scopes. If the dependency has been cached for longer than the timeToLive period the"},{"type":"text","text":" "},{"type":"text","text":"cached item will be discarded and a new instance created."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/timeToLive(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/timetolive(_:)"},"doc://Factory/documentation/Factory/Factory/register(scope:factory:)":{"role":"symbol","title":"register(scope:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Allows registering new factory closure and updating scope used after the fact."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/register(scope:factory:)","kind":"symbol","type":"topic","deprecated":true,"url":"\/documentation\/factory\/factory\/register(scope:factory:)"},"doc://Factory/documentation/Factory/Factory/reset(_:)":{"role":"symbol","title":"reset(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/reset(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/reset(_:)"},"doc://Factory/documentation/Factory/Factory/decorator(_:)":{"role":"symbol","title":"decorator(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"type":"emphasis","inlineContent":[{"type":"text","text":"always"}]},{"type":"text","text":" be called with the resolved dependency"},{"type":"text","text":" "},{"type":"text","text":"for further examination or manipulation."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/decorator(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/decorator(_:)"},"doc://Factory/documentation/Factory/Factory/shared":{"role":"symbol","title":"shared","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/shared","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/shared"},"doc://Factory/documentation/Factory/Factory/onDevice(factory:)":{"role":"symbol","title":"onDevice(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDevice(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/ondevice(factory:)"},"doc://Factory/documentation/Factory/Factory/graph":{"role":"symbol","title":"graph","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/graph","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/graph"},"doc://Factory/documentation/Factory/Factory/unique":{"role":"symbol","title":"unique","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/unique","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/unique"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/Factory/once()":{"role":"symbol","title":"once()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/once()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/once()"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/graph.json b/docs/data/documentation/factory/factory/graph.json index 7a2889d7..06dc40c0 100644 --- a/docs/data/documentation/factory/factory/graph.json +++ b/docs/data/documentation/factory/factory/graph.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .graph","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/graph"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/graph","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"graph","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE5graphxvp::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Factory/graph":{"role":"symbol","title":"graph","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/graph","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/graph"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .graph","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/graph"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/graph","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"graph","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE5graphxvp::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory/graph":{"role":"symbol","title":"graph","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/graph","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/graph"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/onarg(_:factory:).json b/docs/data/documentation/factory/factory/onarg(_:factory:).json index 2e44b82c..e949d896 100644 --- a/docs/data/documentation/factory/factory/onarg(_:factory:).json +++ b/docs/data/documentation/factory/factory/onarg(_:factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"argument"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/onarg(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArg(_:factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onArg(_:factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE5onArg_7factoryxSS_1TQz1PQzctF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory/onArg(_:factory:)":{"role":"symbol","title":"onArg(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArg(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/onarg(_:factory:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"argument"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/onarg(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArg(_:factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onArg(_:factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE5onArg_7factoryxSS_1TQz1PQzctF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Factory/onArg(_:factory:)":{"role":"symbol","title":"onArg(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArg(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/onarg(_:factory:)"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/onargs(_:factory:).json b/docs/data/documentation/factory/factory/onargs(_:factory:).json index 589bd1fe..770c87a7 100644 --- a/docs/data/documentation/factory/factory/onargs(_:factory:).json +++ b/docs/data/documentation/factory/factory/onargs(_:factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"args"},{"kind":"text","text":": ["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/onargs(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArgs(_:factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onArgs(_:factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE6onArgs_7factoryxSaySSG_1TQz1PQzctF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory/onArgs(_:factory:)":{"role":"symbol","title":"onArgs(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArgs(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/onargs(_:factory:)"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"args"},{"kind":"text","text":": ["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/onargs(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArgs(_:factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onArgs(_:factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE6onArgs_7factoryxSaySSG_1TQz1PQzctF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory/onArgs(_:factory:)":{"role":"symbol","title":"onArgs(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArgs(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/onargs(_:factory:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/once().json b/docs/data/documentation/factory/factory/once().json index dea5ccc8..b9bb94b2 100644 --- a/docs/data/documentation/factory/factory/once().json +++ b/docs/data/documentation/factory/factory/once().json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/once()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/once()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"kind":"symbol","metadata":{"role":"symbol","title":"once()","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE4oncexyF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Factory/once()":{"role":"symbol","title":"once()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/once()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/once()"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/once()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/once()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"kind":"symbol","metadata":{"role":"symbol","title":"once()","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE4oncexyF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Factory/once()":{"role":"symbol","title":"once()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/once()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/once()"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/ondebug(factory:).json b/docs/data/documentation/factory/factory/ondebug(factory:).json index c44c1b0a..a59b10cb 100644 --- a/docs/data/documentation/factory/factory/ondebug(factory:).json +++ b/docs/data/documentation/factory/factory/ondebug(factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/ondebug(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDebug(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onDebug(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE7onDebug7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Factory/onDebug(factory:)":{"role":"symbol","title":"onDebug(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDebug(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/ondebug(factory:)"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/ondebug(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDebug(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onDebug(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE7onDebug7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory/onDebug(factory:)":{"role":"symbol","title":"onDebug(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDebug(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/ondebug(factory:)"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/ondevice(factory:).json b/docs/data/documentation/factory/factory/ondevice(factory:).json index a651d704..6294d8f8 100644 --- a/docs/data/documentation/factory/factory/ondevice(factory:).json +++ b/docs/data/documentation/factory/factory/ondevice(factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/ondevice(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDevice(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onDevice(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE8onDevice7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Factory/onDevice(factory:)":{"role":"symbol","title":"onDevice(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDevice(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/ondevice(factory:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/ondevice(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDevice(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onDevice(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE8onDevice7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory/onDevice(factory:)":{"role":"symbol","title":"onDevice(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDevice(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/ondevice(factory:)"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/onpreview(factory:).json b/docs/data/documentation/factory/factory/onpreview(factory:).json index 4488f9ba..137de8a4 100644 --- a/docs/data/documentation/factory/factory/onpreview(factory:).json +++ b/docs/data/documentation/factory/factory/onpreview(factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/onpreview(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onPreview(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onPreview(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE9onPreview7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory/onPreview(factory:)":{"role":"symbol","title":"onPreview(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onPreview(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/onpreview(factory:)"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/onpreview(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onPreview(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onPreview(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE9onPreview7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory/onPreview(factory:)":{"role":"symbol","title":"onPreview(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onPreview(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/onpreview(factory:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/onsimulator(factory:).json b/docs/data/documentation/factory/factory/onsimulator(factory:).json index 7b52a7ab..bac68440 100644 --- a/docs/data/documentation/factory/factory/onsimulator(factory:).json +++ b/docs/data/documentation/factory/factory/onsimulator(factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/onsimulator(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onSimulator(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onSimulator(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE11onSimulator7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory/onSimulator(factory:)":{"role":"symbol","title":"onSimulator(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onSimulator(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/onsimulator(factory:)"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/onsimulator(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onSimulator(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onSimulator(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE11onSimulator7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Factory/onSimulator(factory:)":{"role":"symbol","title":"onSimulator(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onSimulator(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/onsimulator(factory:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/ontest(factory:).json b/docs/data/documentation/factory/factory/ontest(factory:).json index dd4607e2..2a67d0fc 100644 --- a/docs/data/documentation/factory/factory/ontest(factory:).json +++ b/docs/data/documentation/factory/factory/ontest(factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/ontest(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onTest(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onTest(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE6onTest7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Factory/onTest(factory:)":{"role":"symbol","title":"onTest(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onTest(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/ontest(factory:)"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/ontest(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onTest(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onTest(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE6onTest7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory/onTest(factory:)":{"role":"symbol","title":"onTest(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onTest(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/ontest(factory:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/register(factory:).json b/docs/data/documentation/factory/factory/register(factory:).json index 27ee2e97..dc72757d 100644 --- a/docs/data/documentation/factory/factory/register(factory:).json +++ b/docs/data/documentation/factory/factory/register(factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This factory overrides the original factory closure and clears the associated scope so that the next time this factory is resolved"},{"type":"text","text":" "},{"type":"text","text":"Factory will evaluate the new closure and return an instance of the newly registered object instead."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s an example of registering a new Factory closure."}]},{"type":"codeListing","syntax":"swift","code":["container.service.register {"," SomeService()","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This is how default functionality is overridden in order to change the nature of the system at runtime, and is the primary mechanism"},{"type":"text","text":" "},{"type":"text","text":"used to provide mocks and testing doubles."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Registration “overrides” are stored in the associated container. If the container ever goes our of scope, so"},{"type":"text","text":" "},{"type":"text","text":"will all of its registrations."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The original factory closure is preserved, and may be restored by resetting the Factory to its original state."}]},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"factory: A new factory closure that produces an object of the desired type when needed."},{"type":"text","text":" "},{"type":"text","text":"Allows updating registered factory and scope."}]}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/register(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/register(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Registers a new factory closure capable of producing an object or service of the desired type."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"title":"register(factory:)","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:7FactoryAAV8register7factoryAByxGxyc_tF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory/register(factory:)":{"role":"symbol","title":"register(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Registers a new factory closure capable of producing an object or service of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/register(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/register(factory:)"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This factory overrides the original factory closure and clears the associated scope so that the next time this factory is resolved"},{"type":"text","text":" "},{"type":"text","text":"Factory will evaluate the new closure and return an instance of the newly registered object instead."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s an example of registering a new Factory closure."}]},{"type":"codeListing","syntax":"swift","code":["container.service.register {"," SomeService()","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This is how default functionality is overridden in order to change the nature of the system at runtime, and is the primary mechanism"},{"type":"text","text":" "},{"type":"text","text":"used to provide mocks and testing doubles."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Registration “overrides” are stored in the associated container. If the container ever goes our of scope, so"},{"type":"text","text":" "},{"type":"text","text":"will all of its registrations."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The original factory closure is preserved, and may be restored by resetting the Factory to its original state."}]},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"factory: A new factory closure that produces an object of the desired type when needed."},{"type":"text","text":" "},{"type":"text","text":"Allows updating registered factory and scope."}]}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/register(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/register(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Registers a new factory closure capable of producing an object or service of the desired type."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"title":"register(factory:)","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:7FactoryAAV8register7factoryAByxGxyc_tF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"references":{"doc://Factory/documentation/Factory/Factory/register(factory:)":{"role":"symbol","title":"register(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Registers a new factory closure capable of producing an object or service of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/register(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/register(factory:)"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/register(scope:factory:).json b/docs/data/documentation/factory/factory/register(scope:factory:).json index 85d32c4a..61fb3288 100644 --- a/docs/data/documentation/factory/factory/register(scope:factory:).json +++ b/docs/data/documentation/factory/factory/register(scope:factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"scope: Optional parameter that lets the registration redefine the scope used for this dependency."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"factory: A new factory closure that produces an object of the desired type when needed."}]}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/register(scope:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/register(scope:factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Allows registering new factory closure and updating scope used after the fact."}],"kind":"symbol","metadata":{"modules":[{"name":"Factory"}],"role":"symbol","title":"register(scope:factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE8register5scope7factoryxAA5ScopeCSg_1TQz1PQzctF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","platforms":[]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"deprecationSummary":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Use container.service.scope(.cached).register { Service() } instead"}]}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Factory/register(scope:factory:)":{"role":"symbol","title":"register(scope:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Allows registering new factory closure and updating scope used after the fact."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/register(scope:factory:)","kind":"symbol","type":"topic","deprecated":true,"url":"\/documentation\/factory\/factory\/register(scope:factory:)"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"scope: Optional parameter that lets the registration redefine the scope used for this dependency."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"factory: A new factory closure that produces an object of the desired type when needed."}]}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/register(scope:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/register(scope:factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Allows registering new factory closure and updating scope used after the fact."}],"kind":"symbol","metadata":{"modules":[{"name":"Factory"}],"role":"symbol","title":"register(scope:factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE8register5scope7factoryxAA5ScopeCSg_1TQz1PQzctF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","platforms":[]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"deprecationSummary":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Use container.service.scope(.cached).register { Service() } instead"}]}],"references":{"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory/register(scope:factory:)":{"role":"symbol","title":"register(scope:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Allows registering new factory closure and updating scope used after the fact."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/register(scope:factory:)","kind":"symbol","type":"topic","deprecated":true,"url":"\/documentation\/factory\/factory\/register(scope:factory:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/registration.json b/docs/data/documentation/factory/factory/registration.json index 2d374b9a..760333b6 100644 --- a/docs/data/documentation/factory/factory/registration.json +++ b/docs/data/documentation/factory/factory/registration.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV","text":"FactoryRegistration"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/registration"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/registration","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Internal parameters for this Factory including id, container, the factory closure itself, the scope,"},{"type":"text","text":" "},{"type":"text","text":"and others."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"title":"registration","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7FactoryAAV12registrationAA0A12RegistrationVyytxGvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Factory/registration":{"role":"symbol","title":"registration","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Internal parameters for this Factory including id, container, the factory closure itself, the scope,"},{"type":"text","text":" "},{"type":"text","text":"and others."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/registration","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/registration"},"doc://Factory/documentation/Factory/FactoryRegistration":{"role":"symbol","title":"FactoryRegistration","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"url":"\/documentation\/factory\/factoryregistration"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV","text":"FactoryRegistration"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/registration"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/registration","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Internal parameters for this Factory including id, container, the factory closure itself, the scope,"},{"type":"text","text":" "},{"type":"text","text":"and others."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"title":"registration","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7FactoryAAV12registrationAA0A12RegistrationVyytxGvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Factory/registration":{"role":"symbol","title":"registration","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Internal parameters for this Factory including id, container, the factory closure itself, the scope,"},{"type":"text","text":" "},{"type":"text","text":"and others."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/registration","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/registration"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryRegistration":{"role":"symbol","title":"FactoryRegistration","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"url":"\/documentation\/factory\/factoryregistration"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/reset(_:).json b/docs/data/documentation/factory/factory/reset(_:).json index cf32eef1..78fa5f83 100644 --- a/docs/data/documentation/factory/factory/reset(_:).json +++ b/docs/data/documentation/factory/factory/reset(_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"options"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":" = .all)"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"options","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"options description"}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/reset(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/reset(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope."}],"kind":"symbol","metadata":{"role":"symbol","title":"reset(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE5resetyyAA0A12ResetOptionsOF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory/reset(_:)":{"role":"symbol","title":"reset(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/reset(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/reset(_:)"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"options"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":" = .all)"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"options","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"options description"}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/reset(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/reset(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope."}],"kind":"symbol","metadata":{"role":"symbol","title":"reset(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE5resetyyAA0A12ResetOptionsOF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory/reset(_:)":{"role":"symbol","title":"reset(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/reset(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/reset(_:)"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/resolve().json b/docs/data/documentation/factory/factory/resolve().json index 90435ca8..5b52b030 100644 --- a/docs/data/documentation/factory/factory/resolve().json +++ b/docs/data/documentation/factory/factory/resolve().json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/resolve()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/resolve()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Unsugared resolution function."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"title":"resolve()","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:7FactoryAAV7resolvexyF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory/resolve()":{"role":"symbol","title":"resolve()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Unsugared resolution function."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/resolve()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/resolve()"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/resolve()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/resolve()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Unsugared resolution function."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"title":"resolve()","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:7FactoryAAV7resolvexyF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"references":{"doc://Factory/documentation/Factory/Factory/resolve()":{"role":"symbol","title":"resolve()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Unsugared resolution function."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/resolve()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/resolve()"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/scope(_:).json b/docs/data/documentation/factory/factory/scope(_:).json index 79d988c0..5e65c2d0 100644 --- a/docs/data/documentation/factory/factory/scope(_:).json +++ b/docs/data/documentation/factory/factory/scope(_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .scope(.session)","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/scope(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/scope(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"scope(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE5scopeyxAA5ScopeCF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Factory/scope(_:)":{"role":"symbol","title":"scope(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/scope(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/scope(_:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .scope(.session)","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/scope(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/scope(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"scope(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE5scopeyxAA5ScopeCF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory/scope(_:)":{"role":"symbol","title":"scope(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/scope(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/scope(_:)"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/shared.json b/docs/data/documentation/factory/factory/shared.json index a5be2444..1c5c05ac 100644 --- a/docs/data/documentation/factory/factory/shared.json +++ b/docs/data/documentation/factory/factory/shared.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .shared","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/shared"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/shared","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"shared","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE6sharedxvp::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory/shared":{"role":"symbol","title":"shared","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/shared","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/shared"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .shared","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/shared"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/shared","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"shared","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE6sharedxvp::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"role":"symbol","title":"Scope.Shared","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"url":"\/documentation\/factory\/scope\/shared-swift.class"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Factory/shared":{"role":"symbol","title":"shared","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/shared","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/shared"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/singleton.json b/docs/data/documentation/factory/factory/singleton.json index fe7452af..cfcfc08a 100644 --- a/docs/data/documentation/factory/factory/singleton.json +++ b/docs/data/documentation/factory/factory/singleton.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .singleton","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/singleton"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/singleton","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"singleton","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE9singletonxvp::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Factory/singleton":{"role":"symbol","title":"singleton","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/singleton","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/singleton"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .singleton","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/singleton"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/singleton","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"singleton","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE9singletonxvp::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory/singleton":{"role":"symbol","title":"singleton","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/singleton","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/singleton"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/timetolive(_:).json b/docs/data/documentation/factory/factory/timetolive(_:).json index 8354925c..b228dd72 100644 --- a/docs/data/documentation/factory/factory/timetolive(_:).json +++ b/docs/data/documentation/factory/factory/timetolive(_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"seconds"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/timetolive(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/timeToLive(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Adds time to live option for scopes. If the dependency has been cached for longer than the timeToLive period the"},{"type":"text","text":" "},{"type":"text","text":"cached item will be discarded and a new instance created."}],"kind":"symbol","metadata":{"role":"symbol","title":"timeToLive(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE10timeToLiveyxSdF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory/timeToLive(_:)":{"role":"symbol","title":"timeToLive(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds time to live option for scopes. If the dependency has been cached for longer than the timeToLive period the"},{"type":"text","text":" "},{"type":"text","text":"cached item will be discarded and a new instance created."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/timeToLive(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/timetolive(_:)"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"seconds"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/timetolive(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/timeToLive(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Adds time to live option for scopes. If the dependency has been cached for longer than the timeToLive period the"},{"type":"text","text":" "},{"type":"text","text":"cached item will be discarded and a new instance created."}],"kind":"symbol","metadata":{"role":"symbol","title":"timeToLive(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE10timeToLiveyxSdF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory/timeToLive(_:)":{"role":"symbol","title":"timeToLive(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds time to live option for scopes. If the dependency has been cached for longer than the timeToLive period the"},{"type":"text","text":" "},{"type":"text","text":"cached item will be discarded and a new instance created."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/timeToLive(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/timetolive(_:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/unique.json b/docs/data/documentation/factory/factory/unique.json index a5a6dfa6..b7658b4a 100644 --- a/docs/data/documentation/factory/factory/unique.json +++ b/docs/data/documentation/factory/factory/unique.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .unique","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"While you can add the modifier, Factory’s are unique by default."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/unique"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/unique","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"unique","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE6uniquexvp::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Factory/unique":{"role":"symbol","title":"unique","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/unique","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/unique"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .unique","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"While you can add the modifier, Factory’s are unique by default."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/unique"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/unique","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"unique","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE6uniquexvp::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Factory/unique":{"role":"symbol","title":"unique","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/unique","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/unique"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontext.json b/docs/data/documentation/factory/factorycontext.json index 503aa806..a88bf458 100644 --- a/docs/data/documentation/factory/factorycontext.json +++ b/docs/data/documentation/factory/factorycontext.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontext"],"traits":[{"interfaceLanguage":"swift"}]}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/SQ"],"kind":"relationships","title":"Conforms To","type":"conformsTo"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"title":"FactoryContext","roleHeading":"Enumeration","role":"symbol","symbolKind":"enum","externalID":"s:7Factory0A7ContextO","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Enumeration Cases","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/arg(_:)","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/args(_:)","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/debug","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/device","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/preview","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/simulator","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/test"]},{"title":"Type Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/removeArg(forKey:)","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/setArg(_:forKey:)"]},{"title":"Default Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/Equatable-Implementations"],"generated":true}],"references":{"doc://Factory/SQ":{"type":"unresolvable","title":"Swift.Equatable","identifier":"doc:\/\/Factory\/SQ"},"doc://Factory/documentation/Factory/FactoryContext/simulator":{"role":"symbol","title":"FactoryContext.simulator","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"simulator"}],"abstract":[{"type":"text","text":"Context used when application is running within an Xcode simulator."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/simulator","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/simulator"},"doc://Factory/documentation/Factory/FactoryContext/preview":{"role":"symbol","title":"FactoryContext.preview","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"preview"}],"abstract":[{"type":"text","text":"Context used when application is running in Xcode Preview mode."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/preview","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/preview"},"doc://Factory/documentation/Factory/FactoryContext/Equatable-Implementations":{"role":"collectionGroup","title":"Equatable Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/Equatable-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factorycontext\/equatable-implementations"},"doc://Factory/documentation/Factory/FactoryContext/device":{"role":"symbol","title":"FactoryContext.device","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"device"}],"abstract":[{"type":"text","text":"Context used when application is running on an actual device."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/device","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/device"},"doc://Factory/documentation/Factory/FactoryContext/args(_:)":{"role":"symbol","title":"FactoryContext.args(_:)","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"args"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"])"}],"abstract":[{"type":"text","text":"Context used when application is launched with a particular argument or arguments."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/args(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/args(_:)"},"doc://Factory/documentation/Factory/FactoryContext/test":{"role":"symbol","title":"FactoryContext.test","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"test"}],"abstract":[{"type":"text","text":"Context used when application is running in Xcode Unit Test mode."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/test","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/test"},"doc://Factory/documentation/Factory/FactoryContext/removeArg(forKey:)":{"role":"symbol","title":"removeArg(forKey:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"removeArg"},{"kind":"text","text":"("},{"kind":"externalParam","text":"forKey"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Add argument to global context."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/removeArg(forKey:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/removearg(forkey:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryContext/debug":{"role":"symbol","title":"FactoryContext.debug","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"debug"}],"abstract":[{"type":"text","text":"Context used when application is running in Xcode DEBUG mode."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/debug","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/debug"},"doc://Factory/documentation/Factory/FactoryContext/arg(_:)":{"role":"symbol","title":"FactoryContext.arg(_:)","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"arg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Context used when application is launched with a particular argument."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/arg(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/arg(_:)"},"doc://Factory/documentation/Factory/FactoryContext/setArg(_:forKey:)":{"role":"symbol","title":"setArg(_:forKey:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"setArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"forKey"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Add argument to global context."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/setArg(_:forKey:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/setarg(_:forkey:)"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontext"],"traits":[{"interfaceLanguage":"swift"}]}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/SQ"],"kind":"relationships","title":"Conforms To","type":"conformsTo"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"title":"FactoryContext","roleHeading":"Enumeration","role":"symbol","symbolKind":"enum","externalID":"s:7Factory0A7ContextO","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Enumeration Cases","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/arg(_:)","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/args(_:)","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/debug","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/device","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/preview","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/simulator","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/test"]},{"title":"Type Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/removeArg(forKey:)","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/setArg(_:forKey:)"]},{"title":"Default Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/Equatable-Implementations"],"generated":true}],"references":{"doc://Factory/documentation/Factory/FactoryContext/test":{"role":"symbol","title":"FactoryContext.test","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"test"}],"abstract":[{"type":"text","text":"Context used when application is running in Xcode Unit Test mode."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/test","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/test"},"doc://Factory/documentation/Factory/FactoryContext/arg(_:)":{"role":"symbol","title":"FactoryContext.arg(_:)","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"arg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Context used when application is launched with a particular argument."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/arg(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/arg(_:)"},"doc://Factory/documentation/Factory/FactoryContext/preview":{"role":"symbol","title":"FactoryContext.preview","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"preview"}],"abstract":[{"type":"text","text":"Context used when application is running in Xcode Preview mode."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/preview","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/preview"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory/FactoryContext/args(_:)":{"role":"symbol","title":"FactoryContext.args(_:)","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"args"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"])"}],"abstract":[{"type":"text","text":"Context used when application is launched with a particular argument or arguments."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/args(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/args(_:)"},"doc://Factory/documentation/Factory/FactoryContext/removeArg(forKey:)":{"role":"symbol","title":"removeArg(forKey:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"removeArg"},{"kind":"text","text":"("},{"kind":"externalParam","text":"forKey"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Add argument to global context."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/removeArg(forKey:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/removearg(forkey:)"},"doc://Factory/SQ":{"type":"unresolvable","title":"Swift.Equatable","identifier":"doc:\/\/Factory\/SQ"},"doc://Factory/documentation/Factory/FactoryContext/device":{"role":"symbol","title":"FactoryContext.device","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"device"}],"abstract":[{"type":"text","text":"Context used when application is running on an actual device."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/device","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/device"},"doc://Factory/documentation/Factory/FactoryContext/Equatable-Implementations":{"role":"collectionGroup","title":"Equatable Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/Equatable-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factorycontext\/equatable-implementations"},"doc://Factory/documentation/Factory/FactoryContext/debug":{"role":"symbol","title":"FactoryContext.debug","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"debug"}],"abstract":[{"type":"text","text":"Context used when application is running in Xcode DEBUG mode."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/debug","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/debug"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryContext/simulator":{"role":"symbol","title":"FactoryContext.simulator","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"simulator"}],"abstract":[{"type":"text","text":"Context used when application is running within an Xcode simulator."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/simulator","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/simulator"},"doc://Factory/documentation/Factory/FactoryContext/setArg(_:forKey:)":{"role":"symbol","title":"setArg(_:forKey:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"setArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"forKey"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Add argument to global context."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/setArg(_:forKey:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/setarg(_:forkey:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontext/!=(_:_:).json b/docs/data/documentation/factory/factorycontext/!=(_:_:).json index dbc352d6..ba82b8a5 100644 --- a/docs/data/documentation/factory/factorycontext/!=(_:_:).json +++ b/docs/data/documentation/factory/factorycontext/!=(_:_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"internalParam","text":"lhs"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"internalParam","text":"rhs"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/!=(_:_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/!=(_:_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Inherited from "},{"type":"codeVoice","code":"Equatable.!=(_:_:)"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"!=(_:_:)","roleHeading":"Operator","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"symbolKind":"op","externalID":"s:SQsE2neoiySbx_xtFZ::SYNTHESIZED::s:7Factory0A7ContextO","extendedModule":"Swift","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/Equatable-Implementations"]]},"references":{"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory/FactoryContext/Equatable-Implementations":{"role":"collectionGroup","title":"Equatable Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/Equatable-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factorycontext\/equatable-implementations"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryContext/!=(_:_:)":{"role":"symbol","title":"!=(_:_:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/!=(_:_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/!=(_:_:)"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"internalParam","text":"lhs"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"internalParam","text":"rhs"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/!=(_:_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/!=(_:_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Inherited from "},{"type":"codeVoice","code":"Equatable.!=(_:_:)"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"!=(_:_:)","roleHeading":"Operator","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"symbolKind":"op","externalID":"s:SQsE2neoiySbx_xtFZ::SYNTHESIZED::s:7Factory0A7ContextO","extendedModule":"Swift","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/Equatable-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryContext/Equatable-Implementations":{"role":"collectionGroup","title":"Equatable Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/Equatable-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factorycontext\/equatable-implementations"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory/FactoryContext/!=(_:_:)":{"role":"symbol","title":"!=(_:_:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/!=(_:_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/!=(_:_:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontext/arg(_:).json b/docs/data/documentation/factory/factorycontext/arg(_:).json index 1a4bf1c1..c6ba9735 100644 --- a/docs/data/documentation/factory/factorycontext/arg(_:).json +++ b/docs/data/documentation/factory/factorycontext/arg(_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"arg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/arg(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/arg(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Context used when application is launched with a particular argument."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"arg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"title":"FactoryContext.arg(_:)","roleHeading":"Case","role":"symbol","symbolKind":"case","externalID":"s:7Factory0A7ContextO3argyACSScACmF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory/FactoryContext/arg(_:)":{"role":"symbol","title":"FactoryContext.arg(_:)","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"arg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Context used when application is launched with a particular argument."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/arg(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/arg(_:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"arg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/arg(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/arg(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Context used when application is launched with a particular argument."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"arg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"title":"FactoryContext.arg(_:)","roleHeading":"Case","role":"symbol","symbolKind":"case","externalID":"s:7Factory0A7ContextO3argyACSScACmF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory/FactoryContext/arg(_:)":{"role":"symbol","title":"FactoryContext.arg(_:)","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"arg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Context used when application is launched with a particular argument."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/arg(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/arg(_:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontext/args(_:).json b/docs/data/documentation/factory/factorycontext/args(_:).json index 86ee17b5..ea46b862 100644 --- a/docs/data/documentation/factory/factorycontext/args(_:).json +++ b/docs/data/documentation/factory/factorycontext/args(_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"args"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"])"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/args(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/args(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Context used when application is launched with a particular argument or arguments."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"args"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"])"}],"title":"FactoryContext.args(_:)","roleHeading":"Case","role":"symbol","symbolKind":"case","externalID":"s:7Factory0A7ContextO4argsyACSaySSGcACmF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory/FactoryContext/args(_:)":{"role":"symbol","title":"FactoryContext.args(_:)","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"args"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"])"}],"abstract":[{"type":"text","text":"Context used when application is launched with a particular argument or arguments."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/args(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/args(_:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"args"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"])"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/args(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/args(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Context used when application is launched with a particular argument or arguments."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"args"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"])"}],"title":"FactoryContext.args(_:)","roleHeading":"Case","role":"symbol","symbolKind":"case","externalID":"s:7Factory0A7ContextO4argsyACSaySSGcACmF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory/FactoryContext/args(_:)":{"role":"symbol","title":"FactoryContext.args(_:)","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"args"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"])"}],"abstract":[{"type":"text","text":"Context used when application is launched with a particular argument or arguments."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/args(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/args(_:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontext/debug.json b/docs/data/documentation/factory/factorycontext/debug.json index 0f1b53da..b8d47be0 100644 --- a/docs/data/documentation/factory/factorycontext/debug.json +++ b/docs/data/documentation/factory/factorycontext/debug.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"debug"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/debug"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/debug","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Context used when application is running in Xcode DEBUG mode."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"debug"}],"title":"FactoryContext.debug","roleHeading":"Case","role":"symbol","symbolKind":"case","externalID":"s:7Factory0A7ContextO5debugyA2CmF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory/FactoryContext/debug":{"role":"symbol","title":"FactoryContext.debug","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"debug"}],"abstract":[{"type":"text","text":"Context used when application is running in Xcode DEBUG mode."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/debug","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/debug"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"debug"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/debug"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/debug","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Context used when application is running in Xcode DEBUG mode."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"debug"}],"title":"FactoryContext.debug","roleHeading":"Case","role":"symbol","symbolKind":"case","externalID":"s:7Factory0A7ContextO5debugyA2CmF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory/FactoryContext/debug":{"role":"symbol","title":"FactoryContext.debug","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"debug"}],"abstract":[{"type":"text","text":"Context used when application is running in Xcode DEBUG mode."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/debug","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/debug"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontext/device.json b/docs/data/documentation/factory/factorycontext/device.json index 9043ae2e..692d7ce7 100644 --- a/docs/data/documentation/factory/factorycontext/device.json +++ b/docs/data/documentation/factory/factorycontext/device.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"device"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/device"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/device","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Context used when application is running on an actual device."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"device"}],"title":"FactoryContext.device","roleHeading":"Case","role":"symbol","symbolKind":"case","externalID":"s:7Factory0A7ContextO6deviceyA2CmF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory/FactoryContext/device":{"role":"symbol","title":"FactoryContext.device","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"device"}],"abstract":[{"type":"text","text":"Context used when application is running on an actual device."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/device","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/device"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"device"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/device"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/device","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Context used when application is running on an actual device."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"device"}],"title":"FactoryContext.device","roleHeading":"Case","role":"symbol","symbolKind":"case","externalID":"s:7Factory0A7ContextO6deviceyA2CmF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory/FactoryContext/device":{"role":"symbol","title":"FactoryContext.device","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"device"}],"abstract":[{"type":"text","text":"Context used when application is running on an actual device."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/device","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/device"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontext/equatable-implementations.json b/docs/data/documentation/factory/factorycontext/equatable-implementations.json index a5006ff1..c5c9c3d3 100644 --- a/docs/data/documentation/factory/factorycontext/equatable-implementations.json +++ b/docs/data/documentation/factory/factorycontext/equatable-implementations.json @@ -1 +1 @@ -{"variants":[{"paths":["\/documentation\/factory\/factorycontext\/equatable-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/Equatable-Implementations","interfaceLanguage":"swift"},"topicSections":[{"title":"Operators","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/!=(_:_:)"],"generated":true}],"kind":"article","metadata":{"modules":[{"name":"Factory"}],"role":"collectionGroup","title":"Equatable Implementations"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryContext/!=(_:_:)":{"role":"symbol","title":"!=(_:_:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/!=(_:_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/!=(_:_:)"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"}}} \ No newline at end of file +{"variants":[{"paths":["\/documentation\/factory\/factorycontext\/equatable-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/Equatable-Implementations","interfaceLanguage":"swift"},"topicSections":[{"title":"Operators","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/!=(_:_:)"],"generated":true}],"kind":"article","metadata":{"modules":[{"name":"Factory"}],"role":"collectionGroup","title":"Equatable Implementations"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryContext/!=(_:_:)":{"role":"symbol","title":"!=(_:_:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/!=(_:_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/!=(_:_:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontext/preview.json b/docs/data/documentation/factory/factorycontext/preview.json index f428cf6b..4a1b43f1 100644 --- a/docs/data/documentation/factory/factorycontext/preview.json +++ b/docs/data/documentation/factory/factorycontext/preview.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"preview"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/preview"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/preview","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Context used when application is running in Xcode Preview mode."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"preview"}],"title":"FactoryContext.preview","roleHeading":"Case","role":"symbol","symbolKind":"case","externalID":"s:7Factory0A7ContextO7previewyA2CmF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory/FactoryContext/preview":{"role":"symbol","title":"FactoryContext.preview","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"preview"}],"abstract":[{"type":"text","text":"Context used when application is running in Xcode Preview mode."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/preview","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/preview"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"preview"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/preview"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/preview","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Context used when application is running in Xcode Preview mode."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"preview"}],"title":"FactoryContext.preview","roleHeading":"Case","role":"symbol","symbolKind":"case","externalID":"s:7Factory0A7ContextO7previewyA2CmF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory/FactoryContext/preview":{"role":"symbol","title":"FactoryContext.preview","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"preview"}],"abstract":[{"type":"text","text":"Context used when application is running in Xcode Preview mode."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/preview","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/preview"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontext/removearg(forkey:).json b/docs/data/documentation/factory/factorycontext/removearg(forkey:).json index 1143ceb4..639e3dbb 100644 --- a/docs/data/documentation/factory/factorycontext/removearg(forkey:).json +++ b/docs/data/documentation/factory/factorycontext/removearg(forkey:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"removeArg"},{"kind":"text","text":"("},{"kind":"externalParam","text":"forKey"},{"kind":"text","text":" "},{"kind":"internalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/removearg(forkey:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/removeArg(forKey:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Add argument to global context."}],"kind":"symbol","metadata":{"role":"symbol","title":"removeArg(forKey:)","roleHeading":"Type Method","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"removeArg"},{"kind":"text","text":"("},{"kind":"externalParam","text":"forKey"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"symbolKind":"method","externalID":"s:7Factory0A7ContextO9removeArg6forKeyySS_tFZ","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory/FactoryContext/removeArg(forKey:)":{"role":"symbol","title":"removeArg(forKey:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"removeArg"},{"kind":"text","text":"("},{"kind":"externalParam","text":"forKey"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Add argument to global context."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/removeArg(forKey:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/removearg(forkey:)"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"removeArg"},{"kind":"text","text":"("},{"kind":"externalParam","text":"forKey"},{"kind":"text","text":" "},{"kind":"internalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/removearg(forkey:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/removeArg(forKey:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Add argument to global context."}],"kind":"symbol","metadata":{"role":"symbol","title":"removeArg(forKey:)","roleHeading":"Type Method","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"removeArg"},{"kind":"text","text":"("},{"kind":"externalParam","text":"forKey"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"symbolKind":"method","externalID":"s:7Factory0A7ContextO9removeArg6forKeyySS_tFZ","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryContext/removeArg(forKey:)":{"role":"symbol","title":"removeArg(forKey:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"removeArg"},{"kind":"text","text":"("},{"kind":"externalParam","text":"forKey"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Add argument to global context."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/removeArg(forKey:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/removearg(forkey:)"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontext/setarg(_:forkey:).json b/docs/data/documentation/factory/factorycontext/setarg(_:forkey:).json index c9cb29ad..b18183c6 100644 --- a/docs/data/documentation/factory/factorycontext/setarg(_:forkey:).json +++ b/docs/data/documentation/factory/factorycontext/setarg(_:forkey:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"setArg"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"arg"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"forKey"},{"kind":"text","text":" "},{"kind":"internalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/setarg(_:forkey:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/setArg(_:forKey:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Add argument to global context."}],"kind":"symbol","metadata":{"role":"symbol","title":"setArg(_:forKey:)","roleHeading":"Type Method","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"setArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"forKey"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"symbolKind":"method","externalID":"s:7Factory0A7ContextO6setArg_6forKeyySS_SStFZ","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory/FactoryContext/setArg(_:forKey:)":{"role":"symbol","title":"setArg(_:forKey:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"setArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"forKey"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Add argument to global context."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/setArg(_:forKey:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/setarg(_:forkey:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"setArg"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"arg"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"forKey"},{"kind":"text","text":" "},{"kind":"internalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/setarg(_:forkey:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/setArg(_:forKey:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Add argument to global context."}],"kind":"symbol","metadata":{"role":"symbol","title":"setArg(_:forKey:)","roleHeading":"Type Method","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"setArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"forKey"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"symbolKind":"method","externalID":"s:7Factory0A7ContextO6setArg_6forKeyySS_SStFZ","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory/FactoryContext/setArg(_:forKey:)":{"role":"symbol","title":"setArg(_:forKey:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"setArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"forKey"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Add argument to global context."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/setArg(_:forKey:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/setarg(_:forkey:)"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontext/simulator.json b/docs/data/documentation/factory/factorycontext/simulator.json index 0f022388..7f3dbad2 100644 --- a/docs/data/documentation/factory/factorycontext/simulator.json +++ b/docs/data/documentation/factory/factorycontext/simulator.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"simulator"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/simulator"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/simulator","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Context used when application is running within an Xcode simulator."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"simulator"}],"title":"FactoryContext.simulator","roleHeading":"Case","role":"symbol","symbolKind":"case","externalID":"s:7Factory0A7ContextO9simulatoryA2CmF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory/FactoryContext/simulator":{"role":"symbol","title":"FactoryContext.simulator","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"simulator"}],"abstract":[{"type":"text","text":"Context used when application is running within an Xcode simulator."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/simulator","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/simulator"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"simulator"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/simulator"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/simulator","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Context used when application is running within an Xcode simulator."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"simulator"}],"title":"FactoryContext.simulator","roleHeading":"Case","role":"symbol","symbolKind":"case","externalID":"s:7Factory0A7ContextO9simulatoryA2CmF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryContext/simulator":{"role":"symbol","title":"FactoryContext.simulator","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"simulator"}],"abstract":[{"type":"text","text":"Context used when application is running within an Xcode simulator."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/simulator","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/simulator"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontext/test.json b/docs/data/documentation/factory/factorycontext/test.json index 6380eb1b..8ae3ef93 100644 --- a/docs/data/documentation/factory/factorycontext/test.json +++ b/docs/data/documentation/factory/factorycontext/test.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"test"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/test"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/test","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Context used when application is running in Xcode Unit Test mode."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"test"}],"title":"FactoryContext.test","roleHeading":"Case","role":"symbol","symbolKind":"case","externalID":"s:7Factory0A7ContextO4testyA2CmF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory/FactoryContext/test":{"role":"symbol","title":"FactoryContext.test","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"test"}],"abstract":[{"type":"text","text":"Context used when application is running in Xcode Unit Test mode."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/test","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/test"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"test"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/test"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/test","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Context used when application is running in Xcode Unit Test mode."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"test"}],"title":"FactoryContext.test","roleHeading":"Case","role":"symbol","symbolKind":"case","externalID":"s:7Factory0A7ContextO4testyA2CmF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryContext/test":{"role":"symbol","title":"FactoryContext.test","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"test"}],"abstract":[{"type":"text","text":"Context used when application is running in Xcode Unit Test mode."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/test","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontext\/test"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying.json b/docs/data/documentation/factory/factorymodifying.json index b4a03dd4..ea4e0fa4 100644 --- a/docs/data/documentation/factory/factorymodifying.json +++ b/docs/data/documentation/factory/factorymodifying.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying"],"traits":[{"interfaceLanguage":"swift"}]}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"],"kind":"relationships","title":"Conforming Types","type":"conformingTypes"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"title":"FactoryModifying","roleHeading":"Protocol","role":"symbol","symbolKind":"protocol","externalID":"s:7Factory0A9ModifyingP","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Associated Types","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T"]},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/cached","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/graph","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/registration","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/shared","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/singleton","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/unique"]},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/context(_:factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/decorator(_:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArg(_:factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArgs(_:factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDebug(factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDevice(factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onPreview(factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onSimulator(factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onTest(factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/once()","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/register(scope:factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/reset(_:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/scope(_:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/timeToLive(_:)"]}],"references":{"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/singleton":{"role":"symbol","title":"singleton","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/singleton","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/singleton"},"doc://Factory/documentation/Factory/FactoryModifying/cached":{"role":"symbol","title":"cached","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/cached","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/cached"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/FactoryModifying/onSimulator(factory:)":{"role":"symbol","title":"onSimulator(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onSimulator(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/onsimulator(factory:)"},"doc://Factory/documentation/Factory/FactoryModifying/onPreview(factory:)":{"role":"symbol","title":"onPreview(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onPreview(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/onpreview(factory:)"},"doc://Factory/documentation/Factory/FactoryModifying/onDevice(factory:)":{"role":"symbol","title":"onDevice(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDevice(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/ondevice(factory:)"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/FactoryModifying/scope(_:)":{"role":"symbol","title":"scope(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/scope(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/scope(_:)"},"doc://Factory/documentation/Factory/FactoryModifying/onArgs(_:factory:)":{"role":"symbol","title":"onArgs(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArgs(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/onargs(_:factory:)"},"doc://Factory/documentation/Factory/FactoryModifying/shared":{"role":"symbol","title":"shared","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/shared","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/shared"},"doc://Factory/documentation/Factory/FactoryModifying/onTest(factory:)":{"role":"symbol","title":"onTest(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onTest(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/ontest(factory:)"},"doc://Factory/documentation/Factory/FactoryModifying/onArg(_:factory:)":{"role":"symbol","title":"onArg(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArg(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/onarg(_:factory:)"},"doc://Factory/documentation/Factory/FactoryModifying/timeToLive(_:)":{"role":"symbol","title":"timeToLive(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds time to live option for scopes. If the dependency has been cached for longer than the timeToLive period the"},{"type":"text","text":" "},{"type":"text","text":"cached item will be discarded and a new instance created."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/timeToLive(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/timetolive(_:)"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/FactoryModifying/reset(_:)":{"role":"symbol","title":"reset(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/reset(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/reset(_:)"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/FactoryModifying/onDebug(factory:)":{"role":"symbol","title":"onDebug(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDebug(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/ondebug(factory:)"},"doc://Factory/documentation/Factory/FactoryModifying/context(_:factory:)":{"role":"symbol","title":"context(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryContext","preciseIdentifier":"s:7Factory0A7ContextO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/context(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/context(_:factory:)"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryModifying/decorator(_:)":{"role":"symbol","title":"decorator(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"type":"emphasis","inlineContent":[{"type":"text","text":"always"}]},{"type":"text","text":" be called with the resolved dependency"},{"type":"text","text":" "},{"type":"text","text":"for further examination or manipulation."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/decorator(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/decorator(_:)"},"doc://Factory/documentation/Factory/FactoryModifying/once()":{"role":"symbol","title":"once()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/once()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/once()"},"doc://Factory/documentation/Factory/FactoryModifying/unique":{"role":"symbol","title":"unique","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/unique","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/unique"},"doc://Factory/documentation/Factory/FactoryModifying/graph":{"role":"symbol","title":"graph","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/graph","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/graph"},"doc://Factory/documentation/Factory/FactoryModifying/registration":{"role":"symbol","title":"registration","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Internal information that describes this Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/registration","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/factorymodifying\/registration"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"role":"symbol","title":"P","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"P"}],"abstract":[{"type":"text","text":"The parameter type of the Factory, if any. Will be "},{"type":"codeVoice","code":"Void"},{"type":"text","text":" on the standard Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/factorymodifying\/p"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/FactoryModifying/register(scope:factory:)":{"role":"symbol","title":"register(scope:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Allows registering new factory closure and updating scope used after the fact."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/register(scope:factory:)","kind":"symbol","type":"topic","deprecated":true,"url":"\/documentation\/factory\/factorymodifying\/register(scope:factory:)"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"role":"symbol","title":"T","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}],"abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/factorymodifying\/t"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying"],"traits":[{"interfaceLanguage":"swift"}]}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"],"kind":"relationships","title":"Conforming Types","type":"conformingTypes"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"title":"FactoryModifying","roleHeading":"Protocol","role":"symbol","symbolKind":"protocol","externalID":"s:7Factory0A9ModifyingP","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Associated Types","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T"]},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/cached","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/graph","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/registration","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/shared","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/singleton","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/unique"]},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/context(_:factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/decorator(_:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArg(_:factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArgs(_:factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDebug(factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDevice(factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onPreview(factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onSimulator(factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onTest(factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/once()","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/register(scope:factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/reset(_:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/scope(_:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/timeToLive(_:)"]}],"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/onDevice(factory:)":{"role":"symbol","title":"onDevice(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDevice(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/ondevice(factory:)"},"doc://Factory/documentation/Factory/FactoryModifying/onArg(_:factory:)":{"role":"symbol","title":"onArg(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArg(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/onarg(_:factory:)"},"doc://Factory/documentation/Factory/FactoryModifying/shared":{"role":"symbol","title":"shared","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/shared","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/shared"},"doc://Factory/documentation/Factory/FactoryModifying/context(_:factory:)":{"role":"symbol","title":"context(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryContext","preciseIdentifier":"s:7Factory0A7ContextO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/context(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/context(_:factory:)"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/FactoryModifying/register(scope:factory:)":{"role":"symbol","title":"register(scope:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Allows registering new factory closure and updating scope used after the fact."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/register(scope:factory:)","kind":"symbol","type":"topic","deprecated":true,"url":"\/documentation\/factory\/factorymodifying\/register(scope:factory:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryModifying/onArgs(_:factory:)":{"role":"symbol","title":"onArgs(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArgs(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/onargs(_:factory:)"},"doc://Factory/documentation/Factory/FactoryModifying/reset(_:)":{"role":"symbol","title":"reset(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/reset(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/reset(_:)"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"role":"symbol","title":"P","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"P"}],"abstract":[{"type":"text","text":"The parameter type of the Factory, if any. Will be "},{"type":"codeVoice","code":"Void"},{"type":"text","text":" on the standard Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/factorymodifying\/p"},"doc://Factory/documentation/Factory/FactoryModifying/singleton":{"role":"symbol","title":"singleton","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/singleton","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/singleton"},"doc://Factory/documentation/Factory/FactoryModifying/decorator(_:)":{"role":"symbol","title":"decorator(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"type":"emphasis","inlineContent":[{"type":"text","text":"always"}]},{"type":"text","text":" be called with the resolved dependency"},{"type":"text","text":" "},{"type":"text","text":"for further examination or manipulation."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/decorator(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/decorator(_:)"},"doc://Factory/documentation/Factory/FactoryModifying/cached":{"role":"symbol","title":"cached","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/cached","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/cached"},"doc://Factory/documentation/Factory/FactoryModifying/scope(_:)":{"role":"symbol","title":"scope(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/scope(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/scope(_:)"},"doc://Factory/documentation/Factory/FactoryModifying/onTest(factory:)":{"role":"symbol","title":"onTest(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onTest(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/ontest(factory:)"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"role":"symbol","title":"Scope.Shared","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"url":"\/documentation\/factory\/scope\/shared-swift.class"},"doc://Factory/documentation/Factory/FactoryModifying/timeToLive(_:)":{"role":"symbol","title":"timeToLive(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds time to live option for scopes. If the dependency has been cached for longer than the timeToLive period the"},{"type":"text","text":" "},{"type":"text","text":"cached item will be discarded and a new instance created."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/timeToLive(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/timetolive(_:)"},"doc://Factory/documentation/Factory/FactoryModifying/unique":{"role":"symbol","title":"unique","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/unique","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/unique"},"doc://Factory/documentation/Factory/FactoryModifying/onPreview(factory:)":{"role":"symbol","title":"onPreview(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onPreview(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/onpreview(factory:)"},"doc://Factory/documentation/Factory/FactoryModifying/graph":{"role":"symbol","title":"graph","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/graph","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/graph"},"doc://Factory/documentation/Factory/FactoryModifying/once()":{"role":"symbol","title":"once()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/once()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/once()"},"doc://Factory/documentation/Factory/FactoryModifying/registration":{"role":"symbol","title":"registration","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Internal information that describes this Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/registration","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/factorymodifying\/registration"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/FactoryModifying/onDebug(factory:)":{"role":"symbol","title":"onDebug(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDebug(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/ondebug(factory:)"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"role":"symbol","title":"T","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}],"abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/factorymodifying\/t"},"doc://Factory/documentation/Factory/FactoryModifying/onSimulator(factory:)":{"role":"symbol","title":"onSimulator(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onSimulator(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/onsimulator(factory:)"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying/cached.json b/docs/data/documentation/factory/factorymodifying/cached.json index 53dd2ae0..2037dba0 100644 --- a/docs/data/documentation/factory/factorymodifying/cached.json +++ b/docs/data/documentation/factory/factorymodifying/cached.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .cached","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/cached"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/cached","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"cached","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE6cachedxvp","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryModifying/cached":{"role":"symbol","title":"cached","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/cached","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/cached"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .cached","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/cached"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/cached","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"cached","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE6cachedxvp","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/cached":{"role":"symbol","title":"cached","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/cached","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/cached"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying/context(_:factory:).json b/docs/data/documentation/factory/factorymodifying/context(_:factory:).json index d3ddcc29..2559fc7d 100644 --- a/docs/data/documentation/factory/factorymodifying/context(_:factory:).json +++ b/docs/data/documentation/factory/factorymodifying/context(_:factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"contexts"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","preciseIdentifier":"s:7Factory0A7ContextO","text":"FactoryContext"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"A context might be be when running in SwiftUI preview mode, or when running unit tests."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/context(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/context(_:factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"kind":"symbol","metadata":{"role":"symbol","title":"context(_:factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryContext","preciseIdentifier":"s:7Factory0A7ContextO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE7context_7factoryxAA0A7ContextOd_1TQz1PQzctF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/context(_:factory:)":{"role":"symbol","title":"context(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryContext","preciseIdentifier":"s:7Factory0A7ContextO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/context(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/context(_:factory:)"},"doc://Factory/documentation/Factory/Contexts":{"role":"article","title":"Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","kind":"article","type":"topic","url":"\/documentation\/factory\/contexts"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"contexts"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","preciseIdentifier":"s:7Factory0A7ContextO","text":"FactoryContext"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"A context might be be when running in SwiftUI preview mode, or when running unit tests."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/context(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/context(_:factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"kind":"symbol","metadata":{"role":"symbol","title":"context(_:factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryContext","preciseIdentifier":"s:7Factory0A7ContextO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE7context_7factoryxAA0A7ContextOd_1TQz1PQzctF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory/Contexts":{"role":"article","title":"Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","kind":"article","type":"topic","url":"\/documentation\/factory\/contexts"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/context(_:factory:)":{"role":"symbol","title":"context(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryContext","preciseIdentifier":"s:7Factory0A7ContextO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/context(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/context(_:factory:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying/graph.json b/docs/data/documentation/factory/factorymodifying/graph.json index 2e45e1a6..f6eadb1c 100644 --- a/docs/data/documentation/factory/factorymodifying/graph.json +++ b/docs/data/documentation/factory/factorymodifying/graph.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .graph","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/graph"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/graph","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"graph","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE5graphxvp","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/FactoryModifying/graph":{"role":"symbol","title":"graph","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/graph","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/graph"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .graph","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/graph"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/graph","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"graph","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE5graphxvp","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory/FactoryModifying/graph":{"role":"symbol","title":"graph","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/graph","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/graph"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying/onarg(_:factory:).json b/docs/data/documentation/factory/factorymodifying/onarg(_:factory:).json index ab266e3a..8436c742 100644 --- a/docs/data/documentation/factory/factorymodifying/onarg(_:factory:).json +++ b/docs/data/documentation/factory/factorymodifying/onarg(_:factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"argument"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/onarg(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArg(_:factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onArg(_:factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE5onArg_7factoryxSS_1TQz1PQzctF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/onArg(_:factory:)":{"role":"symbol","title":"onArg(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArg(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/onarg(_:factory:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"argument"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/onarg(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArg(_:factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onArg(_:factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE5onArg_7factoryxSS_1TQz1PQzctF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryModifying/onArg(_:factory:)":{"role":"symbol","title":"onArg(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArg(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/onarg(_:factory:)"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying/onargs(_:factory:).json b/docs/data/documentation/factory/factorymodifying/onargs(_:factory:).json index 0e9364bb..17fe91d1 100644 --- a/docs/data/documentation/factory/factorymodifying/onargs(_:factory:).json +++ b/docs/data/documentation/factory/factorymodifying/onargs(_:factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"args"},{"kind":"text","text":": ["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/onargs(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArgs(_:factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onArgs(_:factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE6onArgs_7factoryxSaySSG_1TQz1PQzctF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/FactoryModifying/onArgs(_:factory:)":{"role":"symbol","title":"onArgs(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArgs(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/onargs(_:factory:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"args"},{"kind":"text","text":": ["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/onargs(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArgs(_:factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onArgs(_:factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE6onArgs_7factoryxSaySSG_1TQz1PQzctF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/onArgs(_:factory:)":{"role":"symbol","title":"onArgs(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArgs(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/onargs(_:factory:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying/once().json b/docs/data/documentation/factory/factorymodifying/once().json index 1363fb66..fc6d4514 100644 --- a/docs/data/documentation/factory/factorymodifying/once().json +++ b/docs/data/documentation/factory/factorymodifying/once().json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/once()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/once()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"kind":"symbol","metadata":{"role":"symbol","title":"once()","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE4oncexyF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryModifying/once()":{"role":"symbol","title":"once()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/once()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/once()"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/once()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/once()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"kind":"symbol","metadata":{"role":"symbol","title":"once()","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE4oncexyF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/FactoryModifying/once()":{"role":"symbol","title":"once()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/once()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/once()"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying/ondebug(factory:).json b/docs/data/documentation/factory/factorymodifying/ondebug(factory:).json index d66e3710..4909243a 100644 --- a/docs/data/documentation/factory/factorymodifying/ondebug(factory:).json +++ b/docs/data/documentation/factory/factorymodifying/ondebug(factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/ondebug(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDebug(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onDebug(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE7onDebug7factoryx1TQz1PQzc_tF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryModifying/onDebug(factory:)":{"role":"symbol","title":"onDebug(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDebug(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/ondebug(factory:)"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/ondebug(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDebug(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onDebug(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE7onDebug7factoryx1TQz1PQzc_tF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/FactoryModifying/onDebug(factory:)":{"role":"symbol","title":"onDebug(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDebug(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/ondebug(factory:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying/onpreview(factory:).json b/docs/data/documentation/factory/factorymodifying/onpreview(factory:).json index 6ae1ae57..7bd9cc63 100644 --- a/docs/data/documentation/factory/factorymodifying/onpreview(factory:).json +++ b/docs/data/documentation/factory/factorymodifying/onpreview(factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/onpreview(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onPreview(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onPreview(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE9onPreview7factoryx1TQz1PQzc_tF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/FactoryModifying/onPreview(factory:)":{"role":"symbol","title":"onPreview(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onPreview(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/onpreview(factory:)"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/onpreview(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onPreview(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onPreview(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE9onPreview7factoryx1TQz1PQzc_tF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryModifying/onPreview(factory:)":{"role":"symbol","title":"onPreview(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onPreview(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/onpreview(factory:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying/ontest(factory:).json b/docs/data/documentation/factory/factorymodifying/ontest(factory:).json index d4b9c116..178c13d6 100644 --- a/docs/data/documentation/factory/factorymodifying/ontest(factory:).json +++ b/docs/data/documentation/factory/factorymodifying/ontest(factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/ontest(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onTest(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onTest(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE6onTest7factoryx1TQz1PQzc_tF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/onTest(factory:)":{"role":"symbol","title":"onTest(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onTest(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/ontest(factory:)"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/ontest(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onTest(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onTest(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE6onTest7factoryx1TQz1PQzc_tF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/onTest(factory:)":{"role":"symbol","title":"onTest(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onTest(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/ontest(factory:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying/p.json b/docs/data/documentation/factory/factorymodifying/p.json index b9ff5361..24c95423 100644 --- a/docs/data/documentation/factory/factorymodifying/p.json +++ b/docs/data/documentation/factory/factorymodifying/p.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"P"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/p"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"The parameter type of the Factory, if any. Will be "},{"type":"codeVoice","code":"Void"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","metadata":{"role":"symbol","title":"P","roleHeading":"Associated Type","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"P"}],"symbolKind":"associatedtype","externalID":"s:7Factory0A9ModifyingP1PQa","required":true,"modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"role":"symbol","title":"P","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"P"}],"abstract":[{"type":"text","text":"The parameter type of the Factory, if any. Will be "},{"type":"codeVoice","code":"Void"},{"type":"text","text":" on the standard Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/factorymodifying\/p"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"P"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/p"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"The parameter type of the Factory, if any. Will be "},{"type":"codeVoice","code":"Void"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","metadata":{"role":"symbol","title":"P","roleHeading":"Associated Type","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"P"}],"symbolKind":"associatedtype","externalID":"s:7Factory0A9ModifyingP1PQa","required":true,"modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"role":"symbol","title":"P","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"P"}],"abstract":[{"type":"text","text":"The parameter type of the Factory, if any. Will be "},{"type":"codeVoice","code":"Void"},{"type":"text","text":" on the standard Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/factorymodifying\/p"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying/register(scope:factory:).json b/docs/data/documentation/factory/factorymodifying/register(scope:factory:).json index e4b2e7aa..daddd332 100644 --- a/docs/data/documentation/factory/factorymodifying/register(scope:factory:).json +++ b/docs/data/documentation/factory/factorymodifying/register(scope:factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"scope: Optional parameter that lets the registration redefine the scope used for this dependency."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"factory: A new factory closure that produces an object of the desired type when needed."}]}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/register(scope:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/register(scope:factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Allows registering new factory closure and updating scope used after the fact."}],"kind":"symbol","metadata":{"modules":[{"name":"Factory"}],"role":"symbol","title":"register(scope:factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE8register5scope7factoryxAA5ScopeCSg_1TQz1PQzctF","extendedModule":"Factory","platforms":[]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"deprecationSummary":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Use container.service.scope(.cached).register { Service() } instead"}]}],"references":{"doc://Factory/documentation/Factory/FactoryModifying/register(scope:factory:)":{"role":"symbol","title":"register(scope:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Allows registering new factory closure and updating scope used after the fact."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/register(scope:factory:)","kind":"symbol","type":"topic","deprecated":true,"url":"\/documentation\/factory\/factorymodifying\/register(scope:factory:)"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"scope: Optional parameter that lets the registration redefine the scope used for this dependency."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"factory: A new factory closure that produces an object of the desired type when needed."}]}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/register(scope:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/register(scope:factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Allows registering new factory closure and updating scope used after the fact."}],"kind":"symbol","metadata":{"modules":[{"name":"Factory"}],"role":"symbol","title":"register(scope:factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE8register5scope7factoryxAA5ScopeCSg_1TQz1PQzctF","extendedModule":"Factory","platforms":[]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"deprecationSummary":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Use container.service.scope(.cached).register { Service() } instead"}]}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/FactoryModifying/register(scope:factory:)":{"role":"symbol","title":"register(scope:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Allows registering new factory closure and updating scope used after the fact."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/register(scope:factory:)","kind":"symbol","type":"topic","deprecated":true,"url":"\/documentation\/factory\/factorymodifying\/register(scope:factory:)"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying/registration.json b/docs/data/documentation/factory/factorymodifying/registration.json index 88c13b08..0b45817c 100644 --- a/docs/data/documentation/factory/factorymodifying/registration.json +++ b/docs/data/documentation/factory/factorymodifying/registration.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV","text":"FactoryRegistration"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"> { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/registration"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/registration","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Internal information that describes this Factory."}],"kind":"symbol","metadata":{"role":"symbol","title":"registration","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingP12registrationAA0A12RegistrationVy1PQz1TQzGvp","required":true,"modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryRegistration":{"role":"symbol","title":"FactoryRegistration","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"url":"\/documentation\/factory\/factoryregistration"},"doc://Factory/documentation/Factory/FactoryModifying/registration":{"role":"symbol","title":"registration","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Internal information that describes this Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/registration","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/factorymodifying\/registration"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV","text":"FactoryRegistration"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"> { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/registration"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/registration","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Internal information that describes this Factory."}],"kind":"symbol","metadata":{"role":"symbol","title":"registration","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingP12registrationAA0A12RegistrationVy1PQz1TQzGvp","required":true,"modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/registration":{"role":"symbol","title":"registration","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Internal information that describes this Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/registration","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/factorymodifying\/registration"},"doc://Factory/documentation/Factory/FactoryRegistration":{"role":"symbol","title":"FactoryRegistration","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"url":"\/documentation\/factory\/factoryregistration"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying/reset(_:).json b/docs/data/documentation/factory/factorymodifying/reset(_:).json index d7b20d10..003307d9 100644 --- a/docs/data/documentation/factory/factorymodifying/reset(_:).json +++ b/docs/data/documentation/factory/factorymodifying/reset(_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"options"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":" = .all)"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"options","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"options description"}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/reset(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/reset(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope."}],"kind":"symbol","metadata":{"role":"symbol","title":"reset(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE5resetyyAA0A12ResetOptionsOF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/reset(_:)":{"role":"symbol","title":"reset(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/reset(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/reset(_:)"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"options"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":" = .all)"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"options","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"options description"}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/reset(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/reset(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope."}],"kind":"symbol","metadata":{"role":"symbol","title":"reset(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE5resetyyAA0A12ResetOptionsOF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/FactoryModifying/reset(_:)":{"role":"symbol","title":"reset(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/reset(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/reset(_:)"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying/scope(_:).json b/docs/data/documentation/factory/factorymodifying/scope(_:).json index 403692ca..09ff8e36 100644 --- a/docs/data/documentation/factory/factorymodifying/scope(_:).json +++ b/docs/data/documentation/factory/factorymodifying/scope(_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .scope(.session)","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/scope(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/scope(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"scope(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE5scopeyxAA5ScopeCF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/FactoryModifying/scope(_:)":{"role":"symbol","title":"scope(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/scope(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/scope(_:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .scope(.session)","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/scope(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/scope(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"scope(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE5scopeyxAA5ScopeCF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/FactoryModifying/scope(_:)":{"role":"symbol","title":"scope(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/scope(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/scope(_:)"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying/shared.json b/docs/data/documentation/factory/factorymodifying/shared.json index 1b7de0ad..8d123609 100644 --- a/docs/data/documentation/factory/factorymodifying/shared.json +++ b/docs/data/documentation/factory/factorymodifying/shared.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .shared","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/shared"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/shared","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"shared","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE6sharedxvp","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryModifying/shared":{"role":"symbol","title":"shared","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/shared","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/shared"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .shared","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/shared"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/shared","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"shared","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE6sharedxvp","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/shared":{"role":"symbol","title":"shared","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/shared","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/shared"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"role":"symbol","title":"Scope.Shared","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"url":"\/documentation\/factory\/scope\/shared-swift.class"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying/singleton.json b/docs/data/documentation/factory/factorymodifying/singleton.json index e414cca6..383b3ac0 100644 --- a/docs/data/documentation/factory/factorymodifying/singleton.json +++ b/docs/data/documentation/factory/factorymodifying/singleton.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .singleton","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/singleton"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/singleton","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"singleton","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE9singletonxvp","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/singleton":{"role":"symbol","title":"singleton","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/singleton","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/singleton"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .singleton","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/singleton"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/singleton","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"singleton","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE9singletonxvp","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/FactoryModifying/singleton":{"role":"symbol","title":"singleton","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/singleton","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/singleton"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying/t.json b/docs/data/documentation/factory/factorymodifying/t.json index 55b0979d..7f082448 100644 --- a/docs/data/documentation/factory/factorymodifying/t.json +++ b/docs/data/documentation/factory/factorymodifying/t.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/t"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","metadata":{"role":"symbol","title":"T","roleHeading":"Associated Type","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}],"symbolKind":"associatedtype","externalID":"s:7Factory0A9ModifyingP1TQa","required":true,"modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"role":"symbol","title":"T","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}],"abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/factorymodifying\/t"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/t"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","metadata":{"role":"symbol","title":"T","roleHeading":"Associated Type","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}],"symbolKind":"associatedtype","externalID":"s:7Factory0A9ModifyingP1TQa","required":true,"modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"role":"symbol","title":"T","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}],"abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/factorymodifying\/t"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying/unique.json b/docs/data/documentation/factory/factorymodifying/unique.json index 1262508c..918b72ed 100644 --- a/docs/data/documentation/factory/factorymodifying/unique.json +++ b/docs/data/documentation/factory/factorymodifying/unique.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .unique","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"While you can add the modifier, Factory’s are unique by default."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/unique"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/unique","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"unique","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE6uniquexvp","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/FactoryModifying/unique":{"role":"symbol","title":"unique","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/unique","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/unique"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .unique","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"While you can add the modifier, Factory’s are unique by default."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/unique"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/unique","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"unique","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE6uniquexvp","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/FactoryModifying/unique":{"role":"symbol","title":"unique","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/unique","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/unique"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factoryregistration.json b/docs/data/documentation/factory/factoryregistration.json index fe3e50cb..a9b3d305 100644 --- a/docs/data/documentation/factory/factoryregistration.json +++ b/docs/data/documentation/factory/factoryregistration.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factoryregistration"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"}],"title":"FactoryRegistration","roleHeading":"Structure","role":"symbol","symbolKind":"struct","externalID":"s:7Factory0A12RegistrationV","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration\/id","doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration\/type"]}],"references":{"doc://Factory/documentation/Factory/FactoryRegistration":{"role":"symbol","title":"FactoryRegistration","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"url":"\/documentation\/factory\/factoryregistration"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryRegistration/type":{"role":"symbol","title":"type","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"type"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"abstract":[{"type":"text","text":"Type string for id and circular dependency chain check"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration\/type","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryregistration\/type"},"doc://Factory/documentation/Factory/FactoryRegistration/id":{"role":"symbol","title":"id","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"id"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"abstract":[{"type":"text","text":"ID used to manage registrations and cached values. Usually looks something like “service”."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration\/id","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryregistration\/id"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factoryregistration"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"}],"title":"FactoryRegistration","roleHeading":"Structure","role":"symbol","symbolKind":"struct","externalID":"s:7Factory0A12RegistrationV","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration\/id","doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration\/type"]}],"references":{"doc://Factory/documentation/Factory/FactoryRegistration":{"role":"symbol","title":"FactoryRegistration","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"url":"\/documentation\/factory\/factoryregistration"},"doc://Factory/documentation/Factory/FactoryRegistration/id":{"role":"symbol","title":"id","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"id"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"abstract":[{"type":"text","text":"ID used to manage registrations and cached values. Usually looks something like “service”."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration\/id","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryregistration\/id"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryRegistration/type":{"role":"symbol","title":"type","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"type"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"abstract":[{"type":"text","text":"Type string for id and circular dependency chain check"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration\/type","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryregistration\/type"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factoryregistration/id.json b/docs/data/documentation/factory/factoryregistration/id.json index 2f41053f..059fb7a5 100644 --- a/docs/data/documentation/factory/factoryregistration/id.json +++ b/docs/data/documentation/factory/factoryregistration/id.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"id"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factoryregistration\/id"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration\/id","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"ID used to manage registrations and cached values. Usually looks something like “service”."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"id"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"title":"id","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory0A12RegistrationV2idSSvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryRegistration":{"role":"symbol","title":"FactoryRegistration","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"url":"\/documentation\/factory\/factoryregistration"},"doc://Factory/documentation/Factory/FactoryRegistration/id":{"role":"symbol","title":"id","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"id"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"abstract":[{"type":"text","text":"ID used to manage registrations and cached values. Usually looks something like “service”."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration\/id","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryregistration\/id"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"id"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factoryregistration\/id"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration\/id","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"ID used to manage registrations and cached values. Usually looks something like “service”."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"id"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"title":"id","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory0A12RegistrationV2idSSvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration"]]},"references":{"doc://Factory/documentation/Factory/FactoryRegistration":{"role":"symbol","title":"FactoryRegistration","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"url":"\/documentation\/factory\/factoryregistration"},"doc://Factory/documentation/Factory/FactoryRegistration/id":{"role":"symbol","title":"id","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"id"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"abstract":[{"type":"text","text":"ID used to manage registrations and cached values. Usually looks something like “service”."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration\/id","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryregistration\/id"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factoryregistration/type.json b/docs/data/documentation/factory/factoryregistration/type.json index 383a219e..8ef032c0 100644 --- a/docs/data/documentation/factory/factoryregistration/type.json +++ b/docs/data/documentation/factory/factoryregistration/type.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"type"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factoryregistration\/type"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration\/type","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Type string for id and circular dependency chain check"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"type"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"title":"type","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory0A12RegistrationV4typeSSvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration"]]},"references":{"doc://Factory/documentation/Factory/FactoryRegistration/type":{"role":"symbol","title":"type","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"type"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"abstract":[{"type":"text","text":"Type string for id and circular dependency chain check"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration\/type","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryregistration\/type"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryRegistration":{"role":"symbol","title":"FactoryRegistration","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"url":"\/documentation\/factory\/factoryregistration"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"type"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factoryregistration\/type"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration\/type","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Type string for id and circular dependency chain check"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"type"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"title":"type","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory0A12RegistrationV4typeSSvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration"]]},"references":{"doc://Factory/documentation/Factory/FactoryRegistration":{"role":"symbol","title":"FactoryRegistration","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"url":"\/documentation\/factory\/factoryregistration"},"doc://Factory/documentation/Factory/FactoryRegistration/type":{"role":"symbol","title":"type","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"type"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"}],"abstract":[{"type":"text","text":"Type string for id and circular dependency chain check"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration\/type","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryregistration\/type"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factoryresetoptions.json b/docs/data/documentation/factory/factoryresetoptions.json index e2e1c030..2696c05d 100644 --- a/docs/data/documentation/factory/factoryresetoptions.json +++ b/docs/data/documentation/factory/factoryresetoptions.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions"],"traits":[{"interfaceLanguage":"swift"}]}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/SQ","doc:\/\/Factory\/SH"],"kind":"relationships","title":"Conforms To","type":"conformsTo"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"title":"FactoryResetOptions","roleHeading":"Enumeration","role":"symbol","symbolKind":"enum","externalID":"s:7Factory0A12ResetOptionsO","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Enumeration Cases","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/all","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/context","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/none","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/registration","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/scope"]},{"title":"Default Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations"],"generated":true}],"references":{"doc://Factory/documentation/Factory/FactoryResetOptions/context":{"role":"symbol","title":"FactoryResetOptions.context","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"}],"abstract":[{"type":"text","text":"Resets context-based registrations on this container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/context","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/context"},"doc://Factory/documentation/Factory/FactoryResetOptions/all":{"role":"symbol","title":"FactoryResetOptions.all","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"all"}],"abstract":[{"type":"text","text":"Resets registration and scope caches"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/all","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/all"},"doc://Factory/documentation/Factory/FactoryResetOptions/scope":{"role":"symbol","title":"FactoryResetOptions.scope","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"}],"abstract":[{"type":"text","text":"Resets all scope caches on this container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/scope","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/scope"},"doc://Factory/SH":{"type":"unresolvable","title":"Swift.Hashable","identifier":"doc:\/\/Factory\/SH"},"doc://Factory/SQ":{"type":"unresolvable","title":"Swift.Equatable","identifier":"doc:\/\/Factory\/SQ"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryResetOptions/registration":{"role":"symbol","title":"FactoryResetOptions.registration","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"}],"abstract":[{"type":"text","text":"Resets registrations on this container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/registration","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/registration"},"doc://Factory/documentation/Factory/FactoryResetOptions/Equatable-Implementations":{"role":"collectionGroup","title":"Equatable Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/equatable-implementations"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"},"doc://Factory/documentation/Factory/FactoryResetOptions/none":{"role":"symbol","title":"FactoryResetOptions.none","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"none"}],"abstract":[{"type":"text","text":"Performs no reset actions on this container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/none","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/none"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions"],"traits":[{"interfaceLanguage":"swift"}]}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/SQ","doc:\/\/Factory\/SH"],"kind":"relationships","title":"Conforms To","type":"conformsTo"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"title":"FactoryResetOptions","roleHeading":"Enumeration","role":"symbol","symbolKind":"enum","externalID":"s:7Factory0A12ResetOptionsO","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Enumeration Cases","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/all","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/context","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/none","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/registration","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/scope"]},{"title":"Default Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations"],"generated":true}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"},"doc://Factory/documentation/Factory/FactoryResetOptions/registration":{"role":"symbol","title":"FactoryResetOptions.registration","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"}],"abstract":[{"type":"text","text":"Resets registrations on this container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/registration","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/registration"},"doc://Factory/documentation/Factory/FactoryResetOptions/scope":{"role":"symbol","title":"FactoryResetOptions.scope","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"}],"abstract":[{"type":"text","text":"Resets all scope caches on this container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/scope","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/scope"},"doc://Factory/documentation/Factory/FactoryResetOptions/none":{"role":"symbol","title":"FactoryResetOptions.none","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"none"}],"abstract":[{"type":"text","text":"Performs no reset actions on this container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/none","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/none"},"doc://Factory/SQ":{"type":"unresolvable","title":"Swift.Equatable","identifier":"doc:\/\/Factory\/SQ"},"doc://Factory/documentation/Factory/FactoryResetOptions/all":{"role":"symbol","title":"FactoryResetOptions.all","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"all"}],"abstract":[{"type":"text","text":"Resets registration and scope caches"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/all","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/all"},"doc://Factory/documentation/Factory/FactoryResetOptions/context":{"role":"symbol","title":"FactoryResetOptions.context","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"}],"abstract":[{"type":"text","text":"Resets context-based registrations on this container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/context","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/context"},"doc://Factory/documentation/Factory/FactoryResetOptions/Equatable-Implementations":{"role":"collectionGroup","title":"Equatable Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/equatable-implementations"},"doc://Factory/SH":{"type":"unresolvable","title":"Swift.Hashable","identifier":"doc:\/\/Factory\/SH"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factoryresetoptions/!=(_:_:).json b/docs/data/documentation/factory/factoryresetoptions/!=(_:_:).json index 0b459011..5aec5540 100644 --- a/docs/data/documentation/factory/factoryresetoptions/!=(_:_:).json +++ b/docs/data/documentation/factory/factoryresetoptions/!=(_:_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"internalParam","text":"lhs"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"internalParam","text":"rhs"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions\/!=(_:_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/!=(_:_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Inherited from "},{"type":"codeVoice","code":"Equatable.!=(_:_:)"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"!=(_:_:)","roleHeading":"Operator","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"symbolKind":"op","externalID":"s:SQsE2neoiySbx_xtFZ::SYNTHESIZED::s:7Factory0A12ResetOptionsO","extendedModule":"Swift","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations"]]},"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryResetOptions/Equatable-Implementations":{"role":"collectionGroup","title":"Equatable Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/equatable-implementations"},"doc://Factory/documentation/Factory/FactoryResetOptions/!=(_:_:)":{"role":"symbol","title":"!=(_:_:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/!=(_:_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/!=(_:_:)"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"internalParam","text":"lhs"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"internalParam","text":"rhs"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions\/!=(_:_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/!=(_:_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Inherited from "},{"type":"codeVoice","code":"Equatable.!=(_:_:)"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"!=(_:_:)","roleHeading":"Operator","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"symbolKind":"op","externalID":"s:SQsE2neoiySbx_xtFZ::SYNTHESIZED::s:7Factory0A12ResetOptionsO","extendedModule":"Swift","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations"]]},"references":{"doc://Factory/documentation/Factory/FactoryResetOptions/!=(_:_:)":{"role":"symbol","title":"!=(_:_:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/!=(_:_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/!=(_:_:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryResetOptions/Equatable-Implementations":{"role":"collectionGroup","title":"Equatable Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/equatable-implementations"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factoryresetoptions/equatable-implementations.json b/docs/data/documentation/factory/factoryresetoptions/equatable-implementations.json index 5ecbb88b..1bb6c6c2 100644 --- a/docs/data/documentation/factory/factoryresetoptions/equatable-implementations.json +++ b/docs/data/documentation/factory/factoryresetoptions/equatable-implementations.json @@ -1 +1 @@ -{"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions\/equatable-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations","interfaceLanguage":"swift"},"topicSections":[{"title":"Operators","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/!=(_:_:)"],"generated":true}],"kind":"article","metadata":{"modules":[{"name":"Factory"}],"role":"collectionGroup","title":"Equatable Implementations"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"},"doc://Factory/documentation/Factory/FactoryResetOptions/!=(_:_:)":{"role":"symbol","title":"!=(_:_:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/!=(_:_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/!=(_:_:)"}}} \ No newline at end of file +{"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions\/equatable-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations","interfaceLanguage":"swift"},"topicSections":[{"title":"Operators","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/!=(_:_:)"],"generated":true}],"kind":"article","metadata":{"modules":[{"name":"Factory"}],"role":"collectionGroup","title":"Equatable Implementations"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"references":{"doc://Factory/documentation/Factory/FactoryResetOptions/!=(_:_:)":{"role":"symbol","title":"!=(_:_:)","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/!=(_:_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/!=(_:_:)"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factoryresetoptions/none.json b/docs/data/documentation/factory/factoryresetoptions/none.json index 7711c144..2be36a4b 100644 --- a/docs/data/documentation/factory/factoryresetoptions/none.json +++ b/docs/data/documentation/factory/factoryresetoptions/none.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"none"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions\/none"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/none","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Performs no reset actions on this container"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"none"}],"title":"FactoryResetOptions.none","roleHeading":"Case","role":"symbol","symbolKind":"case","externalID":"s:7Factory0A12ResetOptionsO4noneyA2CmF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryResetOptions/none":{"role":"symbol","title":"FactoryResetOptions.none","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"none"}],"abstract":[{"type":"text","text":"Performs no reset actions on this container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/none","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/none"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"none"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions\/none"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/none","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Performs no reset actions on this container"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"none"}],"title":"FactoryResetOptions.none","roleHeading":"Case","role":"symbol","symbolKind":"case","externalID":"s:7Factory0A12ResetOptionsO4noneyA2CmF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"references":{"doc://Factory/documentation/Factory/FactoryResetOptions/none":{"role":"symbol","title":"FactoryResetOptions.none","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"none"}],"abstract":[{"type":"text","text":"Performs no reset actions on this container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/none","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/none"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factoryresetoptions/registration.json b/docs/data/documentation/factory/factoryresetoptions/registration.json index 27357cd1..bf3a24eb 100644 --- a/docs/data/documentation/factory/factoryresetoptions/registration.json +++ b/docs/data/documentation/factory/factoryresetoptions/registration.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions\/registration"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/registration","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Resets registrations on this container"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"}],"title":"FactoryResetOptions.registration","roleHeading":"Case","role":"symbol","symbolKind":"case","externalID":"s:7Factory0A12ResetOptionsO12registrationyA2CmF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryResetOptions/registration":{"role":"symbol","title":"FactoryResetOptions.registration","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"}],"abstract":[{"type":"text","text":"Resets registrations on this container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/registration","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/registration"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions\/registration"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/registration","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Resets registrations on this container"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"}],"title":"FactoryResetOptions.registration","roleHeading":"Case","role":"symbol","symbolKind":"case","externalID":"s:7Factory0A12ResetOptionsO12registrationyA2CmF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"},"doc://Factory/documentation/Factory/FactoryResetOptions/registration":{"role":"symbol","title":"FactoryResetOptions.registration","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"}],"abstract":[{"type":"text","text":"Resets registrations on this container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/registration","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/registration"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factoryresetoptions/scope.json b/docs/data/documentation/factory/factoryresetoptions/scope.json index 7540fe0a..fb5fb50a 100644 --- a/docs/data/documentation/factory/factoryresetoptions/scope.json +++ b/docs/data/documentation/factory/factoryresetoptions/scope.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions\/scope"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/scope","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Resets all scope caches on this container"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"}],"title":"FactoryResetOptions.scope","roleHeading":"Case","role":"symbol","symbolKind":"case","externalID":"s:7Factory0A12ResetOptionsO5scopeyA2CmF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"references":{"doc://Factory/documentation/Factory/FactoryResetOptions/scope":{"role":"symbol","title":"FactoryResetOptions.scope","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"}],"abstract":[{"type":"text","text":"Resets all scope caches on this container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/scope","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/scope"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions\/scope"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/scope","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Resets all scope caches on this container"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"}],"title":"FactoryResetOptions.scope","roleHeading":"Case","role":"symbol","symbolKind":"case","externalID":"s:7Factory0A12ResetOptionsO5scopeyA2CmF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"},"doc://Factory/documentation/Factory/FactoryResetOptions/scope":{"role":"symbol","title":"FactoryResetOptions.scope","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"}],"abstract":[{"type":"text","text":"Resets all scope caches on this container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/scope","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/scope"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/functional.json b/docs/data/documentation/factory/functional.json index 5f6e363d..6515c699 100644 --- a/docs/data/documentation/factory/functional.json +++ b/docs/data/documentation/factory/functional.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Functional Injection is a powerful tool that can, in many cases, eliminate the need for defining protocols, implementations, and the various stubs and mocks one needs when doing traditional Protocol-Oriented-Programing."}]},{"anchor":"Example","level":2,"type":"heading","text":"Example"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Consider the following typealias and Factory."}]},{"type":"codeListing","syntax":"swift","code":["typealias AccountProviding = () async throws -> [Account]","","extension Container {"," let accountProvider: Factory {"," self {{ try await Network.get(path: \"\/accounts\") }}"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note the double braces. In this example our factory closure is returning a closure, not a class or struct."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now, here’s the view model that uses it."}]},{"type":"codeListing","syntax":"swift","code":["class AccountViewModel: ObservableObject {"," @Injected(\\.accountProvider) var accountProvider"," @Published var accounts: [Account] = []"," @MainActor func load() async {"," do {"," accounts = try await accountProvider()"," } catch {"," print(error)"," }"," }","}"]},{"anchor":"Testing","level":2,"type":"heading","text":"Testing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now consider how easy it is to write a test with mock accounts…"}]},{"type":"codeListing","syntax":"swift","code":["func testAllAccounts() async {"," Container.shared.accountProvider.register {{ Account.mockAccounts }}"," do {"," let viewModel = AccountViewModel()"," try await viewModel.load()"," XCTAssert(viewModel.accounts.count == 5)"," } catch {"," XCTFail(\"Account load failed\")"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or test edge cases like no accounts found."}]},{"type":"codeListing","syntax":"swift","code":["func testEmptyAccounts() async {"," Container.shared.accountProvider.register {{ [] }}"," ...","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or test specific error cases."}]},{"type":"codeListing","syntax":"swift","code":["func testErrorLoadingAccounts() async {"," Container.shared.accountProvider.register {{ throw APIError.network }}"," ...","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s an article that goes into the technique in more detail: "},{"type":"reference","isActive":true,"identifier":"https:\/\/betterprogramming.pub\/factory-and-functional-dependency-injection-2d0a38042d05"}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/functional"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Functional","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"kind":"article","metadata":{"roleHeading":"Article","title":"Functional Injection","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Advanced Topics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Design","doc:\/\/Factory\/documentation\/Factory\/Modifiers","doc:\/\/Factory\/documentation\/Factory\/Modules","doc:\/\/Factory\/documentation\/Factory\/Cycle","doc:\/\/Factory\/documentation\/Factory\/Optionals","doc:\/\/Factory\/documentation\/Factory\/Tags"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Modifiers":{"role":"article","title":"Factory Modifiers","abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","kind":"article","type":"topic","url":"\/documentation\/factory\/modifiers"},"doc://Factory/documentation/Factory/Modules":{"role":"article","title":"Modular Development","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","kind":"article","type":"topic","url":"\/documentation\/factory\/modules"},"doc://Factory/documentation/Factory/Cycle":{"role":"article","title":"Resolution Cycles","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","type":"topic","url":"\/documentation\/factory\/cycle"},"doc://Factory/documentation/Factory/Design":{"role":"article","title":"Designing Factory","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","kind":"article","type":"topic","url":"\/documentation\/factory\/design"},"doc://Factory/documentation/Factory/Tags":{"role":"article","title":"Tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","kind":"article","type":"topic","url":"\/documentation\/factory\/tags"},"doc://Factory/documentation/Factory/Optionals":{"role":"article","title":"Optionals and Dynamic Registration","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","kind":"article","type":"topic","url":"\/documentation\/factory\/optionals"},"https://betterprogramming.pub/factory-and-functional-dependency-injection-2d0a38042d05":{"title":"Factory and Functional Dependency Injection","titleInlineContent":[{"type":"text","text":"Factory and Functional Dependency Injection"}],"type":"link","identifier":"https:\/\/betterprogramming.pub\/factory-and-functional-dependency-injection-2d0a38042d05","url":"https:\/\/betterprogramming.pub\/factory-and-functional-dependency-injection-2d0a38042d05"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Functional Injection is a powerful tool that can, in many cases, eliminate the need for defining protocols, implementations, and the various stubs and mocks one needs when doing traditional Protocol-Oriented-Programing."}]},{"anchor":"Example","level":2,"type":"heading","text":"Example"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Consider the following typealias and Factory."}]},{"type":"codeListing","syntax":"swift","code":["typealias AccountProviding = () async throws -> [Account]","","extension Container {"," let accountProvider: Factory {"," self {{ try await Network.get(path: \"\/accounts\") }}"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note the double braces. In this example our factory closure is returning a closure, not a class or struct."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now, here’s the view model that uses it."}]},{"type":"codeListing","syntax":"swift","code":["class AccountViewModel: ObservableObject {"," @Injected(\\.accountProvider) var accountProvider"," @Published var accounts: [Account] = []"," @MainActor func load() async {"," do {"," accounts = try await accountProvider()"," } catch {"," print(error)"," }"," }","}"]},{"anchor":"Testing","level":2,"type":"heading","text":"Testing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now consider how easy it is to write a test with mock accounts…"}]},{"type":"codeListing","syntax":"swift","code":["func testAllAccounts() async {"," Container.shared.accountProvider.register {{ Account.mockAccounts }}"," do {"," let viewModel = AccountViewModel()"," try await viewModel.load()"," XCTAssert(viewModel.accounts.count == 5)"," } catch {"," XCTFail(\"Account load failed\")"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or test edge cases like no accounts found."}]},{"type":"codeListing","syntax":"swift","code":["func testEmptyAccounts() async {"," Container.shared.accountProvider.register {{ [] }}"," ...","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or test specific error cases."}]},{"type":"codeListing","syntax":"swift","code":["func testErrorLoadingAccounts() async {"," Container.shared.accountProvider.register {{ throw APIError.network }}"," ...","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s an article that goes into the technique in more detail: "},{"type":"reference","isActive":true,"identifier":"https:\/\/betterprogramming.pub\/factory-and-functional-dependency-injection-2d0a38042d05"}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/functional"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Functional","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"kind":"article","metadata":{"roleHeading":"Article","title":"Functional Injection","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Advanced Topics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Design","doc:\/\/Factory\/documentation\/Factory\/Modifiers","doc:\/\/Factory\/documentation\/Factory\/Modules","doc:\/\/Factory\/documentation\/Factory\/Cycle","doc:\/\/Factory\/documentation\/Factory\/Optionals","doc:\/\/Factory\/documentation\/Factory\/Tags"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Modifiers":{"role":"article","title":"Factory Modifiers","abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","kind":"article","type":"topic","url":"\/documentation\/factory\/modifiers"},"https://betterprogramming.pub/factory-and-functional-dependency-injection-2d0a38042d05":{"title":"Factory and Functional Dependency Injection","titleInlineContent":[{"type":"text","text":"Factory and Functional Dependency Injection"}],"type":"link","identifier":"https:\/\/betterprogramming.pub\/factory-and-functional-dependency-injection-2d0a38042d05","url":"https:\/\/betterprogramming.pub\/factory-and-functional-dependency-injection-2d0a38042d05"},"doc://Factory/documentation/Factory/Cycle":{"role":"article","title":"Resolution Cycles","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","type":"topic","url":"\/documentation\/factory\/cycle"},"doc://Factory/documentation/Factory/Modules":{"role":"article","title":"Modular Development","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","kind":"article","type":"topic","url":"\/documentation\/factory\/modules"},"doc://Factory/documentation/Factory/Optionals":{"role":"article","title":"Optionals and Dynamic Registration","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","kind":"article","type":"topic","url":"\/documentation\/factory\/optionals"},"doc://Factory/documentation/Factory/Design":{"role":"article","title":"Designing Factory","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","kind":"article","type":"topic","url":"\/documentation\/factory\/design"},"doc://Factory/documentation/Factory/Tags":{"role":"article","title":"Tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","kind":"article","type":"topic","url":"\/documentation\/factory\/tags"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/gettingstarted.json b/docs/data/documentation/factory/gettingstarted.json index 2835c5bf..05d705aa 100644 --- a/docs/data/documentation/factory/gettingstarted.json +++ b/docs/data/documentation/factory/gettingstarted.json @@ -1 +1 @@ -{"seeAlsoSections":[{"title":"The Basics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Containers","doc:\/\/Factory\/documentation\/Factory\/Scopes"],"generated":true}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"A "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"type":"text","text":" manages the dependency injection process for a specific object or service and produces an object of the desired type when required."}]},{"anchor":"Defining-a-Factory","level":2,"type":"heading","text":"Defining a Factory"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Most container-based dependency injection systems require you to define that a dependency is available for injection and many require some sort of factory or mechanism that will provide a new instance of the service when needed."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory, as you may have guessed from the name, is no exception."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s a simple registration that creates a "},{"type":"codeVoice","code":"ServiceType"},{"type":"text","text":" dependency for us when needed."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"There’s a few things going on here, so let’s break it down."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"First, we extended our container in order to define a new computed variable of type "},{"type":"codeVoice","code":"Factory"},{"type":"text","text":"."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," ..."," }","}"]},{"type":"paragraph","inlineContent":[{"type":"codeVoice","code":"ServiceType"},{"type":"text","text":" is the dependency type, and it’s often a protocol to which the returned dependency conforms."}]},{"type":"paragraph","inlineContent":[{"type":"codeVoice","code":"Factory"},{"type":"text","text":" is the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory"},{"type":"text","text":" that controls how and when our "},{"type":"codeVoice","code":"ServiceType"},{"type":"text","text":" dependency is made. It manages our dependency."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So our computed variable needs to return a Factory. But Factory’s are complex creatures. They need to communicate with their enclosing containers and they need to be provided with a closure that can be called to create an instance of our dependency when required."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As such, a complete, formal Factory definition would look like this…"}]},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," Factory(self, scope: .unique) { "," MyService()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But we can do better. Factory also provides a bit of syntactic sugar that asks the enclosing container to make our factory for us using a "},{"type":"codeVoice","code":"callAsFunction"},{"type":"text","text":" function on "},{"type":"codeVoice","code":"self"},{"type":"text","text":"."}]},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And we’re done. Either way, the Factory generated by the container is then returned directly to the caller, usually to be evaluated. See “Resolving a Factory” below."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Every time we resolve this particular factory we’ll get a new, unique instance of an object that matches our Factory’s type."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you’re concerned about building Factory’s on the fly, don’t be. Like SwiftUI Views, Factory structs and modifiers are lightweight and transitory value types. They’re created when needed and then immediately discarded once their purpose has been served."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"For more examples of Factory definitions that define scopes, use constructor injection, and do parameter passing, see: "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Registrations"},{"type":"text","text":"."}]},{"anchor":"Resolving-a-Factory","level":2,"type":"heading","text":"Resolving a Factory"},{"type":"paragraph","inlineContent":[{"type":"text","text":"To resolve a Factory and obtain an object or service of the desired type, one simply calls the Factory as s function. Here we use the "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" container that’s provided for each and every container type."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {"," private let myService = Container.shared.service()"," ...","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The resolved instance may be brand new or Factory may return a cached value from the specified "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you’re passing an instance of a container around to your views or view models, just call it directly."}]},{"type":"codeListing","syntax":"swift","code":["private let service = container.service()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Finally, we could have also used an "},{"type":"codeVoice","code":"@Injected"},{"type":"text","text":" property wrapper and specified a keyPath to the desired dependency."}]},{"type":"codeListing","syntax":"swift","code":["@Injected(\\.service) var service"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Unless otherwise specified, the "},{"type":"codeVoice","code":"@Injected"},{"type":"text","text":" property wrapper looks for dependencies in the standard shared container provided by Factory, so the above is functionally identical to the "},{"type":"codeVoice","code":"Container.shared.service()"},{"type":"text","text":" example shown earlier. Here’s one pointing to your own container."}]},{"type":"codeListing","syntax":"swift","code":["@Injected(\\MyCustomContainer.service) var service: ServiceType"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"For more examples see: "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions"},{"type":"text","text":"."}]},{"anchor":"Registering-a-new-Factory-closure","level":2,"type":"heading","text":"Registering a new Factory closure"},{"type":"paragraph","inlineContent":[{"type":"text","text":"What happens if we want to change the behavior of a Factory? What if the system requires changes during runtime, or what if we want our factory to provide mocks and testing doubles?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"It’s easy. Just register a new closure with the existing Factory."}]},{"type":"codeListing","syntax":"swift","code":["container.service.register {"," MockService()","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This new factory registration overrides the original factory closure and then asks the container to clear its associated scope. The next time this factory is resolved Factory will evaluate the new closure and return an instance of the newly registered object instead."}]},{"type":"paragraph","inlineContent":[{"type":"emphasis","inlineContent":[{"type":"text","text":"This includes singletons, with a few caveats. See the Singleton section in "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing"}]}]},{"anchor":"Mocking-and-Testing","level":2,"type":"heading","text":"Mocking and Testing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If we go back and look at our original view model code one might wonder why we’ve gone to all of this trouble? Why not simply say "},{"type":"codeVoice","code":"let myService = MyService()"},{"type":"text","text":" and be done with it?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or keep the container idea, but write something similar to this…"}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," static var myService: MyServiceType { MyService() }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Well, the primary benefit one gains from using a container-based dependency injection system is that we’re able to change the behavior of the system as needed. Consider the following code:"}]},{"type":"codeListing","syntax":"swift","code":["struct ContentView: View {"," @StateObject var model = ContentViewModel()"," var body: some View {"," Text(model.text())"," .padding()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Our ContentView uses our view model, which is assigned to a StateObject. Great. But now we want to preview our code. How do we change the behavior of "},{"type":"codeVoice","code":"ContentViewModel"},{"type":"text","text":" so that its "},{"type":"codeVoice","code":"MyService"},{"type":"text","text":" dependency isn’t making live API calls during development?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"It’s easy. Just replace "},{"type":"codeVoice","code":"MyService"},{"type":"text","text":" with a mock that also conforms to "},{"type":"codeVoice","code":"MyServiceType"},{"type":"text","text":"."}]},{"type":"codeListing","syntax":"swift","code":["struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," let _ = Container.shared.myService.register { MockService2() }"," ContentView()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note the line in our preview code where we’re gone back to our container and registered a new closure on our factory. This function overrides the default factory closure."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now when our preview is displayed "},{"type":"codeVoice","code":"ContentView"},{"type":"text","text":" creates a "},{"type":"codeVoice","code":"ContentViewModel"},{"type":"text","text":" which in turn has a dependency on "},{"type":"codeVoice","code":"myService"},{"type":"text","text":" using shared container."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And when the wrapper asks the factory for an instance of "},{"type":"codeVoice","code":"MyServiceType"},{"type":"text","text":" it now gets a "},{"type":"codeVoice","code":"MockService2"},{"type":"text","text":" instead of the "},{"type":"codeVoice","code":"MyService"},{"type":"text","text":" type originally defined."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This is a powerful concept that lets us reach deep into a chain of dependencies and alter the behavior of a system as needed."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We’re just scratching the surface here. Read more in the section on "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing"},{"type":"text","text":"."}]},{"anchor":"Contexts","level":2,"type":"heading","text":"Contexts"},{"type":"paragraph","inlineContent":[{"type":"text","text":"One powerful new feature in Factory 2.1 is contexts. Let’s say that for logistical reasons whenever your application runs in debug mode you never want it to make calls to your application’s analytics engine."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory makes it easy. Just register an override for that particular context."}]},{"type":"codeListing","syntax":"swift","code":["container.analytics.onDebug {"," StubAnalyticsEngine()","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"There are many contexts for testing, previews, and even UITesting. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"},{"type":"text","text":" for more."}]}]}],"variants":[{"paths":["\/documentation\/factory\/gettingstarted"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"kind":"article","metadata":{"modules":[{"name":"Factory"}],"role":"collectionGroup","title":"Getting Started"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Examples","abstract":[{"type":"text","text":"Some code samples demonstration various ways to register and resolve Factory’s."}],"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Registrations","doc:\/\/Factory\/documentation\/Factory\/Resolutions"]}],"references":{"doc://Factory/documentation/Factory/Resolutions":{"role":"article","title":"Sample Resolutions","abstract":[{"type":"text","text":"There are many ways to use Factory to resolve dependencies. Here are a few examples."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","kind":"article","type":"topic","url":"\/documentation\/factory\/resolutions"},"doc://Factory/documentation/Factory/Contexts":{"role":"article","title":"Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","kind":"article","type":"topic","url":"\/documentation\/factory\/contexts"},"doc://Factory/documentation/Factory/Registrations":{"role":"article","title":"Sample Registrations","abstract":[{"type":"text","text":"There are many ways to register dependencies with Factory. Here are a few examples."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Registrations","kind":"article","type":"topic","url":"\/documentation\/factory\/registrations"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Containers":{"role":"article","title":"Containers","abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","kind":"article","type":"topic","url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Testing":{"role":"article","title":"Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","kind":"article","type":"topic","url":"\/documentation\/factory\/testing"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"}}} \ No newline at end of file +{"seeAlsoSections":[{"title":"The Basics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Containers","doc:\/\/Factory\/documentation\/Factory\/Scopes"],"generated":true}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"A "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"type":"text","text":" manages the dependency injection process for a specific object or service and produces an object of the desired type when required."}]},{"anchor":"Defining-a-Factory","level":2,"type":"heading","text":"Defining a Factory"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Most container-based dependency injection systems require you to define that a dependency is available for injection and many require some sort of factory or mechanism that will provide a new instance of the service when needed."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory, as you may have guessed from the name, is no exception."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s a simple registration that creates a "},{"type":"codeVoice","code":"ServiceType"},{"type":"text","text":" dependency for us when needed."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"There’s a few things going on here, so let’s break it down."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"First, we extended our container in order to define a new computed variable of type "},{"type":"codeVoice","code":"Factory"},{"type":"text","text":"."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," ..."," }","}"]},{"type":"paragraph","inlineContent":[{"type":"codeVoice","code":"ServiceType"},{"type":"text","text":" is the dependency type, and it’s often a protocol to which the returned dependency conforms."}]},{"type":"paragraph","inlineContent":[{"type":"codeVoice","code":"Factory"},{"type":"text","text":" is the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory"},{"type":"text","text":" that controls how and when our "},{"type":"codeVoice","code":"ServiceType"},{"type":"text","text":" dependency is made. It manages our dependency."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So our computed variable needs to return a Factory. But Factory’s are complex creatures. They need to communicate with their enclosing containers and they need to be provided with a closure that can be called to create an instance of our dependency when required."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As such, a complete, formal Factory definition would look like this…"}]},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," Factory(self, scope: .unique) { "," MyService()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But we can do better. Factory also provides a bit of syntactic sugar that asks the enclosing container to make our factory for us using a "},{"type":"codeVoice","code":"callAsFunction"},{"type":"text","text":" function on "},{"type":"codeVoice","code":"self"},{"type":"text","text":"."}]},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And we’re done. Either way, the Factory generated by the container is then returned directly to the caller, usually to be evaluated. See “Resolving a Factory” below."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Every time we resolve this particular factory we’ll get a new, unique instance of an object that matches our Factory’s type."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you’re concerned about building Factory’s on the fly, don’t be. Like SwiftUI Views, Factory structs and modifiers are lightweight and transitory value types. They’re created when needed and then immediately discarded once their purpose has been served."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"For more examples of Factory definitions that define scopes, use constructor injection, and do parameter passing, see: "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Registrations"},{"type":"text","text":"."}]},{"anchor":"Resolving-a-Factory","level":2,"type":"heading","text":"Resolving a Factory"},{"type":"paragraph","inlineContent":[{"type":"text","text":"To resolve a Factory and obtain an object or service of the desired type, one simply calls the Factory as s function. Here we use the "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" container that’s provided for each and every container type."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {"," private let myService = Container.shared.service()"," ...","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The resolved instance may be brand new or Factory may return a cached value from the specified "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you’re passing an instance of a container around to your views or view models, just call it directly."}]},{"type":"codeListing","syntax":"swift","code":["private let service = container.service()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Finally, we could have also used an "},{"type":"codeVoice","code":"@Injected"},{"type":"text","text":" property wrapper and specified a keyPath to the desired dependency."}]},{"type":"codeListing","syntax":"swift","code":["@Injected(\\.service) var service"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Unless otherwise specified, the "},{"type":"codeVoice","code":"@Injected"},{"type":"text","text":" property wrapper looks for dependencies in the standard shared container provided by Factory, so the above is functionally identical to the "},{"type":"codeVoice","code":"Container.shared.service()"},{"type":"text","text":" example shown earlier. Here’s one pointing to your own container."}]},{"type":"codeListing","syntax":"swift","code":["@Injected(\\MyCustomContainer.service) var service: ServiceType"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"For more examples see: "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions"},{"type":"text","text":"."}]},{"anchor":"Registering-a-new-Factory-closure","level":2,"type":"heading","text":"Registering a new Factory closure"},{"type":"paragraph","inlineContent":[{"type":"text","text":"What happens if we want to change the behavior of a Factory? What if the system requires changes during runtime, or what if we want our factory to provide mocks and testing doubles?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"It’s easy. Just register a new closure with the existing Factory."}]},{"type":"codeListing","syntax":"swift","code":["container.service.register {"," MockService()","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This new factory registration overrides the original factory closure and then asks the container to clear its associated scope. The next time this factory is resolved Factory will evaluate the new closure and return an instance of the newly registered object instead."}]},{"type":"paragraph","inlineContent":[{"type":"emphasis","inlineContent":[{"type":"text","text":"This includes singletons, with a few caveats. See the Singleton section in "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing"}]}]},{"anchor":"Mocking-and-Testing","level":2,"type":"heading","text":"Mocking and Testing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If we go back and look at our original view model code one might wonder why we’ve gone to all of this trouble? Why not simply say "},{"type":"codeVoice","code":"let myService = MyService()"},{"type":"text","text":" and be done with it?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or keep the container idea, but write something similar to this…"}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," static var myService: MyServiceType { MyService() }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Well, the primary benefit one gains from using a container-based dependency injection system is that we’re able to change the behavior of the system as needed. Consider the following code:"}]},{"type":"codeListing","syntax":"swift","code":["struct ContentView: View {"," @StateObject var model = ContentViewModel()"," var body: some View {"," Text(model.text())"," .padding()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Our ContentView uses our view model, which is assigned to a StateObject. Great. But now we want to preview our code. How do we change the behavior of "},{"type":"codeVoice","code":"ContentViewModel"},{"type":"text","text":" so that its "},{"type":"codeVoice","code":"MyService"},{"type":"text","text":" dependency isn’t making live API calls during development?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"It’s easy. Just replace "},{"type":"codeVoice","code":"MyService"},{"type":"text","text":" with a mock that also conforms to "},{"type":"codeVoice","code":"MyServiceType"},{"type":"text","text":"."}]},{"type":"codeListing","syntax":"swift","code":["struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," let _ = Container.shared.myService.register { MockService2() }"," ContentView()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note the line in our preview code where we’re gone back to our container and registered a new closure on our factory. This function overrides the default factory closure."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now when our preview is displayed "},{"type":"codeVoice","code":"ContentView"},{"type":"text","text":" creates a "},{"type":"codeVoice","code":"ContentViewModel"},{"type":"text","text":" which in turn has a dependency on "},{"type":"codeVoice","code":"myService"},{"type":"text","text":" using shared container."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And when the wrapper asks the factory for an instance of "},{"type":"codeVoice","code":"MyServiceType"},{"type":"text","text":" it now gets a "},{"type":"codeVoice","code":"MockService2"},{"type":"text","text":" instead of the "},{"type":"codeVoice","code":"MyService"},{"type":"text","text":" type originally defined."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This is a powerful concept that lets us reach deep into a chain of dependencies and alter the behavior of a system as needed."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We’re just scratching the surface here. Read more in the section on "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing"},{"type":"text","text":"."}]},{"anchor":"Contexts","level":2,"type":"heading","text":"Contexts"},{"type":"paragraph","inlineContent":[{"type":"text","text":"One powerful new feature in Factory 2.1 is contexts. Let’s say that for logistical reasons whenever your application runs in debug mode you never want it to make calls to your application’s analytics engine."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory makes it easy. Just register an override for that particular context."}]},{"type":"codeListing","syntax":"swift","code":["container.analytics.onDebug {"," StubAnalyticsEngine()","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"There are many contexts for testing, previews, and even UITesting. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"},{"type":"text","text":" for more."}]}]}],"variants":[{"paths":["\/documentation\/factory\/gettingstarted"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"kind":"article","metadata":{"modules":[{"name":"Factory"}],"role":"collectionGroup","title":"Getting Started"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Examples","abstract":[{"type":"text","text":"Some code samples demonstration various ways to register and resolve Factory’s."}],"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Registrations","doc:\/\/Factory\/documentation\/Factory\/Resolutions"]}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Testing":{"role":"article","title":"Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","kind":"article","type":"topic","url":"\/documentation\/factory\/testing"},"doc://Factory/documentation/Factory/Resolutions":{"role":"article","title":"Sample Resolutions","abstract":[{"type":"text","text":"There are many ways to use Factory to resolve dependencies. Here are a few examples."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","kind":"article","type":"topic","url":"\/documentation\/factory\/resolutions"},"doc://Factory/documentation/Factory/Contexts":{"role":"article","title":"Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","kind":"article","type":"topic","url":"\/documentation\/factory\/contexts"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Containers":{"role":"article","title":"Containers","abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","kind":"article","type":"topic","url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory/Registrations":{"role":"article","title":"Sample Registrations","abstract":[{"type":"text","text":"There are many ways to register dependencies with Factory. Here are a few examples."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Registrations","kind":"article","type":"topic","url":"\/documentation\/factory\/registrations"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injected.json b/docs/data/documentation/factory/injected.json index ff419b3b..6756c1e7 100644 --- a/docs/data/documentation/factory/injected.json +++ b/docs/data/documentation/factory/injected.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@propertyWrapper"},{"kind":"text","text":" "},{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Property wrappers implement an annotation pattern to resolving dependencies, similar to using"},{"type":"text","text":" "},{"type":"text","text":"EnvironmentObject in SwiftUI."}]},{"type":"codeListing","syntax":"swift","code":["class MyViewModel {"," @Injected(\\.myService) var service"," @Injected(\\MyCustomContainer.myService) var service","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The provided keypath resolves to a Factory definition on the "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" container required for each Container type."},{"type":"text","text":" "},{"type":"text","text":"The short version of the keyPath resolves to the default container, while the expanded version"},{"type":"text","text":" "},{"type":"text","text":"allows you to point an instance on your own customer container type."}]},{"style":"note","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The @Injected property wrapper will be resolved on "},{"type":"strong","inlineContent":[{"type":"text","text":"initialization"}]},{"type":"text","text":". In the above example"},{"type":"text","text":" "},{"type":"text","text":"the referenced dependencies will be acquired when the parent class is created."}]}],"type":"aside","name":"Note"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injected"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"title":"Injected","roleHeading":"Structure","role":"symbol","symbolKind":"struct","externalID":"s:7Factory8InjectedV","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"Injected"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-7xpmb","doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-9sxzk"]},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Injected\/factory","doc:\/\/Factory\/documentation\/Factory\/Injected\/projectedValue","doc:\/\/Factory\/documentation\/Factory\/Injected\/wrappedValue"]},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Injected\/resolve(reset:)"]}],"references":{"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Injected/projectedValue":{"role":"symbol","title":"projectedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Injected","preciseIdentifier":"s:7Factory8InjectedV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/projectedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/projectedvalue"},"doc://Factory/documentation/Factory/Injected/resolve(reset:)":{"role":"symbol","title":"resolve(reset:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/resolve(reset:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/resolve(reset:)"},"doc://Factory/documentation/Factory/Injected/init(_:)-7xpmb":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-7xpmb","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/init(_:)-7xpmb"},"doc://Factory/documentation/Factory/Injected/wrappedValue":{"role":"symbol","title":"wrappedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/wrappedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/wrappedvalue"},"doc://Factory/documentation/Factory/Injected/init(_:)-9sxzk":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-9sxzk","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/init(_:)-9sxzk"},"doc://Factory/documentation/Factory/Injected/factory":{"role":"symbol","title":"factory","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/factory","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@propertyWrapper"},{"kind":"text","text":" "},{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Property wrappers implement an annotation pattern to resolving dependencies, similar to using"},{"type":"text","text":" "},{"type":"text","text":"EnvironmentObject in SwiftUI."}]},{"type":"codeListing","syntax":"swift","code":["class MyViewModel {"," @Injected(\\.myService) var service"," @Injected(\\MyCustomContainer.myService) var service","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The provided keypath resolves to a Factory definition on the "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" container required for each Container type."},{"type":"text","text":" "},{"type":"text","text":"The short version of the keyPath resolves to the default container, while the expanded version"},{"type":"text","text":" "},{"type":"text","text":"allows you to point an instance on your own customer container type."}]},{"style":"note","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The @Injected property wrapper will be resolved on "},{"type":"strong","inlineContent":[{"type":"text","text":"initialization"}]},{"type":"text","text":". In the above example"},{"type":"text","text":" "},{"type":"text","text":"the referenced dependencies will be acquired when the parent class is created."}]}],"type":"aside","name":"Note"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injected"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"title":"Injected","roleHeading":"Structure","role":"symbol","symbolKind":"struct","externalID":"s:7Factory8InjectedV","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"Injected"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-7xpmb","doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-9sxzk"]},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Injected\/factory","doc:\/\/Factory\/documentation\/Factory\/Injected\/projectedValue","doc:\/\/Factory\/documentation\/Factory\/Injected\/wrappedValue"]},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Injected\/resolve(reset:)"]}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Injected/resolve(reset:)":{"role":"symbol","title":"resolve(reset:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/resolve(reset:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/resolve(reset:)"},"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"},"doc://Factory/documentation/Factory/Injected/projectedValue":{"role":"symbol","title":"projectedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Injected","preciseIdentifier":"s:7Factory8InjectedV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/projectedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/projectedvalue"},"doc://Factory/documentation/Factory/Injected/factory":{"role":"symbol","title":"factory","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/factory","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/factory"},"doc://Factory/documentation/Factory/Injected/init(_:)-9sxzk":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-9sxzk","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/init(_:)-9sxzk"},"doc://Factory/documentation/Factory/Injected/wrappedValue":{"role":"symbol","title":"wrappedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/wrappedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/wrappedvalue"},"doc://Factory/documentation/Factory/Injected/init(_:)-7xpmb":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-7xpmb","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/init(_:)-7xpmb"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injected/factory.json b/docs/data/documentation/factory/injected/factory.json index 0bd772e8..d467587a 100644 --- a/docs/data/documentation/factory/injected/factory.json +++ b/docs/data/documentation/factory/injected/factory.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"> { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injected\/factory"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/factory","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"title":"factory","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory8InjectedV7factoryA2AVyxGvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Injected/factory":{"role":"symbol","title":"factory","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/factory","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/factory"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"> { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injected\/factory"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/factory","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"title":"factory","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory8InjectedV7factoryA2AVyxGvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Injected/factory":{"role":"symbol","title":"factory","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/factory","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/factory"},"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injected/init(_:)-7xpmb.json b/docs/data/documentation/factory/injected/init(_:)-7xpmb.json index da026520..4dbfada8 100644 --- a/docs/data/documentation/factory/injected/init(_:)-7xpmb.json +++ b/docs/data/documentation/factory/injected/init(_:)-7xpmb.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","preciseIdentifier":"s:7Factory9ContainerC","text":"Container"},{"kind":"text","text":", "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"KeyPath to a Factory on the default Container."}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injected\/init(_:)-7xpmb"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-7xpmb","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"title":"init(_:)","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory8InjectedVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Injected/init(_:)-7xpmb":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-7xpmb","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/init(_:)-7xpmb"},"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","preciseIdentifier":"s:7Factory9ContainerC","text":"Container"},{"kind":"text","text":", "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"KeyPath to a Factory on the default Container."}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injected\/init(_:)-7xpmb"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-7xpmb","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"title":"init(_:)","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory8InjectedVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"references":{"doc://Factory/documentation/Factory/Injected/init(_:)-7xpmb":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-7xpmb","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/init(_:)-7xpmb"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injected/init(_:)-9sxzk.json b/docs/data/documentation/factory/injected/init(_:)-9sxzk.json index bf1d8191..6ec9fc48 100644 --- a/docs/data/documentation/factory/injected/init(_:)-9sxzk.json +++ b/docs/data/documentation/factory/injected/init(_:)-9sxzk.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>) "},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","preciseIdentifier":"s:7Factory15SharedContainerP","text":"SharedContainer"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"KeyPath to a Factory on the specified Container."}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injected\/init(_:)-9sxzk"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-9sxzk","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"title":"init(_:)","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory8InjectedVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"references":{"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Injected/init(_:)-9sxzk":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-9sxzk","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/init(_:)-9sxzk"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/SharedContainer":{"role":"symbol","title":"SharedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"abstract":[{"type":"text","text":"SharedContainer defines the protocol all Containers must adopt if they want to support Service Locator style injection or support any of the injection property wrappers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"url":"\/documentation\/factory\/sharedcontainer"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>) "},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","preciseIdentifier":"s:7Factory15SharedContainerP","text":"SharedContainer"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"KeyPath to a Factory on the specified Container."}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injected\/init(_:)-9sxzk"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-9sxzk","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"title":"init(_:)","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory8InjectedVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"},"doc://Factory/documentation/Factory/SharedContainer":{"role":"symbol","title":"SharedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"abstract":[{"type":"text","text":"SharedContainer defines the protocol all Containers must adopt if they want to support Service Locator style injection or support any of the injection property wrappers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"url":"\/documentation\/factory\/sharedcontainer"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Injected/init(_:)-9sxzk":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-9sxzk","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/init(_:)-9sxzk"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injected/projectedvalue.json b/docs/data/documentation/factory/injected/projectedvalue.json index c77732ed..d7ecfaf6 100644 --- a/docs/data/documentation/factory/injected/projectedvalue.json +++ b/docs/data/documentation/factory/injected/projectedvalue.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","preciseIdentifier":"s:7Factory8InjectedV","text":"Injected"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"> { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injected\/projectedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/projectedValue","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Injected","preciseIdentifier":"s:7Factory8InjectedV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"title":"projectedValue","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory8InjectedV14projectedValueACyxGvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"references":{"doc://Factory/documentation/Factory/Injected/projectedValue":{"role":"symbol","title":"projectedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Injected","preciseIdentifier":"s:7Factory8InjectedV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/projectedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/projectedvalue"},"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","preciseIdentifier":"s:7Factory8InjectedV","text":"Injected"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"> { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injected\/projectedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/projectedValue","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Injected","preciseIdentifier":"s:7Factory8InjectedV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"title":"projectedValue","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory8InjectedV14projectedValueACyxGvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"},"doc://Factory/documentation/Factory/Injected/projectedValue":{"role":"symbol","title":"projectedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Injected","preciseIdentifier":"s:7Factory8InjectedV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/projectedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/projectedvalue"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injected/resolve(reset:).json b/docs/data/documentation/factory/injected/resolve(reset:).json index 94459d04..189bea70 100644 --- a/docs/data/documentation/factory/injected/resolve(reset:).json +++ b/docs/data/documentation/factory/injected/resolve(reset:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"mutating"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":" "},{"kind":"internalParam","text":"options"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":" = .none)"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injected\/resolve(reset:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/resolve(reset:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"title":"resolve(reset:)","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:7Factory8InjectedV7resolve5resetyAA0A12ResetOptionsO_tF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"references":{"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"},"doc://Factory/documentation/Factory/Injected/resolve(reset:)":{"role":"symbol","title":"resolve(reset:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/resolve(reset:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/resolve(reset:)"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"mutating"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":" "},{"kind":"internalParam","text":"options"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":" = .none)"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injected\/resolve(reset:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/resolve(reset:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"title":"resolve(reset:)","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:7Factory8InjectedV7resolve5resetyAA0A12ResetOptionsO_tF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"},"doc://Factory/documentation/Factory/Injected/resolve(reset:)":{"role":"symbol","title":"resolve(reset:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/resolve(reset:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/resolve(reset:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injected/wrappedvalue.json b/docs/data/documentation/factory/injected/wrappedvalue.json index 0f80f3f5..828471c5 100644 --- a/docs/data/documentation/factory/injected/wrappedvalue.json +++ b/docs/data/documentation/factory/injected/wrappedvalue.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injected\/wrappedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/wrappedValue","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"title":"wrappedValue","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory8InjectedV12wrappedValuexvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"},"doc://Factory/documentation/Factory/Injected/wrappedValue":{"role":"symbol","title":"wrappedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/wrappedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/wrappedvalue"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injected\/wrappedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/wrappedValue","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"title":"wrappedValue","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory8InjectedV12wrappedValuexvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"references":{"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Injected/wrappedValue":{"role":"symbol","title":"wrappedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/wrappedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/wrappedvalue"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injectedobject.json b/docs/data/documentation/factory/injectedobject.json index 6eee2b02..b22bcdac 100644 --- a/docs/data/documentation/factory/injectedobject.json +++ b/docs/data/documentation/factory/injectedobject.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@frozen"},{"kind":"text","text":" "},{"kind":"attribute","text":"@propertyWrapper"},{"kind":"text","text":" "},{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":"> "},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"ObservableObject","preciseIdentifier":"s:7Combine16ObservableObjectP"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This wrapper is meant for use in SwiftUI Views and exposes bindable objects similar to that of SwiftUI @StateObject"},{"type":"text","text":" "},{"type":"text","text":"and @EnvironmentObject."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Like the other Injected property wrappers, InjectedObject wraps obtains the dependency from the Factory keypath"},{"type":"text","text":" "},{"type":"text","text":"and provides it to a wrapped instance of StateObject. Updating object state will trigger view update."}]},{"type":"codeListing","syntax":"swift","code":["struct ContentView: View {"," @InjectedObject(\\.contentViewModel) var model"," var body: some View {"," ..."," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"ContentViewModel must, of course, be of type ObservableObject and is registered like any other service"},{"type":"text","text":" "},{"type":"text","text":"or dependency."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var contentViewModel: Factory {"," self { ContentViewModel() }"," }","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injectedobject"],"traits":[{"interfaceLanguage":"swift"}]}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/7SwiftUI15DynamicPropertyP"],"kind":"relationships","title":"Conforms To","type":"conformsTo"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"kind":"symbol","metadata":{"navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"role":"symbol","title":"InjectedObject","roleHeading":"Structure","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"symbolKind":"struct","externalID":"s:7Factory14InjectedObjectV","modules":[{"name":"Factory"}],"platforms":[{"beta":false,"unavailable":false,"name":"iOS","introducedAt":"14.0","deprecated":false},{"beta":false,"unavailable":false,"name":"macOS","introducedAt":"11.0","deprecated":false},{"beta":false,"unavailable":false,"name":"tvOS","introducedAt":"14.0","deprecated":false},{"beta":false,"unavailable":false,"name":"watchOS","introducedAt":"7.0","deprecated":false}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-4awwf","doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-7dlth","doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-8lxkh"]},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/projectedValue","doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/wrappedValue"]},{"title":"Default Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations"],"generated":true}],"references":{"doc://Factory/documentation/Factory/InjectedObject/init(_:)-4awwf":{"conformance":{"constraints":[{"type":"codeVoice","code":"T"},{"type":"text","text":" conforms to "},{"type":"codeVoice","code":"ObservableObject"},{"type":"text","text":"."}],"availabilityPrefix":[{"type":"text","text":"Available when"}],"conformancePrefix":[{"type":"text","text":"Conforms when"}]},"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Simple initializer with passed parameter bypassing injection."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-4awwf","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injectedobject\/init(_:)-4awwf"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-7dlth":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-7dlth","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injectedobject\/init(_:)-7dlth"},"doc://Factory/documentation/Factory/InjectedObject/projectedValue":{"role":"symbol","title":"projectedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ObservedObject","preciseIdentifier":"s:7SwiftUI14ObservedObjectV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">."},{"kind":"typeIdentifier","text":"Wrapper","preciseIdentifier":"s:7SwiftUI14ObservedObjectV7WrapperV"}],"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/projectedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injectedobject\/projectedvalue"},"doc://Factory/7SwiftUI15DynamicPropertyP":{"type":"unresolvable","title":"SwiftUI.DynamicProperty","identifier":"doc:\/\/Factory\/7SwiftUI15DynamicPropertyP"},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-8lxkh":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-8lxkh","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injectedobject\/init(_:)-8lxkh"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"},"doc://Factory/documentation/Factory/InjectedObject/wrappedValue":{"role":"symbol","title":"wrappedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/wrappedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injectedobject\/wrappedvalue"},"doc://Factory/documentation/Factory/InjectedObject/DynamicProperty-Implementations":{"role":"collectionGroup","title":"DynamicProperty Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/injectedobject\/dynamicproperty-implementations"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@frozen"},{"kind":"text","text":" "},{"kind":"attribute","text":"@propertyWrapper"},{"kind":"text","text":" "},{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":"> "},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"ObservableObject","preciseIdentifier":"s:7Combine16ObservableObjectP"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This wrapper is meant for use in SwiftUI Views and exposes bindable objects similar to that of SwiftUI @StateObject"},{"type":"text","text":" "},{"type":"text","text":"and @EnvironmentObject."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Like the other Injected property wrappers, InjectedObject wraps obtains the dependency from the Factory keypath"},{"type":"text","text":" "},{"type":"text","text":"and provides it to a wrapped instance of StateObject. Updating object state will trigger view update."}]},{"type":"codeListing","syntax":"swift","code":["struct ContentView: View {"," @InjectedObject(\\.contentViewModel) var model"," var body: some View {"," ..."," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"ContentViewModel must, of course, be of type ObservableObject and is registered like any other service"},{"type":"text","text":" "},{"type":"text","text":"or dependency."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var contentViewModel: Factory {"," self { ContentViewModel() }"," }","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injectedobject"],"traits":[{"interfaceLanguage":"swift"}]}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/7SwiftUI15DynamicPropertyP"],"kind":"relationships","title":"Conforms To","type":"conformsTo"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"kind":"symbol","metadata":{"navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"role":"symbol","title":"InjectedObject","roleHeading":"Structure","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"symbolKind":"struct","externalID":"s:7Factory14InjectedObjectV","modules":[{"name":"Factory"}],"platforms":[{"beta":false,"unavailable":false,"name":"iOS","introducedAt":"14.0","deprecated":false},{"beta":false,"unavailable":false,"name":"macOS","introducedAt":"11.0","deprecated":false},{"beta":false,"unavailable":false,"name":"tvOS","introducedAt":"14.0","deprecated":false},{"beta":false,"unavailable":false,"name":"watchOS","introducedAt":"7.0","deprecated":false}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-4awwf","doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-7dlth","doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-8lxkh"]},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/projectedValue","doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/wrappedValue"]},{"title":"Default Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations"],"generated":true}],"references":{"doc://Factory/documentation/Factory/InjectedObject/wrappedValue":{"role":"symbol","title":"wrappedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/wrappedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injectedobject\/wrappedvalue"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-8lxkh":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-8lxkh","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injectedobject\/init(_:)-8lxkh"},"doc://Factory/7SwiftUI15DynamicPropertyP":{"type":"unresolvable","title":"SwiftUI.DynamicProperty","identifier":"doc:\/\/Factory\/7SwiftUI15DynamicPropertyP"},"doc://Factory/documentation/Factory/InjectedObject/projectedValue":{"role":"symbol","title":"projectedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ObservedObject","preciseIdentifier":"s:7SwiftUI14ObservedObjectV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">."},{"kind":"typeIdentifier","text":"Wrapper","preciseIdentifier":"s:7SwiftUI14ObservedObjectV7WrapperV"}],"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/projectedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injectedobject\/projectedvalue"},"doc://Factory/documentation/Factory/InjectedObject/DynamicProperty-Implementations":{"role":"collectionGroup","title":"DynamicProperty Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/injectedobject\/dynamicproperty-implementations"},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-4awwf":{"conformance":{"constraints":[{"type":"codeVoice","code":"T"},{"type":"text","text":" conforms to "},{"type":"codeVoice","code":"ObservableObject"},{"type":"text","text":"."}],"availabilityPrefix":[{"type":"text","text":"Available when"}],"conformancePrefix":[{"type":"text","text":"Conforms when"}]},"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Simple initializer with passed parameter bypassing injection."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-4awwf","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injectedobject\/init(_:)-4awwf"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-7dlth":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-7dlth","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injectedobject\/init(_:)-7dlth"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injectedobject/dynamicproperty-implementations.json b/docs/data/documentation/factory/injectedobject/dynamicproperty-implementations.json index e04cbaf1..56c6d124 100644 --- a/docs/data/documentation/factory/injectedobject/dynamicproperty-implementations.json +++ b/docs/data/documentation/factory/injectedobject/dynamicproperty-implementations.json @@ -1 +1 @@ -{"variants":[{"paths":["\/documentation\/factory\/injectedobject\/dynamicproperty-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations","interfaceLanguage":"swift"},"topicSections":[{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/update()"],"generated":true}],"kind":"article","metadata":{"modules":[{"name":"Factory"}],"role":"collectionGroup","title":"DynamicProperty Implementations"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"references":{"doc://Factory/documentation/Factory/InjectedObject/update()":{"role":"symbol","title":"update()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"update"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/update()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injectedobject\/update()"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"variants":[{"paths":["\/documentation\/factory\/injectedobject\/dynamicproperty-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations","interfaceLanguage":"swift"},"topicSections":[{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/update()"],"generated":true}],"kind":"article","metadata":{"modules":[{"name":"Factory"}],"role":"collectionGroup","title":"DynamicProperty Implementations"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"references":{"doc://Factory/documentation/Factory/InjectedObject/update()":{"role":"symbol","title":"update()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"update"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/update()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injectedobject\/update()"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injectedobject/init(_:)-4awwf.json b/docs/data/documentation/factory/injectedobject/init(_:)-4awwf.json index 302e76c7..110bfd19 100644 --- a/docs/data/documentation/factory/injectedobject/init(_:)-4awwf.json +++ b/docs/data/documentation/factory/injectedobject/init(_:)-4awwf.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":")"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Still has issue with attempting to pass dependency into existing view when existing InjectedObject has keyPath."},{"type":"text","text":" "},{"type":"text","text":"https:\/\/forums.swift.org\/t\/allow-property-wrappers-with-multiple-arguments-to-defer-initialization-when-wrappedvalue-is-not-specified"}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injectedobject\/init(_:)-4awwf"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-4awwf","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Simple initializer with passed parameter bypassing injection."}],"kind":"symbol","metadata":{"modules":[{"name":"Factory"}],"conformance":{"constraints":[{"type":"codeVoice","code":"T"},{"type":"text","text":" conforms to "},{"type":"codeVoice","code":"ObservableObject"},{"type":"text","text":"."}],"availabilityPrefix":[{"type":"text","text":"Available when"}],"conformancePrefix":[{"type":"text","text":"Conforms when"}]},"role":"symbol","title":"init(_:)","roleHeading":"Initializer","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":")"}],"symbolKind":"init","externalID":"s:7Factory14InjectedObjectVyACyxGxcfc","extendedModule":"Factory","platforms":[{"beta":false,"unavailable":false,"name":"iOS","introducedAt":"14.0","deprecated":false},{"beta":false,"unavailable":false,"name":"macOS","introducedAt":"11.0","deprecated":false},{"beta":false,"unavailable":false,"name":"tvOS","introducedAt":"14.0","deprecated":false},{"beta":false,"unavailable":false,"name":"watchOS","introducedAt":"7.0","deprecated":false}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"references":{"doc://Factory/documentation/Factory/InjectedObject/init(_:)-4awwf":{"conformance":{"constraints":[{"type":"codeVoice","code":"T"},{"type":"text","text":" conforms to "},{"type":"codeVoice","code":"ObservableObject"},{"type":"text","text":"."}],"availabilityPrefix":[{"type":"text","text":"Available when"}],"conformancePrefix":[{"type":"text","text":"Conforms when"}]},"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Simple initializer with passed parameter bypassing injection."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-4awwf","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injectedobject\/init(_:)-4awwf"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":")"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Still has issue with attempting to pass dependency into existing view when existing InjectedObject has keyPath."},{"type":"text","text":" "},{"type":"text","text":"https:\/\/forums.swift.org\/t\/allow-property-wrappers-with-multiple-arguments-to-defer-initialization-when-wrappedvalue-is-not-specified"}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injectedobject\/init(_:)-4awwf"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-4awwf","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Simple initializer with passed parameter bypassing injection."}],"kind":"symbol","metadata":{"modules":[{"name":"Factory"}],"conformance":{"constraints":[{"type":"codeVoice","code":"T"},{"type":"text","text":" conforms to "},{"type":"codeVoice","code":"ObservableObject"},{"type":"text","text":"."}],"availabilityPrefix":[{"type":"text","text":"Available when"}],"conformancePrefix":[{"type":"text","text":"Conforms when"}]},"role":"symbol","title":"init(_:)","roleHeading":"Initializer","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":")"}],"symbolKind":"init","externalID":"s:7Factory14InjectedObjectVyACyxGxcfc","extendedModule":"Factory","platforms":[{"beta":false,"unavailable":false,"name":"iOS","introducedAt":"14.0","deprecated":false},{"beta":false,"unavailable":false,"name":"macOS","introducedAt":"11.0","deprecated":false},{"beta":false,"unavailable":false,"name":"tvOS","introducedAt":"14.0","deprecated":false},{"beta":false,"unavailable":false,"name":"watchOS","introducedAt":"7.0","deprecated":false}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-4awwf":{"conformance":{"constraints":[{"type":"codeVoice","code":"T"},{"type":"text","text":" conforms to "},{"type":"codeVoice","code":"ObservableObject"},{"type":"text","text":"."}],"availabilityPrefix":[{"type":"text","text":"Available when"}],"conformancePrefix":[{"type":"text","text":"Conforms when"}]},"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Simple initializer with passed parameter bypassing injection."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-4awwf","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injectedobject\/init(_:)-4awwf"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injectedobject/init(_:)-7dlth.json b/docs/data/documentation/factory/injectedobject/init(_:)-7dlth.json index 06ad15bd..406a5ec5 100644 --- a/docs/data/documentation/factory/injectedobject/init(_:)-7dlth.json +++ b/docs/data/documentation/factory/injectedobject/init(_:)-7dlth.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","preciseIdentifier":"s:7Factory9ContainerC","text":"Container"},{"kind":"text","text":", "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"KeyPath to a Factory on the default Container."}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injectedobject\/init(_:)-7dlth"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-7dlth","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"kind":"symbol","metadata":{"role":"symbol","title":"init(_:)","roleHeading":"Initializer","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"symbolKind":"init","externalID":"s:7Factory14InjectedObjectVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc","modules":[{"name":"Factory"}],"platforms":[{"beta":false,"unavailable":false,"name":"iOS","introducedAt":"14.0","deprecated":false},{"beta":false,"unavailable":false,"name":"macOS","introducedAt":"11.0","deprecated":false},{"beta":false,"unavailable":false,"name":"tvOS","introducedAt":"14.0","deprecated":false},{"beta":false,"unavailable":false,"name":"watchOS","introducedAt":"7.0","deprecated":false}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-7dlth":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-7dlth","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injectedobject\/init(_:)-7dlth"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","preciseIdentifier":"s:7Factory9ContainerC","text":"Container"},{"kind":"text","text":", "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"KeyPath to a Factory on the default Container."}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injectedobject\/init(_:)-7dlth"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-7dlth","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"kind":"symbol","metadata":{"role":"symbol","title":"init(_:)","roleHeading":"Initializer","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"symbolKind":"init","externalID":"s:7Factory14InjectedObjectVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc","modules":[{"name":"Factory"}],"platforms":[{"beta":false,"unavailable":false,"name":"iOS","introducedAt":"14.0","deprecated":false},{"beta":false,"unavailable":false,"name":"macOS","introducedAt":"11.0","deprecated":false},{"beta":false,"unavailable":false,"name":"tvOS","introducedAt":"14.0","deprecated":false},{"beta":false,"unavailable":false,"name":"watchOS","introducedAt":"7.0","deprecated":false}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-7dlth":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-7dlth","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injectedobject\/init(_:)-7dlth"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injectedobject/init(_:)-8lxkh.json b/docs/data/documentation/factory/injectedobject/init(_:)-8lxkh.json index c473561a..51c67207 100644 --- a/docs/data/documentation/factory/injectedobject/init(_:)-8lxkh.json +++ b/docs/data/documentation/factory/injectedobject/init(_:)-8lxkh.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>) "},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","preciseIdentifier":"s:7Factory15SharedContainerP","text":"SharedContainer"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"KeyPath to a Factory on the specified Container."}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injectedobject\/init(_:)-8lxkh"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-8lxkh","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"kind":"symbol","metadata":{"role":"symbol","title":"init(_:)","roleHeading":"Initializer","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"symbolKind":"init","externalID":"s:7Factory14InjectedObjectVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc","modules":[{"name":"Factory"}],"platforms":[{"beta":false,"unavailable":false,"name":"iOS","introducedAt":"14.0","deprecated":false},{"beta":false,"unavailable":false,"name":"macOS","introducedAt":"11.0","deprecated":false},{"beta":false,"unavailable":false,"name":"tvOS","introducedAt":"14.0","deprecated":false},{"beta":false,"unavailable":false,"name":"watchOS","introducedAt":"7.0","deprecated":false}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-8lxkh":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-8lxkh","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injectedobject\/init(_:)-8lxkh"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"},"doc://Factory/documentation/Factory/SharedContainer":{"role":"symbol","title":"SharedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"abstract":[{"type":"text","text":"SharedContainer defines the protocol all Containers must adopt if they want to support Service Locator style injection or support any of the injection property wrappers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"url":"\/documentation\/factory\/sharedcontainer"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>) "},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","preciseIdentifier":"s:7Factory15SharedContainerP","text":"SharedContainer"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"KeyPath to a Factory on the specified Container."}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injectedobject\/init(_:)-8lxkh"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-8lxkh","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"kind":"symbol","metadata":{"role":"symbol","title":"init(_:)","roleHeading":"Initializer","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"symbolKind":"init","externalID":"s:7Factory14InjectedObjectVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc","modules":[{"name":"Factory"}],"platforms":[{"beta":false,"unavailable":false,"name":"iOS","introducedAt":"14.0","deprecated":false},{"beta":false,"unavailable":false,"name":"macOS","introducedAt":"11.0","deprecated":false},{"beta":false,"unavailable":false,"name":"tvOS","introducedAt":"14.0","deprecated":false},{"beta":false,"unavailable":false,"name":"watchOS","introducedAt":"7.0","deprecated":false}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/SharedContainer":{"role":"symbol","title":"SharedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"abstract":[{"type":"text","text":"SharedContainer defines the protocol all Containers must adopt if they want to support Service Locator style injection or support any of the injection property wrappers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"url":"\/documentation\/factory\/sharedcontainer"},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-8lxkh":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-8lxkh","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injectedobject\/init(_:)-8lxkh"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injectedobject/projectedvalue.json b/docs/data/documentation/factory/injectedobject/projectedvalue.json index ee81be44..8d8350ad 100644 --- a/docs/data/documentation/factory/injectedobject/projectedvalue.json +++ b/docs/data/documentation/factory/injectedobject/projectedvalue.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ObservedObject","preciseIdentifier":"s:7SwiftUI14ObservedObjectV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">."},{"kind":"typeIdentifier","text":"Wrapper","preciseIdentifier":"s:7SwiftUI14ObservedObjectV7WrapperV"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injectedobject\/projectedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/projectedValue","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"kind":"symbol","metadata":{"role":"symbol","title":"projectedValue","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ObservedObject","preciseIdentifier":"s:7SwiftUI14ObservedObjectV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">."},{"kind":"typeIdentifier","text":"Wrapper","preciseIdentifier":"s:7SwiftUI14ObservedObjectV7WrapperV"}],"symbolKind":"property","externalID":"s:7Factory14InjectedObjectV14projectedValue7SwiftUI08ObservedC0V7WrapperVyx_Gvp","modules":[{"name":"Factory"}],"platforms":[{"beta":false,"unavailable":false,"name":"iOS","introducedAt":"14.0","deprecated":false},{"beta":false,"unavailable":false,"name":"macOS","introducedAt":"11.0","deprecated":false},{"beta":false,"unavailable":false,"name":"tvOS","introducedAt":"14.0","deprecated":false},{"beta":false,"unavailable":false,"name":"watchOS","introducedAt":"7.0","deprecated":false}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"},"doc://Factory/documentation/Factory/InjectedObject/projectedValue":{"role":"symbol","title":"projectedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ObservedObject","preciseIdentifier":"s:7SwiftUI14ObservedObjectV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">."},{"kind":"typeIdentifier","text":"Wrapper","preciseIdentifier":"s:7SwiftUI14ObservedObjectV7WrapperV"}],"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/projectedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injectedobject\/projectedvalue"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ObservedObject","preciseIdentifier":"s:7SwiftUI14ObservedObjectV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">."},{"kind":"typeIdentifier","text":"Wrapper","preciseIdentifier":"s:7SwiftUI14ObservedObjectV7WrapperV"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injectedobject\/projectedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/projectedValue","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"kind":"symbol","metadata":{"role":"symbol","title":"projectedValue","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ObservedObject","preciseIdentifier":"s:7SwiftUI14ObservedObjectV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">."},{"kind":"typeIdentifier","text":"Wrapper","preciseIdentifier":"s:7SwiftUI14ObservedObjectV7WrapperV"}],"symbolKind":"property","externalID":"s:7Factory14InjectedObjectV14projectedValue7SwiftUI08ObservedC0V7WrapperVyx_Gvp","modules":[{"name":"Factory"}],"platforms":[{"beta":false,"unavailable":false,"name":"iOS","introducedAt":"14.0","deprecated":false},{"beta":false,"unavailable":false,"name":"macOS","introducedAt":"11.0","deprecated":false},{"beta":false,"unavailable":false,"name":"tvOS","introducedAt":"14.0","deprecated":false},{"beta":false,"unavailable":false,"name":"watchOS","introducedAt":"7.0","deprecated":false}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"references":{"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/InjectedObject/projectedValue":{"role":"symbol","title":"projectedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ObservedObject","preciseIdentifier":"s:7SwiftUI14ObservedObjectV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">."},{"kind":"typeIdentifier","text":"Wrapper","preciseIdentifier":"s:7SwiftUI14ObservedObjectV7WrapperV"}],"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/projectedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injectedobject\/projectedvalue"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injectedobject/update().json b/docs/data/documentation/factory/injectedobject/update().json index d2bd7692..6469ddc4 100644 --- a/docs/data/documentation/factory/injectedobject/update().json +++ b/docs/data/documentation/factory/injectedobject/update().json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"mutating"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"update"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injectedobject\/update()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/update()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Inherited from "},{"type":"codeVoice","code":"DynamicProperty.update()"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"modules":[{"name":"Factory"}],"role":"symbol","title":"update()","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"update"},{"kind":"text","text":"()"}],"symbolKind":"method","externalID":"s:7SwiftUI15DynamicPropertyPAAE6updateyyF::SYNTHESIZED::s:7Factory14InjectedObjectV","extendedModule":"SwiftUI","platforms":[{"beta":false,"unavailable":false,"name":"iOS","introducedAt":"13.0","deprecated":false},{"beta":false,"unavailable":false,"name":"macOS","introducedAt":"10.15","deprecated":false},{"beta":false,"unavailable":false,"name":"tvOS","introducedAt":"13.0","deprecated":false},{"beta":false,"unavailable":false,"name":"watchOS","introducedAt":"6.0","deprecated":false}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject","doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"},"doc://Factory/documentation/Factory/InjectedObject/DynamicProperty-Implementations":{"role":"collectionGroup","title":"DynamicProperty Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/injectedobject\/dynamicproperty-implementations"},"doc://Factory/documentation/Factory/InjectedObject/update()":{"role":"symbol","title":"update()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"update"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/update()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injectedobject\/update()"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"mutating"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"update"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injectedobject\/update()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/update()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Inherited from "},{"type":"codeVoice","code":"DynamicProperty.update()"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"modules":[{"name":"Factory"}],"role":"symbol","title":"update()","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"update"},{"kind":"text","text":"()"}],"symbolKind":"method","externalID":"s:7SwiftUI15DynamicPropertyPAAE6updateyyF::SYNTHESIZED::s:7Factory14InjectedObjectV","extendedModule":"SwiftUI","platforms":[{"beta":false,"unavailable":false,"name":"iOS","introducedAt":"13.0","deprecated":false},{"beta":false,"unavailable":false,"name":"macOS","introducedAt":"10.15","deprecated":false},{"beta":false,"unavailable":false,"name":"tvOS","introducedAt":"13.0","deprecated":false},{"beta":false,"unavailable":false,"name":"watchOS","introducedAt":"6.0","deprecated":false}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject","doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations"]]},"references":{"doc://Factory/documentation/Factory/InjectedObject/update()":{"role":"symbol","title":"update()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"update"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/update()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injectedobject\/update()"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/InjectedObject/DynamicProperty-Implementations":{"role":"collectionGroup","title":"DynamicProperty Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/injectedobject\/dynamicproperty-implementations"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injectedobject/wrappedvalue.json b/docs/data/documentation/factory/injectedobject/wrappedvalue.json index 9e18adea..3ad09e2d 100644 --- a/docs/data/documentation/factory/injectedobject/wrappedvalue.json +++ b/docs/data/documentation/factory/injectedobject/wrappedvalue.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injectedobject\/wrappedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/wrappedValue","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"kind":"symbol","metadata":{"role":"symbol","title":"wrappedValue","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"symbolKind":"property","externalID":"s:7Factory14InjectedObjectV12wrappedValuexvp","modules":[{"name":"Factory"}],"platforms":[{"beta":false,"unavailable":false,"name":"iOS","introducedAt":"14.0","deprecated":false},{"beta":false,"unavailable":false,"name":"macOS","introducedAt":"11.0","deprecated":false},{"beta":false,"unavailable":false,"name":"tvOS","introducedAt":"14.0","deprecated":false},{"beta":false,"unavailable":false,"name":"watchOS","introducedAt":"7.0","deprecated":false}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"references":{"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"},"doc://Factory/documentation/Factory/InjectedObject/wrappedValue":{"role":"symbol","title":"wrappedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/wrappedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injectedobject\/wrappedvalue"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injectedobject\/wrappedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/wrappedValue","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"kind":"symbol","metadata":{"role":"symbol","title":"wrappedValue","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"symbolKind":"property","externalID":"s:7Factory14InjectedObjectV12wrappedValuexvp","modules":[{"name":"Factory"}],"platforms":[{"beta":false,"unavailable":false,"name":"iOS","introducedAt":"14.0","deprecated":false},{"beta":false,"unavailable":false,"name":"macOS","introducedAt":"11.0","deprecated":false},{"beta":false,"unavailable":false,"name":"tvOS","introducedAt":"14.0","deprecated":false},{"beta":false,"unavailable":false,"name":"watchOS","introducedAt":"7.0","deprecated":false}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"references":{"doc://Factory/documentation/Factory/InjectedObject/wrappedValue":{"role":"symbol","title":"wrappedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/wrappedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/injectedobject\/wrappedvalue"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/lazyinjected.json b/docs/data/documentation/factory/lazyinjected.json index ff45b532..767dee70 100644 --- a/docs/data/documentation/factory/lazyinjected.json +++ b/docs/data/documentation/factory/lazyinjected.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@propertyWrapper"},{"kind":"text","text":" "},{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Property wrappers implement an annotation pattern to resolving dependencies, similar to using"},{"type":"text","text":" "},{"type":"text","text":"EnvironmentObject in SwiftUI."}]},{"type":"codeListing","syntax":"swift","code":["class MyViewModel {"," @LazyInjected(\\.myService) var service"," @LazyInjected(\\MyCustomContainer.myService) var service","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The provided keypath resolves to a Factory definition on the "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" container required for each Container type."},{"type":"text","text":" "},{"type":"text","text":"The short version of the keyPath resolves to the default container, while the expanded version"},{"type":"text","text":" "},{"type":"text","text":"allows you to point an instance on your own customer container type."}]},{"style":"note","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Lazy injection is resolved the first time the dependency is referenced by the code, and "},{"type":"strong","inlineContent":[{"type":"text","text":"not"}]},{"type":"text","text":" on initialization."}]}],"type":"aside","name":"Note"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/lazyinjected"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"title":"LazyInjected","roleHeading":"Structure","role":"symbol","symbolKind":"struct","externalID":"s:7Factory12LazyInjectedV","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-1mer0","doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-8np9u"]},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/projectedValue","doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/wrappedValue"]},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolve(reset:)"]}],"references":{"doc://Factory/documentation/Factory/LazyInjected/projectedValue":{"role":"symbol","title":"projectedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"LazyInjected","preciseIdentifier":"s:7Factory12LazyInjectedV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/projectedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/lazyinjected\/projectedvalue"},"doc://Factory/documentation/Factory/LazyInjected/wrappedValue":{"role":"symbol","title":"wrappedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/wrappedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/lazyinjected\/wrappedvalue"},"doc://Factory/documentation/Factory/LazyInjected/resolve(reset:)":{"role":"symbol","title":"resolve(reset:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolve(reset:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/lazyinjected\/resolve(reset:)"},"doc://Factory/documentation/Factory/LazyInjected/init(_:)-8np9u":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-8np9u","kind":"symbol","type":"topic","url":"\/documentation\/factory\/lazyinjected\/init(_:)-8np9u"},"doc://Factory/documentation/Factory/LazyInjected":{"role":"symbol","title":"LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"url":"\/documentation\/factory\/lazyinjected"},"doc://Factory/documentation/Factory/LazyInjected/factory":{"role":"symbol","title":"factory","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/factory","kind":"symbol","type":"topic","url":"\/documentation\/factory\/lazyinjected\/factory"},"doc://Factory/documentation/Factory/LazyInjected/init(_:)-1mer0":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-1mer0","kind":"symbol","type":"topic","url":"\/documentation\/factory\/lazyinjected\/init(_:)-1mer0"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@propertyWrapper"},{"kind":"text","text":" "},{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Property wrappers implement an annotation pattern to resolving dependencies, similar to using"},{"type":"text","text":" "},{"type":"text","text":"EnvironmentObject in SwiftUI."}]},{"type":"codeListing","syntax":"swift","code":["class MyViewModel {"," @LazyInjected(\\.myService) var service"," @LazyInjected(\\MyCustomContainer.myService) var service","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The provided keypath resolves to a Factory definition on the "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" container required for each Container type."},{"type":"text","text":" "},{"type":"text","text":"The short version of the keyPath resolves to the default container, while the expanded version"},{"type":"text","text":" "},{"type":"text","text":"allows you to point an instance on your own customer container type."}]},{"style":"note","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Lazy injection is resolved the first time the dependency is referenced by the code, and "},{"type":"strong","inlineContent":[{"type":"text","text":"not"}]},{"type":"text","text":" on initialization."}]}],"type":"aside","name":"Note"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/lazyinjected"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"title":"LazyInjected","roleHeading":"Structure","role":"symbol","symbolKind":"struct","externalID":"s:7Factory12LazyInjectedV","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-1mer0","doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-8np9u"]},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/projectedValue","doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/wrappedValue"]},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolve(reset:)"]}],"references":{"doc://Factory/documentation/Factory/LazyInjected/resolve(reset:)":{"role":"symbol","title":"resolve(reset:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolve(reset:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/lazyinjected\/resolve(reset:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/LazyInjected":{"role":"symbol","title":"LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"url":"\/documentation\/factory\/lazyinjected"},"doc://Factory/documentation/Factory/LazyInjected/init(_:)-8np9u":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-8np9u","kind":"symbol","type":"topic","url":"\/documentation\/factory\/lazyinjected\/init(_:)-8np9u"},"doc://Factory/documentation/Factory/LazyInjected/projectedValue":{"role":"symbol","title":"projectedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"LazyInjected","preciseIdentifier":"s:7Factory12LazyInjectedV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/projectedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/lazyinjected\/projectedvalue"},"doc://Factory/documentation/Factory/LazyInjected/wrappedValue":{"role":"symbol","title":"wrappedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/wrappedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/lazyinjected\/wrappedvalue"},"doc://Factory/documentation/Factory/LazyInjected/factory":{"role":"symbol","title":"factory","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/factory","kind":"symbol","type":"topic","url":"\/documentation\/factory\/lazyinjected\/factory"},"doc://Factory/documentation/Factory/LazyInjected/init(_:)-1mer0":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-1mer0","kind":"symbol","type":"topic","url":"\/documentation\/factory\/lazyinjected\/init(_:)-1mer0"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/lazyinjected/factory.json b/docs/data/documentation/factory/lazyinjected/factory.json index 8f995415..7ce05dc6 100644 --- a/docs/data/documentation/factory/lazyinjected/factory.json +++ b/docs/data/documentation/factory/lazyinjected/factory.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"> { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/lazyinjected\/factory"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/factory","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"title":"factory","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory12LazyInjectedV7factoryA2AVyxGvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/LazyInjected/factory":{"role":"symbol","title":"factory","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/factory","kind":"symbol","type":"topic","url":"\/documentation\/factory\/lazyinjected\/factory"},"doc://Factory/documentation/Factory/LazyInjected":{"role":"symbol","title":"LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"url":"\/documentation\/factory\/lazyinjected"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"> { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/lazyinjected\/factory"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/factory","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"title":"factory","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory12LazyInjectedV7factoryA2AVyxGvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"references":{"doc://Factory/documentation/Factory/LazyInjected":{"role":"symbol","title":"LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"url":"\/documentation\/factory\/lazyinjected"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/LazyInjected/factory":{"role":"symbol","title":"factory","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/factory","kind":"symbol","type":"topic","url":"\/documentation\/factory\/lazyinjected\/factory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/lazyinjected/init(_:)-1mer0.json b/docs/data/documentation/factory/lazyinjected/init(_:)-1mer0.json index 417b6b57..f1ae5e25 100644 --- a/docs/data/documentation/factory/lazyinjected/init(_:)-1mer0.json +++ b/docs/data/documentation/factory/lazyinjected/init(_:)-1mer0.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","preciseIdentifier":"s:7Factory9ContainerC","text":"Container"},{"kind":"text","text":", "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"KeyPath to a Factory on the default Container."}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/lazyinjected\/init(_:)-1mer0"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-1mer0","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"title":"init(_:)","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory12LazyInjectedVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/LazyInjected/init(_:)-1mer0":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-1mer0","kind":"symbol","type":"topic","url":"\/documentation\/factory\/lazyinjected\/init(_:)-1mer0"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/LazyInjected":{"role":"symbol","title":"LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"url":"\/documentation\/factory\/lazyinjected"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","preciseIdentifier":"s:7Factory9ContainerC","text":"Container"},{"kind":"text","text":", "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"KeyPath to a Factory on the default Container."}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/lazyinjected\/init(_:)-1mer0"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-1mer0","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"title":"init(_:)","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory12LazyInjectedVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"references":{"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/LazyInjected":{"role":"symbol","title":"LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"url":"\/documentation\/factory\/lazyinjected"},"doc://Factory/documentation/Factory/LazyInjected/init(_:)-1mer0":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-1mer0","kind":"symbol","type":"topic","url":"\/documentation\/factory\/lazyinjected\/init(_:)-1mer0"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/lazyinjected/init(_:)-8np9u.json b/docs/data/documentation/factory/lazyinjected/init(_:)-8np9u.json index c042baf0..bcf0d4c2 100644 --- a/docs/data/documentation/factory/lazyinjected/init(_:)-8np9u.json +++ b/docs/data/documentation/factory/lazyinjected/init(_:)-8np9u.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>) "},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","preciseIdentifier":"s:7Factory15SharedContainerP","text":"SharedContainer"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"KeyPath to a Factory on the specified Container."}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/lazyinjected\/init(_:)-8np9u"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-8np9u","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"title":"init(_:)","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory12LazyInjectedVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/SharedContainer":{"role":"symbol","title":"SharedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"abstract":[{"type":"text","text":"SharedContainer defines the protocol all Containers must adopt if they want to support Service Locator style injection or support any of the injection property wrappers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"url":"\/documentation\/factory\/sharedcontainer"},"doc://Factory/documentation/Factory/LazyInjected/init(_:)-8np9u":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-8np9u","kind":"symbol","type":"topic","url":"\/documentation\/factory\/lazyinjected\/init(_:)-8np9u"},"doc://Factory/documentation/Factory/LazyInjected":{"role":"symbol","title":"LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"url":"\/documentation\/factory\/lazyinjected"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>) "},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","preciseIdentifier":"s:7Factory15SharedContainerP","text":"SharedContainer"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"KeyPath to a Factory on the specified Container."}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/lazyinjected\/init(_:)-8np9u"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-8np9u","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"title":"init(_:)","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory12LazyInjectedVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"references":{"doc://Factory/documentation/Factory/LazyInjected":{"role":"symbol","title":"LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"url":"\/documentation\/factory\/lazyinjected"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/SharedContainer":{"role":"symbol","title":"SharedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"abstract":[{"type":"text","text":"SharedContainer defines the protocol all Containers must adopt if they want to support Service Locator style injection or support any of the injection property wrappers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"url":"\/documentation\/factory\/sharedcontainer"},"doc://Factory/documentation/Factory/LazyInjected/init(_:)-8np9u":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-8np9u","kind":"symbol","type":"topic","url":"\/documentation\/factory\/lazyinjected\/init(_:)-8np9u"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/lazyinjected/resolve(reset:).json b/docs/data/documentation/factory/lazyinjected/resolve(reset:).json index a792ffe0..0e46df65 100644 --- a/docs/data/documentation/factory/lazyinjected/resolve(reset:).json +++ b/docs/data/documentation/factory/lazyinjected/resolve(reset:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"mutating"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":" "},{"kind":"internalParam","text":"options"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":" = .none)"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/lazyinjected\/resolve(reset:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolve(reset:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"title":"resolve(reset:)","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:7Factory12LazyInjectedV7resolve5resetyAA0A12ResetOptionsO_tF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"references":{"doc://Factory/documentation/Factory/LazyInjected/resolve(reset:)":{"role":"symbol","title":"resolve(reset:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolve(reset:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/lazyinjected\/resolve(reset:)"},"doc://Factory/documentation/Factory/LazyInjected":{"role":"symbol","title":"LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"url":"\/documentation\/factory\/lazyinjected"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"mutating"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":" "},{"kind":"internalParam","text":"options"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":" = .none)"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/lazyinjected\/resolve(reset:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolve(reset:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"title":"resolve(reset:)","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:7Factory12LazyInjectedV7resolve5resetyAA0A12ResetOptionsO_tF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"references":{"doc://Factory/documentation/Factory/LazyInjected/resolve(reset:)":{"role":"symbol","title":"resolve(reset:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolve(reset:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/lazyinjected\/resolve(reset:)"},"doc://Factory/documentation/Factory/LazyInjected":{"role":"symbol","title":"LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"url":"\/documentation\/factory\/lazyinjected"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/lazyinjected/wrappedvalue.json b/docs/data/documentation/factory/lazyinjected/wrappedvalue.json index a0fccf12..f570f8ad 100644 --- a/docs/data/documentation/factory/lazyinjected/wrappedvalue.json +++ b/docs/data/documentation/factory/lazyinjected/wrappedvalue.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":" { "},{"kind":"keyword","text":"mutating"},{"kind":"text","text":" "},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/lazyinjected\/wrappedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/wrappedValue","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"title":"wrappedValue","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory12LazyInjectedV12wrappedValuexvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"references":{"doc://Factory/documentation/Factory/LazyInjected":{"role":"symbol","title":"LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"url":"\/documentation\/factory\/lazyinjected"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/LazyInjected/wrappedValue":{"role":"symbol","title":"wrappedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/wrappedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/lazyinjected\/wrappedvalue"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":" { "},{"kind":"keyword","text":"mutating"},{"kind":"text","text":" "},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/lazyinjected\/wrappedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/wrappedValue","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"title":"wrappedValue","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory12LazyInjectedV12wrappedValuexvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"references":{"doc://Factory/documentation/Factory/LazyInjected":{"role":"symbol","title":"LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"url":"\/documentation\/factory\/lazyinjected"},"doc://Factory/documentation/Factory/LazyInjected/wrappedValue":{"role":"symbol","title":"wrappedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/wrappedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/lazyinjected\/wrappedvalue"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/managedcontainer.json b/docs/data/documentation/factory/managedcontainer.json index 0095f4ec..3d312796 100644 --- a/docs/data/documentation/factory/managedcontainer.json +++ b/docs/data/documentation/factory/managedcontainer.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"},{"kind":"text","text":" : AnyObject"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If a container only supports ManagedContainer then the container must be instantiated and passed as an instance. Here’s"},{"type":"text","text":" "},{"type":"text","text":"an example of passing such a container to a view model for dependency resolution."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel {"," let service: MyServiceType"," init(container: Container) {"," service = container.service()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers"},{"type":"text","text":" for more information."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/managedcontainer"],"traits":[{"interfaceLanguage":"swift"}]}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/SharedContainer"],"kind":"relationships","title":"Inherited By","type":"inheritedBy"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container"],"kind":"relationships","title":"Conforming Types","type":"conformingTypes"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"title":"ManagedContainer","roleHeading":"Protocol","role":"symbol","symbolKind":"protocol","externalID":"s:7Factory16ManagedContainerP","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/manager"]},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-40gvj","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-6h19","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/decorator(_:)","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/with(_:)"]}],"references":{"doc://Factory/documentation/Factory/SharedContainer":{"role":"symbol","title":"SharedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"abstract":[{"type":"text","text":"SharedContainer defines the protocol all Containers must adopt if they want to support Service Locator style injection or support any of the injection property wrappers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"url":"\/documentation\/factory\/sharedcontainer"},"doc://Factory/documentation/Factory/ManagedContainer/promised(key:)":{"role":"symbol","title":"promised(key:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory where registration is promised before resolution."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/managedcontainer\/promised(key:)"},"doc://Factory/documentation/Factory/ManagedContainer/with(_:)":{"role":"symbol","title":"with(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"with"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Defines a with function to allow container transformation on assignment."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/with(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/managedcontainer\/with(_:)"},"doc://Factory/documentation/Factory/ManagedContainer":{"role":"symbol","title":"ManagedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory/Containers":{"role":"article","title":"Containers","abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","kind":"article","type":"topic","url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory/ManagedContainer/callAsFunction(key:_:)-6h19":{"role":"symbol","title":"callAsFunction(key:_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-6h19","kind":"symbol","type":"topic","url":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-6h19"},"doc://Factory/documentation/Factory/ManagedContainer/decorator(_:)":{"role":"symbol","title":"decorator(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"((("},{"kind":"keyword","text":"Any"},{"kind":"text","text":") -> ())?)"}],"abstract":[{"type":"text","text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/decorator(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/managedcontainer\/decorator(_:)"},"doc://Factory/documentation/Factory/ManagedContainer/callAsFunction(key:_:)-40gvj":{"role":"symbol","title":"callAsFunction(key:_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound ParameterFactory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-40gvj","kind":"symbol","type":"topic","url":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-40gvj"},"doc://Factory/documentation/Factory/ManagedContainer/manager":{"role":"symbol","title":"manager","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC"}],"abstract":[{"type":"text","text":"Defines the ContainerManager used to manage registrations, resolutions, and scope caching for that container. Encapsulating the code in"},{"type":"text","text":" "},{"type":"text","text":"this fashion makes creating and using your own custom containers much simpler."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/manager","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/managedcontainer\/manager"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"},{"kind":"text","text":" : AnyObject"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If a container only supports ManagedContainer then the container must be instantiated and passed as an instance. Here’s"},{"type":"text","text":" "},{"type":"text","text":"an example of passing such a container to a view model for dependency resolution."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel {"," let service: MyServiceType"," init(container: Container) {"," service = container.service()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers"},{"type":"text","text":" for more information."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/managedcontainer"],"traits":[{"interfaceLanguage":"swift"}]}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/SharedContainer"],"kind":"relationships","title":"Inherited By","type":"inheritedBy"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container"],"kind":"relationships","title":"Conforming Types","type":"conformingTypes"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"title":"ManagedContainer","roleHeading":"Protocol","role":"symbol","symbolKind":"protocol","externalID":"s:7Factory16ManagedContainerP","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/manager"]},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-40gvj","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-6h19","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/decorator(_:)","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/with(_:)"]}],"references":{"doc://Factory/documentation/Factory/ManagedContainer/with(_:)":{"role":"symbol","title":"with(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"with"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Defines a with function to allow container transformation on assignment."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/with(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/managedcontainer\/with(_:)"},"doc://Factory/documentation/Factory/SharedContainer":{"role":"symbol","title":"SharedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"abstract":[{"type":"text","text":"SharedContainer defines the protocol all Containers must adopt if they want to support Service Locator style injection or support any of the injection property wrappers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"url":"\/documentation\/factory\/sharedcontainer"},"doc://Factory/documentation/Factory/ManagedContainer/callAsFunction(key:_:)-40gvj":{"role":"symbol","title":"callAsFunction(key:_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound ParameterFactory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-40gvj","kind":"symbol","type":"topic","url":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-40gvj"},"doc://Factory/documentation/Factory/ManagedContainer/manager":{"role":"symbol","title":"manager","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC"}],"abstract":[{"type":"text","text":"Defines the ContainerManager used to manage registrations, resolutions, and scope caching for that container. Encapsulating the code in"},{"type":"text","text":" "},{"type":"text","text":"this fashion makes creating and using your own custom containers much simpler."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/manager","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/managedcontainer\/manager"},"doc://Factory/documentation/Factory/ManagedContainer/promised(key:)":{"role":"symbol","title":"promised(key:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory where registration is promised before resolution."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/managedcontainer\/promised(key:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ManagedContainer":{"role":"symbol","title":"ManagedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/Containers":{"role":"article","title":"Containers","abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","kind":"article","type":"topic","url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory/ManagedContainer/callAsFunction(key:_:)-6h19":{"role":"symbol","title":"callAsFunction(key:_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-6h19","kind":"symbol","type":"topic","url":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-6h19"},"doc://Factory/documentation/Factory/ManagedContainer/decorator(_:)":{"role":"symbol","title":"decorator(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"((("},{"kind":"keyword","text":"Any"},{"kind":"text","text":") -> ())?)"}],"abstract":[{"type":"text","text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/decorator(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/managedcontainer\/decorator(_:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/managedcontainer/callasfunction(key:_:)-40gvj.json b/docs/data/documentation/factory/managedcontainer/callasfunction(key:_:)-40gvj.json index e7e60031..76674233 100644 --- a/docs/data/documentation/factory/managedcontainer/callasfunction(key:_:)-40gvj.json +++ b/docs/data/documentation/factory/managedcontainer/callasfunction(key:_:)-40gvj.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":" = "},{"kind":"keyword","text":"#function"},{"kind":"text","text":", "},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-40gvj"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-40gvj","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound ParameterFactory."}],"kind":"symbol","metadata":{"role":"symbol","title":"callAsFunction(key:_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"symbolKind":"method","externalID":"s:7Factory16ManagedContainerPAAE14callAsFunction3key_AA09ParameterA0Vyqd__qd_0_GSS_qd_0_qd__ctr0_lF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"references":{"doc://Factory/documentation/Factory/ManagedContainer":{"role":"symbol","title":"ManagedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory/ManagedContainer/callAsFunction(key:_:)-40gvj":{"role":"symbol","title":"callAsFunction(key:_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound ParameterFactory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-40gvj","kind":"symbol","type":"topic","url":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-40gvj"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":" = "},{"kind":"keyword","text":"#function"},{"kind":"text","text":", "},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-40gvj"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-40gvj","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound ParameterFactory."}],"kind":"symbol","metadata":{"role":"symbol","title":"callAsFunction(key:_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"symbolKind":"method","externalID":"s:7Factory16ManagedContainerPAAE14callAsFunction3key_AA09ParameterA0Vyqd__qd_0_GSS_qd_0_qd__ctr0_lF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ManagedContainer/callAsFunction(key:_:)-40gvj":{"role":"symbol","title":"callAsFunction(key:_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound ParameterFactory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-40gvj","kind":"symbol","type":"topic","url":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-40gvj"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ManagedContainer":{"role":"symbol","title":"ManagedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"url":"\/documentation\/factory\/managedcontainer"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/managedcontainer/decorator(_:).json b/docs/data/documentation/factory/managedcontainer/decorator(_:).json index 0018e2dc..0ab76d49 100644 --- a/docs/data/documentation/factory/managedcontainer/decorator(_:).json +++ b/docs/data/documentation/factory/managedcontainer/decorator(_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"decorator"},{"kind":"text","text":": (("},{"kind":"keyword","text":"Any"},{"kind":"text","text":") -> ())?)"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/managedcontainer\/decorator(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/decorator(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container."}],"kind":"symbol","metadata":{"role":"symbol","title":"decorator(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"((("},{"kind":"keyword","text":"Any"},{"kind":"text","text":") -> ())?)"}],"symbolKind":"method","externalID":"s:7Factory16ManagedContainerPAAE9decoratoryyyypcSgF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"references":{"doc://Factory/documentation/Factory/ManagedContainer":{"role":"symbol","title":"ManagedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory/ManagedContainer/decorator(_:)":{"role":"symbol","title":"decorator(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"((("},{"kind":"keyword","text":"Any"},{"kind":"text","text":") -> ())?)"}],"abstract":[{"type":"text","text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/decorator(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/managedcontainer\/decorator(_:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"decorator"},{"kind":"text","text":": (("},{"kind":"keyword","text":"Any"},{"kind":"text","text":") -> ())?)"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/managedcontainer\/decorator(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/decorator(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container."}],"kind":"symbol","metadata":{"role":"symbol","title":"decorator(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"((("},{"kind":"keyword","text":"Any"},{"kind":"text","text":") -> ())?)"}],"symbolKind":"method","externalID":"s:7Factory16ManagedContainerPAAE9decoratoryyyypcSgF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"references":{"doc://Factory/documentation/Factory/ManagedContainer":{"role":"symbol","title":"ManagedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ManagedContainer/decorator(_:)":{"role":"symbol","title":"decorator(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"((("},{"kind":"keyword","text":"Any"},{"kind":"text","text":") -> ())?)"}],"abstract":[{"type":"text","text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/decorator(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/managedcontainer\/decorator(_:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/managedcontainer/manager.json b/docs/data/documentation/factory/managedcontainer/manager.json index 82cf8987..58fc90ad 100644 --- a/docs/data/documentation/factory/managedcontainer/manager.json +++ b/docs/data/documentation/factory/managedcontainer/manager.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC","text":"ContainerManager"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/managedcontainer\/manager"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/manager","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Defines the ContainerManager used to manage registrations, resolutions, and scope caching for that container. Encapsulating the code in"},{"type":"text","text":" "},{"type":"text","text":"this fashion makes creating and using your own custom containers much simpler."}],"kind":"symbol","metadata":{"role":"symbol","title":"manager","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC"}],"symbolKind":"property","externalID":"s:7Factory16ManagedContainerP7managerAA0C7ManagerCvp","required":true,"modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"references":{"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"},"doc://Factory/documentation/Factory/ManagedContainer":{"role":"symbol","title":"ManagedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ManagedContainer/manager":{"role":"symbol","title":"manager","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC"}],"abstract":[{"type":"text","text":"Defines the ContainerManager used to manage registrations, resolutions, and scope caching for that container. Encapsulating the code in"},{"type":"text","text":" "},{"type":"text","text":"this fashion makes creating and using your own custom containers much simpler."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/manager","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/managedcontainer\/manager"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC","text":"ContainerManager"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/managedcontainer\/manager"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/manager","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Defines the ContainerManager used to manage registrations, resolutions, and scope caching for that container. Encapsulating the code in"},{"type":"text","text":" "},{"type":"text","text":"this fashion makes creating and using your own custom containers much simpler."}],"kind":"symbol","metadata":{"role":"symbol","title":"manager","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC"}],"symbolKind":"property","externalID":"s:7Factory16ManagedContainerP7managerAA0C7ManagerCvp","required":true,"modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ContainerManager":{"role":"symbol","title":"ContainerManager","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"},"doc://Factory/documentation/Factory/ManagedContainer":{"role":"symbol","title":"ManagedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory/ManagedContainer/manager":{"role":"symbol","title":"manager","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC"}],"abstract":[{"type":"text","text":"Defines the ContainerManager used to manage registrations, resolutions, and scope caching for that container. Encapsulating the code in"},{"type":"text","text":" "},{"type":"text","text":"this fashion makes creating and using your own custom containers much simpler."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/manager","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/managedcontainer\/manager"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/managedcontainer/promised(key:).json b/docs/data/documentation/factory/managedcontainer/promised(key:).json index c9e20afa..31e00930 100644 --- a/docs/data/documentation/factory/managedcontainer/promised(key:).json +++ b/docs/data/documentation/factory/managedcontainer/promised(key:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":" = "},{"kind":"keyword","text":"#function"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/managedcontainer\/promised(key:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory where registration is promised before resolution."}],"kind":"symbol","metadata":{"role":"symbol","title":"promised(key:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"symbolKind":"method","externalID":"s:7Factory16ManagedContainerPAAE8promised3keyA2AVyqd__SgGSS_tlF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ManagedContainer/promised(key:)":{"role":"symbol","title":"promised(key:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory where registration is promised before resolution."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/managedcontainer\/promised(key:)"},"doc://Factory/documentation/Factory/ManagedContainer":{"role":"symbol","title":"ManagedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":" = "},{"kind":"keyword","text":"#function"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/managedcontainer\/promised(key:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory where registration is promised before resolution."}],"kind":"symbol","metadata":{"role":"symbol","title":"promised(key:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"symbolKind":"method","externalID":"s:7Factory16ManagedContainerPAAE8promised3keyA2AVyqd__SgGSS_tlF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"references":{"doc://Factory/documentation/Factory/ManagedContainer/promised(key:)":{"role":"symbol","title":"promised(key:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory where registration is promised before resolution."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/managedcontainer\/promised(key:)"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ManagedContainer":{"role":"symbol","title":"ManagedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"url":"\/documentation\/factory\/managedcontainer"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/managedcontainer/with(_:).json b/docs/data/documentation/factory/managedcontainer/with(_:).json index f606bc22..2fb222ab 100644 --- a/docs/data/documentation/factory/managedcontainer/with(_:).json +++ b/docs/data/documentation/factory/managedcontainer/with(_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"with"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"transform"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/managedcontainer\/with(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/with(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Defines a with function to allow container transformation on assignment."}],"kind":"symbol","metadata":{"role":"symbol","title":"with(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"with"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory16ManagedContainerPAAE4withyxyxXEF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ManagedContainer":{"role":"symbol","title":"ManagedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory/ManagedContainer/with(_:)":{"role":"symbol","title":"with(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"with"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Defines a with function to allow container transformation on assignment."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/with(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/managedcontainer\/with(_:)"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"with"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"transform"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/managedcontainer\/with(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/with(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Defines a with function to allow container transformation on assignment."}],"kind":"symbol","metadata":{"role":"symbol","title":"with(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"with"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory16ManagedContainerPAAE4withyxyxXEF","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ManagedContainer/with(_:)":{"role":"symbol","title":"with(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"with"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Defines a with function to allow container transformation on assignment."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/with(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/managedcontainer\/with(_:)"},"doc://Factory/documentation/Factory/ManagedContainer":{"role":"symbol","title":"ManagedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"url":"\/documentation\/factory\/managedcontainer"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/migration.json b/docs/data/documentation/factory/migration.json index 28a62a37..7cb97512 100644 --- a/docs/data/documentation/factory/migration.json +++ b/docs/data/documentation/factory/migration.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory 2.0 is planning for the future, and as such it needs to break from the past."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Containers in Factory 1.X were essentially namespaces, and not actual object instances that could be passed around. That made the overall syntax slightly cleaner, but the tradeoff resulted in a lack of functionality and the static class definitions prevented Factory from being used in anything other than a Service Locator role."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That wasn’t good."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So that changed in Factory 2.0. Instead of defining Factory’s as static variables on a class, they’re now defined and returned as computed variables on the container itself. And instances of a given container can be created and shared as needed."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s take a look."}]},{"anchor":"Defining-a-Factory","level":2,"type":"heading","text":"Defining a Factory"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Most container-based dependency injection systems require you to define that a given dependency is available for injection and many require some sort of factory or mechanism that will provide a new instance of the service when needed."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory, as you may have guessed from the name, is no exception. Here’s a simple registration that returns a "},{"type":"codeVoice","code":"ServiceType"},{"type":"text","text":" dependency."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We extended a Factory "},{"type":"codeVoice","code":"Container"},{"type":"text","text":" and within that container we defined a new computed variable of type "},{"type":"codeVoice","code":"Factory"},{"type":"text","text":". The type must be explicitly defined, and is usually a"},{"type":"text","text":" "},{"type":"text","text":"protocol to which the returned dependency conforms."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So our computed variable needs to return a Factory. But Factory’s are complex creatures. They need to communicate with their enclosing containers and they need to be provided with a closure that can be called to create an instance of our dependency when required."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As such, a complete, formal Factory definition would look like this…"}]},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," Factory(self, scope: .unique) { "," MyService()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But we can do better. Factory provides a bit of syntactic sugar that asks the enclosing container to make our factory for us."}]},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That Factory is then returned to the caller, usually to be evaluated (see "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()"},{"type":"text","text":"). Every time we resolve this factory we’ll get a new, unique instance of our object."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Just for reference, here’s are the Factory 1.x and 2.0 registration definitions side by side."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," \/\/ Factory 1.x"," static var service = Factory { MyService() }"," "," \/\/ Factory 2.0"," var service: Factory { self { MyService() } }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The new version is one character longer. Hey. I tried… ;)"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Like SwiftUI Views, Factory structs and modifiers are lightweight and transitory. In Factory 2.0 they’re created when needed and then immediately discarded once their purpose has been served."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers"},{"type":"text","text":" page for a lot more on the subject."}]},{"anchor":"Resolving-a-Factory","level":2,"type":"heading","text":"Resolving a Factory"},{"type":"paragraph","inlineContent":[{"type":"text","text":"To resolve a Factory and obtain an object or service of the desired type, one simply calls the Factory as a function. If you’re passing an instance of a container around to your views or view models, just call it directly."}]},{"type":"codeListing","syntax":"swift","code":["let service = container.service()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The resolved instance may be brand new or Factory may return a cached value from the specified "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We can also use the "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" container that’s provided for each and every container type."}]},{"type":"codeListing","syntax":"swift","code":["let service = Container.shared.service()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that this is fundamentally the same as the Service Locator pattern used in Factory 1.0."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ Factory 1.0 resolution","let service = Container.service()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Finally, you can also use the @Injected property wrapper. That’s changed too, and now uses keyPaths to indicate the desired dependency."}]},{"type":"codeListing","syntax":"swift","code":["@Injected(\\.service) var service: ServiceType"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The @Injected property wrapper looks for dependencies in the shared container, so this example is functionally identical to the "},{"type":"codeVoice","code":"Container.shared.service()"},{"type":"text","text":" version shown above."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected"},{"type":"text","text":", "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected"},{"type":"text","text":", "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"},{"type":"text","text":", and "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject"},{"type":"text","text":" for more."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ Factory 1.0 version for reference","@Injected(Container.service) var service: ServiceType"]},{"anchor":"Registering-a-new-Factory-closure","level":2,"type":"heading","text":"Registering a new Factory closure"},{"type":"paragraph","inlineContent":[{"type":"text","text":"What happens if we want to change the behavior of a Factory? What if the system changes during runtime, or what if we want our factory to provide mocks and testing doubles?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"It’s easy, and works pretty much the same as it did before. Just register a new closure with the Factory from its container."}]},{"type":"codeListing","syntax":"swift","code":["container.service.register {"," MockService()","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This new factory closure overrides the original factory closure and clears the associated scope so that the next time this factory is resolved Factory will evaluate the new closure and return an instance of the newly registered object instead."}]},{"style":"note","content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Warning"}]},{"type":"text","text":": Registration “overrides” and scope caches are stored in the associated container. If the container ever goes out of scope, so will all of its registrations."}]}],"type":"aside","name":"Note"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Again, see the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers"},{"type":"text","text":" page for a lot more on the subject."}]},{"anchor":"Scopes","level":2,"type":"heading","text":"Scopes"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Scopes behave exactly as they did before, although they’re now defined using a modifier syntax on the Factory."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var singletonService: Factory {"," self { MyService() }.singleton"," }"," var decoratedSharedService: Factory {"," self { MyService() }"," .shared"," .decorator { print(\"DECORATING \\($0.id)\") }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory 2.0 also provides additional modifiers for all of the known scoped, as well as a few more like the per-factory decorator shown above."}]},{"anchor":"Resetting","level":2,"type":"heading","text":"Resetting"},{"type":"paragraph","inlineContent":[{"type":"text","text":"When doing tests and in other situations it was relatively common to reset factories and factory scopes and we can still do that today. Again, it’s just the syntax that’s a little different."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Just keep in mind that in Factory 1.0 registrations and scopes were global, whereas today we ask our container to do the job for us."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ Reset everything based in that container.","Container.shared.manager.reset()","","\/\/ Reset all registrations, restoring original factories but leaving caches intact","Container.shared.manager.reset(options: .registration)","","\/\/ Reset all scope caches, leaving registrations intact","Container.shared.manager.reset(options: .scope)"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can also reset a specific scope cache while leaving the others intact."}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.manager.reset(scope: .cached)"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Resetting a container only affects that container."}]},{"anchor":"Creating-Custom-Containers-and-Scopes","level":2,"type":"heading","text":"Creating Custom Containers and Scopes"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Again, a bit different. Rather than duplicate the documentation for doing so, please checkout the appropriate section in the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers"},{"type":"text","text":" or "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes"},{"type":"text","text":" documentation."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/migration"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Migration","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Moving from 1.x to 2.0"}],"kind":"article","metadata":{"roleHeading":"Article","title":"Migration","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"references":{"doc://Factory/documentation/Factory/Containers":{"role":"article","title":"Containers","abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","kind":"article","type":"topic","url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Factory/callAsFunction()":{"role":"symbol","title":"callAsFunction()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Evaluates the factory and returns an object or service of the desired type. The resolved instance may be brand new or Factory may"},{"type":"text","text":" "},{"type":"text","text":"return a cached value from the specified scope."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/callasfunction()"},"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"},"doc://Factory/documentation/Factory/LazyInjected":{"role":"symbol","title":"LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"url":"\/documentation\/factory\/lazyinjected"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"url":"\/documentation\/factory\/weaklazyinjected"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory 2.0 is planning for the future, and as such it needs to break from the past."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Containers in Factory 1.X were essentially namespaces, and not actual object instances that could be passed around. That made the overall syntax slightly cleaner, but the tradeoff resulted in a lack of functionality and the static class definitions prevented Factory from being used in anything other than a Service Locator role."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That wasn’t good."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So that changed in Factory 2.0. Instead of defining Factory’s as static variables on a class, they’re now defined and returned as computed variables on the container itself. And instances of a given container can be created and shared as needed."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s take a look."}]},{"anchor":"Defining-a-Factory","level":2,"type":"heading","text":"Defining a Factory"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Most container-based dependency injection systems require you to define that a given dependency is available for injection and many require some sort of factory or mechanism that will provide a new instance of the service when needed."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory, as you may have guessed from the name, is no exception. Here’s a simple registration that returns a "},{"type":"codeVoice","code":"ServiceType"},{"type":"text","text":" dependency."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We extended a Factory "},{"type":"codeVoice","code":"Container"},{"type":"text","text":" and within that container we defined a new computed variable of type "},{"type":"codeVoice","code":"Factory"},{"type":"text","text":". The type must be explicitly defined, and is usually a"},{"type":"text","text":" "},{"type":"text","text":"protocol to which the returned dependency conforms."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So our computed variable needs to return a Factory. But Factory’s are complex creatures. They need to communicate with their enclosing containers and they need to be provided with a closure that can be called to create an instance of our dependency when required."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As such, a complete, formal Factory definition would look like this…"}]},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," Factory(self, scope: .unique) { "," MyService()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But we can do better. Factory provides a bit of syntactic sugar that asks the enclosing container to make our factory for us."}]},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That Factory is then returned to the caller, usually to be evaluated (see "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()"},{"type":"text","text":"). Every time we resolve this factory we’ll get a new, unique instance of our object."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Just for reference, here’s are the Factory 1.x and 2.0 registration definitions side by side."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," \/\/ Factory 1.x"," static var service = Factory { MyService() }"," "," \/\/ Factory 2.0"," var service: Factory { self { MyService() } }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The new version is one character longer. Hey. I tried… ;)"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Like SwiftUI Views, Factory structs and modifiers are lightweight and transitory. In Factory 2.0 they’re created when needed and then immediately discarded once their purpose has been served."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers"},{"type":"text","text":" page for a lot more on the subject."}]},{"anchor":"Resolving-a-Factory","level":2,"type":"heading","text":"Resolving a Factory"},{"type":"paragraph","inlineContent":[{"type":"text","text":"To resolve a Factory and obtain an object or service of the desired type, one simply calls the Factory as a function. If you’re passing an instance of a container around to your views or view models, just call it directly."}]},{"type":"codeListing","syntax":"swift","code":["let service = container.service()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The resolved instance may be brand new or Factory may return a cached value from the specified "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We can also use the "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" container that’s provided for each and every container type."}]},{"type":"codeListing","syntax":"swift","code":["let service = Container.shared.service()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that this is fundamentally the same as the Service Locator pattern used in Factory 1.0."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ Factory 1.0 resolution","let service = Container.service()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Finally, you can also use the @Injected property wrapper. That’s changed too, and now uses keyPaths to indicate the desired dependency."}]},{"type":"codeListing","syntax":"swift","code":["@Injected(\\.service) var service: ServiceType"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The @Injected property wrapper looks for dependencies in the shared container, so this example is functionally identical to the "},{"type":"codeVoice","code":"Container.shared.service()"},{"type":"text","text":" version shown above."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected"},{"type":"text","text":", "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected"},{"type":"text","text":", "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"},{"type":"text","text":", and "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject"},{"type":"text","text":" for more."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ Factory 1.0 version for reference","@Injected(Container.service) var service: ServiceType"]},{"anchor":"Registering-a-new-Factory-closure","level":2,"type":"heading","text":"Registering a new Factory closure"},{"type":"paragraph","inlineContent":[{"type":"text","text":"What happens if we want to change the behavior of a Factory? What if the system changes during runtime, or what if we want our factory to provide mocks and testing doubles?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"It’s easy, and works pretty much the same as it did before. Just register a new closure with the Factory from its container."}]},{"type":"codeListing","syntax":"swift","code":["container.service.register {"," MockService()","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This new factory closure overrides the original factory closure and clears the associated scope so that the next time this factory is resolved Factory will evaluate the new closure and return an instance of the newly registered object instead."}]},{"style":"note","content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Warning"}]},{"type":"text","text":": Registration “overrides” and scope caches are stored in the associated container. If the container ever goes out of scope, so will all of its registrations."}]}],"type":"aside","name":"Note"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Again, see the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers"},{"type":"text","text":" page for a lot more on the subject."}]},{"anchor":"Scopes","level":2,"type":"heading","text":"Scopes"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Scopes behave exactly as they did before, although they’re now defined using a modifier syntax on the Factory."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var singletonService: Factory {"," self { MyService() }.singleton"," }"," var decoratedSharedService: Factory {"," self { MyService() }"," .shared"," .decorator { print(\"DECORATING \\($0.id)\") }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory 2.0 also provides additional modifiers for all of the known scoped, as well as a few more like the per-factory decorator shown above."}]},{"anchor":"Resetting","level":2,"type":"heading","text":"Resetting"},{"type":"paragraph","inlineContent":[{"type":"text","text":"When doing tests and in other situations it was relatively common to reset factories and factory scopes and we can still do that today. Again, it’s just the syntax that’s a little different."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Just keep in mind that in Factory 1.0 registrations and scopes were global, whereas today we ask our container to do the job for us."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ Reset everything based in that container.","Container.shared.manager.reset()","","\/\/ Reset all registrations, restoring original factories but leaving caches intact","Container.shared.manager.reset(options: .registration)","","\/\/ Reset all scope caches, leaving registrations intact","Container.shared.manager.reset(options: .scope)"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can also reset a specific scope cache while leaving the others intact."}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.manager.reset(scope: .cached)"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Resetting a container only affects that container."}]},{"anchor":"Creating-Custom-Containers-and-Scopes","level":2,"type":"heading","text":"Creating Custom Containers and Scopes"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Again, a bit different. Rather than duplicate the documentation for doing so, please checkout the appropriate section in the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers"},{"type":"text","text":" or "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes"},{"type":"text","text":" documentation."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/migration"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Migration","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Moving from 1.x to 2.0"}],"kind":"article","metadata":{"roleHeading":"Article","title":"Migration","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"references":{"doc://Factory/documentation/Factory/Factory/callAsFunction()":{"role":"symbol","title":"callAsFunction()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Evaluates the factory and returns an object or service of the desired type. The resolved instance may be brand new or Factory may"},{"type":"text","text":" "},{"type":"text","text":"return a cached value from the specified scope."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/callasfunction()"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/LazyInjected":{"role":"symbol","title":"LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"url":"\/documentation\/factory\/lazyinjected"},"doc://Factory/documentation/Factory/Containers":{"role":"article","title":"Containers","abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","kind":"article","type":"topic","url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"url":"\/documentation\/factory\/weaklazyinjected"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/modifiers.json b/docs/data/documentation/factory/modifiers.json index 89f9e794..5fc9bcfb 100644 --- a/docs/data/documentation/factory/modifiers.json +++ b/docs/data/documentation/factory/modifiers.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"When Factory was redesigned for Factory 2.0 the decision was made to provide many of Factory’s configuration options using a modifier syntax similar to that of SwiftUI."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Modifiers make it easy to define a Factory’s options in the Factory registration…"}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public func myService: Factory() {"," self { MyService() }"," .singleton"," .onTest { MockAnalyticsEngine() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"After the fact, when the application runs…"}]},{"type":"codeListing","syntax":"swift","code":["extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," myService"," .onArg(\"mock0\") { EmptyService() }"," .onArg(\"mock1\") { MockServiceN(1) }"," .onArg(\"error\") { MockError(404) }"," #endif"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or even under direct program control…"}]},{"type":"codeListing","syntax":"swift","code":["func logout() {"," ..."," Container.shared.userProviding.register { nil }"," ...","}"]},{"anchor":"Modifiers","level":2,"type":"heading","text":"Modifiers"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory provides quite a few modifiers for your use, but they basically break down into a few different categories:"}]},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Scopes: Defines just how long a particular dependency persists."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Registrations: Updating or changing the dependency to be provided."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Contexts: Defines Factory overrides that should occur when the app is running is a specific context."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Decorators: Defines code to be run whenever a dependency is resolved."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Resets: Reseting a Factory’s registrations or scope cache."}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Plus a few more, but that covers most of them."}]},{"anchor":"Resolving-a-Factory","level":2,"type":"heading","text":"Resolving a Factory"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As mentioned in "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted"},{"type":"text","text":", there are many ways to resolve a Factory. Here’s a simple example that resolves the "},{"type":"codeVoice","code":"myService"},{"type":"text","text":" Factory we defined above."}]},{"type":"codeListing","syntax":"swift","code":["let myService = Container.shared.myService()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This code asks "},{"type":"codeVoice","code":"Container.shared.myService"},{"type":"text","text":" for a Factory, and then asks the Factory to resolve itself using its "},{"type":"codeVoice","code":"callAsFunction"},{"type":"text","text":" resolution shortcut."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But consider the original definition."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public func myService: Factory() {"," self { MyService() }"," .singleton"," .onTest { MockAnalyticsEngine() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"myService"},{"type":"text","text":" variable is a computed function."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"When it’s ’called, the "},{"type":"codeVoice","code":"self { MyService() }"},{"type":"text","text":" code asks the parent container to build a Factory with the passed closure. That Factory is modified with a scope option, and then again with an "},{"type":"codeVoice","code":"onTest"},{"type":"text","text":" context modifier."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That fully configure Factory is what’s returned to the caller, either to be modified further, or resolved as we’ve done here."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That may seem like a lot of overhead, but it actually isn’t. As we’ve mentioned elsewhere, Factory’s are like SwiftUI Views. Its structs and modifiers are lightweight and transitory value types, created when needed and then immediately discarded once their purpose has been served."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"There is, however, one consideration."}]},{"anchor":"The-Factory-Wins","level":2,"type":"heading","text":"The Factory Wins"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s say, for example, that we run the following code to change the factory context during a unit test."}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.myService.onTest { NullAnalyticsEngine() }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And then a bit further down we resolve our service."}]},{"type":"codeListing","syntax":"swift","code":["let myService = Container.shared.myService()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now the question is: Do we now have an instance of "},{"type":"codeVoice","code":"NullAnalyticsEngine"},{"type":"text","text":", or "},{"type":"codeVoice","code":"MockAnalyticsEngine"},{"type":"text","text":"?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As may be apparent from the section title, we actually have an instance of "},{"type":"codeVoice","code":"MockAnalyticsEngine"},{"type":"text","text":". But why? Didn’t we just change it?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We did. But then we called "},{"type":"codeVoice","code":"Container.shared.myService"},{"type":"text","text":" again, which built a new Factory, which defined a scope, and which once more "},{"type":"strong","inlineContent":[{"type":"text","text":"defined"}]},{"type":"text","text":" "},{"type":"codeVoice","code":"onTest"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And so Factory went with it’s most recent definition."}]},{"anchor":"SwiftUI","level":2,"type":"heading","text":"SwiftUI"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Similar behavior can be seen in SwiftUI itself."}]},{"type":"codeListing","syntax":"swift","code":["struct innerView: View {"," var body: some View {"," Text(\"Hello\")"," .foregroundColor(.red)"," }","}","struct outerView: View {"," var body: some View {"," innerView()"," .foregroundColor(.green)"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here the color of the “Hello” text is red, despite our attempt to override it. The innermost bound property wins."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So what can we do?"}]},{"anchor":"External-Setup","level":2,"type":"heading","text":"External Setup"},{"type":"paragraph","inlineContent":[{"type":"text","text":"One solution is to be careful what we put inside our factory definition."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public func myService: Factory() {"," self { MyService() }"," .singleton"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And then we add anything we might want to change later as an externally defined option."}]},{"type":"codeListing","syntax":"swift","code":["extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," myService"," .onTest { MockAnalyticsEngine() }"," #endif"," }","}"]},{"anchor":"Chaining","level":2,"type":"heading","text":"Chaining"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Another solution that might work in some circumstances is chaining."}]},{"type":"codeListing","syntax":"swift","code":["let myService = Container.shared.myService"," .onTest { NullAnalyticsEngine() }"," .()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This way the internal definitions are applied, then onTest is updated, and then we immediately resolve the service using the latest definition."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or we can use a new modifier added to Factory 2.1."}]},{"anchor":"Once","level":2,"type":"heading","text":"Once"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"once"},{"type":"text","text":" modifier basically tells the system that anything that occurs before it should only be done "},{"type":"strong","inlineContent":[{"type":"text","text":"once"}]}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public func myService: Factory() {"," self { MyService() }"," .singleton"," .onTest { MockAnalyticsEngine() }"," .once()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So when we do:"}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.myService.onTest { NullAnalyticsEngine() }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Our Factory is constructed, the singleton is applied, the internal onTest is applied, and then the new onTest is applied."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And then later, when we resolve our service."}]},{"type":"codeListing","syntax":"swift","code":["let myService = Container.shared.myService()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Our Factory is constructed, but the internal singleton modifier has already occurred once, so it’s ignored, keeping the current value. Similarly, the internal onTest has already occurred once, so it too is ignored, again maintaining the current value."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Which means that we get our "},{"type":"codeVoice","code":"NullAnalyticsEngine"},{"type":"text","text":", just like we wanted."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Once is a useful tool to have around, but in reality it’s probably best simply to be careful in regard to what goes into our basic Factory definition."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/modifiers"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"kind":"article","metadata":{"roleHeading":"Article","title":"Factory Modifiers","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Advanced Topics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Design","doc:\/\/Factory\/documentation\/Factory\/Modules","doc:\/\/Factory\/documentation\/Factory\/Cycle","doc:\/\/Factory\/documentation\/Factory\/Optionals","doc:\/\/Factory\/documentation\/Factory\/Functional","doc:\/\/Factory\/documentation\/Factory\/Tags"],"generated":true}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Optionals":{"role":"article","title":"Optionals and Dynamic Registration","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","kind":"article","type":"topic","url":"\/documentation\/factory\/optionals"},"doc://Factory/documentation/Factory/Functional":{"role":"article","title":"Functional Injection","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","kind":"article","type":"topic","url":"\/documentation\/factory\/functional"},"doc://Factory/documentation/Factory/Tags":{"role":"article","title":"Tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","kind":"article","type":"topic","url":"\/documentation\/factory\/tags"},"doc://Factory/documentation/Factory/GettingStarted":{"role":"collectionGroup","title":"Getting Started","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","kind":"article","type":"topic","url":"\/documentation\/factory\/gettingstarted"},"doc://Factory/documentation/Factory/Cycle":{"role":"article","title":"Resolution Cycles","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","type":"topic","url":"\/documentation\/factory\/cycle"},"doc://Factory/documentation/Factory/Modules":{"role":"article","title":"Modular Development","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","kind":"article","type":"topic","url":"\/documentation\/factory\/modules"},"doc://Factory/documentation/Factory/Design":{"role":"article","title":"Designing Factory","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","kind":"article","type":"topic","url":"\/documentation\/factory\/design"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"When Factory was redesigned for Factory 2.0 the decision was made to provide many of Factory’s configuration options using a modifier syntax similar to that of SwiftUI."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Modifiers make it easy to define a Factory’s options in the Factory registration…"}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public func myService: Factory() {"," self { MyService() }"," .singleton"," .onTest { MockAnalyticsEngine() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"After the fact, when the application runs…"}]},{"type":"codeListing","syntax":"swift","code":["extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," myService"," .onArg(\"mock0\") { EmptyService() }"," .onArg(\"mock1\") { MockServiceN(1) }"," .onArg(\"error\") { MockError(404) }"," #endif"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or even under direct program control…"}]},{"type":"codeListing","syntax":"swift","code":["func logout() {"," ..."," Container.shared.userProviding.register { nil }"," ...","}"]},{"anchor":"Modifiers","level":2,"type":"heading","text":"Modifiers"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory provides quite a few modifiers for your use, but they basically break down into a few different categories:"}]},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Scopes: Defines just how long a particular dependency persists."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Registrations: Updating or changing the dependency to be provided."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Contexts: Defines Factory overrides that should occur when the app is running is a specific context."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Decorators: Defines code to be run whenever a dependency is resolved."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Resets: Reseting a Factory’s registrations or scope cache."}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Plus a few more, but that covers most of them."}]},{"anchor":"Resolving-a-Factory","level":2,"type":"heading","text":"Resolving a Factory"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As mentioned in "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted"},{"type":"text","text":", there are many ways to resolve a Factory. Here’s a simple example that resolves the "},{"type":"codeVoice","code":"myService"},{"type":"text","text":" Factory we defined above."}]},{"type":"codeListing","syntax":"swift","code":["let myService = Container.shared.myService()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This code asks "},{"type":"codeVoice","code":"Container.shared.myService"},{"type":"text","text":" for a Factory, and then asks the Factory to resolve itself using its "},{"type":"codeVoice","code":"callAsFunction"},{"type":"text","text":" resolution shortcut."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But consider the original definition."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public func myService: Factory() {"," self { MyService() }"," .singleton"," .onTest { MockAnalyticsEngine() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"myService"},{"type":"text","text":" variable is a computed function."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"When it’s ’called, the "},{"type":"codeVoice","code":"self { MyService() }"},{"type":"text","text":" code asks the parent container to build a Factory with the passed closure. That Factory is modified with a scope option, and then again with an "},{"type":"codeVoice","code":"onTest"},{"type":"text","text":" context modifier."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That fully configure Factory is what’s returned to the caller, either to be modified further, or resolved as we’ve done here."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That may seem like a lot of overhead, but it actually isn’t. As we’ve mentioned elsewhere, Factory’s are like SwiftUI Views. Its structs and modifiers are lightweight and transitory value types, created when needed and then immediately discarded once their purpose has been served."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"There is, however, one consideration."}]},{"anchor":"The-Factory-Wins","level":2,"type":"heading","text":"The Factory Wins"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s say, for example, that we run the following code to change the factory context during a unit test."}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.myService.onTest { NullAnalyticsEngine() }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And then a bit further down we resolve our service."}]},{"type":"codeListing","syntax":"swift","code":["let myService = Container.shared.myService()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now the question is: Do we now have an instance of "},{"type":"codeVoice","code":"NullAnalyticsEngine"},{"type":"text","text":", or "},{"type":"codeVoice","code":"MockAnalyticsEngine"},{"type":"text","text":"?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As may be apparent from the section title, we actually have an instance of "},{"type":"codeVoice","code":"MockAnalyticsEngine"},{"type":"text","text":". But why? Didn’t we just change it?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We did. But then we called "},{"type":"codeVoice","code":"Container.shared.myService"},{"type":"text","text":" again, which built a new Factory, which defined a scope, and which once more "},{"type":"strong","inlineContent":[{"type":"text","text":"defined"}]},{"type":"text","text":" "},{"type":"codeVoice","code":"onTest"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And so Factory went with it’s most recent definition."}]},{"anchor":"SwiftUI","level":2,"type":"heading","text":"SwiftUI"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Similar behavior can be seen in SwiftUI itself."}]},{"type":"codeListing","syntax":"swift","code":["struct innerView: View {"," var body: some View {"," Text(\"Hello\")"," .foregroundColor(.red)"," }","}","struct outerView: View {"," var body: some View {"," innerView()"," .foregroundColor(.green)"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here the color of the “Hello” text is red, despite our attempt to override it. The innermost bound property wins."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So what can we do?"}]},{"anchor":"External-Setup","level":2,"type":"heading","text":"External Setup"},{"type":"paragraph","inlineContent":[{"type":"text","text":"One solution is to be careful what we put inside our factory definition."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public func myService: Factory() {"," self { MyService() }"," .singleton"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And then we add anything we might want to change later as an externally defined option."}]},{"type":"codeListing","syntax":"swift","code":["extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," myService"," .onTest { MockAnalyticsEngine() }"," #endif"," }","}"]},{"anchor":"Chaining","level":2,"type":"heading","text":"Chaining"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Another solution that might work in some circumstances is chaining."}]},{"type":"codeListing","syntax":"swift","code":["let myService = Container.shared.myService"," .onTest { NullAnalyticsEngine() }"," .()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This way the internal definitions are applied, then onTest is updated, and then we immediately resolve the service using the latest definition."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or we can use a new modifier added to Factory 2.1."}]},{"anchor":"Once","level":2,"type":"heading","text":"Once"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"once"},{"type":"text","text":" modifier basically tells the system that anything that occurs before it should only be done "},{"type":"strong","inlineContent":[{"type":"text","text":"once"}]}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public func myService: Factory() {"," self { MyService() }"," .singleton"," .onTest { MockAnalyticsEngine() }"," .once()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So when we do:"}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.myService.onTest { NullAnalyticsEngine() }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Our Factory is constructed, the singleton is applied, the internal onTest is applied, and then the new onTest is applied."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And then later, when we resolve our service."}]},{"type":"codeListing","syntax":"swift","code":["let myService = Container.shared.myService()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Our Factory is constructed, but the internal singleton modifier has already occurred once, so it’s ignored, keeping the current value. Similarly, the internal onTest has already occurred once, so it too is ignored, again maintaining the current value."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Which means that we get our "},{"type":"codeVoice","code":"NullAnalyticsEngine"},{"type":"text","text":", just like we wanted."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Once is a useful tool to have around, but in reality it’s probably best simply to be careful in regard to what goes into our basic Factory definition."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/modifiers"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"kind":"article","metadata":{"roleHeading":"Article","title":"Factory Modifiers","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Advanced Topics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Design","doc:\/\/Factory\/documentation\/Factory\/Modules","doc:\/\/Factory\/documentation\/Factory\/Cycle","doc:\/\/Factory\/documentation\/Factory\/Optionals","doc:\/\/Factory\/documentation\/Factory\/Functional","doc:\/\/Factory\/documentation\/Factory\/Tags"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Tags":{"role":"article","title":"Tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","kind":"article","type":"topic","url":"\/documentation\/factory\/tags"},"doc://Factory/documentation/Factory/Modules":{"role":"article","title":"Modular Development","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","kind":"article","type":"topic","url":"\/documentation\/factory\/modules"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Optionals":{"role":"article","title":"Optionals and Dynamic Registration","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","kind":"article","type":"topic","url":"\/documentation\/factory\/optionals"},"doc://Factory/documentation/Factory/Cycle":{"role":"article","title":"Resolution Cycles","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","type":"topic","url":"\/documentation\/factory\/cycle"},"doc://Factory/documentation/Factory/Design":{"role":"article","title":"Designing Factory","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","kind":"article","type":"topic","url":"\/documentation\/factory\/design"},"doc://Factory/documentation/Factory/Functional":{"role":"article","title":"Functional Injection","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","kind":"article","type":"topic","url":"\/documentation\/factory\/functional"},"doc://Factory/documentation/Factory/GettingStarted":{"role":"collectionGroup","title":"Getting Started","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","kind":"article","type":"topic","url":"\/documentation\/factory\/gettingstarted"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/modules.json b/docs/data/documentation/factory/modules.json index 34989f6f..b85141ed 100644 --- a/docs/data/documentation/factory/modules.json +++ b/docs/data/documentation/factory/modules.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"When you want to use a dependency injection system like Factory with multiple modules you often run into a “Who’s on first” dilemma."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s say that we have a ModuleP which specifies an abstract AccountLoading protocol."}]},{"type":"codeListing","syntax":"swift","code":["public protocol AccountLoading {"," func load() -> [Account]","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Next, we have an accounting module, ModuleA, that displays our accounts, but needs one of those loaders to load them."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Moving on, we have one last module, let’s call this one ModuleB, that knows how to build loaders of any type that we need."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And, finally, we have our application itself."}]},{"type":"paragraph","inlineContent":[{"type":"image","identifier":"MultiModule"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that ModuleA and ModuleB are independent. Neither one knows about the other one, but both have a direct dependency on ModuleP, our master of models and protocols."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This is a classic modular contractural pattern."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But we have an application to build. So how can ModuleA get an instance of an account loader, when it knows nothing about ModuleB?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s take a look."}]},{"anchor":"Implementation-in-same-module-as-protocol","level":2,"type":"heading","text":"Implementation in same module as protocol"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Before we answer the above question, let’s look at a related, but simpler problem."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s say we have a module called Networking that provides (surprise, surprise) a service that conforms to a Networking protocol. Let’s also say that module "},{"type":"emphasis","inlineContent":[{"type":"text","text":"also"}]},{"type":"text","text":" provides the implementation of that service."}]},{"type":"paragraph","inlineContent":[{"type":"image","identifier":"Networking"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"In which case our implementation is quite simple. Inside Networking we define the public protocol "},{"type":"emphasis","inlineContent":[{"type":"text","text":"and"}]},{"type":"text","text":" we publicly define the Factory that provides it."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ Public Protocol","public protocol Networking {"," func load() async throws -> T","}","","\/\/ Public Factory","extension Container {"," public var network: Factory { self { Network() } }","}","","\/\/ Private Implementation","private class Network: Networking {"," public func load() async throws -> T {"," ..."," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that our implementation is private and hidden from the rest of the world, which can only see and receive some instance that conforms to Networking."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Got it? Anything that can see our protocol can "},{"type":"emphasis","inlineContent":[{"type":"text","text":"also"}]},{"type":"text","text":" see a source that provides an instance of it."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So with that, let’s return to our originally scheduled program."}]},{"anchor":"Implementation-in-different-module-from-protocol","level":2,"type":"heading","text":"Implementation in different module from protocol"},{"type":"paragraph","inlineContent":[{"type":"text","text":"To recap, we have a protocol that’s defined in ModuleP and the concrete type AccountLoader exists in ModuleB… but ModuleA doesn’t know about it. It can’t know about."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But the code in ModuleA needs to be able to see a Factory in order to resolve it. And that Factory must have a definition, but it can’t, because it can’t see ModuleB."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Who’s on first?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"It’s a dilemma, but fortunately it’s not a serious one. The solution is twofold."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"First, everyone imports Factory. From an architectural perspective, the dependency injection system is an invisible layer that lives above and wraps around everything else."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Next, we implement part of the “same module” solution shown above, but with a twist, adding the following Factory definition to "},{"type":"strong","inlineContent":[{"type":"text","text":"ModuleP"}]},{"type":"text","text":"."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ Public Factory","extension Container {"," public var accountLoading: Factory { self { nil } }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now, as with our earlier solution, anyone who imports ModuleP can see the protocol and can also see a Factory that promises to provide one."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That Factory, however, doesn’t know how to construct one, so its definition is optional, and its factory closure just returns nil."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now we’re cooking. But where does our missing ingredient come from?"}]},{"anchor":"Wiring-Things-Together","level":2,"type":"heading","text":"Wiring Things Together"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Since our application is the only piece of the puzzle that can see ModuleP, ModuleA, "},{"type":"emphasis","inlineContent":[{"type":"text","text":"and"}]},{"type":"text","text":" ModuleB, it’s up to the application to wire everything together."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So let’s go into our main application and create a spot where we can cross-wire all of the pieces together."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The key to the puzzle is "},{"type":"codeVoice","code":"AutoRegistering"},{"type":"text","text":", a container-based protocol which defines a function that’s guaranteed to be called before any Factory is resolved."}]},{"type":"codeListing","syntax":"swift","code":["import ModuleP","import ModuleA","import ModuleB","","extension Container: AutoRegistering {"," func autoRegister {"," accountLoader.register { AccountLoader() }"," ..."," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Since this file can see all of the modules, it’s tasked with registering a new factory closure for "},{"type":"codeVoice","code":"accountLoader"},{"type":"text","text":" that provides the actual instance of "},{"type":"codeVoice","code":"AccountLoader"},{"type":"text","text":" from ModuleB."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And… that’s it. Prior to the first resolution Factory will call "},{"type":"codeVoice","code":"autoRegister"},{"type":"text","text":" in order to setup everything needed for the application to run."}]},{"anchor":"Optionals","level":2,"type":"heading","text":"Optionals"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that our code will need to account for the optional service in actual use."}]},{"type":"codeListing","syntax":"swift","code":["class ViewModel: ObservableObject {"," @Injected(\\.accountLoader) var loader"," @Published var accounts: [Account] = []"," func load() {"," guard let loader else { return }"," accounts = loader.load()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But that one line is the price we pay for compile-time safety. Should we fail to cross-wire a module dependency, our application isn’t going to crash. It may not run correctly, but it isn’t going to crash."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"AutomaticRegistration.swift"},{"type":"text","text":" file in the demo application illustrates a few examples of the cross-module registration technique. Check it out."}]},{"anchor":"Explicitly-Unwrapped-Optionals","level":2,"type":"heading","text":"Explicitly Unwrapped Optionals"},{"type":"paragraph","inlineContent":[{"type":"text","text":"We could, of course, do the following."}]},{"type":"codeListing","syntax":"swift","code":["class ViewModel: ObservableObject {"," @Injected(\\.accountLoader) var loader: AccountLoading!"," @Published var accounts: [Account] = []"," func load() {"," accounts = loader.load()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We could… but let’s not do that, shall we? Explicitly unwrapping the optional works if we’ve wired everything together, but could crash if we haven’t."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Which sort of defeats Factory’s primary goal in life - Safety."}]},{"anchor":"Promises","level":2,"type":"heading","text":"Promises"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Some might worry that an developer might slip up and forget to provide a needed registration. While that’s certainly possible, the probability is that you’d tend to notice such a thing the first time you tried to test a new feature."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"One "},{"type":"emphasis","inlineContent":[{"type":"text","text":"could"}]},{"type":"text","text":" also do something like the following …"}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public var accountLoading: Factory { self { fatalError() } }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Which provides the factory closure with "},{"type":"codeVoice","code":"fatalError"},{"type":"text","text":" that will cause the application to crash the very first time an unregistered Factory is accessed. And some people actually prefer this “fail fast” approach."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But the problem of course, is what happens if the application is shipped and the registration was never provided? Or was accidentally removed? In either case the end user goes to screen X, the view model for that screen tries to get an accountLoader… and the application crashes."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Not a good look. Fortunately, Factory 2.1 provides a solution."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public var accountLoading: Factory { promised() }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"When run in debug mode and the application attempts to resolve an unregistered accountLoader, "},{"type":"codeVoice","code":"promised()"},{"type":"text","text":" will trigger a fatalError to inform you of the mistake. But in a released application, "},{"type":"codeVoice","code":"promised()"},{"type":"text","text":" simply returns nil and your application can continue on."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The feature still won’t work of course, but at least the application won’t blow up and crash, possibly taking some of your user’s data with it."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Promised also cleans up Factory registrations, a nice win that eliminates the rather odd looking "},{"type":"codeVoice","code":"self { nil }"},{"type":"text","text":" requirement."}]},{"anchor":"Separating-Dependencies","level":2,"type":"heading","text":"Separating Dependencies"},{"type":"paragraph","inlineContent":[{"type":"text","text":"There could well be some cases where ModuleP wants to be truely independent and simply "},{"type":"emphasis","inlineContent":[{"type":"text","text":"can’t"}]},{"type":"text","text":" depend on Factory."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"In those cases, we’re going to need a level of indirection."}]},{"type":"paragraph","inlineContent":[{"type":"image","identifier":"Services"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Everyone sees what they saw before, plus everyone who’s dependent on ModuleP can also see a new module called "},{"type":"codeVoice","code":"Services"},{"type":"text","text":" which is a new cross-module framework where our empty registrations are defined. "},{"type":"codeVoice","code":"Services"},{"type":"text","text":" in turn, can only see ModuleP in order to get the model and protocol definitions it needs to create its Factory’s."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Our original "},{"type":"codeVoice","code":"accountLoading"},{"type":"text","text":" Factory, which lived in ModuleP in the original example, now lives in Services."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ Public Factory","extension Container {"," public var accountLoading: Factory { self { nil } }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And the application, which can see everything, cross wires the various service registrations provided by "},{"type":"codeVoice","code":"Services"},{"type":"text","text":" together, just as it did before."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"ModuleP is now completely independent."}]},{"anchor":"Adaptors","level":2,"type":"heading","text":"Adaptors"},{"type":"paragraph","inlineContent":[{"type":"text","text":"There’s one last case, that of using some third party library."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"In that case, we’re often better off implementing an adaptor protocol to wrap the library and provide an agnostic, independent interface to its functionality."}]},{"type":"paragraph","inlineContent":[{"type":"image","identifier":"Adaptor"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This is a good approach to take when faced with third-party analytics libraries or feature managers like LaunchDarkly."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ Public Protocol","public protocol Analytics {"," func event(location: String, name: String)","}","","\/\/ Public Factory","extension Container {"," public var analytics: Factory { self { AnalyticsAdaptor() } }","}","","\/\/ Private Implementation","private class AnalyticsAdaptor: Analytics {"," public func event(location: String, name: String) {"," \/\/ talk to analytics library"," }","}"]},{"anchor":"Mix-and-Match","level":2,"type":"heading","text":"Mix and Match"},{"type":"paragraph","inlineContent":[{"type":"text","text":"In a real world application where multiple modules provide varying sets of features and services, one would probably use all of the techniques mentioned here."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Some modules benefit from the cross-module wiring approach, while other service modules and adaptors can simply provide the public protocols and internal implementations as shown above in the first and last examples."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/modules"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Modules","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"kind":"article","metadata":{"roleHeading":"Article","title":"Modular Development","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Advanced Topics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Design","doc:\/\/Factory\/documentation\/Factory\/Modifiers","doc:\/\/Factory\/documentation\/Factory\/Cycle","doc:\/\/Factory\/documentation\/Factory\/Optionals","doc:\/\/Factory\/documentation\/Factory\/Functional","doc:\/\/Factory\/documentation\/Factory\/Tags"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Optionals":{"role":"article","title":"Optionals and Dynamic Registration","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","kind":"article","type":"topic","url":"\/documentation\/factory\/optionals"},"MultiModule":{"alt":"Diagram of Application Architecture","type":"image","identifier":"MultiModule","variants":[{"url":"\/images\/MultiModule.png","traits":["1x","light"]}]},"Adaptor":{"alt":"Diagram of Application Architecture","type":"image","identifier":"Adaptor","variants":[{"url":"\/images\/Adaptor.png","traits":["1x","light"]}]},"Networking":{"alt":"Diagram of Application Architecture","type":"image","identifier":"Networking","variants":[{"url":"\/images\/Networking.png","traits":["1x","light"]}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Tags":{"role":"article","title":"Tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","kind":"article","type":"topic","url":"\/documentation\/factory\/tags"},"Services":{"alt":"Diagram of Application Architecture","type":"image","identifier":"Services","variants":[{"url":"\/images\/Services.png","traits":["1x","light"]}]},"doc://Factory/documentation/Factory/Functional":{"role":"article","title":"Functional Injection","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","kind":"article","type":"topic","url":"\/documentation\/factory\/functional"},"doc://Factory/documentation/Factory/Design":{"role":"article","title":"Designing Factory","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","kind":"article","type":"topic","url":"\/documentation\/factory\/design"},"doc://Factory/documentation/Factory/Cycle":{"role":"article","title":"Resolution Cycles","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","type":"topic","url":"\/documentation\/factory\/cycle"},"doc://Factory/documentation/Factory/Modifiers":{"role":"article","title":"Factory Modifiers","abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","kind":"article","type":"topic","url":"\/documentation\/factory\/modifiers"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"When you want to use a dependency injection system like Factory with multiple modules you often run into a “Who’s on first” dilemma."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s say that we have a ModuleP which specifies an abstract AccountLoading protocol."}]},{"type":"codeListing","syntax":"swift","code":["public protocol AccountLoading {"," func load() -> [Account]","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Next, we have an accounting module, ModuleA, that displays our accounts, but needs one of those loaders to load them."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Moving on, we have one last module, let’s call this one ModuleB, that knows how to build loaders of any type that we need."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And, finally, we have our application itself."}]},{"type":"paragraph","inlineContent":[{"type":"image","identifier":"MultiModule"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that ModuleA and ModuleB are independent. Neither one knows about the other one, but both have a direct dependency on ModuleP, our master of models and protocols."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This is a classic modular contractural pattern."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But we have an application to build. So how can ModuleA get an instance of an account loader, when it knows nothing about ModuleB?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s take a look."}]},{"anchor":"Implementation-in-same-module-as-protocol","level":2,"type":"heading","text":"Implementation in same module as protocol"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Before we answer the above question, let’s look at a related, but simpler problem."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s say we have a module called Networking that provides (surprise, surprise) a service that conforms to a Networking protocol. Let’s also say that module "},{"type":"emphasis","inlineContent":[{"type":"text","text":"also"}]},{"type":"text","text":" provides the implementation of that service."}]},{"type":"paragraph","inlineContent":[{"type":"image","identifier":"Networking"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"In which case our implementation is quite simple. Inside Networking we define the public protocol "},{"type":"emphasis","inlineContent":[{"type":"text","text":"and"}]},{"type":"text","text":" we publicly define the Factory that provides it."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ Public Protocol","public protocol Networking {"," func load() async throws -> T","}","","\/\/ Public Factory","extension Container {"," public var network: Factory { self { Network() } }","}","","\/\/ Private Implementation","private class Network: Networking {"," public func load() async throws -> T {"," ..."," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that our implementation is private and hidden from the rest of the world, which can only see and receive some instance that conforms to Networking."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Got it? Anything that can see our protocol can "},{"type":"emphasis","inlineContent":[{"type":"text","text":"also"}]},{"type":"text","text":" see a source that provides an instance of it."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So with that, let’s return to our originally scheduled program."}]},{"anchor":"Implementation-in-different-module-from-protocol","level":2,"type":"heading","text":"Implementation in different module from protocol"},{"type":"paragraph","inlineContent":[{"type":"text","text":"To recap, we have a protocol that’s defined in ModuleP and the concrete type AccountLoader exists in ModuleB… but ModuleA doesn’t know about it. It can’t know about."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But the code in ModuleA needs to be able to see a Factory in order to resolve it. And that Factory must have a definition, but it can’t, because it can’t see ModuleB."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Who’s on first?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"It’s a dilemma, but fortunately it’s not a serious one. The solution is twofold."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"First, everyone imports Factory. From an architectural perspective, the dependency injection system is an invisible layer that lives above and wraps around everything else."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Next, we implement part of the “same module” solution shown above, but with a twist, adding the following Factory definition to "},{"type":"strong","inlineContent":[{"type":"text","text":"ModuleP"}]},{"type":"text","text":"."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ Public Factory","extension Container {"," public var accountLoading: Factory { self { nil } }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now, as with our earlier solution, anyone who imports ModuleP can see the protocol and can also see a Factory that promises to provide one."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That Factory, however, doesn’t know how to construct one, so its definition is optional, and its factory closure just returns nil."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now we’re cooking. But where does our missing ingredient come from?"}]},{"anchor":"Wiring-Things-Together","level":2,"type":"heading","text":"Wiring Things Together"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Since our application is the only piece of the puzzle that can see ModuleP, ModuleA, "},{"type":"emphasis","inlineContent":[{"type":"text","text":"and"}]},{"type":"text","text":" ModuleB, it’s up to the application to wire everything together."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So let’s go into our main application and create a spot where we can cross-wire all of the pieces together."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The key to the puzzle is "},{"type":"codeVoice","code":"AutoRegistering"},{"type":"text","text":", a container-based protocol which defines a function that’s guaranteed to be called before any Factory is resolved."}]},{"type":"codeListing","syntax":"swift","code":["import ModuleP","import ModuleA","import ModuleB","","extension Container: AutoRegistering {"," func autoRegister {"," accountLoader.register { AccountLoader() }"," ..."," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Since this file can see all of the modules, it’s tasked with registering a new factory closure for "},{"type":"codeVoice","code":"accountLoader"},{"type":"text","text":" that provides the actual instance of "},{"type":"codeVoice","code":"AccountLoader"},{"type":"text","text":" from ModuleB."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And… that’s it. Prior to the first resolution Factory will call "},{"type":"codeVoice","code":"autoRegister"},{"type":"text","text":" in order to setup everything needed for the application to run."}]},{"anchor":"Optionals","level":2,"type":"heading","text":"Optionals"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that our code will need to account for the optional service in actual use."}]},{"type":"codeListing","syntax":"swift","code":["class ViewModel: ObservableObject {"," @Injected(\\.accountLoader) var loader"," @Published var accounts: [Account] = []"," func load() {"," guard let loader else { return }"," accounts = loader.load()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But that one line is the price we pay for compile-time safety. Should we fail to cross-wire a module dependency, our application isn’t going to crash. It may not run correctly, but it isn’t going to crash."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"AutomaticRegistration.swift"},{"type":"text","text":" file in the demo application illustrates a few examples of the cross-module registration technique. Check it out."}]},{"anchor":"Explicitly-Unwrapped-Optionals","level":2,"type":"heading","text":"Explicitly Unwrapped Optionals"},{"type":"paragraph","inlineContent":[{"type":"text","text":"We could, of course, do the following."}]},{"type":"codeListing","syntax":"swift","code":["class ViewModel: ObservableObject {"," @Injected(\\.accountLoader) var loader: AccountLoading!"," @Published var accounts: [Account] = []"," func load() {"," accounts = loader.load()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We could… but let’s not do that, shall we? Explicitly unwrapping the optional works if we’ve wired everything together, but could crash if we haven’t."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Which sort of defeats Factory’s primary goal in life - Safety."}]},{"anchor":"Promises","level":2,"type":"heading","text":"Promises"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Some might worry that an developer might slip up and forget to provide a needed registration. While that’s certainly possible, the probability is that you’d tend to notice such a thing the first time you tried to test a new feature."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"One "},{"type":"emphasis","inlineContent":[{"type":"text","text":"could"}]},{"type":"text","text":" also do something like the following …"}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public var accountLoading: Factory { self { fatalError() } }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Which provides the factory closure with "},{"type":"codeVoice","code":"fatalError"},{"type":"text","text":" that will cause the application to crash the very first time an unregistered Factory is accessed. And some people actually prefer this “fail fast” approach."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But the problem of course, is what happens if the application is shipped and the registration was never provided? Or was accidentally removed? In either case the end user goes to screen X, the view model for that screen tries to get an accountLoader… and the application crashes."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Not a good look. Fortunately, Factory 2.1 provides a solution."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public var accountLoading: Factory { promised() }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"When run in debug mode and the application attempts to resolve an unregistered accountLoader, "},{"type":"codeVoice","code":"promised()"},{"type":"text","text":" will trigger a fatalError to inform you of the mistake. But in a released application, "},{"type":"codeVoice","code":"promised()"},{"type":"text","text":" simply returns nil and your application can continue on."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The feature still won’t work of course, but at least the application won’t blow up and crash, possibly taking some of your user’s data with it."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Promised also cleans up Factory registrations, a nice win that eliminates the rather odd looking "},{"type":"codeVoice","code":"self { nil }"},{"type":"text","text":" requirement."}]},{"anchor":"Separating-Dependencies","level":2,"type":"heading","text":"Separating Dependencies"},{"type":"paragraph","inlineContent":[{"type":"text","text":"There could well be some cases where ModuleP wants to be truely independent and simply "},{"type":"emphasis","inlineContent":[{"type":"text","text":"can’t"}]},{"type":"text","text":" depend on Factory."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"In those cases, we’re going to need a level of indirection."}]},{"type":"paragraph","inlineContent":[{"type":"image","identifier":"Services"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Everyone sees what they saw before, plus everyone who’s dependent on ModuleP can also see a new module called "},{"type":"codeVoice","code":"Services"},{"type":"text","text":" which is a new cross-module framework where our empty registrations are defined. "},{"type":"codeVoice","code":"Services"},{"type":"text","text":" in turn, can only see ModuleP in order to get the model and protocol definitions it needs to create its Factory’s."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Our original "},{"type":"codeVoice","code":"accountLoading"},{"type":"text","text":" Factory, which lived in ModuleP in the original example, now lives in Services."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ Public Factory","extension Container {"," public var accountLoading: Factory { self { nil } }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And the application, which can see everything, cross wires the various service registrations provided by "},{"type":"codeVoice","code":"Services"},{"type":"text","text":" together, just as it did before."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"ModuleP is now completely independent."}]},{"anchor":"Adaptors","level":2,"type":"heading","text":"Adaptors"},{"type":"paragraph","inlineContent":[{"type":"text","text":"There’s one last case, that of using some third party library."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"In that case, we’re often better off implementing an adaptor protocol to wrap the library and provide an agnostic, independent interface to its functionality."}]},{"type":"paragraph","inlineContent":[{"type":"image","identifier":"Adaptor"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This is a good approach to take when faced with third-party analytics libraries or feature managers like LaunchDarkly."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ Public Protocol","public protocol Analytics {"," func event(location: String, name: String)","}","","\/\/ Public Factory","extension Container {"," public var analytics: Factory { self { AnalyticsAdaptor() } }","}","","\/\/ Private Implementation","private class AnalyticsAdaptor: Analytics {"," public func event(location: String, name: String) {"," \/\/ talk to analytics library"," }","}"]},{"anchor":"Mix-and-Match","level":2,"type":"heading","text":"Mix and Match"},{"type":"paragraph","inlineContent":[{"type":"text","text":"In a real world application where multiple modules provide varying sets of features and services, one would probably use all of the techniques mentioned here."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Some modules benefit from the cross-module wiring approach, while other service modules and adaptors can simply provide the public protocols and internal implementations as shown above in the first and last examples."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/modules"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Modules","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"kind":"article","metadata":{"roleHeading":"Article","title":"Modular Development","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Advanced Topics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Design","doc:\/\/Factory\/documentation\/Factory\/Modifiers","doc:\/\/Factory\/documentation\/Factory\/Cycle","doc:\/\/Factory\/documentation\/Factory\/Optionals","doc:\/\/Factory\/documentation\/Factory\/Functional","doc:\/\/Factory\/documentation\/Factory\/Tags"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Optionals":{"role":"article","title":"Optionals and Dynamic Registration","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","kind":"article","type":"topic","url":"\/documentation\/factory\/optionals"},"doc://Factory/documentation/Factory/Modifiers":{"role":"article","title":"Factory Modifiers","abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","kind":"article","type":"topic","url":"\/documentation\/factory\/modifiers"},"doc://Factory/documentation/Factory/Design":{"role":"article","title":"Designing Factory","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","kind":"article","type":"topic","url":"\/documentation\/factory\/design"},"Adaptor":{"alt":"Diagram of Application Architecture","type":"image","identifier":"Adaptor","variants":[{"url":"\/images\/Adaptor.png","traits":["1x","light"]}]},"Networking":{"alt":"Diagram of Application Architecture","type":"image","identifier":"Networking","variants":[{"url":"\/images\/Networking.png","traits":["1x","light"]}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Functional":{"role":"article","title":"Functional Injection","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","kind":"article","type":"topic","url":"\/documentation\/factory\/functional"},"doc://Factory/documentation/Factory/Tags":{"role":"article","title":"Tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","kind":"article","type":"topic","url":"\/documentation\/factory\/tags"},"MultiModule":{"alt":"Diagram of Application Architecture","type":"image","identifier":"MultiModule","variants":[{"url":"\/images\/MultiModule.png","traits":["1x","light"]}]},"Services":{"alt":"Diagram of Application Architecture","type":"image","identifier":"Services","variants":[{"url":"\/images\/Services.png","traits":["1x","light"]}]},"doc://Factory/documentation/Factory/Cycle":{"role":"article","title":"Resolution Cycles","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","type":"topic","url":"\/documentation\/factory\/cycle"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/optionals.json b/docs/data/documentation/factory/optionals.json index 15f53011..7f727e6f 100644 --- a/docs/data/documentation/factory/optionals.json +++ b/docs/data/documentation/factory/optionals.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Optional Factory definitions have several uses, including:"}]},{"type":"orderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Dynamic Registration - Providing Factory’s based on application state."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Multiple-Module Registration - Registering Factory’s across modules to avoid cross-cutting concerns."}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s take a look."}]},{"anchor":"Dynamic-Registration","level":2,"type":"heading","text":"Dynamic Registration"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Consider the following optional factory."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," let userProviding = Factory { self { nil } }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Looks strange, right? I mean, of what use is a Factory that returns nothing?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now let’s take a look at a dynamic registration in action."}]},{"type":"codeListing","syntax":"swift","code":["func authenticated(with user: User) {"," ..."," Container.shared.userProviding.register { UserProvider(user: user) }"," ...","}","","func logout() {"," ..."," Container.shared.userProviding.reset()"," ...","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now any view model or service that needs an instance of an authenticated user will receive one (or nothing if no user is authenticated)."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s an example:"}]},{"type":"codeListing","syntax":"swift","code":["class SomeViewModel: ObservableObject {"," @Injected(\\.userProviding) private let provider"," func update(email: String) {"," provider?.updateEmailAddress(email)"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The injected provider is optional by default since the Factory was defined that way."}]},{"anchor":"Explicitly-Unwrapped-Optionals","level":2,"type":"heading","text":"Explicitly Unwrapped Optionals"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that you "},{"type":"emphasis","inlineContent":[{"type":"text","text":"could"}]},{"type":"text","text":" explicitly unwrap the optional…"}]},{"type":"codeListing","syntax":"swift","code":["@Injected(\\.userProviding) private let provider: UserProviding!"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But doing so violates the core premise on which Factory was built in the first place: "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Your code is guaranteed to be safe."}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"I’d advise against it."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"A few other things here. First, note that we used "},{"type":"codeVoice","code":"@Injected"},{"type":"text","text":" to supply an optional type. We don’t need a "},{"type":"codeVoice","code":"@OptionalInjected"},{"type":"text","text":" property wrapper to do this as we did in Resolver. Same for "},{"type":"codeVoice","code":"@LazyInjected"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And also note that calling register also "},{"type":"emphasis","inlineContent":[{"type":"text","text":"removes any cached dependency from its associated scope."}]},{"type":"text","text":" This ensures that any new dependency injection request performed from that point on will always get the most recently defined instance of an object."}]},{"anchor":"Optionals-and-Multiple-Modules","level":2,"type":"heading","text":"Optionals and Multiple Modules"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This technique can also be handy when doing registrations in a project with multiple modules. It’s a bit complex, so there’s an entire page devoted to it."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules"},{"type":"text","text":" for more."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/optionals"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Optionals","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"kind":"article","metadata":{"roleHeading":"Article","title":"Optionals and Dynamic Registration","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Advanced Topics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Design","doc:\/\/Factory\/documentation\/Factory\/Modifiers","doc:\/\/Factory\/documentation\/Factory\/Modules","doc:\/\/Factory\/documentation\/Factory\/Cycle","doc:\/\/Factory\/documentation\/Factory\/Functional","doc:\/\/Factory\/documentation\/Factory\/Tags"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Modifiers":{"role":"article","title":"Factory Modifiers","abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","kind":"article","type":"topic","url":"\/documentation\/factory\/modifiers"},"doc://Factory/documentation/Factory/Functional":{"role":"article","title":"Functional Injection","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","kind":"article","type":"topic","url":"\/documentation\/factory\/functional"},"doc://Factory/documentation/Factory/Tags":{"role":"article","title":"Tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","kind":"article","type":"topic","url":"\/documentation\/factory\/tags"},"doc://Factory/documentation/Factory/Modules":{"role":"article","title":"Modular Development","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","kind":"article","type":"topic","url":"\/documentation\/factory\/modules"},"doc://Factory/documentation/Factory/Cycle":{"role":"article","title":"Resolution Cycles","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","type":"topic","url":"\/documentation\/factory\/cycle"},"doc://Factory/documentation/Factory/Design":{"role":"article","title":"Designing Factory","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","kind":"article","type":"topic","url":"\/documentation\/factory\/design"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Optional Factory definitions have several uses, including:"}]},{"type":"orderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Dynamic Registration - Providing Factory’s based on application state."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Multiple-Module Registration - Registering Factory’s across modules to avoid cross-cutting concerns."}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s take a look."}]},{"anchor":"Dynamic-Registration","level":2,"type":"heading","text":"Dynamic Registration"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Consider the following optional factory."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," let userProviding = Factory { self { nil } }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Looks strange, right? I mean, of what use is a Factory that returns nothing?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now let’s take a look at a dynamic registration in action."}]},{"type":"codeListing","syntax":"swift","code":["func authenticated(with user: User) {"," ..."," Container.shared.userProviding.register { UserProvider(user: user) }"," ...","}","","func logout() {"," ..."," Container.shared.userProviding.reset()"," ...","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now any view model or service that needs an instance of an authenticated user will receive one (or nothing if no user is authenticated)."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s an example:"}]},{"type":"codeListing","syntax":"swift","code":["class SomeViewModel: ObservableObject {"," @Injected(\\.userProviding) private let provider"," func update(email: String) {"," provider?.updateEmailAddress(email)"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The injected provider is optional by default since the Factory was defined that way."}]},{"anchor":"Explicitly-Unwrapped-Optionals","level":2,"type":"heading","text":"Explicitly Unwrapped Optionals"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that you "},{"type":"emphasis","inlineContent":[{"type":"text","text":"could"}]},{"type":"text","text":" explicitly unwrap the optional…"}]},{"type":"codeListing","syntax":"swift","code":["@Injected(\\.userProviding) private let provider: UserProviding!"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But doing so violates the core premise on which Factory was built in the first place: "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Your code is guaranteed to be safe."}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"I’d advise against it."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"A few other things here. First, note that we used "},{"type":"codeVoice","code":"@Injected"},{"type":"text","text":" to supply an optional type. We don’t need a "},{"type":"codeVoice","code":"@OptionalInjected"},{"type":"text","text":" property wrapper to do this as we did in Resolver. Same for "},{"type":"codeVoice","code":"@LazyInjected"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And also note that calling register also "},{"type":"emphasis","inlineContent":[{"type":"text","text":"removes any cached dependency from its associated scope."}]},{"type":"text","text":" This ensures that any new dependency injection request performed from that point on will always get the most recently defined instance of an object."}]},{"anchor":"Optionals-and-Multiple-Modules","level":2,"type":"heading","text":"Optionals and Multiple Modules"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This technique can also be handy when doing registrations in a project with multiple modules. It’s a bit complex, so there’s an entire page devoted to it."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules"},{"type":"text","text":" for more."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/optionals"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Optionals","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"kind":"article","metadata":{"roleHeading":"Article","title":"Optionals and Dynamic Registration","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Advanced Topics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Design","doc:\/\/Factory\/documentation\/Factory\/Modifiers","doc:\/\/Factory\/documentation\/Factory\/Modules","doc:\/\/Factory\/documentation\/Factory\/Cycle","doc:\/\/Factory\/documentation\/Factory\/Functional","doc:\/\/Factory\/documentation\/Factory\/Tags"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Design":{"role":"article","title":"Designing Factory","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","kind":"article","type":"topic","url":"\/documentation\/factory\/design"},"doc://Factory/documentation/Factory/Modifiers":{"role":"article","title":"Factory Modifiers","abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","kind":"article","type":"topic","url":"\/documentation\/factory\/modifiers"},"doc://Factory/documentation/Factory/Functional":{"role":"article","title":"Functional Injection","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","kind":"article","type":"topic","url":"\/documentation\/factory\/functional"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Cycle":{"role":"article","title":"Resolution Cycles","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","type":"topic","url":"\/documentation\/factory\/cycle"},"doc://Factory/documentation/Factory/Modules":{"role":"article","title":"Modular Development","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","kind":"article","type":"topic","url":"\/documentation\/factory\/modules"},"doc://Factory/documentation/Factory/Tags":{"role":"article","title":"Tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","kind":"article","type":"topic","url":"\/documentation\/factory\/tags"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory.json b/docs/data/documentation/factory/parameterfactory.json index 361e3f64..dd33d62f 100644 --- a/docs/data/documentation/factory/parameterfactory.json +++ b/docs/data/documentation/factory/parameterfactory.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Like it or not, some services require one or more parameters to be passed to them in order to be initialized correctly. In that case use "},{"type":"codeVoice","code":"ParameterFactory"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We define a ParameterFactory exactly as we do a normal factory with two exceptions: we need to specify the"},{"type":"text","text":" "},{"type":"text","text":"parameter type, and we need to consume the passed parameter in our factory closure."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var parameterService: ParameterFactory {"," self { ParameterService(value: $0) }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Resolving it is straightforward. Just pass the parameter to the Factory."}]},{"type":"codeListing","syntax":"Swift","code":["let myService = Container.shared.parameterService(n)"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"One caveat is that you can’t use the "},{"type":"codeVoice","code":"@Injected"},{"type":"text","text":" property wrapper with "},{"type":"codeVoice","code":"ParameterFactory"},{"type":"text","text":" as there’s no way to get"},{"type":"text","text":" "},{"type":"text","text":"the needed parameters to the property wrapper before the wrapper is initialized. That being the case, you’ll"},{"type":"text","text":" "},{"type":"text","text":"probably need to reference the container directly and do something similar to the following."}]},{"type":"codeListing","syntax":"swift","code":["class MyClass {"," var myService: MyServiceType"," init(_ n: Int) {"," myService = Container.shared.parameterService(n)"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you need to pass more than one parameter just use a tuple, dictionary, or struct."}]},{"type":"codeListing","syntax":"swift","code":["var tupleService: ParameterFactory<(Int, Int), MultipleParameterService> {"," self { (a, b) in"," MultipleParameterService(a: a, b: b)"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Finally, if you define a scope keep in mind that the first argument passed will be used to create the dependency"},{"type":"text","text":" "},{"type":"text","text":"and "},{"type":"emphasis","inlineContent":[{"type":"text","text":"that"}]},{"type":"text","text":" dependency will be cached. Since the cached object will be returned from now on any arguments passed in"},{"type":"text","text":" "},{"type":"text","text":"later requests will be ignored until the factory or scope is reset."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory"],"traits":[{"interfaceLanguage":"swift"}]}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"],"kind":"relationships","title":"Conforms To","type":"conformsTo"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"title":"ParameterFactory","roleHeading":"Structure","role":"symbol","symbolKind":"struct","externalID":"s:7Factory09ParameterA0V","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/init(_:key:_:)"]},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/registration"]},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/callAsFunction(_:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/resolve(_:)"]},{"title":"Default Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"],"generated":true}],"references":{"doc://Factory/documentation/Factory/ParameterFactory/init(_:key:_:)":{"role":"symbol","title":"init(_:key:_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP"},{"kind":"text","text":", "},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Public initializer creates a factory capable of taking parameters at runtime."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/init(_:key:_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/init(_:key:_:)"},"doc://Factory/documentation/Factory/ParameterFactory/callAsFunction(_:)":{"role":"symbol","title":"callAsFunction(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Resolves a factory capable of taking parameters at runtime."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/callAsFunction(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/callasfunction(_:)"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory/resolve(_:)":{"role":"symbol","title":"resolve(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Unsugared resolution function."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/resolve(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/resolve(_:)"},"doc://Factory/documentation/Factory/ParameterFactory/register(factory:)":{"role":"symbol","title":"register(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Registers a new factory capable of taking parameters at runtime."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/register(factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/registration":{"role":"symbol","title":"registration","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Required registration"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/registration","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/registration"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Like it or not, some services require one or more parameters to be passed to them in order to be initialized correctly. In that case use "},{"type":"codeVoice","code":"ParameterFactory"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We define a ParameterFactory exactly as we do a normal factory with two exceptions: we need to specify the"},{"type":"text","text":" "},{"type":"text","text":"parameter type, and we need to consume the passed parameter in our factory closure."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var parameterService: ParameterFactory {"," self { ParameterService(value: $0) }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Resolving it is straightforward. Just pass the parameter to the Factory."}]},{"type":"codeListing","syntax":"Swift","code":["let myService = Container.shared.parameterService(n)"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"One caveat is that you can’t use the "},{"type":"codeVoice","code":"@Injected"},{"type":"text","text":" property wrapper with "},{"type":"codeVoice","code":"ParameterFactory"},{"type":"text","text":" as there’s no way to get"},{"type":"text","text":" "},{"type":"text","text":"the needed parameters to the property wrapper before the wrapper is initialized. That being the case, you’ll"},{"type":"text","text":" "},{"type":"text","text":"probably need to reference the container directly and do something similar to the following."}]},{"type":"codeListing","syntax":"swift","code":["class MyClass {"," var myService: MyServiceType"," init(_ n: Int) {"," myService = Container.shared.parameterService(n)"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you need to pass more than one parameter just use a tuple, dictionary, or struct."}]},{"type":"codeListing","syntax":"swift","code":["var tupleService: ParameterFactory<(Int, Int), MultipleParameterService> {"," self { (a, b) in"," MultipleParameterService(a: a, b: b)"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Finally, if you define a scope keep in mind that the first argument passed will be used to create the dependency"},{"type":"text","text":" "},{"type":"text","text":"and "},{"type":"emphasis","inlineContent":[{"type":"text","text":"that"}]},{"type":"text","text":" dependency will be cached. Since the cached object will be returned from now on any arguments passed in"},{"type":"text","text":" "},{"type":"text","text":"later requests will be ignored until the factory or scope is reset."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory"],"traits":[{"interfaceLanguage":"swift"}]}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"],"kind":"relationships","title":"Conforms To","type":"conformsTo"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"title":"ParameterFactory","roleHeading":"Structure","role":"symbol","symbolKind":"struct","externalID":"s:7Factory09ParameterA0V","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/init(_:key:_:)"]},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/registration"]},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/callAsFunction(_:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/resolve(_:)"]},{"title":"Default Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"],"generated":true}],"references":{"doc://Factory/documentation/Factory/ParameterFactory/register(factory:)":{"role":"symbol","title":"register(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Registers a new factory capable of taking parameters at runtime."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/register(factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/init(_:key:_:)":{"role":"symbol","title":"init(_:key:_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP"},{"kind":"text","text":", "},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Public initializer creates a factory capable of taking parameters at runtime."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/init(_:key:_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/init(_:key:_:)"},"doc://Factory/documentation/Factory/ParameterFactory/resolve(_:)":{"role":"symbol","title":"resolve(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Unsugared resolution function."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/resolve(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/resolve(_:)"},"doc://Factory/documentation/Factory/FactoryModifying":{"role":"symbol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/ParameterFactory/registration":{"role":"symbol","title":"registration","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Required registration"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/registration","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/registration"},"doc://Factory/documentation/Factory/ParameterFactory/callAsFunction(_:)":{"role":"symbol","title":"callAsFunction(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Resolves a factory capable of taking parameters at runtime."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/callAsFunction(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/callasfunction(_:)"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/cached.json b/docs/data/documentation/factory/parameterfactory/cached.json index b9ff52f0..489a2064 100644 --- a/docs/data/documentation/factory/parameterfactory/cached.json +++ b/docs/data/documentation/factory/parameterfactory/cached.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .cached","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/cached"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/cached","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"cached","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE6cachedxvp::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory/cached":{"role":"symbol","title":"cached","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/cached","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/cached"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .cached","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/cached"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/cached","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"cached","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE6cachedxvp::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory/cached":{"role":"symbol","title":"cached","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/cached","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/cached"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/callasfunction(_:).json b/docs/data/documentation/factory/parameterfactory/callasfunction(_:).json index c7007205..73574a98 100644 --- a/docs/data/documentation/factory/parameterfactory/callasfunction(_:).json +++ b/docs/data/documentation/factory/parameterfactory/callasfunction(_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"parameters"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["let service = container.parameterService(16)"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/callasfunction(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/callAsFunction(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Resolves a factory capable of taking parameters at runtime."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"}],"title":"callAsFunction(_:)","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:7Factory09ParameterA0V14callAsFunctionyq_xF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory/callAsFunction(_:)":{"role":"symbol","title":"callAsFunction(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Resolves a factory capable of taking parameters at runtime."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/callAsFunction(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/callasfunction(_:)"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"parameters"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["let service = container.parameterService(16)"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/callasfunction(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/callAsFunction(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Resolves a factory capable of taking parameters at runtime."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"}],"title":"callAsFunction(_:)","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:7Factory09ParameterA0V14callAsFunctionyq_xF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory/callAsFunction(_:)":{"role":"symbol","title":"callAsFunction(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Resolves a factory capable of taking parameters at runtime."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/callAsFunction(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/callasfunction(_:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/context(_:factory:).json b/docs/data/documentation/factory/parameterfactory/context(_:factory:).json index 3bdb4fc6..51413cc0 100644 --- a/docs/data/documentation/factory/parameterfactory/context(_:factory:).json +++ b/docs/data/documentation/factory/parameterfactory/context(_:factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"contexts"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","preciseIdentifier":"s:7Factory0A7ContextO","text":"FactoryContext"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"A context might be be when running in SwiftUI preview mode, or when running unit tests."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/context(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/context(_:factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"kind":"symbol","metadata":{"role":"symbol","title":"context(_:factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryContext","preciseIdentifier":"s:7Factory0A7ContextO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE7context_7factoryxAA0A7ContextOd_1TQz1PQzctF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory/Contexts":{"role":"article","title":"Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","kind":"article","type":"topic","url":"\/documentation\/factory\/contexts"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory/context(_:factory:)":{"role":"symbol","title":"context(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryContext","preciseIdentifier":"s:7Factory0A7ContextO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/context(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/context(_:factory:)"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"contexts"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","preciseIdentifier":"s:7Factory0A7ContextO","text":"FactoryContext"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"A context might be be when running in SwiftUI preview mode, or when running unit tests."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/context(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/context(_:factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"kind":"symbol","metadata":{"role":"symbol","title":"context(_:factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryContext","preciseIdentifier":"s:7Factory0A7ContextO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE7context_7factoryxAA0A7ContextOd_1TQz1PQzctF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory/context(_:factory:)":{"role":"symbol","title":"context(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryContext","preciseIdentifier":"s:7Factory0A7ContextO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/context(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/context(_:factory:)"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory/Contexts":{"role":"article","title":"Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","kind":"article","type":"topic","url":"\/documentation\/factory\/contexts"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/decorator(_:).json b/docs/data/documentation/factory/parameterfactory/decorator(_:).json index c5d6f56c..cbbfdc90 100644 --- a/docs/data/documentation/factory/parameterfactory/decorator(_:).json +++ b/docs/data/documentation/factory/parameterfactory/decorator(_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"decorator"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This includes previously created items that may have been cached by a scope."}]},{"type":"codeListing","syntax":"swift","code":["var decoratedService: Factory {"," self { ParentChildService() }"," .decorated {"," $0.child.parent = $0"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As shown, decorator can come in handy when you need to perform some operation or manipulation after the fact."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/decorator(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/decorator(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"type":"emphasis","inlineContent":[{"type":"text","text":"always"}]},{"type":"text","text":" be called with the resolved dependency"},{"type":"text","text":" "},{"type":"text","text":"for further examination or manipulation."}],"kind":"symbol","metadata":{"role":"symbol","title":"decorator(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE9decoratoryxy1TQzcF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory/decorator(_:)":{"role":"symbol","title":"decorator(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"type":"emphasis","inlineContent":[{"type":"text","text":"always"}]},{"type":"text","text":" be called with the resolved dependency"},{"type":"text","text":" "},{"type":"text","text":"for further examination or manipulation."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/decorator(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/decorator(_:)"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"decorator"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This includes previously created items that may have been cached by a scope."}]},{"type":"codeListing","syntax":"swift","code":["var decoratedService: Factory {"," self { ParentChildService() }"," .decorated {"," $0.child.parent = $0"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As shown, decorator can come in handy when you need to perform some operation or manipulation after the fact."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/decorator(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/decorator(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"type":"emphasis","inlineContent":[{"type":"text","text":"always"}]},{"type":"text","text":" be called with the resolved dependency"},{"type":"text","text":" "},{"type":"text","text":"for further examination or manipulation."}],"kind":"symbol","metadata":{"role":"symbol","title":"decorator(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE9decoratoryxy1TQzcF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory/decorator(_:)":{"role":"symbol","title":"decorator(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"type":"emphasis","inlineContent":[{"type":"text","text":"always"}]},{"type":"text","text":" be called with the resolved dependency"},{"type":"text","text":" "},{"type":"text","text":"for further examination or manipulation."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/decorator(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/decorator(_:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/factorymodifying-implementations.json b/docs/data/documentation/factory/parameterfactory/factorymodifying-implementations.json index 173d1c4f..187afdc8 100644 --- a/docs/data/documentation/factory/parameterfactory/factorymodifying-implementations.json +++ b/docs/data/documentation/factory/parameterfactory/factorymodifying-implementations.json @@ -1 +1 @@ -{"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","interfaceLanguage":"swift"},"topicSections":[{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/cached","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/graph","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/shared","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/singleton","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/unique"],"generated":true},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/context(_:factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/decorator(_:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArg(_:factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArgs(_:factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDebug(factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDevice(factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onPreview(factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onSimulator(factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onTest(factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/once()","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(scope:factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/reset(_:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/scope(_:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/timeToLive(_:)"],"generated":true}],"kind":"article","metadata":{"modules":[{"name":"Factory"}],"role":"collectionGroup","title":"FactoryModifying Implementations"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory/onArgs(_:factory:)":{"role":"symbol","title":"onArgs(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArgs(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/onargs(_:factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/register(scope:factory:)":{"role":"symbol","title":"register(scope:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Allows registering new factory closure and updating scope used after the fact."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(scope:factory:)","kind":"symbol","type":"topic","deprecated":true,"url":"\/documentation\/factory\/parameterfactory\/register(scope:factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/onDebug(factory:)":{"role":"symbol","title":"onDebug(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDebug(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/ondebug(factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/once()":{"role":"symbol","title":"once()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/once()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/once()"},"doc://Factory/documentation/Factory/ParameterFactory/unique":{"role":"symbol","title":"unique","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/unique","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/unique"},"doc://Factory/documentation/Factory/ParameterFactory/timeToLive(_:)":{"role":"symbol","title":"timeToLive(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds time to live option for scopes. If the dependency has been cached for longer than the timeToLive period the"},{"type":"text","text":" "},{"type":"text","text":"cached item will be discarded and a new instance created."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/timeToLive(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/timetolive(_:)"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/ParameterFactory/onSimulator(factory:)":{"role":"symbol","title":"onSimulator(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onSimulator(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/onsimulator(factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/singleton":{"role":"symbol","title":"singleton","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/singleton","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/singleton"},"doc://Factory/documentation/Factory/ParameterFactory/context(_:factory:)":{"role":"symbol","title":"context(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryContext","preciseIdentifier":"s:7Factory0A7ContextO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/context(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/context(_:factory:)"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/onTest(factory:)":{"role":"symbol","title":"onTest(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onTest(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/ontest(factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/graph":{"role":"symbol","title":"graph","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/graph","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/graph"},"doc://Factory/documentation/Factory/ParameterFactory/reset(_:)":{"role":"symbol","title":"reset(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/reset(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/reset(_:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory/onPreview(factory:)":{"role":"symbol","title":"onPreview(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onPreview(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/onpreview(factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/cached":{"role":"symbol","title":"cached","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/cached","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/cached"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory/ParameterFactory/decorator(_:)":{"role":"symbol","title":"decorator(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"type":"emphasis","inlineContent":[{"type":"text","text":"always"}]},{"type":"text","text":" be called with the resolved dependency"},{"type":"text","text":" "},{"type":"text","text":"for further examination or manipulation."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/decorator(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/decorator(_:)"},"doc://Factory/documentation/Factory/ParameterFactory/scope(_:)":{"role":"symbol","title":"scope(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/scope(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/scope(_:)"},"doc://Factory/documentation/Factory/ParameterFactory/shared":{"role":"symbol","title":"shared","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/shared","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/shared"},"doc://Factory/documentation/Factory/ParameterFactory/onDevice(factory:)":{"role":"symbol","title":"onDevice(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDevice(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/ondevice(factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/onArg(_:factory:)":{"role":"symbol","title":"onArg(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArg(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/onarg(_:factory:)"}}} \ No newline at end of file +{"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","interfaceLanguage":"swift"},"topicSections":[{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/cached","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/graph","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/shared","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/singleton","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/unique"],"generated":true},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/context(_:factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/decorator(_:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArg(_:factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArgs(_:factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDebug(factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDevice(factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onPreview(factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onSimulator(factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onTest(factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/once()","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(scope:factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/reset(_:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/scope(_:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/timeToLive(_:)"],"generated":true}],"kind":"article","metadata":{"modules":[{"name":"Factory"}],"role":"collectionGroup","title":"FactoryModifying Implementations"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory/onArgs(_:factory:)":{"role":"symbol","title":"onArgs(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArgs(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/onargs(_:factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/timeToLive(_:)":{"role":"symbol","title":"timeToLive(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds time to live option for scopes. If the dependency has been cached for longer than the timeToLive period the"},{"type":"text","text":" "},{"type":"text","text":"cached item will be discarded and a new instance created."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/timeToLive(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/timetolive(_:)"},"doc://Factory/documentation/Factory/ParameterFactory/scope(_:)":{"role":"symbol","title":"scope(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/scope(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/scope(_:)"},"doc://Factory/documentation/Factory/ParameterFactory/shared":{"role":"symbol","title":"shared","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/shared","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/shared"},"doc://Factory/documentation/Factory/ParameterFactory/unique":{"role":"symbol","title":"unique","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/unique","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/unique"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"role":"symbol","title":"Scope.Shared","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"url":"\/documentation\/factory\/scope\/shared-swift.class"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/ParameterFactory/onSimulator(factory:)":{"role":"symbol","title":"onSimulator(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onSimulator(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/onsimulator(factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/register(scope:factory:)":{"role":"symbol","title":"register(scope:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Allows registering new factory closure and updating scope used after the fact."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(scope:factory:)","kind":"symbol","type":"topic","deprecated":true,"url":"\/documentation\/factory\/parameterfactory\/register(scope:factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/onArg(_:factory:)":{"role":"symbol","title":"onArg(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArg(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/onarg(_:factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/onDevice(factory:)":{"role":"symbol","title":"onDevice(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDevice(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/ondevice(factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/graph":{"role":"symbol","title":"graph","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/graph","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/graph"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/ParameterFactory/context(_:factory:)":{"role":"symbol","title":"context(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryContext","preciseIdentifier":"s:7Factory0A7ContextO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/context(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/context(_:factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/singleton":{"role":"symbol","title":"singleton","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/singleton","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/singleton"},"doc://Factory/documentation/Factory/ParameterFactory/onTest(factory:)":{"role":"symbol","title":"onTest(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onTest(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/ontest(factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/decorator(_:)":{"role":"symbol","title":"decorator(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"type":"emphasis","inlineContent":[{"type":"text","text":"always"}]},{"type":"text","text":" be called with the resolved dependency"},{"type":"text","text":" "},{"type":"text","text":"for further examination or manipulation."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/decorator(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/decorator(_:)"},"doc://Factory/documentation/Factory/ParameterFactory/cached":{"role":"symbol","title":"cached","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/cached","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/cached"},"doc://Factory/documentation/Factory/ParameterFactory/onDebug(factory:)":{"role":"symbol","title":"onDebug(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDebug(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/ondebug(factory:)"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/once()":{"role":"symbol","title":"once()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/once()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/once()"},"doc://Factory/documentation/Factory/ParameterFactory/reset(_:)":{"role":"symbol","title":"reset(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/reset(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/reset(_:)"},"doc://Factory/documentation/Factory/ParameterFactory/onPreview(factory:)":{"role":"symbol","title":"onPreview(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onPreview(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/onpreview(factory:)"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/graph.json b/docs/data/documentation/factory/parameterfactory/graph.json index 6f7b6e2d..bcfb8fee 100644 --- a/docs/data/documentation/factory/parameterfactory/graph.json +++ b/docs/data/documentation/factory/parameterfactory/graph.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .graph","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/graph"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/graph","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"graph","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE5graphxvp::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory/graph":{"role":"symbol","title":"graph","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/graph","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/graph"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .graph","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/graph"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/graph","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"graph","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE5graphxvp::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory/graph":{"role":"symbol","title":"graph","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/graph","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/graph"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/onargs(_:factory:).json b/docs/data/documentation/factory/parameterfactory/onargs(_:factory:).json index 4bf0b9a9..5e48b74b 100644 --- a/docs/data/documentation/factory/parameterfactory/onargs(_:factory:).json +++ b/docs/data/documentation/factory/parameterfactory/onargs(_:factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"args"},{"kind":"text","text":": ["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/onargs(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArgs(_:factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onArgs(_:factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE6onArgs_7factoryxSaySSG_1TQz1PQzctF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory/onArgs(_:factory:)":{"role":"symbol","title":"onArgs(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArgs(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/onargs(_:factory:)"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"args"},{"kind":"text","text":": ["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/onargs(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArgs(_:factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onArgs(_:factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE6onArgs_7factoryxSaySSG_1TQz1PQzctF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/onArgs(_:factory:)":{"role":"symbol","title":"onArgs(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArgs(_:factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/onargs(_:factory:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/once().json b/docs/data/documentation/factory/parameterfactory/once().json index 2ae08325..8828139c 100644 --- a/docs/data/documentation/factory/parameterfactory/once().json +++ b/docs/data/documentation/factory/parameterfactory/once().json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/once()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/once()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"kind":"symbol","metadata":{"role":"symbol","title":"once()","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE4oncexyF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/once()":{"role":"symbol","title":"once()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/once()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/once()"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/once()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/once()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"kind":"symbol","metadata":{"role":"symbol","title":"once()","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE4oncexyF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory/once()":{"role":"symbol","title":"once()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/once()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/once()"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/ondebug(factory:).json b/docs/data/documentation/factory/parameterfactory/ondebug(factory:).json index cdb4e4b1..9548096a 100644 --- a/docs/data/documentation/factory/parameterfactory/ondebug(factory:).json +++ b/docs/data/documentation/factory/parameterfactory/ondebug(factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/ondebug(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDebug(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onDebug(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE7onDebug7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory/onDebug(factory:)":{"role":"symbol","title":"onDebug(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDebug(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/ondebug(factory:)"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/ondebug(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDebug(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onDebug(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE7onDebug7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/onDebug(factory:)":{"role":"symbol","title":"onDebug(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDebug(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/ondebug(factory:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/ondevice(factory:).json b/docs/data/documentation/factory/parameterfactory/ondevice(factory:).json index 004a916e..1834d2bb 100644 --- a/docs/data/documentation/factory/parameterfactory/ondevice(factory:).json +++ b/docs/data/documentation/factory/parameterfactory/ondevice(factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/ondevice(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDevice(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onDevice(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE8onDevice7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory/onDevice(factory:)":{"role":"symbol","title":"onDevice(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDevice(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/ondevice(factory:)"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/ondevice(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDevice(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onDevice(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE8onDevice7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory/onDevice(factory:)":{"role":"symbol","title":"onDevice(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDevice(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/ondevice(factory:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/onpreview(factory:).json b/docs/data/documentation/factory/parameterfactory/onpreview(factory:).json index 7d65f0e0..d8fb8c73 100644 --- a/docs/data/documentation/factory/parameterfactory/onpreview(factory:).json +++ b/docs/data/documentation/factory/parameterfactory/onpreview(factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/onpreview(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onPreview(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onPreview(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE9onPreview7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory/onPreview(factory:)":{"role":"symbol","title":"onPreview(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onPreview(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/onpreview(factory:)"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/onpreview(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onPreview(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onPreview(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE9onPreview7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/onPreview(factory:)":{"role":"symbol","title":"onPreview(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onPreview(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/onpreview(factory:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/onsimulator(factory:).json b/docs/data/documentation/factory/parameterfactory/onsimulator(factory:).json index 5707e7de..6368899b 100644 --- a/docs/data/documentation/factory/parameterfactory/onsimulator(factory:).json +++ b/docs/data/documentation/factory/parameterfactory/onsimulator(factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/onsimulator(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onSimulator(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onSimulator(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE11onSimulator7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory/onSimulator(factory:)":{"role":"symbol","title":"onSimulator(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onSimulator(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/onsimulator(factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/onsimulator(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onSimulator(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onSimulator(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE11onSimulator7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory/onSimulator(factory:)":{"role":"symbol","title":"onSimulator(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onSimulator(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/onsimulator(factory:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/ontest(factory:).json b/docs/data/documentation/factory/parameterfactory/ontest(factory:).json index e0ebc715..97614b65 100644 --- a/docs/data/documentation/factory/parameterfactory/ontest(factory:).json +++ b/docs/data/documentation/factory/parameterfactory/ontest(factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/ontest(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onTest(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onTest(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE6onTest7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/onTest(factory:)":{"role":"symbol","title":"onTest(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onTest(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/ontest(factory:)"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/ontest(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onTest(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"kind":"symbol","metadata":{"role":"symbol","title":"onTest(factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE6onTest7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory/onTest(factory:)":{"role":"symbol","title":"onTest(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onTest(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/ontest(factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/register(factory:).json b/docs/data/documentation/factory/parameterfactory/register(factory:).json index 9f61ab88..6745bd1e 100644 --- a/docs/data/documentation/factory/parameterfactory/register(factory:).json +++ b/docs/data/documentation/factory/parameterfactory/register(factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["container.parameterService.register { n in"," ParameterService(value: n)","}"]},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"factory: A new factory closure that produces an object of the desired type when needed."}]}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/register(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Registers a new factory capable of taking parameters at runtime."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"title":"register(factory:)","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:7Factory09ParameterA0V8register7factoryACyxq_Gq_xc_tF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory/register(factory:)":{"role":"symbol","title":"register(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Registers a new factory capable of taking parameters at runtime."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/register(factory:)"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["container.parameterService.register { n in"," ParameterService(value: n)","}"]},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"factory: A new factory closure that produces an object of the desired type when needed."}]}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/register(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Registers a new factory capable of taking parameters at runtime."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"title":"register(factory:)","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:7Factory09ParameterA0V8register7factoryACyxq_Gq_xc_tF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory/register(factory:)":{"role":"symbol","title":"register(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Registers a new factory capable of taking parameters at runtime."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(factory:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/register(factory:)"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/register(scope:factory:).json b/docs/data/documentation/factory/parameterfactory/register(scope:factory:).json index 657b5631..7b9bec5d 100644 --- a/docs/data/documentation/factory/parameterfactory/register(scope:factory:).json +++ b/docs/data/documentation/factory/parameterfactory/register(scope:factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"scope: Optional parameter that lets the registration redefine the scope used for this dependency."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"factory: A new factory closure that produces an object of the desired type when needed."}]}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/register(scope:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(scope:factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Allows registering new factory closure and updating scope used after the fact."}],"kind":"symbol","metadata":{"modules":[{"name":"Factory"}],"role":"symbol","title":"register(scope:factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE8register5scope7factoryxAA5ScopeCSg_1TQz1PQzctF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","platforms":[]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"deprecationSummary":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Use container.service.scope(.cached).register { Service() } instead"}]}],"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/register(scope:factory:)":{"role":"symbol","title":"register(scope:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Allows registering new factory closure and updating scope used after the fact."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(scope:factory:)","kind":"symbol","type":"topic","deprecated":true,"url":"\/documentation\/factory\/parameterfactory\/register(scope:factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"scope: Optional parameter that lets the registration redefine the scope used for this dependency."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"factory: A new factory closure that produces an object of the desired type when needed."}]}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/register(scope:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(scope:factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Allows registering new factory closure and updating scope used after the fact."}],"kind":"symbol","metadata":{"modules":[{"name":"Factory"}],"role":"symbol","title":"register(scope:factory:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE8register5scope7factoryxAA5ScopeCSg_1TQz1PQzctF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","platforms":[]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"deprecationSummary":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Use container.service.scope(.cached).register { Service() } instead"}]}],"references":{"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/register(scope:factory:)":{"role":"symbol","title":"register(scope:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Allows registering new factory closure and updating scope used after the fact."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(scope:factory:)","kind":"symbol","type":"topic","deprecated":true,"url":"\/documentation\/factory\/parameterfactory\/register(scope:factory:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/registration.json b/docs/data/documentation/factory/parameterfactory/registration.json index ae0ef311..9c1aac66 100644 --- a/docs/data/documentation/factory/parameterfactory/registration.json +++ b/docs/data/documentation/factory/parameterfactory/registration.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV","text":"FactoryRegistration"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/registration"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/registration","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Required registration"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"title":"registration","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory09ParameterA0V12registrationAA0A12RegistrationVyxq_Gvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/registration":{"role":"symbol","title":"registration","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Required registration"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/registration","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/registration"},"doc://Factory/documentation/Factory/FactoryRegistration":{"role":"symbol","title":"FactoryRegistration","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"url":"\/documentation\/factory\/factoryregistration"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV","text":"FactoryRegistration"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/registration"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/registration","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Required registration"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"title":"registration","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory09ParameterA0V12registrationAA0A12RegistrationVyxq_Gvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory/registration":{"role":"symbol","title":"registration","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Required registration"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/registration","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/registration"},"doc://Factory/documentation/Factory/FactoryRegistration":{"role":"symbol","title":"FactoryRegistration","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"url":"\/documentation\/factory\/factoryregistration"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/reset(_:).json b/docs/data/documentation/factory/parameterfactory/reset(_:).json index ec3d8756..da167179 100644 --- a/docs/data/documentation/factory/parameterfactory/reset(_:).json +++ b/docs/data/documentation/factory/parameterfactory/reset(_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"options"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":" = .all)"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"options","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"options description"}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/reset(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/reset(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope."}],"kind":"symbol","metadata":{"role":"symbol","title":"reset(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE5resetyyAA0A12ResetOptionsOF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory/reset(_:)":{"role":"symbol","title":"reset(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/reset(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/reset(_:)"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"options"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":" = .all)"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"options","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"options description"}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/reset(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/reset(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope."}],"kind":"symbol","metadata":{"role":"symbol","title":"reset(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE5resetyyAA0A12ResetOptionsOF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory/reset(_:)":{"role":"symbol","title":"reset(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/reset(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/reset(_:)"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/resolve(_:).json b/docs/data/documentation/factory/parameterfactory/resolve(_:).json index b2d8c246..0d4b85b2 100644 --- a/docs/data/documentation/factory/parameterfactory/resolve(_:).json +++ b/docs/data/documentation/factory/parameterfactory/resolve(_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"parameters"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/resolve(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/resolve(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Unsugared resolution function."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"}],"title":"resolve(_:)","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:7Factory09ParameterA0V7resolveyq_xF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory/resolve(_:)":{"role":"symbol","title":"resolve(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Unsugared resolution function."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/resolve(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/resolve(_:)"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"parameters"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/resolve(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/resolve(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Unsugared resolution function."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"}],"title":"resolve(_:)","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:7Factory09ParameterA0V7resolveyq_xF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/resolve(_:)":{"role":"symbol","title":"resolve(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"type":"text","text":"Unsugared resolution function."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/resolve(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/resolve(_:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/scope(_:).json b/docs/data/documentation/factory/parameterfactory/scope(_:).json index 6b96458b..6bbc385d 100644 --- a/docs/data/documentation/factory/parameterfactory/scope(_:).json +++ b/docs/data/documentation/factory/parameterfactory/scope(_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .scope(.session)","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/scope(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/scope(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"scope(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE5scopeyxAA5ScopeCF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/ParameterFactory/scope(_:)":{"role":"symbol","title":"scope(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/scope(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/scope(_:)"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .scope(.session)","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/scope(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/scope(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"scope(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE5scopeyxAA5ScopeCF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/ParameterFactory/scope(_:)":{"role":"symbol","title":"scope(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/scope(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/scope(_:)"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/shared.json b/docs/data/documentation/factory/parameterfactory/shared.json index 27676207..6a297896 100644 --- a/docs/data/documentation/factory/parameterfactory/shared.json +++ b/docs/data/documentation/factory/parameterfactory/shared.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .shared","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/shared"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/shared","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"shared","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE6sharedxvp::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory/shared":{"role":"symbol","title":"shared","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/shared","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/shared"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .shared","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/shared"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/shared","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"shared","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE6sharedxvp::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory/shared":{"role":"symbol","title":"shared","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/shared","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/shared"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"role":"symbol","title":"Scope.Shared","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"url":"\/documentation\/factory\/scope\/shared-swift.class"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/singleton.json b/docs/data/documentation/factory/parameterfactory/singleton.json index 2c7b32ce..e996b7f7 100644 --- a/docs/data/documentation/factory/parameterfactory/singleton.json +++ b/docs/data/documentation/factory/parameterfactory/singleton.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .singleton","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/singleton"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/singleton","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"singleton","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE9singletonxvp::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory/singleton":{"role":"symbol","title":"singleton","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/singleton","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/singleton"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .singleton","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/singleton"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/singleton","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"singleton","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE9singletonxvp::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory/singleton":{"role":"symbol","title":"singleton","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/singleton","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/singleton"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/timetolive(_:).json b/docs/data/documentation/factory/parameterfactory/timetolive(_:).json index 3d59678b..e8ec6832 100644 --- a/docs/data/documentation/factory/parameterfactory/timetolive(_:).json +++ b/docs/data/documentation/factory/parameterfactory/timetolive(_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"seconds"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/timetolive(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/timeToLive(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Adds time to live option for scopes. If the dependency has been cached for longer than the timeToLive period the"},{"type":"text","text":" "},{"type":"text","text":"cached item will be discarded and a new instance created."}],"kind":"symbol","metadata":{"role":"symbol","title":"timeToLive(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE10timeToLiveyxSdF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/timeToLive(_:)":{"role":"symbol","title":"timeToLive(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds time to live option for scopes. If the dependency has been cached for longer than the timeToLive period the"},{"type":"text","text":" "},{"type":"text","text":"cached item will be discarded and a new instance created."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/timeToLive(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/timetolive(_:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"seconds"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/timetolive(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/timeToLive(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Adds time to live option for scopes. If the dependency has been cached for longer than the timeToLive period the"},{"type":"text","text":" "},{"type":"text","text":"cached item will be discarded and a new instance created."}],"kind":"symbol","metadata":{"role":"symbol","title":"timeToLive(_:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE10timeToLiveyxSdF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/ParameterFactory/timeToLive(_:)":{"role":"symbol","title":"timeToLive(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds time to live option for scopes. If the dependency has been cached for longer than the timeToLive period the"},{"type":"text","text":" "},{"type":"text","text":"cached item will be discarded and a new instance created."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/timeToLive(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/timetolive(_:)"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/unique.json b/docs/data/documentation/factory/parameterfactory/unique.json index df63d498..b1c3fd2f 100644 --- a/docs/data/documentation/factory/parameterfactory/unique.json +++ b/docs/data/documentation/factory/parameterfactory/unique.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .unique","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"While you can add the modifier, Factory’s are unique by default."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/unique"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/unique","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"unique","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE6uniquexvp::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory/unique":{"role":"symbol","title":"unique","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/unique","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/unique"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .unique","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"While you can add the modifier, Factory’s are unique by default."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/unique"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/unique","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"role":"symbol","title":"unique","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE6uniquexvp::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"role":"collectionGroup","title":"FactoryModifying Implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/unique":{"role":"symbol","title":"unique","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/unique","kind":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/unique"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/previews.json b/docs/data/documentation/factory/previews.json index efba3878..f4b67c7f 100644 --- a/docs/data/documentation/factory/previews.json +++ b/docs/data/documentation/factory/previews.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory can make SwiftUI Previews easier when we’re using View Models and those view models depend on internal dependencies. Let’s take a look."}]},{"anchor":"SwiftUI-Integrations","level":2,"type":"heading","text":"SwiftUI Integrations"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory can be used in SwiftUI to assign a dependency to a "},{"type":"codeVoice","code":"StateObject"},{"type":"text","text":" or "},{"type":"codeVoice","code":"ObservedObject"},{"type":"text","text":"."}]},{"type":"codeListing","syntax":"swift","code":["class ContentView: ObservableObject {"," @StateObject private var viewModel = Container.shared.contentViewModel()"," var body: some View {"," ..."," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Keep in mind that if you assign to an "},{"type":"codeVoice","code":"ObservedObject"},{"type":"text","text":" your Factory is responsible for managing the object’s lifecycle (see the section on Scopes above)."}]},{"anchor":"SwiftUI-Previews","level":2,"type":"heading","text":"SwiftUI Previews"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s an example of updating a view model’s service dependency in order to setup a particular state for preview."}]},{"type":"codeListing","syntax":"swift","code":["class ContentView: ObservableObject {"," @StateObject var viewModel = ContentViewModel()"," var body: some View {"," ..."," }","}","","struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," let _ = Container.myService.register { MockServiceN(4) }"," ContentView()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"If we can control where the view model gets its data then we can put the view model into pretty much any state we choose."}]},{"anchor":"Multiple-Previews","level":2,"type":"heading","text":"Multiple Previews"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If we want to do multiple previews at once, each with different data, we simply need to instantiate our view models and pass them into the view as parameters."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Given the ContentView we used above…"}]},{"type":"codeListing","syntax":"swift","code":["struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," Group {"," let _ = Container.shared.myService.register { MockServiceN(4) }"," let vm1 = ContentViewModel()"," ContentView(viewModel: vm1)"," "," let _ = Container.shared.myService.register { MockServiceN(8) }"," let vm2 = ContentViewModel()"," ContentView(viewModel: vm2)"," }"," }","}"]},{"anchor":"InjectedObject","level":2,"type":"heading","text":"InjectedObject"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Should you prefer, you can also use "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject"},{"type":"text","text":", an immediate injection property wrapper for SwiftUI ObservableObjects."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This wrapper is meant for use in SwiftUI Views and exposes bindable objects similar to that of SwiftUI @StateObject"},{"type":"text","text":" "},{"type":"text","text":"and @EnvironmentObject."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Like the other Injected property wrappers, InjectedObject wraps obtains the dependency from the Factory keypath"},{"type":"text","text":" "},{"type":"text","text":"and provides it to a wrapped instance of StateObject."}]},{"type":"codeListing","syntax":"swift","code":["struct ContentView: View {"," @InjectedObject(\\.contentViewModel) var model"," var body: some View {"," ..."," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"ContentViewModel must, of course, be of type ObservableObject and is registered like any other service"},{"type":"text","text":" "},{"type":"text","text":"or dependency."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var contentViewModel: Factory {"," self { ContentViewModel() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As with StateObject and ObservedObject, updating the object’s state will trigger a view update."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"InjectedObject is also handy when…"}]},{"type":"orderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"You have a service that could be consumed from a view or a view model."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"You have view model dependencies that depend on the Graph scope and you need the view model to be the graph’s root. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes"},{"type":"text","text":" for more details on graph."}]}]}]},{"anchor":"InjectedObject-Previews","level":2,"type":"heading","text":"InjectedObject Previews"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Single previews work exactly the same."}]},{"type":"codeListing","syntax":"swift","code":["struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," let _ = Container.shared.myService.register { MockServiceN(4) }"," ContentView()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But due a bug in how Swift manages property wrappers with built in initializers, doing multiple previews is just a little different than shown earlier."}]},{"type":"codeListing","syntax":"swift","code":["struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," Group {"," let _ = Container.shared.myServiceType.register { MockServiceN(44) }"," let model1 = ContentViewModel()"," ContentView(model: InjectedObject(model1))"," "," let _ = Container.shared.myServiceType.register { MockServiceN(88) }"," let model2 = ContentViewModel()"," ContentView(model: InjectedObject(model2))"," }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Instead of passing the model to the view directly, we need to create the entire "},{"type":"codeVoice","code":"InjectedObject(model1)"},{"type":"text","text":" pair and pass that."}]},{"anchor":"Common-Setup","level":2,"type":"heading","text":"Common Setup"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If we have several mocks that we use all of the time in our previews or unit tests, we can also add a setup function to a given container to make this easier."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," func setupMocks() {"," myService.register { MockServiceN(4) }"," sharedService.register { MockService2() }"," }","}","","struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," let _ = Container.shared.setupMocks()"," ContentView()"," }","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/previews"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Previews","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"kind":"article","metadata":{"roleHeading":"Article","title":"SwiftUI Previews","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Development and Testing","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Testing","doc:\/\/Factory\/documentation\/Factory\/Contexts","doc:\/\/Factory\/documentation\/Factory\/Debugging","doc:\/\/Factory\/documentation\/Factory\/Chains"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Contexts":{"role":"article","title":"Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","kind":"article","type":"topic","url":"\/documentation\/factory\/contexts"},"doc://Factory/documentation/Factory/Testing":{"role":"article","title":"Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","kind":"article","type":"topic","url":"\/documentation\/factory\/testing"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"},"doc://Factory/documentation/Factory/Chains":{"role":"article","title":"Circular Dependency Chains","abstract":[{"type":"text","text":"Detecting and solving Circular Dependency Chains."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","kind":"article","type":"topic","url":"\/documentation\/factory\/chains"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Debugging":{"role":"article","title":"Debugging","abstract":[{"type":"text","text":"Additional support for debugging resolution cycles, dependency chains and other issue."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","kind":"article","type":"topic","url":"\/documentation\/factory\/debugging"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory can make SwiftUI Previews easier when we’re using View Models and those view models depend on internal dependencies. Let’s take a look."}]},{"anchor":"SwiftUI-Integrations","level":2,"type":"heading","text":"SwiftUI Integrations"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory can be used in SwiftUI to assign a dependency to a "},{"type":"codeVoice","code":"StateObject"},{"type":"text","text":" or "},{"type":"codeVoice","code":"ObservedObject"},{"type":"text","text":"."}]},{"type":"codeListing","syntax":"swift","code":["class ContentView: ObservableObject {"," @StateObject private var viewModel = Container.shared.contentViewModel()"," var body: some View {"," ..."," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Keep in mind that if you assign to an "},{"type":"codeVoice","code":"ObservedObject"},{"type":"text","text":" your Factory is responsible for managing the object’s lifecycle (see the section on Scopes above)."}]},{"anchor":"SwiftUI-Previews","level":2,"type":"heading","text":"SwiftUI Previews"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s an example of updating a view model’s service dependency in order to setup a particular state for preview."}]},{"type":"codeListing","syntax":"swift","code":["class ContentView: ObservableObject {"," @StateObject var viewModel = ContentViewModel()"," var body: some View {"," ..."," }","}","","struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," let _ = Container.myService.register { MockServiceN(4) }"," ContentView()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"If we can control where the view model gets its data then we can put the view model into pretty much any state we choose."}]},{"anchor":"Multiple-Previews","level":2,"type":"heading","text":"Multiple Previews"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If we want to do multiple previews at once, each with different data, we simply need to instantiate our view models and pass them into the view as parameters."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Given the ContentView we used above…"}]},{"type":"codeListing","syntax":"swift","code":["struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," Group {"," let _ = Container.shared.myService.register { MockServiceN(4) }"," let vm1 = ContentViewModel()"," ContentView(viewModel: vm1)"," "," let _ = Container.shared.myService.register { MockServiceN(8) }"," let vm2 = ContentViewModel()"," ContentView(viewModel: vm2)"," }"," }","}"]},{"anchor":"InjectedObject","level":2,"type":"heading","text":"InjectedObject"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Should you prefer, you can also use "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject"},{"type":"text","text":", an immediate injection property wrapper for SwiftUI ObservableObjects."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This wrapper is meant for use in SwiftUI Views and exposes bindable objects similar to that of SwiftUI @StateObject"},{"type":"text","text":" "},{"type":"text","text":"and @EnvironmentObject."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Like the other Injected property wrappers, InjectedObject wraps obtains the dependency from the Factory keypath"},{"type":"text","text":" "},{"type":"text","text":"and provides it to a wrapped instance of StateObject."}]},{"type":"codeListing","syntax":"swift","code":["struct ContentView: View {"," @InjectedObject(\\.contentViewModel) var model"," var body: some View {"," ..."," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"ContentViewModel must, of course, be of type ObservableObject and is registered like any other service"},{"type":"text","text":" "},{"type":"text","text":"or dependency."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var contentViewModel: Factory {"," self { ContentViewModel() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As with StateObject and ObservedObject, updating the object’s state will trigger a view update."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"InjectedObject is also handy when…"}]},{"type":"orderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"You have a service that could be consumed from a view or a view model."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"You have view model dependencies that depend on the Graph scope and you need the view model to be the graph’s root. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes"},{"type":"text","text":" for more details on graph."}]}]}]},{"anchor":"InjectedObject-Previews","level":2,"type":"heading","text":"InjectedObject Previews"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Single previews work exactly the same."}]},{"type":"codeListing","syntax":"swift","code":["struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," let _ = Container.shared.myService.register { MockServiceN(4) }"," ContentView()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But due a bug in how Swift manages property wrappers with built in initializers, doing multiple previews is just a little different than shown earlier."}]},{"type":"codeListing","syntax":"swift","code":["struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," Group {"," let _ = Container.shared.myServiceType.register { MockServiceN(44) }"," let model1 = ContentViewModel()"," ContentView(model: InjectedObject(model1))"," "," let _ = Container.shared.myServiceType.register { MockServiceN(88) }"," let model2 = ContentViewModel()"," ContentView(model: InjectedObject(model2))"," }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Instead of passing the model to the view directly, we need to create the entire "},{"type":"codeVoice","code":"InjectedObject(model1)"},{"type":"text","text":" pair and pass that."}]},{"anchor":"Common-Setup","level":2,"type":"heading","text":"Common Setup"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If we have several mocks that we use all of the time in our previews or unit tests, we can also add a setup function to a given container to make this easier."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," func setupMocks() {"," myService.register { MockServiceN(4) }"," sharedService.register { MockService2() }"," }","}","","struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," let _ = Container.shared.setupMocks()"," ContentView()"," }","}"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/previews"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Previews","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"kind":"article","metadata":{"roleHeading":"Article","title":"SwiftUI Previews","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Development and Testing","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Testing","doc:\/\/Factory\/documentation\/Factory\/Contexts","doc:\/\/Factory\/documentation\/Factory\/Debugging","doc:\/\/Factory\/documentation\/Factory\/Chains"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Chains":{"role":"article","title":"Circular Dependency Chains","abstract":[{"type":"text","text":"Detecting and solving Circular Dependency Chains."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","kind":"article","type":"topic","url":"\/documentation\/factory\/chains"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"},"doc://Factory/documentation/Factory/Testing":{"role":"article","title":"Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","kind":"article","type":"topic","url":"\/documentation\/factory\/testing"},"doc://Factory/documentation/Factory/Contexts":{"role":"article","title":"Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","kind":"article","type":"topic","url":"\/documentation\/factory\/contexts"},"doc://Factory/documentation/Factory/Debugging":{"role":"article","title":"Debugging","abstract":[{"type":"text","text":"Additional support for debugging resolution cycles, dependency chains and other issue."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","kind":"article","type":"topic","url":"\/documentation\/factory\/debugging"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/registrations.json b/docs/data/documentation/factory/registrations.json index 400be992..d4568cdb 100644 --- a/docs/data/documentation/factory/registrations.json +++ b/docs/data/documentation/factory/registrations.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Basic","level":3,"type":"heading","text":"Basic"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Example of a basic dependency registration in a Factory 2.0 container."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This registered dependency returns a new, unique version of "},{"type":"codeVoice","code":"MyServiceType"},{"type":"text","text":" whenever it’s asked to do so."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can also go ahead and use the full, formal definition, constructing the Factory yourself and passing it a reference to its enclosing container."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," Factory(self) { MyService() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We prefer the more concise version, and that’s what we’ll use going forward."}]},{"style":"note","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The container helper functions are "},{"type":"codeVoice","code":"@inlinable"},{"type":"text","text":" and as such there’s no performance penalty incurred when calling them."}]}],"type":"aside","name":"Note"},{"anchor":"Scopes","level":3,"type":"heading","text":"Scopes"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Examples of defining scoped services in a Factory 2.0 container."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var standardService: Factory {"," self { MyService() }"," }"," var cachedService: Factory {"," self { MyService() }"," .cached"," }"," var singletonService: Factory {"," self { SimpleService() }"," .singleton"," }"," var sharedService: Factory {"," self { MyService() }"," .shared"," .decorator { print(\"DECORATING \\($0.id)\") }"," }"," var customScopedService: Factory {"," self { SimpleService() }"," .scope(.session)"," }","}"]},{"anchor":"Constructor-Injection","level":3,"type":"heading","text":"Constructor Injection"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Example of service with constructor injection that requires another service as a parameter. To obtain that dependency we simply ask the Factory dedicated to that service to provide one for us."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var constructedService: Factory {"," self { MyConstructedService(service: self.cachedService()) }"," }"," var cachedService: Factory {"," self { MyService() }.cached"," }","}"]},{"anchor":"Parameters","level":3,"type":"heading","text":"Parameters"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Like it or not, some services require one or more parameters to be passed to them in order to be initialized correctly. In that case use "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"},{"type":"text","text":"."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var parameterService: ParameterFactory {"," self { ParameterService(value: $0) }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that we also needed to specify the type of our parameter."}]},{"anchor":"Same-Types","level":3,"type":"heading","text":"Same Types"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Example of correctly handling multiple instances of the same type."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var string1: Factory {"," self { \"String 1\" }"," }"," var string2: Factory {"," self { \"String 2\" }"," }"," var string3: Factory {"," self { \"String 3\" }"," }"," var string4: Factory {"," self { \"String 4\" }"," }","}"]},{"anchor":"Inside-Custom-Containers","level":3,"type":"heading","text":"Inside Custom Containers"},{"type":"paragraph","inlineContent":[{"type":"text","text":"You’ve seen factory registrations done within container "},{"type":"emphasis","inlineContent":[{"type":"text","text":"extensions"}]},{"type":"text","text":", but it should also be noted that we can also create them within our own custom containers."}]},{"type":"codeListing","syntax":"swift","code":["final class ServiceContainer: SharedContainer {"," \/\/ CONFORMANCE"," static var shared = ServiceContainer()"," var manager = ContainerManager()"," "," \/\/ DEFINE FACTORY"," var service1: Factory {"," self { MyService() }"," }",""," \/\/ DON'T DO THIS"," lazy var service2: Factory = self {"," MyService()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note the last “lazy” definition of "},{"type":"codeVoice","code":"service2"},{"type":"text","text":". This may seem like a reasonable equivalent, but it hides a fatal flaw. Factory’s are designed to be transient. They’re lightweight structs created to do a job and then they’re discarded."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"In order to accomplish this task, each Factory that’s created needs to maintain a strong reference to its enclosing container. And now you should be able to see the problem."}]},{"style":"warning","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Creating a “lazy” Factory and assigning it to it’s enclosing class will create a reference cycle."}]}],"type":"aside","name":"Warning"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Should you attempt to release such a container it will never go away, and you’ll have a memory leak on your hands."}]},{"anchor":"Static-Factories","level":3,"type":"heading","text":"Static Factories"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Example of a static Factory 2.0 registration container."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," static var oldSchool: Factory {"," Factory(shared) { School() }"," }","}","","let school = Container.oldSchool"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that we referenced the class “shared” container. That container will manage the registrations and scopes for our Factory."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"While you "},{"type":"emphasis","inlineContent":[{"type":"text","text":"can"}]},{"type":"text","text":" create static Factory’s in this manner, such usage should be considered to be deprecated. Static factories are also no longer compatible with the various "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected"},{"type":"text","text":" property wrappers due to the lack of keyPaths."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Better to simply define the Factory as a standard computed variable within a Container, and then access the “shared” version."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var newSchool: Factory {"," self { School() }"," }","}","","let school = Container.shared.newSchool"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/registrations"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Registrations","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"There are many ways to register dependencies with Factory. Here are a few examples."}],"kind":"article","metadata":{"roleHeading":"Article","title":"Sample Registrations","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/GettingStarted"]]},"seeAlsoSections":[{"title":"Examples","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolutions"],"generated":true}],"references":{"doc://Factory/documentation/Factory/GettingStarted":{"role":"collectionGroup","title":"Getting Started","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","kind":"article","type":"topic","url":"\/documentation\/factory\/gettingstarted"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Resolutions":{"role":"article","title":"Sample Resolutions","abstract":[{"type":"text","text":"There are many ways to use Factory to resolve dependencies. Here are a few examples."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","kind":"article","type":"topic","url":"\/documentation\/factory\/resolutions"},"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Basic","level":3,"type":"heading","text":"Basic"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Example of a basic dependency registration in a Factory 2.0 container."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This registered dependency returns a new, unique version of "},{"type":"codeVoice","code":"MyServiceType"},{"type":"text","text":" whenever it’s asked to do so."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can also go ahead and use the full, formal definition, constructing the Factory yourself and passing it a reference to its enclosing container."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," Factory(self) { MyService() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We prefer the more concise version, and that’s what we’ll use going forward."}]},{"style":"note","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The container helper functions are "},{"type":"codeVoice","code":"@inlinable"},{"type":"text","text":" and as such there’s no performance penalty incurred when calling them."}]}],"type":"aside","name":"Note"},{"anchor":"Scopes","level":3,"type":"heading","text":"Scopes"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Examples of defining scoped services in a Factory 2.0 container."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var standardService: Factory {"," self { MyService() }"," }"," var cachedService: Factory {"," self { MyService() }"," .cached"," }"," var singletonService: Factory {"," self { SimpleService() }"," .singleton"," }"," var sharedService: Factory {"," self { MyService() }"," .shared"," .decorator { print(\"DECORATING \\($0.id)\") }"," }"," var customScopedService: Factory {"," self { SimpleService() }"," .scope(.session)"," }","}"]},{"anchor":"Constructor-Injection","level":3,"type":"heading","text":"Constructor Injection"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Example of service with constructor injection that requires another service as a parameter. To obtain that dependency we simply ask the Factory dedicated to that service to provide one for us."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var constructedService: Factory {"," self { MyConstructedService(service: self.cachedService()) }"," }"," var cachedService: Factory {"," self { MyService() }.cached"," }","}"]},{"anchor":"Parameters","level":3,"type":"heading","text":"Parameters"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Like it or not, some services require one or more parameters to be passed to them in order to be initialized correctly. In that case use "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"},{"type":"text","text":"."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var parameterService: ParameterFactory {"," self { ParameterService(value: $0) }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that we also needed to specify the type of our parameter."}]},{"anchor":"Same-Types","level":3,"type":"heading","text":"Same Types"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Example of correctly handling multiple instances of the same type."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var string1: Factory {"," self { \"String 1\" }"," }"," var string2: Factory {"," self { \"String 2\" }"," }"," var string3: Factory {"," self { \"String 3\" }"," }"," var string4: Factory {"," self { \"String 4\" }"," }","}"]},{"anchor":"Inside-Custom-Containers","level":3,"type":"heading","text":"Inside Custom Containers"},{"type":"paragraph","inlineContent":[{"type":"text","text":"You’ve seen factory registrations done within container "},{"type":"emphasis","inlineContent":[{"type":"text","text":"extensions"}]},{"type":"text","text":", but it should also be noted that we can also create them within our own custom containers."}]},{"type":"codeListing","syntax":"swift","code":["final class ServiceContainer: SharedContainer {"," \/\/ CONFORMANCE"," static var shared = ServiceContainer()"," var manager = ContainerManager()"," "," \/\/ DEFINE FACTORY"," var service1: Factory {"," self { MyService() }"," }",""," \/\/ DON'T DO THIS"," lazy var service2: Factory = self {"," MyService()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note the last “lazy” definition of "},{"type":"codeVoice","code":"service2"},{"type":"text","text":". This may seem like a reasonable equivalent, but it hides a fatal flaw. Factory’s are designed to be transient. They’re lightweight structs created to do a job and then they’re discarded."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"In order to accomplish this task, each Factory that’s created needs to maintain a strong reference to its enclosing container. And now you should be able to see the problem."}]},{"style":"warning","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Creating a “lazy” Factory and assigning it to it’s enclosing class will create a reference cycle."}]}],"type":"aside","name":"Warning"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Should you attempt to release such a container it will never go away, and you’ll have a memory leak on your hands."}]},{"anchor":"Static-Factories","level":3,"type":"heading","text":"Static Factories"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Example of a static Factory 2.0 registration container."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," static var oldSchool: Factory {"," Factory(shared) { School() }"," }","}","","let school = Container.oldSchool"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that we referenced the class “shared” container. That container will manage the registrations and scopes for our Factory."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"While you "},{"type":"emphasis","inlineContent":[{"type":"text","text":"can"}]},{"type":"text","text":" create static Factory’s in this manner, such usage should be considered to be deprecated. Static factories are also no longer compatible with the various "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected"},{"type":"text","text":" property wrappers due to the lack of keyPaths."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Better to simply define the Factory as a standard computed variable within a Container, and then access the “shared” version."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var newSchool: Factory {"," self { School() }"," }","}","","let school = Container.shared.newSchool"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/registrations"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Registrations","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"There are many ways to register dependencies with Factory. Here are a few examples."}],"kind":"article","metadata":{"roleHeading":"Article","title":"Sample Registrations","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/GettingStarted"]]},"seeAlsoSections":[{"title":"Examples","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolutions"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Resolutions":{"role":"article","title":"Sample Resolutions","abstract":[{"type":"text","text":"There are many ways to use Factory to resolve dependencies. Here are a few examples."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","kind":"article","type":"topic","url":"\/documentation\/factory\/resolutions"},"doc://Factory/documentation/Factory/GettingStarted":{"role":"collectionGroup","title":"Getting Started","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","kind":"article","type":"topic","url":"\/documentation\/factory\/gettingstarted"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/resolutions.json b/docs/data/documentation/factory/resolutions.json index 24ccae20..67a5faf9 100644 --- a/docs/data/documentation/factory/resolutions.json +++ b/docs/data/documentation/factory/resolutions.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Shared-Class-Container","level":3,"type":"heading","text":"Shared Class Container"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here we instantiate our dependency from a shared class container."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {"," let service = Container.shared.constructedService()","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This is the classic Service Locator pattern updated for Factory 2.0."}]},{"anchor":"Initialization-from-Passed-Container","level":3,"type":"heading","text":"Initialization from Passed Container"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Passing an instance of a container to our view model and initializing service from that container."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {",""," let service2: MyServiceType",""," init(container: Container) {"," service2 = container.service()"," }"," ","}"]},{"anchor":"Lazy-Initialization-from-Passed-Container","level":3,"type":"heading","text":"Lazy Initialization from Passed Container"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Passing an instance of a container to our view model and saving it for later lazy initializers."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {",""," private let container: Container",""," private lazy var service3: MyConstructedService = container.constructedService()"," private lazy var service4: MyServiceType = container.cachedService()"," private lazy var service5: SimpleService = container.singletonService()"," private lazy var service6: MyServiceType = container.sharedService()",""," init(container: Container) {"," self.container = container"," }","","}"]},{"anchor":"Injected-Property-Wrappers","level":3,"type":"heading","text":"Injected Property Wrappers"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Using the "},{"type":"codeVoice","code":"@Injected"},{"type":"text","text":" and "},{"type":"codeVoice","code":"@LazyInjected"},{"type":"text","text":" property wrappers to obtain dependencies using an Annotation pattern similar to that used by "},{"type":"codeVoice","code":"EnvironmentObject"},{"type":"text","text":" in SwiftUI."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {",""," \/\/ Injected property from default container"," @Injected(\\.constructedService) var constructed",""," \/\/ Injected property from custom container"," @Injected(\\MyContainer.anotherService) var anotherService",""," \/\/ LazyInjected property from custom container"," @LazyInjected(\\MyContainer.myLazyService) var myLazyService","","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"One can also inject the view model itself."}]},{"type":"codeListing","syntax":"swift","code":["struct ContentView: View {"," @InjectedObject(\\.contentViewModel) var model: ContentViewModel"," var body: some View {"," ..."," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected"},{"type":"text","text":", "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected"},{"type":"text","text":", "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"},{"type":"text","text":", and "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject"},{"type":"text","text":" for more."}]},{"anchor":"Parameterized-Initialization-from-Passed-Container","level":3,"type":"heading","text":"Parameterized Initialization from Passed Container"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Passing a required parameter to a factory for resolution."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {",""," let parameterService: ParameterService",""," init(container: Container, value: Int) {"," service2 = container.parameterService(value)"," }","","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"},{"type":"text","text":" for more details."}]},{"anchor":"Classic-Factory-from-Static-Class-Member","level":3,"type":"heading","text":"Classic Factory from Static Class Member"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Initializing dependency from class. This is classic Service Locator pattern but this pattern should be consider deprecated."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {"," let newSchool = Container.newSchool()","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This was discussed in greater detail in "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Registrations"}]},{"anchor":"Composition-Root","level":3,"type":"heading","text":"Composition Root"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you want to use a Composition Root pattern, just use the container to provide the required dependencies to a constructor."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var constructedService: Factory {"," self { MyConstructedService(service: self.cachedService()) }.singleton"," }"," var cachedService: Factory {"," self { MyService() }.cached"," }","}","","@main","struct FactoryDemoApp: App {"," let viewModel = MyViewModel(service: Container.shared.constructedService())"," var body: some Scene {"," WindowGroup {"," NavigationView {"," ContentView(viewModel: viewModel)"," }"," }"," }","}ß"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/resolutions"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"There are many ways to use Factory to resolve dependencies. Here are a few examples."}],"kind":"article","metadata":{"roleHeading":"Article","title":"Sample Resolutions","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/GettingStarted"]]},"seeAlsoSections":[{"title":"Examples","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Registrations"],"generated":true}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"url":"\/documentation\/factory\/weaklazyinjected"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/GettingStarted":{"role":"collectionGroup","title":"Getting Started","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","kind":"article","type":"topic","url":"\/documentation\/factory\/gettingstarted"},"doc://Factory/documentation/Factory/Registrations":{"role":"article","title":"Sample Registrations","abstract":[{"type":"text","text":"There are many ways to register dependencies with Factory. Here are a few examples."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Registrations","kind":"article","type":"topic","url":"\/documentation\/factory\/registrations"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"},"doc://Factory/documentation/Factory/LazyInjected":{"role":"symbol","title":"LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"url":"\/documentation\/factory\/lazyinjected"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Shared-Class-Container","level":3,"type":"heading","text":"Shared Class Container"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here we instantiate our dependency from a shared class container."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {"," let service = Container.shared.constructedService()","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This is the classic Service Locator pattern updated for Factory 2.0."}]},{"anchor":"Initialization-from-Passed-Container","level":3,"type":"heading","text":"Initialization from Passed Container"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Passing an instance of a container to our view model and initializing service from that container."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {",""," let service2: MyServiceType",""," init(container: Container) {"," service2 = container.service()"," }"," ","}"]},{"anchor":"Lazy-Initialization-from-Passed-Container","level":3,"type":"heading","text":"Lazy Initialization from Passed Container"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Passing an instance of a container to our view model and saving it for later lazy initializers."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {",""," private let container: Container",""," private lazy var service3: MyConstructedService = container.constructedService()"," private lazy var service4: MyServiceType = container.cachedService()"," private lazy var service5: SimpleService = container.singletonService()"," private lazy var service6: MyServiceType = container.sharedService()",""," init(container: Container) {"," self.container = container"," }","","}"]},{"anchor":"Injected-Property-Wrappers","level":3,"type":"heading","text":"Injected Property Wrappers"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Using the "},{"type":"codeVoice","code":"@Injected"},{"type":"text","text":" and "},{"type":"codeVoice","code":"@LazyInjected"},{"type":"text","text":" property wrappers to obtain dependencies using an Annotation pattern similar to that used by "},{"type":"codeVoice","code":"EnvironmentObject"},{"type":"text","text":" in SwiftUI."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {",""," \/\/ Injected property from default container"," @Injected(\\.constructedService) var constructed",""," \/\/ Injected property from custom container"," @Injected(\\MyContainer.anotherService) var anotherService",""," \/\/ LazyInjected property from custom container"," @LazyInjected(\\MyContainer.myLazyService) var myLazyService","","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"One can also inject the view model itself."}]},{"type":"codeListing","syntax":"swift","code":["struct ContentView: View {"," @InjectedObject(\\.contentViewModel) var model: ContentViewModel"," var body: some View {"," ..."," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected"},{"type":"text","text":", "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected"},{"type":"text","text":", "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"},{"type":"text","text":", and "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject"},{"type":"text","text":" for more."}]},{"anchor":"Parameterized-Initialization-from-Passed-Container","level":3,"type":"heading","text":"Parameterized Initialization from Passed Container"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Passing a required parameter to a factory for resolution."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {",""," let parameterService: ParameterService",""," init(container: Container, value: Int) {"," service2 = container.parameterService(value)"," }","","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"},{"type":"text","text":" for more details."}]},{"anchor":"Classic-Factory-from-Static-Class-Member","level":3,"type":"heading","text":"Classic Factory from Static Class Member"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Initializing dependency from class. This is classic Service Locator pattern but this pattern should be consider deprecated."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {"," let newSchool = Container.newSchool()","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This was discussed in greater detail in "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Registrations"}]},{"anchor":"Composition-Root","level":3,"type":"heading","text":"Composition Root"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you want to use a Composition Root pattern, just use the container to provide the required dependencies to a constructor."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var constructedService: Factory {"," self { MyConstructedService(service: self.cachedService()) }.singleton"," }"," var cachedService: Factory {"," self { MyService() }.cached"," }","}","","@main","struct FactoryDemoApp: App {"," let viewModel = MyViewModel(service: Container.shared.constructedService())"," var body: some Scene {"," WindowGroup {"," NavigationView {"," ContentView(viewModel: viewModel)"," }"," }"," }","}ß"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/resolutions"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"There are many ways to use Factory to resolve dependencies. Here are a few examples."}],"kind":"article","metadata":{"roleHeading":"Article","title":"Sample Resolutions","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/GettingStarted"]]},"seeAlsoSections":[{"title":"Examples","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Registrations"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Injected":{"role":"symbol","title":"Injected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected"},"doc://Factory/documentation/Factory/LazyInjected":{"role":"symbol","title":"LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"url":"\/documentation\/factory\/lazyinjected"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Registrations":{"role":"article","title":"Sample Registrations","abstract":[{"type":"text","text":"There are many ways to register dependencies with Factory. Here are a few examples."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Registrations","kind":"article","type":"topic","url":"\/documentation\/factory\/registrations"},"doc://Factory/documentation/Factory/ParameterFactory":{"role":"symbol","title":"ParameterFactory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","title":"InjectedObject","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"url":"\/documentation\/factory\/injectedobject"},"doc://Factory/documentation/Factory/GettingStarted":{"role":"collectionGroup","title":"Getting Started","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","kind":"article","type":"topic","url":"\/documentation\/factory\/gettingstarted"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"url":"\/documentation\/factory\/weaklazyinjected"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/scope.json b/docs/data/documentation/factory/scope.json index a94318f8..3cdf7206 100644 --- a/docs/data/documentation/factory/scope.json +++ b/docs/data/documentation/factory/scope.json @@ -1 +1 @@ -{"seeAlsoSections":[{"title":"Scope Class Definitions","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class"],"generated":true}],"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"title":"Scope","roleHeading":"Class","role":"symbol","symbolKind":"class","externalID":"s:7Factory5ScopeC","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"Scope"}]},"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope","interfaceLanguage":"swift"},"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class"],"kind":"relationships","title":"Inherited By","type":"inheritedBy"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"topicSections":[{"title":"Type Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/cached-swift.type.property","doc:\/\/Factory\/documentation\/Factory\/Scope\/graph-swift.type.property","doc:\/\/Factory\/documentation\/Factory\/Scope\/shared-swift.type.property","doc:\/\/Factory\/documentation\/Factory\/Scope\/singleton-swift.type.property","doc:\/\/Factory\/documentation\/Factory\/Scope\/unique-swift.type.property"]}],"variants":[{"paths":["\/documentation\/factory\/scope"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"When a scope is associated with a Factory the first time the dependency is resolved a reference to that object"},{"type":"text","text":" "},{"type":"text","text":"is cached. The next time that Factory is resolved a reference to the originally cached object will be returned."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That behavior can vary according to the scope type (e.g. Shared or Graph)"}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," self { MyService() }"," .singleton"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Scopes work hand in hand with Containers to managed object lifecycles. If the container ever goes our of scope, so"},{"type":"text","text":" "},{"type":"text","text":"will all of its cached references."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"If no scope is associated with a given Factory then the scope is considered to be unique and a new instance"},{"type":"text","text":" "},{"type":"text","text":"of the dependency will be created each and every time that factory is resolved."}]}]}],"references":{"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"role":"symbol","title":"Scope.Shared","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"url":"\/documentation\/factory\/scope\/shared-swift.class"},"doc://Factory/documentation/Factory/Scope/singleton-swift.type.property":{"role":"symbol","title":"singleton","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Singleton","preciseIdentifier":"s:7Factory5ScopeC9SingletonC"}],"abstract":[{"type":"text","text":"A reference to the default singleton scope manager."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/singleton-swift.type.property","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.type.property"},"doc://Factory/documentation/Factory/Scope/shared-swift.type.property":{"role":"symbol","title":"shared","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Shared","preciseIdentifier":"s:7Factory5ScopeC6SharedC"}],"abstract":[{"type":"text","text":"A reference to the default shared scope manager."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/shared-swift.type.property","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/shared-swift.type.property"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/Scope/graph-swift.type.property":{"role":"symbol","title":"graph","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Graph","preciseIdentifier":"s:7Factory5ScopeC5GraphC"}],"abstract":[{"type":"text","text":"A reference to the default graph scope manager."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/graph-swift.type.property","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.type.property"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"role":"symbol","title":"Scope.Unique","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}],"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scope/cached-swift.type.property":{"role":"symbol","title":"cached","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Cached","preciseIdentifier":"s:7Factory5ScopeC6CachedC"}],"abstract":[{"type":"text","text":"A reference to the default cached scope manager."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/cached-swift.type.property","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/cached-swift.type.property"},"doc://Factory/documentation/Factory/Scope/unique-swift.type.property":{"role":"symbol","title":"unique","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Unique","preciseIdentifier":"s:7Factory5ScopeC6UniqueC"}],"abstract":[{"type":"text","text":"A reference to the default unique scope."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/unique-swift.type.property","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/unique-swift.type.property"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"seeAlsoSections":[{"title":"Scope Class Definitions","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class"],"generated":true}],"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"title":"Scope","roleHeading":"Class","role":"symbol","symbolKind":"class","externalID":"s:7Factory5ScopeC","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"Scope"}]},"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope","interfaceLanguage":"swift"},"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class"],"kind":"relationships","title":"Inherited By","type":"inheritedBy"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"topicSections":[{"title":"Type Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/cached-swift.type.property","doc:\/\/Factory\/documentation\/Factory\/Scope\/graph-swift.type.property","doc:\/\/Factory\/documentation\/Factory\/Scope\/shared-swift.type.property","doc:\/\/Factory\/documentation\/Factory\/Scope\/singleton-swift.type.property","doc:\/\/Factory\/documentation\/Factory\/Scope\/unique-swift.type.property"]}],"variants":[{"paths":["\/documentation\/factory\/scope"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"When a scope is associated with a Factory the first time the dependency is resolved a reference to that object"},{"type":"text","text":" "},{"type":"text","text":"is cached. The next time that Factory is resolved a reference to the originally cached object will be returned."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That behavior can vary according to the scope type (e.g. Shared or Graph)"}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," self { MyService() }"," .singleton"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Scopes work hand in hand with Containers to managed object lifecycles. If the container ever goes our of scope, so"},{"type":"text","text":" "},{"type":"text","text":"will all of its cached references."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"If no scope is associated with a given Factory then the scope is considered to be unique and a new instance"},{"type":"text","text":" "},{"type":"text","text":"of the dependency will be created each and every time that factory is resolved."}]}]}],"references":{"doc://Factory/documentation/Factory/Scope/singleton-swift.type.property":{"role":"symbol","title":"singleton","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Singleton","preciseIdentifier":"s:7Factory5ScopeC9SingletonC"}],"abstract":[{"type":"text","text":"A reference to the default singleton scope manager."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/singleton-swift.type.property","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.type.property"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Scope/unique-swift.type.property":{"role":"symbol","title":"unique","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Unique","preciseIdentifier":"s:7Factory5ScopeC6UniqueC"}],"abstract":[{"type":"text","text":"A reference to the default unique scope."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/unique-swift.type.property","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/unique-swift.type.property"},"doc://Factory/documentation/Factory/Scope/graph-swift.type.property":{"role":"symbol","title":"graph","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Graph","preciseIdentifier":"s:7Factory5ScopeC5GraphC"}],"abstract":[{"type":"text","text":"A reference to the default graph scope manager."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/graph-swift.type.property","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.type.property"},"doc://Factory/documentation/Factory/Scope/shared-swift.type.property":{"role":"symbol","title":"shared","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Shared","preciseIdentifier":"s:7Factory5ScopeC6SharedC"}],"abstract":[{"type":"text","text":"A reference to the default shared scope manager."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/shared-swift.type.property","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/shared-swift.type.property"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"role":"symbol","title":"Scope.Unique","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}],"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"role":"symbol","title":"Scope.Shared","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"url":"\/documentation\/factory\/scope\/shared-swift.class"},"doc://Factory/documentation/Factory/Scope/cached-swift.type.property":{"role":"symbol","title":"cached","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Cached","preciseIdentifier":"s:7Factory5ScopeC6CachedC"}],"abstract":[{"type":"text","text":"A reference to the default cached scope manager."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/cached-swift.type.property","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/cached-swift.type.property"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/scope/cached-swift.class.json b/docs/data/documentation/factory/scope/cached-swift.class.json index 2e23fdd8..6ac4f2bc 100644 --- a/docs/data/documentation/factory/scope/cached-swift.class.json +++ b/docs/data/documentation/factory/scope/cached-swift.class.json @@ -1 +1 @@ -{"seeAlsoSections":[{"title":"Scope Class Definitions","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope","doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class"],"generated":true}],"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"navigatorTitle":[{"kind":"identifier","text":"Cached"}],"role":"symbol","title":"Scope.Cached","roleHeading":"Class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"symbolKind":"class","externalID":"s:7Factory5ScopeC6CachedC","extendedModule":"Factory","modules":[{"name":"Factory"}]},"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","interfaceLanguage":"swift"},"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"],"kind":"relationships","title":"Inherits From","type":"inheritsFrom"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class\/init()"]}],"variants":[{"paths":["\/documentation\/factory\/scope\/cached-swift.class"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"final"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"languages":["swift"],"platforms":["macOS"]}]}],"references":{"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"role":"symbol","title":"Scope.Shared","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"url":"\/documentation\/factory\/scope\/shared-swift.class"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/cached-swift.class\/init()"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"role":"symbol","title":"Scope.Unique","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}],"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"}}} \ No newline at end of file +{"seeAlsoSections":[{"title":"Scope Class Definitions","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope","doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class"],"generated":true}],"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"navigatorTitle":[{"kind":"identifier","text":"Cached"}],"role":"symbol","title":"Scope.Cached","roleHeading":"Class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"symbolKind":"class","externalID":"s:7Factory5ScopeC6CachedC","extendedModule":"Factory","modules":[{"name":"Factory"}]},"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","interfaceLanguage":"swift"},"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"],"kind":"relationships","title":"Inherits From","type":"inheritsFrom"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class\/init()"]}],"variants":[{"paths":["\/documentation\/factory\/scope\/cached-swift.class"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"final"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"languages":["swift"],"platforms":["macOS"]}]}],"references":{"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"role":"symbol","title":"Scope.Shared","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"url":"\/documentation\/factory\/scope\/shared-swift.class"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"role":"symbol","title":"Scope.Unique","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}],"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/cached-swift.class\/init()"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/scope/cached-swift.class/init().json b/docs/data/documentation/factory/scope/cached-swift.class/init().json index cc42a511..4842a684 100644 --- a/docs/data/documentation/factory/scope/cached-swift.class/init().json +++ b/docs/data/documentation/factory/scope/cached-swift.class/init().json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"override"},{"kind":"text","text":" "},{"kind":"keyword","text":"init"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/cached-swift.class\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class\/init()","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"title":"init()","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory5ScopeC6CachedCAEycfc","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/cached-swift.class\/init()"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"override"},{"kind":"text","text":" "},{"kind":"keyword","text":"init"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/cached-swift.class\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class\/init()","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"title":"init()","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory5ScopeC6CachedCAEycfc","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"]]},"references":{"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/cached-swift.class\/init()"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/scope/cached-swift.type.property.json b/docs/data/documentation/factory/scope/cached-swift.type.property.json index 02677d86..7bf52cbc 100644 --- a/docs/data/documentation/factory/scope/cached-swift.type.property.json +++ b/docs/data/documentation/factory/scope/cached-swift.type.property.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","preciseIdentifier":"s:7Factory5ScopeC6CachedC","text":"Cached"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/cached-swift.type.property"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/cached-swift.type.property","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A reference to the default cached scope manager."}],"kind":"symbol","metadata":{"role":"symbol","title":"cached","roleHeading":"Type Property","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Cached","preciseIdentifier":"s:7Factory5ScopeC6CachedC"}],"symbolKind":"property","externalID":"s:7Factory5ScopeC6cachedAC6CachedCvpZ","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"references":{"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/Scope/cached-swift.type.property":{"role":"symbol","title":"cached","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Cached","preciseIdentifier":"s:7Factory5ScopeC6CachedC"}],"abstract":[{"type":"text","text":"A reference to the default cached scope manager."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/cached-swift.type.property","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/cached-swift.type.property"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","preciseIdentifier":"s:7Factory5ScopeC6CachedC","text":"Cached"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/cached-swift.type.property"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/cached-swift.type.property","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A reference to the default cached scope manager."}],"kind":"symbol","metadata":{"role":"symbol","title":"cached","roleHeading":"Type Property","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Cached","preciseIdentifier":"s:7Factory5ScopeC6CachedC"}],"symbolKind":"property","externalID":"s:7Factory5ScopeC6cachedAC6CachedCvpZ","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"references":{"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Scope/cached-swift.type.property":{"role":"symbol","title":"cached","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Cached","preciseIdentifier":"s:7Factory5ScopeC6CachedC"}],"abstract":[{"type":"text","text":"A reference to the default cached scope manager."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/cached-swift.type.property","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/cached-swift.type.property"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/scope/graph-swift.class.json b/docs/data/documentation/factory/scope/graph-swift.class.json index 40a6afab..a304a296 100644 --- a/docs/data/documentation/factory/scope/graph-swift.class.json +++ b/docs/data/documentation/factory/scope/graph-swift.class.json @@ -1 +1 @@ -{"seeAlsoSections":[{"title":"Scope Class Definitions","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope","doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class"],"generated":true}],"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"navigatorTitle":[{"kind":"identifier","text":"Graph"}],"role":"symbol","title":"Scope.Graph","roleHeading":"Class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"symbolKind":"class","externalID":"s:7Factory5ScopeC5GraphC","extendedModule":"Factory","modules":[{"name":"Factory"}]},"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","interfaceLanguage":"swift"},"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"],"kind":"relationships","title":"Inherits From","type":"inheritsFrom"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class\/init()"]}],"variants":[{"paths":["\/documentation\/factory\/scope\/graph-swift.class"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"final"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This scope is managed and cleared by the main resolution function at the end of each resolution cycle."}]}]}],"references":{"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"role":"symbol","title":"Scope.Unique","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}],"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"role":"symbol","title":"Scope.Shared","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"url":"\/documentation\/factory\/scope\/shared-swift.class"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.class\/init()"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"}}} \ No newline at end of file +{"seeAlsoSections":[{"title":"Scope Class Definitions","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope","doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class"],"generated":true}],"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"navigatorTitle":[{"kind":"identifier","text":"Graph"}],"role":"symbol","title":"Scope.Graph","roleHeading":"Class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"symbolKind":"class","externalID":"s:7Factory5ScopeC5GraphC","extendedModule":"Factory","modules":[{"name":"Factory"}]},"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","interfaceLanguage":"swift"},"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"],"kind":"relationships","title":"Inherits From","type":"inheritsFrom"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class\/init()"]}],"variants":[{"paths":["\/documentation\/factory\/scope\/graph-swift.class"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"final"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This scope is managed and cleared by the main resolution function at the end of each resolution cycle."}]}]}],"references":{"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"role":"symbol","title":"Scope.Shared","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"url":"\/documentation\/factory\/scope\/shared-swift.class"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"role":"symbol","title":"Scope.Unique","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}],"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.class\/init()"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/scope/graph-swift.class/init().json b/docs/data/documentation/factory/scope/graph-swift.class/init().json index 3bf8615a..f2dd59e0 100644 --- a/docs/data/documentation/factory/scope/graph-swift.class/init().json +++ b/docs/data/documentation/factory/scope/graph-swift.class/init().json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"override"},{"kind":"text","text":" "},{"kind":"keyword","text":"init"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/graph-swift.class\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class\/init()","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"title":"init()","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory5ScopeC5GraphCAEycfc","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.class\/init()"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"override"},{"kind":"text","text":" "},{"kind":"keyword","text":"init"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/graph-swift.class\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class\/init()","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"title":"init()","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory5ScopeC5GraphCAEycfc","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"]]},"references":{"doc://Factory/documentation/Factory/Scope/Graph-swift.class/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.class\/init()"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/scope/graph-swift.type.property.json b/docs/data/documentation/factory/scope/graph-swift.type.property.json index 428b0c39..35112a2f 100644 --- a/docs/data/documentation/factory/scope/graph-swift.type.property.json +++ b/docs/data/documentation/factory/scope/graph-swift.type.property.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","preciseIdentifier":"s:7Factory5ScopeC5GraphC","text":"Graph"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/graph-swift.type.property"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/graph-swift.type.property","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A reference to the default graph scope manager."}],"kind":"symbol","metadata":{"role":"symbol","title":"graph","roleHeading":"Type Property","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Graph","preciseIdentifier":"s:7Factory5ScopeC5GraphC"}],"symbolKind":"property","externalID":"s:7Factory5ScopeC5graphAC5GraphCvpZ","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"references":{"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Scope/graph-swift.type.property":{"role":"symbol","title":"graph","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Graph","preciseIdentifier":"s:7Factory5ScopeC5GraphC"}],"abstract":[{"type":"text","text":"A reference to the default graph scope manager."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/graph-swift.type.property","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.type.property"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","preciseIdentifier":"s:7Factory5ScopeC5GraphC","text":"Graph"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/graph-swift.type.property"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/graph-swift.type.property","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A reference to the default graph scope manager."}],"kind":"symbol","metadata":{"role":"symbol","title":"graph","roleHeading":"Type Property","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Graph","preciseIdentifier":"s:7Factory5ScopeC5GraphC"}],"symbolKind":"property","externalID":"s:7Factory5ScopeC5graphAC5GraphCvpZ","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"references":{"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/graph-swift.type.property":{"role":"symbol","title":"graph","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Graph","preciseIdentifier":"s:7Factory5ScopeC5GraphC"}],"abstract":[{"type":"text","text":"A reference to the default graph scope manager."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/graph-swift.type.property","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.type.property"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/scope/shared-swift.class.json b/docs/data/documentation/factory/scope/shared-swift.class.json index d36a3100..9578e2c5 100644 --- a/docs/data/documentation/factory/scope/shared-swift.class.json +++ b/docs/data/documentation/factory/scope/shared-swift.class.json @@ -1 +1 @@ -{"seeAlsoSections":[{"title":"Scope Class Definitions","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope","doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class"],"generated":true}],"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"navigatorTitle":[{"kind":"identifier","text":"Shared"}],"role":"symbol","title":"Scope.Shared","roleHeading":"Class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"symbolKind":"class","externalID":"s:7Factory5ScopeC6SharedC","extendedModule":"Factory","modules":[{"name":"Factory"}]},"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","interfaceLanguage":"swift"},"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"],"kind":"relationships","title":"Inherits From","type":"inheritsFrom"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class\/init()"]}],"variants":[{"paths":["\/documentation\/factory\/scope\/shared-swift.class"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"final"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"languages":["swift"],"platforms":["macOS"]}]}],"references":{"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"role":"symbol","title":"Scope.Unique","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}],"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/shared-swift.class\/init()"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"role":"symbol","title":"Scope.Shared","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"url":"\/documentation\/factory\/scope\/shared-swift.class"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"}}} \ No newline at end of file +{"seeAlsoSections":[{"title":"Scope Class Definitions","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope","doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class"],"generated":true}],"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"navigatorTitle":[{"kind":"identifier","text":"Shared"}],"role":"symbol","title":"Scope.Shared","roleHeading":"Class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"symbolKind":"class","externalID":"s:7Factory5ScopeC6SharedC","extendedModule":"Factory","modules":[{"name":"Factory"}]},"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","interfaceLanguage":"swift"},"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"],"kind":"relationships","title":"Inherits From","type":"inheritsFrom"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class\/init()"]}],"variants":[{"paths":["\/documentation\/factory\/scope\/shared-swift.class"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"final"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"languages":["swift"],"platforms":["macOS"]}]}],"references":{"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"role":"symbol","title":"Scope.Shared","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"url":"\/documentation\/factory\/scope\/shared-swift.class"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"role":"symbol","title":"Scope.Unique","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}],"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/shared-swift.class\/init()"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/scope/shared-swift.class/init().json b/docs/data/documentation/factory/scope/shared-swift.class/init().json index 4d04fb0d..0a9081f2 100644 --- a/docs/data/documentation/factory/scope/shared-swift.class/init().json +++ b/docs/data/documentation/factory/scope/shared-swift.class/init().json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"override"},{"kind":"text","text":" "},{"kind":"keyword","text":"init"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/shared-swift.class\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class\/init()","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"title":"init()","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory5ScopeC6SharedCAEycfc","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class"]]},"references":{"doc://Factory/documentation/Factory/Scope/Shared-swift.class/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/shared-swift.class\/init()"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"role":"symbol","title":"Scope.Shared","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"url":"\/documentation\/factory\/scope\/shared-swift.class"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"override"},{"kind":"text","text":" "},{"kind":"keyword","text":"init"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/shared-swift.class\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class\/init()","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"title":"init()","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory5ScopeC6SharedCAEycfc","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class"]]},"references":{"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"role":"symbol","title":"Scope.Shared","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"url":"\/documentation\/factory\/scope\/shared-swift.class"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/shared-swift.class\/init()"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/scope/shared-swift.type.property.json b/docs/data/documentation/factory/scope/shared-swift.type.property.json index 2c960c8e..bd635120 100644 --- a/docs/data/documentation/factory/scope/shared-swift.type.property.json +++ b/docs/data/documentation/factory/scope/shared-swift.type.property.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","preciseIdentifier":"s:7Factory5ScopeC6SharedC","text":"Shared"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/shared-swift.type.property"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/shared-swift.type.property","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A reference to the default shared scope manager."}],"kind":"symbol","metadata":{"role":"symbol","title":"shared","roleHeading":"Type Property","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Shared","preciseIdentifier":"s:7Factory5ScopeC6SharedC"}],"symbolKind":"property","externalID":"s:7Factory5ScopeC6sharedAC6SharedCvpZ","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"role":"symbol","title":"Scope.Shared","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"url":"\/documentation\/factory\/scope\/shared-swift.class"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Scope/shared-swift.type.property":{"role":"symbol","title":"shared","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Shared","preciseIdentifier":"s:7Factory5ScopeC6SharedC"}],"abstract":[{"type":"text","text":"A reference to the default shared scope manager."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/shared-swift.type.property","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/shared-swift.type.property"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","preciseIdentifier":"s:7Factory5ScopeC6SharedC","text":"Shared"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/shared-swift.type.property"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/shared-swift.type.property","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A reference to the default shared scope manager."}],"kind":"symbol","metadata":{"role":"symbol","title":"shared","roleHeading":"Type Property","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Shared","preciseIdentifier":"s:7Factory5ScopeC6SharedC"}],"symbolKind":"property","externalID":"s:7Factory5ScopeC6sharedAC6SharedCvpZ","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/shared-swift.type.property":{"role":"symbol","title":"shared","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Shared","preciseIdentifier":"s:7Factory5ScopeC6SharedC"}],"abstract":[{"type":"text","text":"A reference to the default shared scope manager."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/shared-swift.type.property","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/shared-swift.type.property"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"role":"symbol","title":"Scope.Shared","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"url":"\/documentation\/factory\/scope\/shared-swift.class"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/scope/singleton-swift.class.json b/docs/data/documentation/factory/scope/singleton-swift.class.json index f1fe6319..7d8ec968 100644 --- a/docs/data/documentation/factory/scope/singleton-swift.class.json +++ b/docs/data/documentation/factory/scope/singleton-swift.class.json @@ -1 +1 @@ -{"seeAlsoSections":[{"title":"Scope Class Definitions","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope","doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class"],"generated":true}],"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"role":"symbol","title":"Scope.Singleton","roleHeading":"Class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"symbolKind":"class","externalID":"s:7Factory5ScopeC9SingletonC","extendedModule":"Factory","modules":[{"name":"Factory"}]},"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","interfaceLanguage":"swift"},"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"],"kind":"relationships","title":"Inherits From","type":"inheritsFrom"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/init()"]},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/reset()"]}],"variants":[{"paths":["\/documentation\/factory\/scope\/singleton-swift.class"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"final"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"languages":["swift"],"platforms":["macOS"]}]}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"role":"symbol","title":"Scope.Shared","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"url":"\/documentation\/factory\/scope\/shared-swift.class"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class/reset()":{"role":"symbol","title":"reset()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"Reset"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/reset()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.class\/reset()"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.class\/init()"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"role":"symbol","title":"Scope.Unique","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}],"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"}}} \ No newline at end of file +{"seeAlsoSections":[{"title":"Scope Class Definitions","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope","doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class"],"generated":true}],"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"role":"symbol","title":"Scope.Singleton","roleHeading":"Class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"symbolKind":"class","externalID":"s:7Factory5ScopeC9SingletonC","extendedModule":"Factory","modules":[{"name":"Factory"}]},"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","interfaceLanguage":"swift"},"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"],"kind":"relationships","title":"Inherits From","type":"inheritsFrom"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/init()"]},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/reset()"]}],"variants":[{"paths":["\/documentation\/factory\/scope\/singleton-swift.class"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"final"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"languages":["swift"],"platforms":["macOS"]}]}],"references":{"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class/reset()":{"role":"symbol","title":"reset()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"Reset"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/reset()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.class\/reset()"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"role":"symbol","title":"Scope.Shared","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"url":"\/documentation\/factory\/scope\/shared-swift.class"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.class\/init()"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"role":"symbol","title":"Scope.Unique","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}],"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"url":"\/documentation\/factory\/scope\/unique-swift.class"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/scope/singleton-swift.class/init().json b/docs/data/documentation/factory/scope/singleton-swift.class/init().json index 303fa3de..76ab8e2b 100644 --- a/docs/data/documentation/factory/scope/singleton-swift.class/init().json +++ b/docs/data/documentation/factory/scope/singleton-swift.class/init().json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"override"},{"kind":"text","text":" "},{"kind":"keyword","text":"init"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/singleton-swift.class\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/init()","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"title":"init()","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory5ScopeC9SingletonCAEycfc","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"]]},"references":{"doc://Factory/documentation/Factory/Scope/Singleton-swift.class/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.class\/init()"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"override"},{"kind":"text","text":" "},{"kind":"keyword","text":"init"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/singleton-swift.class\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/init()","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"title":"init()","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory5ScopeC9SingletonCAEycfc","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"]]},"references":{"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.class\/init()"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/scope/singleton-swift.class/reset().json b/docs/data/documentation/factory/scope/singleton-swift.class/reset().json index 1186eb14..799250dc 100644 --- a/docs/data/documentation/factory/scope/singleton-swift.class/reset().json +++ b/docs/data/documentation/factory/scope/singleton-swift.class/reset().json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/singleton-swift.class\/reset()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/reset()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Reset"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"()"}],"title":"reset()","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:7Factory5ScopeC9SingletonC5resetyyF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class/reset()":{"role":"symbol","title":"reset()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"Reset"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/reset()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.class\/reset()"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/singleton-swift.class\/reset()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/reset()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Reset"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"()"}],"title":"reset()","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:7Factory5ScopeC9SingletonC5resetyyF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"]]},"references":{"doc://Factory/documentation/Factory/Scope/Singleton-swift.class/reset()":{"role":"symbol","title":"reset()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"Reset"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/reset()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.class\/reset()"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/scope/singleton-swift.type.property.json b/docs/data/documentation/factory/scope/singleton-swift.type.property.json index 3d4b3df2..47361871 100644 --- a/docs/data/documentation/factory/scope/singleton-swift.type.property.json +++ b/docs/data/documentation/factory/scope/singleton-swift.type.property.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","preciseIdentifier":"s:7Factory5ScopeC9SingletonC","text":"Singleton"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/singleton-swift.type.property"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/singleton-swift.type.property","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A reference to the default singleton scope manager."}],"kind":"symbol","metadata":{"role":"symbol","title":"singleton","roleHeading":"Type Property","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Singleton","preciseIdentifier":"s:7Factory5ScopeC9SingletonC"}],"symbolKind":"property","externalID":"s:7Factory5ScopeC9singletonAC9SingletonCvpZ","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"references":{"doc://Factory/documentation/Factory/Scope/singleton-swift.type.property":{"role":"symbol","title":"singleton","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Singleton","preciseIdentifier":"s:7Factory5ScopeC9SingletonC"}],"abstract":[{"type":"text","text":"A reference to the default singleton scope manager."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/singleton-swift.type.property","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.type.property"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","preciseIdentifier":"s:7Factory5ScopeC9SingletonC","text":"Singleton"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/singleton-swift.type.property"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/singleton-swift.type.property","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A reference to the default singleton scope manager."}],"kind":"symbol","metadata":{"role":"symbol","title":"singleton","roleHeading":"Type Property","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Singleton","preciseIdentifier":"s:7Factory5ScopeC9SingletonC"}],"symbolKind":"property","externalID":"s:7Factory5ScopeC9singletonAC9SingletonCvpZ","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/singleton-swift.type.property":{"role":"symbol","title":"singleton","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Singleton","preciseIdentifier":"s:7Factory5ScopeC9SingletonC"}],"abstract":[{"type":"text","text":"A reference to the default singleton scope manager."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/singleton-swift.type.property","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.type.property"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/scope/unique-swift.class.json b/docs/data/documentation/factory/scope/unique-swift.class.json index 03bac961..7fa6dbc1 100644 --- a/docs/data/documentation/factory/scope/unique-swift.class.json +++ b/docs/data/documentation/factory/scope/unique-swift.class.json @@ -1 +1 @@ -{"seeAlsoSections":[{"title":"Scope Class Definitions","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope","doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"],"generated":true}],"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"navigatorTitle":[{"kind":"identifier","text":"Unique"}],"role":"symbol","title":"Scope.Unique","roleHeading":"Class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}],"symbolKind":"class","externalID":"s:7Factory5ScopeC6UniqueC","extendedModule":"Factory","modules":[{"name":"Factory"}]},"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","interfaceLanguage":"swift"},"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"],"kind":"relationships","title":"Inherits From","type":"inheritsFrom"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class\/init()"]}],"variants":[{"paths":["\/documentation\/factory\/scope\/unique-swift.class"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"final"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}],"languages":["swift"],"platforms":["macOS"]}]}],"references":{"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/unique-swift.class\/init()"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"role":"symbol","title":"Scope.Unique","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}],"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"role":"symbol","title":"Scope.Shared","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"url":"\/documentation\/factory\/scope\/shared-swift.class"}}} \ No newline at end of file +{"seeAlsoSections":[{"title":"Scope Class Definitions","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope","doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"],"generated":true}],"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"navigatorTitle":[{"kind":"identifier","text":"Unique"}],"role":"symbol","title":"Scope.Unique","roleHeading":"Class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}],"symbolKind":"class","externalID":"s:7Factory5ScopeC6UniqueC","extendedModule":"Factory","modules":[{"name":"Factory"}]},"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","interfaceLanguage":"swift"},"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"],"kind":"relationships","title":"Inherits From","type":"inheritsFrom"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class\/init()"]}],"variants":[{"paths":["\/documentation\/factory\/scope\/unique-swift.class"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"final"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}],"languages":["swift"],"platforms":["macOS"]}]}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"role":"symbol","title":"Scope.Shared","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"url":"\/documentation\/factory\/scope\/shared-swift.class"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"role":"symbol","title":"Scope.Unique","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}],"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/unique-swift.class\/init()"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/scope/unique-swift.class/init().json b/docs/data/documentation/factory/scope/unique-swift.class/init().json index 9ddd7fa1..f7473841 100644 --- a/docs/data/documentation/factory/scope/unique-swift.class/init().json +++ b/docs/data/documentation/factory/scope/unique-swift.class/init().json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"override"},{"kind":"text","text":" "},{"kind":"keyword","text":"init"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/unique-swift.class\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class\/init()","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"title":"init()","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory5ScopeC6UniqueCAEycfc","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class"]]},"references":{"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"role":"symbol","title":"Scope.Unique","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}],"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/unique-swift.class\/init()"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"override"},{"kind":"text","text":" "},{"kind":"keyword","text":"init"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/unique-swift.class\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class\/init()","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"title":"init()","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory5ScopeC6UniqueCAEycfc","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class"]]},"references":{"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"role":"symbol","title":"Scope.Unique","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}],"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class/init()":{"role":"symbol","title":"init()","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class\/init()","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/unique-swift.class\/init()"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/scope/unique-swift.type.property.json b/docs/data/documentation/factory/scope/unique-swift.type.property.json index 19b83871..10c89101 100644 --- a/docs/data/documentation/factory/scope/unique-swift.type.property.json +++ b/docs/data/documentation/factory/scope/unique-swift.type.property.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","preciseIdentifier":"s:7Factory5ScopeC6UniqueC","text":"Unique"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If no scope cache is specified then Factory is running in unique more."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/unique-swift.type.property"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/unique-swift.type.property","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A reference to the default unique scope."}],"kind":"symbol","metadata":{"role":"symbol","title":"unique","roleHeading":"Type Property","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Unique","preciseIdentifier":"s:7Factory5ScopeC6UniqueC"}],"symbolKind":"property","externalID":"s:7Factory5ScopeC6uniqueAC6UniqueCvpZ","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Scope/unique-swift.type.property":{"role":"symbol","title":"unique","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Unique","preciseIdentifier":"s:7Factory5ScopeC6UniqueC"}],"abstract":[{"type":"text","text":"A reference to the default unique scope."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/unique-swift.type.property","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/unique-swift.type.property"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"role":"symbol","title":"Scope.Unique","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}],"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"url":"\/documentation\/factory\/scope\/unique-swift.class"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","preciseIdentifier":"s:7Factory5ScopeC6UniqueC","text":"Unique"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If no scope cache is specified then Factory is running in unique more."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/unique-swift.type.property"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/unique-swift.type.property","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A reference to the default unique scope."}],"kind":"symbol","metadata":{"role":"symbol","title":"unique","roleHeading":"Type Property","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Unique","preciseIdentifier":"s:7Factory5ScopeC6UniqueC"}],"symbolKind":"property","externalID":"s:7Factory5ScopeC6uniqueAC6UniqueCvpZ","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"references":{"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","title":"Scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","kind":"article","type":"topic","url":"\/documentation\/factory\/scopes"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"role":"symbol","title":"Scope.Unique","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}],"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Scope/unique-swift.type.property":{"role":"symbol","title":"unique","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Unique","preciseIdentifier":"s:7Factory5ScopeC6UniqueC"}],"abstract":[{"type":"text","text":"A reference to the default unique scope."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/unique-swift.type.property","kind":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/unique-swift.type.property"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/scopes.json b/docs/data/documentation/factory/scopes.json index f60f8963..d63b5b19 100644 --- a/docs/data/documentation/factory/scopes.json +++ b/docs/data/documentation/factory/scopes.json @@ -1 +1 @@ -{"seeAlsoSections":[{"title":"The Basics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/GettingStarted","doc:\/\/Factory\/documentation\/Factory\/Containers"],"generated":true}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you’ve used Resolver or some other dependency injection system before then you’ve probably experienced the benefits and power of scopes."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And if not, the concept is easy to understand: Just how long should an instance of an object live?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You’ve no doubt stuffed an instance of a class into a static variable and created a singleton at some point in your career. This is an example of a scope. A single instance is created and then used and shared by all of the methods and functions in the app."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This is easily done in Factory."}]},{"anchor":"Singleton","level":2,"type":"heading","text":"Singleton"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Just specify a singleton factory."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var myService: Factory { "," self { MyService() }"," .singleton"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now whenever someone requests an instance of "},{"type":"codeVoice","code":"myService"},{"type":"text","text":" they’ll get the same instance of the object as everyone else."}]},{"type":"codeListing","syntax":"swift","code":["let a = container.myService()","let b = container.myService()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"When we do this, both "},{"type":"codeVoice","code":"a"},{"type":"text","text":" and "},{"type":"codeVoice","code":"b"},{"type":"text","text":" refer to the same instance."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Singletons are easy to create, but they should be used with care. Like static singletons you might create in your own code, using singleton scopes can become problematic when testing your code and often require special handling. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing"},{"type":"text","text":" for more information on how to handle this."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Another issue to keep in mind is that singletons are global, meaning that they’re "},{"type":"emphasis","inlineContent":[{"type":"text","text":"not"}]},{"type":"text","text":" managed or cached by any specific container. If we create two instances of the above container and resolve "},{"type":"codeVoice","code":"myService"},{"type":"text","text":" from both, we’ll get the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"same"}]},{"type":"text","text":" instance from both."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Then again, that’s kind of the idea, isn’t it?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Just keep in mind with Factory you have other options. Only use define a scope as singleton when there’s an overriding need for there to be one "},{"type":"emphasis","inlineContent":[{"type":"text","text":"and only one"}]},{"type":"text","text":" instance of an object."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So what do we do if we need our object to be cached?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Just say so."}]},{"anchor":"Cached","level":2,"type":"heading","text":"Cached"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Cached items are persisted until the cache is reset or the container is deallocated. Consider the following Factory registration."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var cachedService: Factory { "," self { MyService() }.cached"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now let’s resolve it."}]},{"type":"codeListing","syntax":"swift","code":["let a = container.cachedService()","let b = container.cachedService()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"When we do this we see that both "},{"type":"codeVoice","code":"a"},{"type":"text","text":" and "},{"type":"codeVoice","code":"b"},{"type":"text","text":" reference the same instance, just as we saw with the singleton example above."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Cached scopes are Factory’s’ workhorses. They make unit testing a lot easier and should be your first choice when you’re looking for a caching solution."}]},{"anchor":"Shared","level":2,"type":"heading","text":"Shared"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Shared items exist just as long as someone holds a strong reference to them. When the last reference goes away, the weakly held shared reference also goes away."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var sharedService: Factory { "," self { MyService() }.shared"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now let’s resolve it."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ resolution","var a = container.sharedService()","var b = container.sharedService()","\/\/ zap all strong references","a = nil","b = nil","\/\/ resolve it again","var c = container.sharedService()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"When "},{"type":"codeVoice","code":"a"},{"type":"text","text":" was resolved it was cached in the shared cache. When "},{"type":"codeVoice","code":"b"},{"type":"text","text":" is resolved it’s pulled from the cache as we might expect. But when the last strong external reference to "},{"type":"codeVoice","code":"a"},{"type":"text","text":" and "},{"type":"codeVoice","code":"b"},{"type":"text","text":" is released (set to nil in the example), the weak reference maintained by the shared cache is also released."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So when we resolve "},{"type":"codeVoice","code":"c"},{"type":"text","text":" we’re going to get a new instance, and the cycle proceeds anew."}]},{"anchor":"Custom-Scopes","level":2,"type":"heading","text":"Custom Scopes"},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can also add your own special purpose caches to the mix. Try this."}]},{"type":"codeListing","syntax":"swift","code":["extension Scope {"," static var session = Cached()","}","","extension Container {"," var authenticatedUser: Factory { "," self { AuthenticatedUser() }"," .scope(.session)"," }"," var profileImageCache: Factory { "," self { ProfileImageCache() } "," .scope(.session)"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Once created, a single instance of "},{"type":"codeVoice","code":"AuthenticatedUser"},{"type":"text","text":" and "},{"type":"codeVoice","code":"ProfileImageCache"},{"type":"text","text":" will be provided to anyone that needs one… up until the point where the session scope is reset, perhaps by a user logging out."}]},{"type":"codeListing","syntax":"swift","code":["func logout() {"," Container.shared.manager.reset(scope: .session)"," ..."," }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Custom scopes are powerful tools to have in your arsenal. Use them."}]},{"anchor":"Graph-Scope","level":2,"type":"heading","text":"Graph Scope"},{"type":"paragraph","inlineContent":[{"type":"text","text":"There’s one additional scope, called "},{"type":"codeVoice","code":"graph"},{"type":"text","text":". This scope will reuse any factory instances resolved during a given resolution cycle. This can come in handy when a single class implements multiple protocols. Consider the following…"}]},{"type":"codeListing","syntax":"swift","code":["class ProtocolConsumer {"," @Injected(\\.idProvider) var ids"," @Injected(\\.valueProvider) var values"," init() {}","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"ProtocolConsumer"},{"type":"text","text":" wants two different protocols. But it doesn’t know that a single class provides both services. (Nor should it care.) Take a look at the referenced factories."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," \/\/ the root"," var consumer: Factory { self { ProtocolConsumer() } }"," \/\/ the interfaces"," var idProvider: Factory { self { commonProviding() } }"," var valueProvider: Factory { self { commonProviding() } }"," \/\/ the common implementation"," private var commonProviding: Factory { self { MyService() }.graph }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Both provider factories reference the same factory. When Factory is asked for an instance of "},{"type":"codeVoice","code":"consumer"},{"type":"text","text":", both providers will receive the same instance of "},{"type":"codeVoice","code":"MyService"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"There are a few caveats and considerations for using graph. The first is that anyone who wants to participate in the graph needs to explicitly state as such using the graph scope. Note the scope parameter for "},{"type":"codeVoice","code":"commonProviding"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The second is that there needs to be a “root” to the graph."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"In the above example, the "},{"type":"codeVoice","code":"consumer"},{"type":"text","text":" object is the root. Factory is asked for a consumer, which in turn requires two providers."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you were to instantiate an instance of "},{"type":"codeVoice","code":"ProtocolConsumer"},{"type":"text","text":" yourself, each one of ProtocolConsumer’s Injected property wrappers would initialize sequentially on the same thread, resulting in two separate and distinct resolution cycles."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See: "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle"},{"type":"text","text":" for more on this."}]},{"anchor":"Unique","level":2,"type":"heading","text":"Unique"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The last scope we’re going to discuss is "},{"type":"codeVoice","code":"unique"},{"type":"text","text":". When unique is specified a new instance of the service will be instantiated and returned each and every time one is requested from the factory."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Everyone gets a new, unique instance."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Unique."}]},{"anchor":"Default-Scope","level":2,"type":"heading","text":"Default Scope"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory’s can have their scopes defined in two different ways:"}]},{"type":"orderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"We can use a scope modifier, as we’ve shown above."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"We don’t specify a scope at all, in which case the scope "},{"type":"emphasis","inlineContent":[{"type":"text","text":"usually"}]},{"type":"text","text":" defaults to "},{"type":"codeVoice","code":"unique"},{"type":"text","text":"."}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The key word here is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"usually"}]},{"type":"text","text":", because Factory lets you control the default scope on a per-container basis."}]},{"type":"codeListing","syntax":"swift","code":["extension Container: AutoRegistering {"," func autoRegister() {"," manager.defaultScope = .cached"," ..."," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now any Factory registration resolved on that container that "},{"type":"emphasis","inlineContent":[{"type":"text","text":"doesn’t specify a scope of its own"}]},{"type":"text","text":" will use the "},{"type":"codeVoice","code":"cached"},{"type":"text","text":" scope by default."}]},{"anchor":"Lifecycles","level":2,"type":"heading","text":"Lifecycles"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Scope caches for all types except singletons are maintained by the Factory’s container."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"If I create an instance of "},{"type":"codeVoice","code":"Container"},{"type":"text","text":" and use it to resolve "},{"type":"codeVoice","code":"cachedService"},{"type":"text","text":" three times, I’ll get the same instance of the object each time."}]},{"type":"codeListing","syntax":"swift","code":["let a = container.cachedService()","let b = container.cachedService()","let c = container.cachedService()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"In this example, a, b, and c are identical."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But if we create two instances of the above container and resolve "},{"type":"codeVoice","code":"cachedService"},{"type":"text","text":" from both, we’ll get two different instances of the service."}]},{"type":"codeListing","syntax":"swift","code":["let a = container1.cachedService()","let b = container2.cachedService()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Scope is managed by the container."}]},{"style":"warning","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"If a container ever goes out of scope, so will all of its registrations and cached objects."}]}],"type":"aside","name":"Warning"},{"type":"paragraph","inlineContent":[{"type":"text","text":"See the “Releasing a Container” discussion in "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers"},{"type":"text","text":" for more information."}]},{"anchor":"TimeToLive","level":2,"type":"heading","text":"TimeToLive"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory provides a “time to live” option for scoped dependencies."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var authenticatedUser: Factory { "," self { AuthenticatedUser() }"," .scope(.session)"," .timeToLive(60 * 20) \/\/ (60 seconds * 20) = 20 minutes"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As shown above, set a time to live for 20 minutes and any new request for that dependency that occurs "},{"type":"emphasis","inlineContent":[{"type":"text","text":"after"}]},{"type":"text","text":" that period will discard the previously cached item, caching and returning a new instance instead."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Requesting a cached item before the timeout period ends returns the currently cached item and effectively restarts the clock for that item."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Like registrations, setting a time to live on a dependency only affects the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"next"}]},{"type":"text","text":" resolution for that item. Anything already resolved and referenced stays resolved and referenced."}]},{"anchor":"Reset","level":2,"type":"heading","text":"Reset"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As mentioned earlier in the discussion on custom scopes, individual scope caches on a container can be reset (cleared) if needed."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ clear the default cached scope","Container.shared.manager.reset(scope: .cached)","\/\/ clear everything cached by the custom session scope","Container.shared.manager.reset(scope: .session)"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can reset the cache for "},{"type":"emphasis","inlineContent":[{"type":"text","text":"all"}]},{"type":"text","text":" of the scopes managed by that container."}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.manager.reset(options: .scope)"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As mentioned earlier, Singletons are global and they’re "},{"type":"emphasis","inlineContent":[{"type":"text","text":"not"}]},{"type":"text","text":" managed by any particular container. If needed, the singleton scope can be reset directly."}]},{"type":"codeListing","syntax":"swift","code":["Scope.singleton.reset()"]},{"style":"important","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Resetting a container or scope has no effect whatsoever on anything that’s already been resolved by Factory. It only ensures that the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"next"}]},{"type":"text","text":" time a Factory on that container is asked to resolve a dependency that dependency will be a new instance."}]}],"type":"aside","name":"Important"}]}],"variants":[{"paths":["\/documentation\/factory\/scopes"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scopes","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"kind":"article","metadata":{"modules":[{"name":"Factory"}],"role":"collectionGroup","title":"Scopes"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Scope Class Definitions","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope","doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class"]}],"references":{"doc://Factory/documentation/Factory/Cycle":{"role":"article","title":"Resolution Cycles","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","type":"topic","url":"\/documentation\/factory\/cycle"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/GettingStarted":{"role":"collectionGroup","title":"Getting Started","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","kind":"article","type":"topic","url":"\/documentation\/factory\/gettingstarted"},"doc://Factory/documentation/Factory/Testing":{"role":"article","title":"Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","kind":"article","type":"topic","url":"\/documentation\/factory\/testing"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Containers":{"role":"article","title":"Containers","abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","kind":"article","type":"topic","url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"role":"symbol","title":"Scope.Unique","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}],"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"role":"symbol","title":"Scope.Shared","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"url":"\/documentation\/factory\/scope\/shared-swift.class"}}} \ No newline at end of file +{"seeAlsoSections":[{"title":"The Basics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/GettingStarted","doc:\/\/Factory\/documentation\/Factory\/Containers"],"generated":true}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you’ve used Resolver or some other dependency injection system before then you’ve probably experienced the benefits and power of scopes."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And if not, the concept is easy to understand: Just how long should an instance of an object live?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You’ve no doubt stuffed an instance of a class into a static variable and created a singleton at some point in your career. This is an example of a scope. A single instance is created and then used and shared by all of the methods and functions in the app."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This is easily done in Factory."}]},{"anchor":"Singleton","level":2,"type":"heading","text":"Singleton"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Just specify a singleton factory."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var myService: Factory { "," self { MyService() }"," .singleton"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now whenever someone requests an instance of "},{"type":"codeVoice","code":"myService"},{"type":"text","text":" they’ll get the same instance of the object as everyone else."}]},{"type":"codeListing","syntax":"swift","code":["let a = container.myService()","let b = container.myService()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"When we do this, both "},{"type":"codeVoice","code":"a"},{"type":"text","text":" and "},{"type":"codeVoice","code":"b"},{"type":"text","text":" refer to the same instance."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Singletons are easy to create, but they should be used with care. Like static singletons you might create in your own code, using singleton scopes can become problematic when testing your code and often require special handling. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing"},{"type":"text","text":" for more information on how to handle this."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Another issue to keep in mind is that singletons are global, meaning that they’re "},{"type":"emphasis","inlineContent":[{"type":"text","text":"not"}]},{"type":"text","text":" managed or cached by any specific container. If we create two instances of the above container and resolve "},{"type":"codeVoice","code":"myService"},{"type":"text","text":" from both, we’ll get the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"same"}]},{"type":"text","text":" instance from both."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Then again, that’s kind of the idea, isn’t it?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Just keep in mind with Factory you have other options. Only use define a scope as singleton when there’s an overriding need for there to be one "},{"type":"emphasis","inlineContent":[{"type":"text","text":"and only one"}]},{"type":"text","text":" instance of an object."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So what do we do if we need our object to be cached?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Just say so."}]},{"anchor":"Cached","level":2,"type":"heading","text":"Cached"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Cached items are persisted until the cache is reset or the container is deallocated. Consider the following Factory registration."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var cachedService: Factory { "," self { MyService() }.cached"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now let’s resolve it."}]},{"type":"codeListing","syntax":"swift","code":["let a = container.cachedService()","let b = container.cachedService()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"When we do this we see that both "},{"type":"codeVoice","code":"a"},{"type":"text","text":" and "},{"type":"codeVoice","code":"b"},{"type":"text","text":" reference the same instance, just as we saw with the singleton example above."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Cached scopes are Factory’s’ workhorses. They make unit testing a lot easier and should be your first choice when you’re looking for a caching solution."}]},{"anchor":"Shared","level":2,"type":"heading","text":"Shared"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Shared items exist just as long as someone holds a strong reference to them. When the last reference goes away, the weakly held shared reference also goes away."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var sharedService: Factory { "," self { MyService() }.shared"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now let’s resolve it."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ resolution","var a = container.sharedService()","var b = container.sharedService()","\/\/ zap all strong references","a = nil","b = nil","\/\/ resolve it again","var c = container.sharedService()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"When "},{"type":"codeVoice","code":"a"},{"type":"text","text":" was resolved it was cached in the shared cache. When "},{"type":"codeVoice","code":"b"},{"type":"text","text":" is resolved it’s pulled from the cache as we might expect. But when the last strong external reference to "},{"type":"codeVoice","code":"a"},{"type":"text","text":" and "},{"type":"codeVoice","code":"b"},{"type":"text","text":" is released (set to nil in the example), the weak reference maintained by the shared cache is also released."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So when we resolve "},{"type":"codeVoice","code":"c"},{"type":"text","text":" we’re going to get a new instance, and the cycle proceeds anew."}]},{"anchor":"Custom-Scopes","level":2,"type":"heading","text":"Custom Scopes"},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can also add your own special purpose caches to the mix. Try this."}]},{"type":"codeListing","syntax":"swift","code":["extension Scope {"," static var session = Cached()","}","","extension Container {"," var authenticatedUser: Factory { "," self { AuthenticatedUser() }"," .scope(.session)"," }"," var profileImageCache: Factory { "," self { ProfileImageCache() } "," .scope(.session)"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Once created, a single instance of "},{"type":"codeVoice","code":"AuthenticatedUser"},{"type":"text","text":" and "},{"type":"codeVoice","code":"ProfileImageCache"},{"type":"text","text":" will be provided to anyone that needs one… up until the point where the session scope is reset, perhaps by a user logging out."}]},{"type":"codeListing","syntax":"swift","code":["func logout() {"," Container.shared.manager.reset(scope: .session)"," ..."," }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Custom scopes are powerful tools to have in your arsenal. Use them."}]},{"anchor":"Graph-Scope","level":2,"type":"heading","text":"Graph Scope"},{"type":"paragraph","inlineContent":[{"type":"text","text":"There’s one additional scope, called "},{"type":"codeVoice","code":"graph"},{"type":"text","text":". This scope will reuse any factory instances resolved during a given resolution cycle. This can come in handy when a single class implements multiple protocols. Consider the following…"}]},{"type":"codeListing","syntax":"swift","code":["class ProtocolConsumer {"," @Injected(\\.idProvider) var ids"," @Injected(\\.valueProvider) var values"," init() {}","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"ProtocolConsumer"},{"type":"text","text":" wants two different protocols. But it doesn’t know that a single class provides both services. (Nor should it care.) Take a look at the referenced factories."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," \/\/ the root"," var consumer: Factory { self { ProtocolConsumer() } }"," \/\/ the interfaces"," var idProvider: Factory { self { commonProviding() } }"," var valueProvider: Factory { self { commonProviding() } }"," \/\/ the common implementation"," private var commonProviding: Factory { self { MyService() }.graph }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Both provider factories reference the same factory. When Factory is asked for an instance of "},{"type":"codeVoice","code":"consumer"},{"type":"text","text":", both providers will receive the same instance of "},{"type":"codeVoice","code":"MyService"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"There are a few caveats and considerations for using graph. The first is that anyone who wants to participate in the graph needs to explicitly state as such using the graph scope. Note the scope parameter for "},{"type":"codeVoice","code":"commonProviding"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The second is that there needs to be a “root” to the graph."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"In the above example, the "},{"type":"codeVoice","code":"consumer"},{"type":"text","text":" object is the root. Factory is asked for a consumer, which in turn requires two providers."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you were to instantiate an instance of "},{"type":"codeVoice","code":"ProtocolConsumer"},{"type":"text","text":" yourself, each one of ProtocolConsumer’s Injected property wrappers would initialize sequentially on the same thread, resulting in two separate and distinct resolution cycles."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See: "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle"},{"type":"text","text":" for more on this."}]},{"anchor":"Unique","level":2,"type":"heading","text":"Unique"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The last scope we’re going to discuss is "},{"type":"codeVoice","code":"unique"},{"type":"text","text":". When unique is specified a new instance of the service will be instantiated and returned each and every time one is requested from the factory."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Everyone gets a new, unique instance."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Unique."}]},{"anchor":"Default-Scope","level":2,"type":"heading","text":"Default Scope"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory’s can have their scopes defined in two different ways:"}]},{"type":"orderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"We can use a scope modifier, as we’ve shown above."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"We don’t specify a scope at all, in which case the scope "},{"type":"emphasis","inlineContent":[{"type":"text","text":"usually"}]},{"type":"text","text":" defaults to "},{"type":"codeVoice","code":"unique"},{"type":"text","text":"."}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The key word here is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"usually"}]},{"type":"text","text":", because Factory lets you control the default scope on a per-container basis."}]},{"type":"codeListing","syntax":"swift","code":["extension Container: AutoRegistering {"," func autoRegister() {"," manager.defaultScope = .cached"," ..."," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now any Factory registration resolved on that container that "},{"type":"emphasis","inlineContent":[{"type":"text","text":"doesn’t specify a scope of its own"}]},{"type":"text","text":" will use the "},{"type":"codeVoice","code":"cached"},{"type":"text","text":" scope by default."}]},{"anchor":"Lifecycles","level":2,"type":"heading","text":"Lifecycles"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Scope caches for all types except singletons are maintained by the Factory’s container."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"If I create an instance of "},{"type":"codeVoice","code":"Container"},{"type":"text","text":" and use it to resolve "},{"type":"codeVoice","code":"cachedService"},{"type":"text","text":" three times, I’ll get the same instance of the object each time."}]},{"type":"codeListing","syntax":"swift","code":["let a = container.cachedService()","let b = container.cachedService()","let c = container.cachedService()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"In this example, a, b, and c are identical."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But if we create two instances of the above container and resolve "},{"type":"codeVoice","code":"cachedService"},{"type":"text","text":" from both, we’ll get two different instances of the service."}]},{"type":"codeListing","syntax":"swift","code":["let a = container1.cachedService()","let b = container2.cachedService()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Scope is managed by the container."}]},{"style":"warning","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"If a container ever goes out of scope, so will all of its registrations and cached objects."}]}],"type":"aside","name":"Warning"},{"type":"paragraph","inlineContent":[{"type":"text","text":"See the “Releasing a Container” discussion in "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers"},{"type":"text","text":" for more information."}]},{"anchor":"TimeToLive","level":2,"type":"heading","text":"TimeToLive"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory provides a “time to live” option for scoped dependencies."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var authenticatedUser: Factory { "," self { AuthenticatedUser() }"," .scope(.session)"," .timeToLive(60 * 20) \/\/ (60 seconds * 20) = 20 minutes"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As shown above, set a time to live for 20 minutes and any new request for that dependency that occurs "},{"type":"emphasis","inlineContent":[{"type":"text","text":"after"}]},{"type":"text","text":" that period will discard the previously cached item, caching and returning a new instance instead."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Requesting a cached item before the timeout period ends returns the currently cached item and effectively restarts the clock for that item."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Like registrations, setting a time to live on a dependency only affects the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"next"}]},{"type":"text","text":" resolution for that item. Anything already resolved and referenced stays resolved and referenced."}]},{"anchor":"Reset","level":2,"type":"heading","text":"Reset"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As mentioned earlier in the discussion on custom scopes, individual scope caches on a container can be reset (cleared) if needed."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ clear the default cached scope","Container.shared.manager.reset(scope: .cached)","\/\/ clear everything cached by the custom session scope","Container.shared.manager.reset(scope: .session)"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can reset the cache for "},{"type":"emphasis","inlineContent":[{"type":"text","text":"all"}]},{"type":"text","text":" of the scopes managed by that container."}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.manager.reset(options: .scope)"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As mentioned earlier, Singletons are global and they’re "},{"type":"emphasis","inlineContent":[{"type":"text","text":"not"}]},{"type":"text","text":" managed by any particular container. If needed, the singleton scope can be reset directly."}]},{"type":"codeListing","syntax":"swift","code":["Scope.singleton.reset()"]},{"style":"important","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Resetting a container or scope has no effect whatsoever on anything that’s already been resolved by Factory. It only ensures that the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"next"}]},{"type":"text","text":" time a Factory on that container is asked to resolve a dependency that dependency will be a new instance."}]}],"type":"aside","name":"Important"}]}],"variants":[{"paths":["\/documentation\/factory\/scopes"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scopes","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"kind":"article","metadata":{"modules":[{"name":"Factory"}],"role":"collectionGroup","title":"Scopes"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Scope Class Definitions","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope","doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class"]}],"references":{"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"role":"symbol","title":"Scope.Unique","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}],"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Containers":{"role":"article","title":"Containers","abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","kind":"article","type":"topic","url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"role":"symbol","title":"Scope.Shared","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"url":"\/documentation\/factory\/scope\/shared-swift.class"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"role":"symbol","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/Testing":{"role":"article","title":"Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","kind":"article","type":"topic","url":"\/documentation\/factory\/testing"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"role":"symbol","title":"Scope.Cached","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Scope":{"role":"symbol","title":"Scope","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"type":"codeVoice","code":"Shared"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"role":"symbol","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"url":"\/documentation\/factory\/scope\/graph-swift.class"},"doc://Factory/documentation/Factory/GettingStarted":{"role":"collectionGroup","title":"Getting Started","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","kind":"article","type":"topic","url":"\/documentation\/factory\/gettingstarted"},"doc://Factory/documentation/Factory/Cycle":{"role":"article","title":"Resolution Cycles","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","type":"topic","url":"\/documentation\/factory\/cycle"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/sharedcontainer.json b/docs/data/documentation/factory/sharedcontainer.json index b614f2f7..819bc90e 100644 --- a/docs/data/documentation/factory/sharedcontainer.json +++ b/docs/data/documentation/factory/sharedcontainer.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP","text":"ManagedContainer"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s an example of reaching out to a Container’s shared instance for dependency resolution."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel {"," let service: MyServiceType = Container.shared.service()","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The default "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container"},{"type":"text","text":" provided is a SharedContainer. It can be used in both roles as needed."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers"},{"type":"text","text":" for more information."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/sharedcontainer"],"traits":[{"interfaceLanguage":"swift"}]}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"],"kind":"relationships","title":"Inherits From","type":"inheritsFrom"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container"],"kind":"relationships","title":"Conforming Types","type":"conformingTypes"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"SharedContainer defines the protocol all Containers must adopt if they want to support Service Locator style injection or support any of the injection property wrappers."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"title":"SharedContainer","roleHeading":"Protocol","role":"symbol","symbolKind":"protocol","externalID":"s:7Factory15SharedContainerP","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Type Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/SharedContainer\/shared"]}],"references":{"doc://Factory/documentation/Factory/SharedContainer":{"role":"symbol","title":"SharedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"abstract":[{"type":"text","text":"SharedContainer defines the protocol all Containers must adopt if they want to support Service Locator style injection or support any of the injection property wrappers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"url":"\/documentation\/factory\/sharedcontainer"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/SharedContainer/shared":{"role":"symbol","title":"shared","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Defines a single “shared” container for that container type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer\/shared","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/sharedcontainer\/shared"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/Containers":{"role":"article","title":"Containers","abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","kind":"article","type":"topic","url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory/ManagedContainer":{"role":"symbol","title":"ManagedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"url":"\/documentation\/factory\/managedcontainer"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP","text":"ManagedContainer"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s an example of reaching out to a Container’s shared instance for dependency resolution."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel {"," let service: MyServiceType = Container.shared.service()","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The default "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container"},{"type":"text","text":" provided is a SharedContainer. It can be used in both roles as needed."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers"},{"type":"text","text":" for more information."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/sharedcontainer"],"traits":[{"interfaceLanguage":"swift"}]}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"],"kind":"relationships","title":"Inherits From","type":"inheritsFrom"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container"],"kind":"relationships","title":"Conforming Types","type":"conformingTypes"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"SharedContainer defines the protocol all Containers must adopt if they want to support Service Locator style injection or support any of the injection property wrappers."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"title":"SharedContainer","roleHeading":"Protocol","role":"symbol","symbolKind":"protocol","externalID":"s:7Factory15SharedContainerP","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Type Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/SharedContainer\/shared"]}],"references":{"doc://Factory/documentation/Factory/SharedContainer":{"role":"symbol","title":"SharedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"abstract":[{"type":"text","text":"SharedContainer defines the protocol all Containers must adopt if they want to support Service Locator style injection or support any of the injection property wrappers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"url":"\/documentation\/factory\/sharedcontainer"},"doc://Factory/documentation/Factory/ManagedContainer":{"role":"symbol","title":"ManagedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Containers":{"role":"article","title":"Containers","abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","kind":"article","type":"topic","url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/SharedContainer/shared":{"role":"symbol","title":"shared","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Defines a single “shared” container for that container type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer\/shared","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/sharedcontainer\/shared"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/sharedcontainer/shared.json b/docs/data/documentation/factory/sharedcontainer/shared.json index 48a8f499..9ee8166a 100644 --- a/docs/data/documentation/factory/sharedcontainer/shared.json +++ b/docs/data/documentation/factory/sharedcontainer/shared.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This container is used by the various @Injected property wrappers to resolve the keyPath to a given Factory. Care should be taken in"},{"type":"text","text":" "},{"type":"text","text":"mixed environments where you’re passing container references AND using the @Injected property wrappers."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/sharedcontainer\/shared"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer\/shared","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Defines a single “shared” container for that container type."}],"kind":"symbol","metadata":{"role":"symbol","title":"shared","roleHeading":"Type Property","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory15SharedContainerP6sharedxvpZ","required":true,"modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/SharedContainer"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/SharedContainer":{"role":"symbol","title":"SharedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"abstract":[{"type":"text","text":"SharedContainer defines the protocol all Containers must adopt if they want to support Service Locator style injection or support any of the injection property wrappers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"url":"\/documentation\/factory\/sharedcontainer"},"doc://Factory/documentation/Factory/SharedContainer/shared":{"role":"symbol","title":"shared","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Defines a single “shared” container for that container type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer\/shared","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/sharedcontainer\/shared"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This container is used by the various @Injected property wrappers to resolve the keyPath to a given Factory. Care should be taken in"},{"type":"text","text":" "},{"type":"text","text":"mixed environments where you’re passing container references AND using the @Injected property wrappers."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/sharedcontainer\/shared"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer\/shared","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Defines a single “shared” container for that container type."}],"kind":"symbol","metadata":{"role":"symbol","title":"shared","roleHeading":"Type Property","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","externalID":"s:7Factory15SharedContainerP6sharedxvpZ","required":true,"modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/SharedContainer"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/SharedContainer/shared":{"role":"symbol","title":"shared","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Defines a single “shared” container for that container type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer\/shared","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/sharedcontainer\/shared"},"doc://Factory/documentation/Factory/SharedContainer":{"role":"symbol","title":"SharedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"abstract":[{"type":"text","text":"SharedContainer defines the protocol all Containers must adopt if they want to support Service Locator style injection or support any of the injection property wrappers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"url":"\/documentation\/factory\/sharedcontainer"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/tags.json b/docs/data/documentation/factory/tags.json index 7c841293..668246fd 100644 --- a/docs/data/documentation/factory/tags.json +++ b/docs/data/documentation/factory/tags.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Some dependency injection systems offer functionality known as tagging. Once tagged, you can ask the system for a list of all registered dependencies that conform to that tag."}]},{"type":"codeListing","syntax":"swift","code":["let processors = container.resolve(tagged: \"processor\")"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Sometimes the tag is explicitly defined during the registration process, like .tag(“processors”). In other systems, you might ask the system for everything registered that conforms to a specific type."}]},{"type":"codeListing","syntax":"swift","code":["let processors = container.resolve(Processing.self)"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Doing this sort of thing in Factory is somewhat problematic, in that in most cases for most instances there "},{"type":"emphasis","inlineContent":[{"type":"text","text":"isn’t"}]},{"type":"text","text":" a registration phase. Factory’s are lazy creatures, and they’re not evaluated until the Factory is requested."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So what can we do?"}]},{"anchor":"Simple-Solution","level":2,"type":"heading","text":"Simple Solution"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Consider the following Factory registrations."}]},{"type":"codeListing","syntax":"swift","code":["extension SharedContainer {"," var processor1: Factory { self { Processor1() } }"," var processor2: Factory { self { Processor2() } }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And now the following container extension added to our main application."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public static var processors: [KeyPath>] = ["," \\.processor1,"," \\.processor2,"," ]","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here we build a simple list of keyPaths that defines all known processors. As discussed in multiple module support, the root application should know what systems are available to it."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Once that’s done, accomplishing the lookup and getting the list of actual processors is a piece of cake."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public func processors() -> [Processor] {"," Container.processors.map { self[keyPath: $0]() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And since the keyPath definition guarantees the type of the object, the array will also be type safe, something that can be difficult to accomplish with simple string-based tagging systems."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But we can do more."}]},{"anchor":"Appending-New-Processors","level":2,"type":"heading","text":"Appending New Processors"},{"type":"paragraph","inlineContent":[{"type":"text","text":"First, note that anything could be added to the array at any point in time."}]},{"type":"codeListing","syntax":"swift","code":["extension Container: AutoRegistering {"," func autoRegister() {"," Container.processors.append(\\.processor3)"," }"," var processor3: Factory { self { Processor3() } }","}"]},{"anchor":"Multiple-Modules-and-Anonymous-Processors","level":2,"type":"heading","text":"Multiple Modules and Anonymous Processors"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Above we mentioned that that main app should know what processors are available to it. That said, sometime you may not."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"In that case you could ask a set of modules for their own, anonymous contributions."}]},{"type":"codeListing","syntax":"swift","code":["extension Container: AutoRegistering {"," func autoRegister() {"," Container.processors += ModuleA.availableProcessors()"," Container.processors += ModuleB.availableProcessors()"," Container.processors += ModuleC.availableProcessors()"," }","}"]},{"anchor":"Priority","level":2,"type":"heading","text":"Priority"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The basic solution can obviously be expanded as needed, perhaps by creating a struct that allows for tag priority."}]},{"type":"codeListing","syntax":"swift","code":["struct Tag {"," let path: KeyPath>"," let priority: Int","}","","extension Container {"," static var processors: [Tag] = ["," Tag(path: \\.processor1, priority: 20),"," Tag(path: \\.processor2, priority: 10),"," ]"," func processors() -> [Processor] {"," Container.processors"," .sorted(by: { $0.priority < $1.priority })"," .map { self[keyPath: $0.path]() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"While Factory doesn’t currently support tags out of the box, there are a lot of ways to roll your own solutions using the tools Factory provides."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/tags"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Tags","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"kind":"article","metadata":{"roleHeading":"Article","title":"Tags","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Advanced Topics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Design","doc:\/\/Factory\/documentation\/Factory\/Modifiers","doc:\/\/Factory\/documentation\/Factory\/Modules","doc:\/\/Factory\/documentation\/Factory\/Cycle","doc:\/\/Factory\/documentation\/Factory\/Optionals","doc:\/\/Factory\/documentation\/Factory\/Functional"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Modifiers":{"role":"article","title":"Factory Modifiers","abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","kind":"article","type":"topic","url":"\/documentation\/factory\/modifiers"},"doc://Factory/documentation/Factory/Functional":{"role":"article","title":"Functional Injection","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","kind":"article","type":"topic","url":"\/documentation\/factory\/functional"},"doc://Factory/documentation/Factory/Optionals":{"role":"article","title":"Optionals and Dynamic Registration","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","kind":"article","type":"topic","url":"\/documentation\/factory\/optionals"},"doc://Factory/documentation/Factory/Design":{"role":"article","title":"Designing Factory","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","kind":"article","type":"topic","url":"\/documentation\/factory\/design"},"doc://Factory/documentation/Factory/Modules":{"role":"article","title":"Modular Development","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","kind":"article","type":"topic","url":"\/documentation\/factory\/modules"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Cycle":{"role":"article","title":"Resolution Cycles","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","type":"topic","url":"\/documentation\/factory\/cycle"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Some dependency injection systems offer functionality known as tagging. Once tagged, you can ask the system for a list of all registered dependencies that conform to that tag."}]},{"type":"codeListing","syntax":"swift","code":["let processors = container.resolve(tagged: \"processor\")"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Sometimes the tag is explicitly defined during the registration process, like .tag(“processors”). In other systems, you might ask the system for everything registered that conforms to a specific type."}]},{"type":"codeListing","syntax":"swift","code":["let processors = container.resolve(Processing.self)"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Doing this sort of thing in Factory is somewhat problematic, in that in most cases for most instances there "},{"type":"emphasis","inlineContent":[{"type":"text","text":"isn’t"}]},{"type":"text","text":" a registration phase. Factory’s are lazy creatures, and they’re not evaluated until the Factory is requested."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So what can we do?"}]},{"anchor":"Simple-Solution","level":2,"type":"heading","text":"Simple Solution"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Consider the following Factory registrations."}]},{"type":"codeListing","syntax":"swift","code":["extension SharedContainer {"," var processor1: Factory { self { Processor1() } }"," var processor2: Factory { self { Processor2() } }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And now the following container extension added to our main application."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public static var processors: [KeyPath>] = ["," \\.processor1,"," \\.processor2,"," ]","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here we build a simple list of keyPaths that defines all known processors. As discussed in multiple module support, the root application should know what systems are available to it."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Once that’s done, accomplishing the lookup and getting the list of actual processors is a piece of cake."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public func processors() -> [Processor] {"," Container.processors.map { self[keyPath: $0]() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And since the keyPath definition guarantees the type of the object, the array will also be type safe, something that can be difficult to accomplish with simple string-based tagging systems."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But we can do more."}]},{"anchor":"Appending-New-Processors","level":2,"type":"heading","text":"Appending New Processors"},{"type":"paragraph","inlineContent":[{"type":"text","text":"First, note that anything could be added to the array at any point in time."}]},{"type":"codeListing","syntax":"swift","code":["extension Container: AutoRegistering {"," func autoRegister() {"," Container.processors.append(\\.processor3)"," }"," var processor3: Factory { self { Processor3() } }","}"]},{"anchor":"Multiple-Modules-and-Anonymous-Processors","level":2,"type":"heading","text":"Multiple Modules and Anonymous Processors"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Above we mentioned that that main app should know what processors are available to it. That said, sometime you may not."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"In that case you could ask a set of modules for their own, anonymous contributions."}]},{"type":"codeListing","syntax":"swift","code":["extension Container: AutoRegistering {"," func autoRegister() {"," Container.processors += ModuleA.availableProcessors()"," Container.processors += ModuleB.availableProcessors()"," Container.processors += ModuleC.availableProcessors()"," }","}"]},{"anchor":"Priority","level":2,"type":"heading","text":"Priority"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The basic solution can obviously be expanded as needed, perhaps by creating a struct that allows for tag priority."}]},{"type":"codeListing","syntax":"swift","code":["struct Tag {"," let path: KeyPath>"," let priority: Int","}","","extension Container {"," static var processors: [Tag] = ["," Tag(path: \\.processor1, priority: 20),"," Tag(path: \\.processor2, priority: 10),"," ]"," func processors() -> [Processor] {"," Container.processors"," .sorted(by: { $0.priority < $1.priority })"," .map { self[keyPath: $0.path]() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"While Factory doesn’t currently support tags out of the box, there are a lot of ways to roll your own solutions using the tools Factory provides."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/tags"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Tags","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"kind":"article","metadata":{"roleHeading":"Article","title":"Tags","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Advanced Topics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Design","doc:\/\/Factory\/documentation\/Factory\/Modifiers","doc:\/\/Factory\/documentation\/Factory\/Modules","doc:\/\/Factory\/documentation\/Factory\/Cycle","doc:\/\/Factory\/documentation\/Factory\/Optionals","doc:\/\/Factory\/documentation\/Factory\/Functional"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Design":{"role":"article","title":"Designing Factory","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","kind":"article","type":"topic","url":"\/documentation\/factory\/design"},"doc://Factory/documentation/Factory/Cycle":{"role":"article","title":"Resolution Cycles","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","type":"topic","url":"\/documentation\/factory\/cycle"},"doc://Factory/documentation/Factory/Optionals":{"role":"article","title":"Optionals and Dynamic Registration","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","kind":"article","type":"topic","url":"\/documentation\/factory\/optionals"},"doc://Factory/documentation/Factory/Modules":{"role":"article","title":"Modular Development","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","kind":"article","type":"topic","url":"\/documentation\/factory\/modules"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Modifiers":{"role":"article","title":"Factory Modifiers","abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","kind":"article","type":"topic","url":"\/documentation\/factory\/modifiers"},"doc://Factory/documentation/Factory/Functional":{"role":"article","title":"Functional Injection","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","kind":"article","type":"topic","url":"\/documentation\/factory\/functional"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/testing.json b/docs/data/documentation/factory/testing.json index 30dc7825..014aa3fe 100644 --- a/docs/data/documentation/factory/testing.json +++ b/docs/data/documentation/factory/testing.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Dependency injection exists to manage and decouple dependencies among objects; making the code more modular, maintainable, and testable. It says so right on the label."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As you’ve already seen, the main mechanism provided by Factory to accomplish this is registration. Going into the dependency system and registering a new type, typically a mock or stub or spy, in order for that type to be injected into the code under test."}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.accountLoading.register { MockNoAccounts() }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But Factory has other enhancements designed to make unit testing and user interface testing simpler and easier."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Some, like "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"},{"type":"text","text":" you may have already seen and used. Others, like pushing\/popping container state, resetting, and so on, are discussed below."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Before we look at them, it’s important to first understand Xcode’s test process and environment, and consider what that means when writing your own unit tests using Factory."}]},{"anchor":"The-Unit-Test-Environment","level":2,"type":"heading","text":"The Unit Test Environment"},{"type":"paragraph","inlineContent":[{"type":"text","text":"When you run a unit test, Xcode is launching and running your app in order to provide a relevant context for your test code."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This means that application main ran, that the application delegate’s "},{"type":"codeVoice","code":"didFinishLaunchingWithOptions"},{"type":"text","text":" function ran, and all the code needed to get to your first screen ran. When your app reaches a state where RunLoop.main starts idling and waiting for user input, "},{"type":"emphasis","inlineContent":[{"type":"text","text":"then"}]},{"type":"text","text":" XCTest will start constructing test classes and running test cases."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"All of which means that a LOT of code has already run before your first test has even fired."}]},{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Including dependency injection code."}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So when writing unit tests we need to keep in mind what our initial runtime application environment looks like, what Factory registrations may have already have occurred, and in particular, if any of those registrations were scoped and cached."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This is specially true when dealing with "},{"type":"emphasis","inlineContent":[{"type":"text","text":"singletons"}]},{"type":"text","text":". But again, let’s save that topic for a bit later."}]},{"anchor":"Changing-Not-Rebuilding","level":2,"type":"heading","text":"Changing, Not Rebuilding"},{"type":"paragraph","inlineContent":[{"type":"text","text":"So our environment exists, running and awaiting our first test. All of our original runtime dependency injection extensions and registrations are also out there, ready to be resolved and injected when needed."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And that’s great. A cryptographic hashing dependency can be used in production and in test with no repercussions. We don’t need to change a thing. And in fact, the more working code we can test in its shipping state, the better."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That said, other services like analytics might want to be swapped out during testing. Don’t want to fed the system all of your dummy test data. Again, "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"},{"type":"text","text":" can help with that."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But we’re here to test, and one thing we probably "},{"type":"emphasis","inlineContent":[{"type":"text","text":"do"}]},{"type":"text","text":" care about is the code is talks to our APIs and other services. Those are the classes and services that we’re probably going to want to mock and reregister so we can test our view models and business logic against stable test data."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Again, Factory makes that easy."}]},{"type":"codeListing","syntax":"swift","code":["func testNoAccounts() async {"," \/\/ register a mock"," Container.shared.accountLoading.register { MockNoAccounts() }"," \/\/ instantiate the model that uses the mock"," let model = Container.shared.accountsViewModel()"," \/\/ and test..."," await model.load()"," XCTAssertTrue(model.isLoaded)"," XCTAssertTrue(model.isEmpty)","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or we can write a test against unstable test data…"}]},{"type":"codeListing","syntax":"swift","code":["func testNoAccounts() async {"," \/\/ register a mock"," Container.shared.accountLoading.register { MockAccountError(404) }"," \/\/ instantiate the model that uses the mock"," let model = Container.shared.accountsViewModel()"," \/\/ and test..."," await model.load()"," XCTAssertFalse(model.isLoaded)"," XCTAssertTrue(model.isError)","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Only if we’re running a lot of tests like this then we’re going to making a lot of changes to the dependency injection environment. And that’s problematic."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We need to make sure that a change made in one test doesn’t affect a later test that relied on the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"original"}]},{"type":"text","text":" object that demonstrated a "},{"type":"emphasis","inlineContent":[{"type":"text","text":"different"}]},{"type":"text","text":" behavior. Or setting up circumstances where randomizing tests can cause the same thing to occur."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Sound confusing? It is. Try tracking it down in actual code."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"How to solve it? Well, the best solution to that sort of problem is to avoid it in the first place."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Fortunately, Factory can help with that."}]},{"anchor":"Pushing-and-Popping-State","level":2,"type":"heading","text":"Pushing and Popping State"},{"type":"paragraph","inlineContent":[{"type":"text","text":"In your unit test setUp function you can "},{"type":"emphasis","inlineContent":[{"type":"text","text":"push"}]},{"type":"text","text":" the current state of the registration system and then register and test anything you want."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Then in teardown you can "},{"type":"emphasis","inlineContent":[{"type":"text","text":"pop"}]},{"type":"text","text":" the stack, eliminating all of your changes and restoring the container to its original state before the push."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This lets each set of tests start from the same initial state, irregardless of what any prior test had changed."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The following example assumes we’re using the shared container."}]},{"type":"codeListing","syntax":"swift","code":["final class FactoryCoreTests: XCTestCase {",""," override func setUp() {"," Container.shared.manager.push()"," Container.shared.setupMocks()"," }"," "," override func tearDown() {"," Container.shared.manager.pop()"," }"," "," func testNoAccounts() async {"," Container.shared.accountLoading.register { MockNoAccounts() }"," let model = Container.shared.accountsViewModel()"," await model.load()"," XCTAssertTrue(model.isLoaded)"," XCTAssertTrue(model.isEmpty)"," }",""," func testError() async {"," Container.shared.accountLoading.register { MockAccountError(404) }"," let model = Container.shared.accountsViewModel()"," await model.load()"," XCTAssertTrue(model.isError)"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That’s pretty much it. Our "},{"type":"codeVoice","code":"AccountsViewModel"},{"type":"text","text":" depended on an "},{"type":"codeVoice","code":"AccountsLoading"},{"type":"text","text":" service."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Change the service provided and we change the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"data"}]},{"type":"text","text":" provided. Change the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"data"}]},{"type":"text","text":" provided and we change our view model’s behavior."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And then we test the results to see if everything matches up with our expectations."}]},{"anchor":"Diving-Deeper","level":2,"type":"heading","text":"Diving Deeper"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that the above is just one way of doing things. If, for example, our "},{"type":"codeVoice","code":"AccountLoader"},{"type":"text","text":" service depended on a custom network layer, we could reach further down the stack."}]},{"type":"codeListing","syntax":"swift","code":["func testNoAccounts() async throws {"," let json = #\"{ \"accounts\": [] }\"#"," Container.shared.networking.register { MockJSON(json) }"," let model = Container.shared.accountsViewModel()"," \/\/ as before","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We create the "},{"type":"codeVoice","code":"AccountsViewModel"},{"type":"text","text":", the view model injects the "},{"type":"codeVoice","code":"AccountLoading"},{"type":"text","text":" service, and that service injects our mock network service."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Same for our error code."}]},{"type":"codeListing","syntax":"swift","code":["func testNoAccounts() async throws {"," Container.shared.networking.register { MockError(404) }"," let model = Container.shared.accountsViewModel()"," \/\/ as before","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Layering your code in such a fashion can dramatically reduce the number of mocks and other objects you need to create and mange. You don’t just change the view model’s dependencies. You change the dependencies the dependencies depend on."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory makes reaching deep into a dependency tree and adjusting behavior simple and easy."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"It can even help you see what’s "},{"type":"emphasis","inlineContent":[{"type":"text","text":"inside"}]},{"type":"text","text":" that dependency tree. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging"},{"type":"text","text":" for more information."}]},{"anchor":"Rebuilding-The-Container","level":2,"type":"heading","text":"Rebuilding The Container"},{"type":"paragraph","inlineContent":[{"type":"text","text":"In your unit test setUp function you can also just create a new container and start over from scratch. No teardown needed."}]},{"type":"codeListing","syntax":"swift","code":["final class FactoryCoreTests: XCTestCase {",""," override func setUp() {"," Container.shared = Container()"," Container.shared.setupMocks()"," }"," "," func testNoAccounts() throws {"," ..."," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that this is pretty safe to do in the majority of cases. Your application has already launched, obtained what it needed, and is now idling."}]},{"anchor":"Passed-Containers","level":2,"type":"heading","text":"Passed Containers"},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can also pass the container into the view model itself."}]},{"type":"codeListing","syntax":"swift","code":["final class FactoryCoreTests: XCTestCase {",""," var container: Container!",""," override func setUp() {"," container = Container()"," container.setupMocks()"," }"," "," func testSomething() throws {"," container.myServiceType.register(factory: { MockService() })"," let model = MyViewModel(container: container)"," model.load()"," XCTAssertTrue(model.isLoaded)"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This does, of course, assume that you structured your app appropriately."}]},{"anchor":"Common-Setup","level":2,"type":"heading","text":"Common Setup"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As shown in the earlier examples, if we have several mocks that we use all of the time in our previews or unit tests, we can also add a setup function to a given container to make this easier."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," func setupMocks() {"," myService.register { MockServiceN(4) }"," sharedService.register { MockService2() }"," }","}"]},{"anchor":"Testing-Singletons","level":2,"type":"heading","text":"Testing Singletons"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s talk singletons. The singleton scope cache is global, meaning that it’s "},{"type":"emphasis","inlineContent":[{"type":"text","text":"not"}]},{"type":"text","text":" managed by any specific container."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That being the case, neither the push\/pull mechanism or the container rebuilding mechanisms described above will clear any cached singleton instances."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Singletons are, after all, expected to be singletons."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So what to do about it? Well, if needed we can reset "},{"type":"emphasis","inlineContent":[{"type":"text","text":"every"}]},{"type":"text","text":" cached singleton with just a single method call. Just call reset on that particular scope."}]},{"type":"codeListing","syntax":"swift","code":["Scope.singleton.reset()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or you can reset a specific singleton by reaching out to its factory."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ reset everything for that factory","Container.shared.someSingletonFactory.reset()","\/\/ reset just the scope cache","Container.shared.someSingletonFactory.reset(options: .scope)","\/\/ or simply register a new instance","Container.shared.someSingletonFactory.register { MyNewMock() }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"On that last point. Doing a registration change on a factory usually clears it’s associated scope automatically. The assumption, of course, being that if you register something you expect it to be used."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This also applies to singletons "},{"type":"emphasis","inlineContent":[{"type":"text","text":"unless you’re inside of a autoRegister block."}]},{"type":"text","text":" AutoRegistration can happen on every container creation, and automatically clearing a registered singleton each and every time that occurs kind of defeats the idea of multiple containers on one hand and singletons on the other."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So all that said, we can deal with them. But as a general rule, singletons can complicate your life, your code, and your tests, and as such they should be avoided and only be used when there’s an overriding need for there to be one and only one instance of an object."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Got that, Highlander?"}]},{"anchor":"Xcode-UITesting","level":2,"type":"heading","text":"Xcode UITesting"},{"type":"paragraph","inlineContent":[{"type":"text","text":"UITesting can be more challenging, in that we’re now to dealing with an active, running application. We have our existing tools, of course, but the issue is often complicated by the fact that we may want to change the application’s behavior "},{"type":"emphasis","inlineContent":[{"type":"text","text":"before"}]},{"type":"text","text":" it gets to RunLoop.main and starts idling."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"How?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"One solution is passed parameters."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The test case is fairly straightforward."}]},{"type":"codeListing","syntax":"swift","code":["import XCTest","","final class FactoryDemoUITests: XCTestCase {"," func testExample() throws {"," let app = XCUIApplication()"," app.launchArguments.append(\"mock1\") \/\/ passed parameter"," app.launch()",""," let welcome = app.staticTexts[\"Mock Number 1! for Michael\"]"," XCTAssert(welcome.exists)"," }","} "]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And then in our application we use Factory’s auto registration feature to check the launch arguments to see what registrations we might want to change."}]},{"type":"codeListing","syntax":"swift","code":["import Foundation","import Factory","","extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," if ProcessInfo().arguments.contains(\"mock1\") {"," myServiceType.register { MockServiceN(1) }"," }"," #endif"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or you can simplify things with an "},{"type":"codeVoice","code":"arg"},{"type":"text","text":" context that accomplishes the same thing."}]},{"type":"codeListing","syntax":"swift","code":["import Foundation","import Factory","","extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," myServiceType.onArg(\"mock1\") { MockServiceN(1) }"," #endif"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"There are many contexts for testing, previews, and even UITesting. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"},{"type":"text","text":" for more."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Obviously, one can add as many different test cases and registrations as needed."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/testing"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Testing","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"kind":"article","metadata":{"roleHeading":"Article","title":"Testing","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Development and Testing","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Previews","doc:\/\/Factory\/documentation\/Factory\/Contexts","doc:\/\/Factory\/documentation\/Factory\/Debugging","doc:\/\/Factory\/documentation\/Factory\/Chains"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Previews":{"role":"article","title":"SwiftUI Previews","abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","kind":"article","type":"topic","url":"\/documentation\/factory\/previews"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Contexts":{"role":"article","title":"Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","kind":"article","type":"topic","url":"\/documentation\/factory\/contexts"},"doc://Factory/documentation/Factory/Debugging":{"role":"article","title":"Debugging","abstract":[{"type":"text","text":"Additional support for debugging resolution cycles, dependency chains and other issue."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","kind":"article","type":"topic","url":"\/documentation\/factory\/debugging"},"doc://Factory/documentation/Factory/Chains":{"role":"article","title":"Circular Dependency Chains","abstract":[{"type":"text","text":"Detecting and solving Circular Dependency Chains."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","kind":"article","type":"topic","url":"\/documentation\/factory\/chains"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Dependency injection exists to manage and decouple dependencies among objects; making the code more modular, maintainable, and testable. It says so right on the label."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As you’ve already seen, the main mechanism provided by Factory to accomplish this is registration. Going into the dependency system and registering a new type, typically a mock or stub or spy, in order for that type to be injected into the code under test."}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.accountLoading.register { MockNoAccounts() }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But Factory has other enhancements designed to make unit testing and user interface testing simpler and easier."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Some, like "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"},{"type":"text","text":" you may have already seen and used. Others, like pushing\/popping container state, resetting, and so on, are discussed below."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Before we look at them, it’s important to first understand Xcode’s test process and environment, and consider what that means when writing your own unit tests using Factory."}]},{"anchor":"The-Unit-Test-Environment","level":2,"type":"heading","text":"The Unit Test Environment"},{"type":"paragraph","inlineContent":[{"type":"text","text":"When you run a unit test, Xcode is launching and running your app in order to provide a relevant context for your test code."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This means that application main ran, that the application delegate’s "},{"type":"codeVoice","code":"didFinishLaunchingWithOptions"},{"type":"text","text":" function ran, and all the code needed to get to your first screen ran. When your app reaches a state where RunLoop.main starts idling and waiting for user input, "},{"type":"emphasis","inlineContent":[{"type":"text","text":"then"}]},{"type":"text","text":" XCTest will start constructing test classes and running test cases."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"All of which means that a LOT of code has already run before your first test has even fired."}]},{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Including dependency injection code."}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So when writing unit tests we need to keep in mind what our initial runtime application environment looks like, what Factory registrations may have already have occurred, and in particular, if any of those registrations were scoped and cached."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This is specially true when dealing with "},{"type":"emphasis","inlineContent":[{"type":"text","text":"singletons"}]},{"type":"text","text":". But again, let’s save that topic for a bit later."}]},{"anchor":"Changing-Not-Rebuilding","level":2,"type":"heading","text":"Changing, Not Rebuilding"},{"type":"paragraph","inlineContent":[{"type":"text","text":"So our environment exists, running and awaiting our first test. All of our original runtime dependency injection extensions and registrations are also out there, ready to be resolved and injected when needed."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And that’s great. A cryptographic hashing dependency can be used in production and in test with no repercussions. We don’t need to change a thing. And in fact, the more working code we can test in its shipping state, the better."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That said, other services like analytics might want to be swapped out during testing. Don’t want to fed the system all of your dummy test data. Again, "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"},{"type":"text","text":" can help with that."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But we’re here to test, and one thing we probably "},{"type":"emphasis","inlineContent":[{"type":"text","text":"do"}]},{"type":"text","text":" care about is the code is talks to our APIs and other services. Those are the classes and services that we’re probably going to want to mock and reregister so we can test our view models and business logic against stable test data."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Again, Factory makes that easy."}]},{"type":"codeListing","syntax":"swift","code":["func testNoAccounts() async {"," \/\/ register a mock"," Container.shared.accountLoading.register { MockNoAccounts() }"," \/\/ instantiate the model that uses the mock"," let model = Container.shared.accountsViewModel()"," \/\/ and test..."," await model.load()"," XCTAssertTrue(model.isLoaded)"," XCTAssertTrue(model.isEmpty)","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or we can write a test against unstable test data…"}]},{"type":"codeListing","syntax":"swift","code":["func testNoAccounts() async {"," \/\/ register a mock"," Container.shared.accountLoading.register { MockAccountError(404) }"," \/\/ instantiate the model that uses the mock"," let model = Container.shared.accountsViewModel()"," \/\/ and test..."," await model.load()"," XCTAssertFalse(model.isLoaded)"," XCTAssertTrue(model.isError)","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Only if we’re running a lot of tests like this then we’re going to making a lot of changes to the dependency injection environment. And that’s problematic."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We need to make sure that a change made in one test doesn’t affect a later test that relied on the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"original"}]},{"type":"text","text":" object that demonstrated a "},{"type":"emphasis","inlineContent":[{"type":"text","text":"different"}]},{"type":"text","text":" behavior. Or setting up circumstances where randomizing tests can cause the same thing to occur."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Sound confusing? It is. Try tracking it down in actual code."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"How to solve it? Well, the best solution to that sort of problem is to avoid it in the first place."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Fortunately, Factory can help with that."}]},{"anchor":"Pushing-and-Popping-State","level":2,"type":"heading","text":"Pushing and Popping State"},{"type":"paragraph","inlineContent":[{"type":"text","text":"In your unit test setUp function you can "},{"type":"emphasis","inlineContent":[{"type":"text","text":"push"}]},{"type":"text","text":" the current state of the registration system and then register and test anything you want."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Then in teardown you can "},{"type":"emphasis","inlineContent":[{"type":"text","text":"pop"}]},{"type":"text","text":" the stack, eliminating all of your changes and restoring the container to its original state before the push."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This lets each set of tests start from the same initial state, irregardless of what any prior test had changed."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The following example assumes we’re using the shared container."}]},{"type":"codeListing","syntax":"swift","code":["final class FactoryCoreTests: XCTestCase {",""," override func setUp() {"," Container.shared.manager.push()"," Container.shared.setupMocks()"," }"," "," override func tearDown() {"," Container.shared.manager.pop()"," }"," "," func testNoAccounts() async {"," Container.shared.accountLoading.register { MockNoAccounts() }"," let model = Container.shared.accountsViewModel()"," await model.load()"," XCTAssertTrue(model.isLoaded)"," XCTAssertTrue(model.isEmpty)"," }",""," func testError() async {"," Container.shared.accountLoading.register { MockAccountError(404) }"," let model = Container.shared.accountsViewModel()"," await model.load()"," XCTAssertTrue(model.isError)"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That’s pretty much it. Our "},{"type":"codeVoice","code":"AccountsViewModel"},{"type":"text","text":" depended on an "},{"type":"codeVoice","code":"AccountsLoading"},{"type":"text","text":" service."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Change the service provided and we change the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"data"}]},{"type":"text","text":" provided. Change the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"data"}]},{"type":"text","text":" provided and we change our view model’s behavior."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And then we test the results to see if everything matches up with our expectations."}]},{"anchor":"Diving-Deeper","level":2,"type":"heading","text":"Diving Deeper"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that the above is just one way of doing things. If, for example, our "},{"type":"codeVoice","code":"AccountLoader"},{"type":"text","text":" service depended on a custom network layer, we could reach further down the stack."}]},{"type":"codeListing","syntax":"swift","code":["func testNoAccounts() async throws {"," let json = #\"{ \"accounts\": [] }\"#"," Container.shared.networking.register { MockJSON(json) }"," let model = Container.shared.accountsViewModel()"," \/\/ as before","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We create the "},{"type":"codeVoice","code":"AccountsViewModel"},{"type":"text","text":", the view model injects the "},{"type":"codeVoice","code":"AccountLoading"},{"type":"text","text":" service, and that service injects our mock network service."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Same for our error code."}]},{"type":"codeListing","syntax":"swift","code":["func testNoAccounts() async throws {"," Container.shared.networking.register { MockError(404) }"," let model = Container.shared.accountsViewModel()"," \/\/ as before","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Layering your code in such a fashion can dramatically reduce the number of mocks and other objects you need to create and mange. You don’t just change the view model’s dependencies. You change the dependencies the dependencies depend on."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory makes reaching deep into a dependency tree and adjusting behavior simple and easy."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"It can even help you see what’s "},{"type":"emphasis","inlineContent":[{"type":"text","text":"inside"}]},{"type":"text","text":" that dependency tree. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging"},{"type":"text","text":" for more information."}]},{"anchor":"Rebuilding-The-Container","level":2,"type":"heading","text":"Rebuilding The Container"},{"type":"paragraph","inlineContent":[{"type":"text","text":"In your unit test setUp function you can also just create a new container and start over from scratch. No teardown needed."}]},{"type":"codeListing","syntax":"swift","code":["final class FactoryCoreTests: XCTestCase {",""," override func setUp() {"," Container.shared = Container()"," Container.shared.setupMocks()"," }"," "," func testNoAccounts() throws {"," ..."," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that this is pretty safe to do in the majority of cases. Your application has already launched, obtained what it needed, and is now idling."}]},{"anchor":"Passed-Containers","level":2,"type":"heading","text":"Passed Containers"},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can also pass the container into the view model itself."}]},{"type":"codeListing","syntax":"swift","code":["final class FactoryCoreTests: XCTestCase {",""," var container: Container!",""," override func setUp() {"," container = Container()"," container.setupMocks()"," }"," "," func testSomething() throws {"," container.myServiceType.register(factory: { MockService() })"," let model = MyViewModel(container: container)"," model.load()"," XCTAssertTrue(model.isLoaded)"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This does, of course, assume that you structured your app appropriately."}]},{"anchor":"Common-Setup","level":2,"type":"heading","text":"Common Setup"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As shown in the earlier examples, if we have several mocks that we use all of the time in our previews or unit tests, we can also add a setup function to a given container to make this easier."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," func setupMocks() {"," myService.register { MockServiceN(4) }"," sharedService.register { MockService2() }"," }","}"]},{"anchor":"Testing-Singletons","level":2,"type":"heading","text":"Testing Singletons"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s talk singletons. The singleton scope cache is global, meaning that it’s "},{"type":"emphasis","inlineContent":[{"type":"text","text":"not"}]},{"type":"text","text":" managed by any specific container."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That being the case, neither the push\/pull mechanism or the container rebuilding mechanisms described above will clear any cached singleton instances."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Singletons are, after all, expected to be singletons."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So what to do about it? Well, if needed we can reset "},{"type":"emphasis","inlineContent":[{"type":"text","text":"every"}]},{"type":"text","text":" cached singleton with just a single method call. Just call reset on that particular scope."}]},{"type":"codeListing","syntax":"swift","code":["Scope.singleton.reset()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or you can reset a specific singleton by reaching out to its factory."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ reset everything for that factory","Container.shared.someSingletonFactory.reset()","\/\/ reset just the scope cache","Container.shared.someSingletonFactory.reset(options: .scope)","\/\/ or simply register a new instance","Container.shared.someSingletonFactory.register { MyNewMock() }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"On that last point. Doing a registration change on a factory usually clears it’s associated scope automatically. The assumption, of course, being that if you register something you expect it to be used."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This also applies to singletons "},{"type":"emphasis","inlineContent":[{"type":"text","text":"unless you’re inside of a autoRegister block."}]},{"type":"text","text":" AutoRegistration can happen on every container creation, and automatically clearing a registered singleton each and every time that occurs kind of defeats the idea of multiple containers on one hand and singletons on the other."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So all that said, we can deal with them. But as a general rule, singletons can complicate your life, your code, and your tests, and as such they should be avoided and only be used when there’s an overriding need for there to be one and only one instance of an object."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Got that, Highlander?"}]},{"anchor":"Xcode-UITesting","level":2,"type":"heading","text":"Xcode UITesting"},{"type":"paragraph","inlineContent":[{"type":"text","text":"UITesting can be more challenging, in that we’re now to dealing with an active, running application. We have our existing tools, of course, but the issue is often complicated by the fact that we may want to change the application’s behavior "},{"type":"emphasis","inlineContent":[{"type":"text","text":"before"}]},{"type":"text","text":" it gets to RunLoop.main and starts idling."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"How?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"One solution is passed parameters."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The test case is fairly straightforward."}]},{"type":"codeListing","syntax":"swift","code":["import XCTest","","final class FactoryDemoUITests: XCTestCase {"," func testExample() throws {"," let app = XCUIApplication()"," app.launchArguments.append(\"mock1\") \/\/ passed parameter"," app.launch()",""," let welcome = app.staticTexts[\"Mock Number 1! for Michael\"]"," XCTAssert(welcome.exists)"," }","} "]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And then in our application we use Factory’s auto registration feature to check the launch arguments to see what registrations we might want to change."}]},{"type":"codeListing","syntax":"swift","code":["import Foundation","import Factory","","extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," if ProcessInfo().arguments.contains(\"mock1\") {"," myServiceType.register { MockServiceN(1) }"," }"," #endif"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or you can simplify things with an "},{"type":"codeVoice","code":"arg"},{"type":"text","text":" context that accomplishes the same thing."}]},{"type":"codeListing","syntax":"swift","code":["import Foundation","import Factory","","extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," myServiceType.onArg(\"mock1\") { MockServiceN(1) }"," #endif"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"There are many contexts for testing, previews, and even UITesting. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"},{"type":"text","text":" for more."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Obviously, one can add as many different test cases and registrations as needed."}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/testing"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Testing","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"kind":"article","metadata":{"roleHeading":"Article","title":"Testing","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Development and Testing","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Previews","doc:\/\/Factory\/documentation\/Factory\/Contexts","doc:\/\/Factory\/documentation\/Factory\/Debugging","doc:\/\/Factory\/documentation\/Factory\/Chains"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Previews":{"role":"article","title":"SwiftUI Previews","abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","kind":"article","type":"topic","url":"\/documentation\/factory\/previews"},"doc://Factory/documentation/Factory/Chains":{"role":"article","title":"Circular Dependency Chains","abstract":[{"type":"text","text":"Detecting and solving Circular Dependency Chains."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","kind":"article","type":"topic","url":"\/documentation\/factory\/chains"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Debugging":{"role":"article","title":"Debugging","abstract":[{"type":"text","text":"Additional support for debugging resolution cycles, dependency chains and other issue."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","kind":"article","type":"topic","url":"\/documentation\/factory\/debugging"},"doc://Factory/documentation/Factory/Contexts":{"role":"article","title":"Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","kind":"article","type":"topic","url":"\/documentation\/factory\/contexts"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/weaklazyinjected.json b/docs/data/documentation/factory/weaklazyinjected.json index b453b3bc..9f7b19d5 100644 --- a/docs/data/documentation/factory/weaklazyinjected.json +++ b/docs/data/documentation/factory/weaklazyinjected.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@propertyWrapper"},{"kind":"text","text":" "},{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This wrapper maintains a weak reference to the object in question, so it must exist elsewhere.t"},{"type":"text","text":" "},{"type":"text","text":"It’s useful for delegate patterns and parent\/child relationships."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Property wrappers implement an annotation pattern to resolving dependencies, similar to using"},{"type":"text","text":" "},{"type":"text","text":"EnvironmentObject in SwiftUI."}]},{"type":"codeListing","syntax":"swift","code":["class MyViewModel {"," @LazyInjected(\\.myService) var service"," @LazyInjected(\\MyCustomContainer.myService) var service","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The provided keypath resolves to a Factory definition on the "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" container required for each Container type."},{"type":"text","text":" "},{"type":"text","text":"The short version of the keyPath resolves to the default container, while the expanded version"},{"type":"text","text":" "},{"type":"text","text":"allows you to point an instance on your own customer container type."}]},{"style":"note","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Lazy injection is resolved the first time the dependency is referenced by the code, "},{"type":"strong","inlineContent":[{"type":"text","text":"not"}]},{"type":"text","text":" on initialization."}]}],"type":"aside","name":"Note"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"title":"WeakLazyInjected","roleHeading":"Structure","role":"symbol","symbolKind":"struct","externalID":"s:7Factory16WeakLazyInjectedV","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-4r0lx","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-75hq3"]},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/projectedValue","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/wrappedValue"]},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolve(reset:)"]}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"url":"\/documentation\/factory\/weaklazyinjected"},"doc://Factory/documentation/Factory/WeakLazyInjected/init(_:)-75hq3":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-75hq3","kind":"symbol","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/init(_:)-75hq3"},"doc://Factory/documentation/Factory/WeakLazyInjected/projectedValue":{"role":"symbol","title":"projectedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WeakLazyInjected","preciseIdentifier":"s:7Factory16WeakLazyInjectedV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/projectedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/projectedvalue"},"doc://Factory/documentation/Factory/WeakLazyInjected/resolve(reset:)":{"role":"symbol","title":"resolve(reset:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolve(reset:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/resolve(reset:)"},"doc://Factory/documentation/Factory/WeakLazyInjected/factory":{"role":"symbol","title":"factory","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/factory","kind":"symbol","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/factory"},"doc://Factory/documentation/Factory/WeakLazyInjected/wrappedValue":{"role":"symbol","title":"wrappedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}],"abstract":[{"type":"text","text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/wrappedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/wrappedvalue"},"doc://Factory/documentation/Factory/WeakLazyInjected/init(_:)-4r0lx":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-4r0lx","kind":"symbol","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/init(_:)-4r0lx"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@propertyWrapper"},{"kind":"text","text":" "},{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This wrapper maintains a weak reference to the object in question, so it must exist elsewhere.t"},{"type":"text","text":" "},{"type":"text","text":"It’s useful for delegate patterns and parent\/child relationships."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Property wrappers implement an annotation pattern to resolving dependencies, similar to using"},{"type":"text","text":" "},{"type":"text","text":"EnvironmentObject in SwiftUI."}]},{"type":"codeListing","syntax":"swift","code":["class MyViewModel {"," @LazyInjected(\\.myService) var service"," @LazyInjected(\\MyCustomContainer.myService) var service","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The provided keypath resolves to a Factory definition on the "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" container required for each Container type."},{"type":"text","text":" "},{"type":"text","text":"The short version of the keyPath resolves to the default container, while the expanded version"},{"type":"text","text":" "},{"type":"text","text":"allows you to point an instance on your own customer container type."}]},{"style":"note","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Lazy injection is resolved the first time the dependency is referenced by the code, "},{"type":"strong","inlineContent":[{"type":"text","text":"not"}]},{"type":"text","text":" on initialization."}]}],"type":"aside","name":"Note"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"title":"WeakLazyInjected","roleHeading":"Structure","role":"symbol","symbolKind":"struct","externalID":"s:7Factory16WeakLazyInjectedV","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-4r0lx","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-75hq3"]},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/projectedValue","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/wrappedValue"]},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolve(reset:)"]}],"references":{"doc://Factory/documentation/Factory/WeakLazyInjected/resolve(reset:)":{"role":"symbol","title":"resolve(reset:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolve(reset:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/resolve(reset:)"},"doc://Factory/documentation/Factory/WeakLazyInjected/wrappedValue":{"role":"symbol","title":"wrappedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}],"abstract":[{"type":"text","text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/wrappedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/wrappedvalue"},"doc://Factory/documentation/Factory/WeakLazyInjected/init(_:)-75hq3":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-75hq3","kind":"symbol","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/init(_:)-75hq3"},"doc://Factory/documentation/Factory/WeakLazyInjected/factory":{"role":"symbol","title":"factory","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/factory","kind":"symbol","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/factory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/WeakLazyInjected/init(_:)-4r0lx":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-4r0lx","kind":"symbol","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/init(_:)-4r0lx"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"url":"\/documentation\/factory\/weaklazyinjected"},"doc://Factory/documentation/Factory/WeakLazyInjected/projectedValue":{"role":"symbol","title":"projectedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WeakLazyInjected","preciseIdentifier":"s:7Factory16WeakLazyInjectedV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/projectedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/projectedvalue"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/weaklazyinjected/factory.json b/docs/data/documentation/factory/weaklazyinjected/factory.json index ced744b9..01956fa8 100644 --- a/docs/data/documentation/factory/weaklazyinjected/factory.json +++ b/docs/data/documentation/factory/weaklazyinjected/factory.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"> { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/factory"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/factory","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"title":"factory","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory16WeakLazyInjectedV7factoryA2AVyxGvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/WeakLazyInjected/factory":{"role":"symbol","title":"factory","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/factory","kind":"symbol","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/factory"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"url":"\/documentation\/factory\/weaklazyinjected"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"> { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/factory"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/factory","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"title":"factory","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory16WeakLazyInjectedV7factoryA2AVyxGvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/WeakLazyInjected/factory":{"role":"symbol","title":"factory","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/factory","kind":"symbol","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/factory"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"url":"\/documentation\/factory\/weaklazyinjected"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/weaklazyinjected/init(_:)-4r0lx.json b/docs/data/documentation/factory/weaklazyinjected/init(_:)-4r0lx.json index a00f8e9a..3e2b1d86 100644 --- a/docs/data/documentation/factory/weaklazyinjected/init(_:)-4r0lx.json +++ b/docs/data/documentation/factory/weaklazyinjected/init(_:)-4r0lx.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","preciseIdentifier":"s:7Factory9ContainerC","text":"Container"},{"kind":"text","text":", "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"KeyPath to a Factory on the default Container."}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/init(_:)-4r0lx"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-4r0lx","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"title":"init(_:)","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory16WeakLazyInjectedVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/WeakLazyInjected/init(_:)-4r0lx":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-4r0lx","kind":"symbol","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/init(_:)-4r0lx"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"url":"\/documentation\/factory\/weaklazyinjected"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","preciseIdentifier":"s:7Factory9ContainerC","text":"Container"},{"kind":"text","text":", "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"KeyPath to a Factory on the default Container."}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/init(_:)-4r0lx"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-4r0lx","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"title":"init(_:)","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory16WeakLazyInjectedVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"references":{"doc://Factory/documentation/Factory/Container":{"role":"symbol","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/WeakLazyInjected/init(_:)-4r0lx":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-4r0lx","kind":"symbol","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/init(_:)-4r0lx"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"url":"\/documentation\/factory\/weaklazyinjected"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/weaklazyinjected/init(_:)-75hq3.json b/docs/data/documentation/factory/weaklazyinjected/init(_:)-75hq3.json index e37c737c..0bc9af60 100644 --- a/docs/data/documentation/factory/weaklazyinjected/init(_:)-75hq3.json +++ b/docs/data/documentation/factory/weaklazyinjected/init(_:)-75hq3.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>) "},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","preciseIdentifier":"s:7Factory15SharedContainerP","text":"SharedContainer"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"KeyPath to a Factory on the specified Container."}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/init(_:)-75hq3"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-75hq3","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"title":"init(_:)","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory16WeakLazyInjectedVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"references":{"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"url":"\/documentation\/factory\/weaklazyinjected"},"doc://Factory/documentation/Factory/SharedContainer":{"role":"symbol","title":"SharedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"abstract":[{"type":"text","text":"SharedContainer defines the protocol all Containers must adopt if they want to support Service Locator style injection or support any of the injection property wrappers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"url":"\/documentation\/factory\/sharedcontainer"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/WeakLazyInjected/init(_:)-75hq3":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-75hq3","kind":"symbol","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/init(_:)-75hq3"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>) "},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","preciseIdentifier":"s:7Factory15SharedContainerP","text":"SharedContainer"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"KeyPath to a Factory on the specified Container."}]}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/init(_:)-75hq3"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-75hq3","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"title":"init(_:)","roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory16WeakLazyInjectedVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"references":{"doc://Factory/documentation/Factory/SharedContainer":{"role":"symbol","title":"SharedContainer","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"abstract":[{"type":"text","text":"SharedContainer defines the protocol all Containers must adopt if they want to support Service Locator style injection or support any of the injection property wrappers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"url":"\/documentation\/factory\/sharedcontainer"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","title":"Factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"url":"\/documentation\/factory\/factory"},"doc://Factory/documentation/Factory/WeakLazyInjected/init(_:)-75hq3":{"role":"symbol","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-75hq3","kind":"symbol","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/init(_:)-75hq3"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"url":"\/documentation\/factory\/weaklazyinjected"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/weaklazyinjected/projectedvalue.json b/docs/data/documentation/factory/weaklazyinjected/projectedvalue.json index 839bf408..793bfeab 100644 --- a/docs/data/documentation/factory/weaklazyinjected/projectedvalue.json +++ b/docs/data/documentation/factory/weaklazyinjected/projectedvalue.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","preciseIdentifier":"s:7Factory16WeakLazyInjectedV","text":"WeakLazyInjected"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"> { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/projectedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/projectedValue","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WeakLazyInjected","preciseIdentifier":"s:7Factory16WeakLazyInjectedV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"title":"projectedValue","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory16WeakLazyInjectedV14projectedValueACyxGvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/WeakLazyInjected/projectedValue":{"role":"symbol","title":"projectedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WeakLazyInjected","preciseIdentifier":"s:7Factory16WeakLazyInjectedV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/projectedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/projectedvalue"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"url":"\/documentation\/factory\/weaklazyinjected"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","preciseIdentifier":"s:7Factory16WeakLazyInjectedV","text":"WeakLazyInjected"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"> { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/projectedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/projectedValue","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WeakLazyInjected","preciseIdentifier":"s:7Factory16WeakLazyInjectedV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"title":"projectedValue","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory16WeakLazyInjectedV14projectedValueACyxGvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"references":{"doc://Factory/documentation/Factory/WeakLazyInjected/projectedValue":{"role":"symbol","title":"projectedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WeakLazyInjected","preciseIdentifier":"s:7Factory16WeakLazyInjectedV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/projectedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/projectedvalue"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"url":"\/documentation\/factory\/weaklazyinjected"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/weaklazyinjected/resolve(reset:).json b/docs/data/documentation/factory/weaklazyinjected/resolve(reset:).json index 05e8b221..3af94bc0 100644 --- a/docs/data/documentation/factory/weaklazyinjected/resolve(reset:).json +++ b/docs/data/documentation/factory/weaklazyinjected/resolve(reset:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"mutating"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":" "},{"kind":"internalParam","text":"options"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":" = .none)"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/resolve(reset:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolve(reset:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"title":"resolve(reset:)","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:7Factory16WeakLazyInjectedV7resolve5resetyAA0A12ResetOptionsO_tF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"references":{"doc://Factory/documentation/Factory/WeakLazyInjected/resolve(reset:)":{"role":"symbol","title":"resolve(reset:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolve(reset:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/resolve(reset:)"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"url":"\/documentation\/factory\/weaklazyinjected"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"mutating"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":" "},{"kind":"internalParam","text":"options"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":" = .none)"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/resolve(reset:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolve(reset:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"title":"resolve(reset:)","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:7Factory16WeakLazyInjectedV7resolve5resetyAA0A12ResetOptionsO_tF","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/WeakLazyInjected/resolve(reset:)":{"role":"symbol","title":"resolve(reset:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolve(reset:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/resolve(reset:)"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"role":"symbol","title":"FactoryResetOptions","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"url":"\/documentation\/factory\/weaklazyinjected"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/weaklazyinjected/wrappedvalue.json b/docs/data/documentation/factory/weaklazyinjected/wrappedvalue.json index 342f4e8f..90b9bda5 100644 --- a/docs/data/documentation/factory/weaklazyinjected/wrappedvalue.json +++ b/docs/data/documentation/factory/weaklazyinjected/wrappedvalue.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"? { "},{"kind":"keyword","text":"mutating"},{"kind":"text","text":" "},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/wrappedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/wrappedValue","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}],"title":"wrappedValue","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory16WeakLazyInjectedV12wrappedValuexSgvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"references":{"doc://Factory/documentation/Factory/WeakLazyInjected/wrappedValue":{"role":"symbol","title":"wrappedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}],"abstract":[{"type":"text","text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/wrappedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/wrappedvalue"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"url":"\/documentation\/factory\/weaklazyinjected"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"? { "},{"kind":"keyword","text":"mutating"},{"kind":"text","text":" "},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/wrappedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/wrappedValue","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}],"title":"wrappedValue","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory16WeakLazyInjectedV12wrappedValuexSgvp","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"references":{"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"url":"\/documentation\/factory\/weaklazyinjected"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","type":"topic","url":"\/documentation\/factory"},"doc://Factory/documentation/Factory/WeakLazyInjected/wrappedValue":{"role":"symbol","title":"wrappedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}],"abstract":[{"type":"text","text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/wrappedValue","kind":"symbol","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/wrappedvalue"}}} \ No newline at end of file