diff --git a/Sources/Factory/Factory.docc/Development/Previews.md b/Sources/Factory/Factory.docc/Development/Previews.md index 33dc3729..d56d8d45 100644 --- a/Sources/Factory/Factory.docc/Development/Previews.md +++ b/Sources/Factory/Factory.docc/Development/Previews.md @@ -40,6 +40,29 @@ struct ContentView_Previews: PreviewProvider { } ``` 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. + +## SwiftUI #Previews + +The same can be done for the new #Preview option, with one minor change. + +```swift +#Preview { + let _ = Container.myService.register { MockServiceN(4) } + return ContentView() +} +``` +The #Preview closure is not a ViewBuilder, so if we add our let statement we just need to explicitly return our view. + +Or we could simply turn it into a ViewBuilder using our old friend, Group. +```swift +#Preview { + Group { + let _ = Container.myService.register { MockServiceN(4) } + ContentView() + } +} +``` +Group actually has a few additional uses... ## Multiple Previews diff --git a/docs/data/documentation/factory.json b/docs/data/documentation/factory.json index a0e79af6..5f17b8dd 100644 --- a/docs/data/documentation/factory.json +++ b/docs/data/documentation/factory.json @@ -1 +1 @@ -{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory"},"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"primaryContentSections":[{"kind":"content","content":[{"level":2,"type":"heading","text":"Overview","anchor":"Overview"},{"inlineContent":[{"type":"text","text":"Factory is strongly influenced by SwiftUI, and in my opinion is highly suited for use in that environment."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory is…"}]},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"text":"Adaptable","type":"text"}]},{"type":"text","text":": Factory doesn’t tie you down to a single dependency injection strategy or technique."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"text":"Powerful","type":"text"}],"type":"strong"},{"type":"text","text":": Factory supports containers, scopes, passed parameters, contexts, decorators, unit tests, SwiftUI Previews, and much, much more."}]}]},{"content":[{"inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Performant"}]},{"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.","type":"text"}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Safe"}]},{"text":": Factory is compile-time safe; a factory for a given type must exist or the code simply will not compile.","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"text":"Concise","type":"text"}],"type":"strong"},{"type":"text","text":": Defining a registration usually takes just a single line of code. Same for resolution."}]}]},{"content":[{"inlineContent":[{"inlineContent":[{"text":"Flexible","type":"text"}],"type":"strong"},{"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."}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"text":"Documented","type":"text"}]},{"text":": Factory 2.0 has extensive DocC documentation and examples covering its classes, methods, and use cases.","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"type":"text","text":"Lightweight"}],"type":"strong"},{"type":"text","text":": With all of that Factory is slim and trim, under 800 lines of executable code."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"type":"text","text":"Tested"}],"type":"strong"},{"text":": Unit tests with 100% code coverage helps ensure correct operation of registrations, resolutions, and scopes.","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"type":"text","text":"Free"}],"type":"strong"},{"type":"text","text":": Factory is free and open source under the MIT License."}]}]}]},{"inlineContent":[{"text":"Ready to get started?","type":"text"}],"type":"paragraph"}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory"]}],"metadata":{"symbolKind":"module","modules":[{"name":"Factory"}],"title":"Factory","externalID":"Factory","role":"collection","roleHeading":"Framework"},"hierarchy":{"paths":[[]]},"sections":[],"kind":"symbol","schemaVersion":{"patch":0,"minor":3,"major":0},"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/GettingStarted","doc:\/\/Factory\/documentation\/Factory\/Containers","doc:\/\/Factory\/documentation\/Factory\/Scopes"],"title":"The Basics"},{"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":"Development and Testing"},{"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":"Advanced Topics"},{"title":"Additional Topics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Migration"]},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"],"title":"Classes"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","doc:\/\/Factory\/documentation\/Factory\/Resolving","doc:\/\/Factory\/documentation\/Factory\/SharedContainer"],"title":"Protocols"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext","doc:\/\/Factory\/documentation\/Factory\/FactoryKey","doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","doc:\/\/Factory\/documentation\/Factory\/Injected","doc:\/\/Factory\/documentation\/Factory\/InjectedObject","doc:\/\/Factory\/documentation\/Factory\/InjectedType","doc:\/\/Factory\/documentation\/Factory\/LazyInjected","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"],"title":"Structures"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-52olu","doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-632zk"],"title":"Functions"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"],"title":"Enumerations"}],"references":{"doc://Factory/documentation/Factory/Resolving":{"type":"topic","title":"Resolving","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","abstract":[{"text":"When protocol is applied to a container it enables a typed registration\/resolution mode.","type":"text"}],"role":"symbol","kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Resolving"}],"url":"\/documentation\/factory\/resolving","navigatorTitle":[{"kind":"identifier","text":"Resolving"}]},"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Tags":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","title":"Tags","url":"\/documentation\/factory\/tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"role":"article"},"doc://Factory/documentation/Factory/GettingStarted":{"url":"\/documentation\/factory\/gettingstarted","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"type":"topic","title":"Getting Started","role":"collectionGroup"},"doc://Factory/documentation/Factory/Migration":{"abstract":[{"type":"text","text":"Moving from 1.x to 2.0"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Migration","title":"Migration","url":"\/documentation\/factory\/migration","type":"topic","role":"article"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","navigatorTitle":[{"text":"FactoryContext","kind":"identifier"}],"abstract":[],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"title":"FactoryResetOptions"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Testing":{"title":"Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"url":"\/documentation\/factory\/testing","kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","role":"article"},"doc://Factory/documentation/Factory/Modifiers":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","title":"Factory Modifiers","url":"\/documentation\/factory\/modifiers","abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"role":"article"},"doc://Factory/documentation/Factory/Cycle":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","title":"Resolution Cycles","url":"\/documentation\/factory\/cycle","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"role":"article"},"doc://Factory/documentation/Factory/FactoryKey":{"title":"FactoryKey","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey","url":"\/documentation\/factory\/factorykey","type":"topic","role":"symbol","navigatorTitle":[{"text":"FactoryKey","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryKey"}],"kind":"symbol","abstract":[]},"doc://Factory/documentation/Factory/Debugging":{"abstract":[{"type":"text","text":"Additional support for debugging resolution cycles, dependency chains and other issue."}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","title":"Debugging","url":"\/documentation\/factory\/debugging","type":"topic","role":"article"},"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"ContainerManager","kind":"identifier"}],"role":"symbol","url":"\/documentation\/factory\/containermanager","title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","abstract":[{"text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container.","type":"text"}]},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/resolve(_:)-52olu":{"title":"resolve(_:)","type":"topic","abstract":[{"text":"Global function to resolve a keypath on Container.shared into the requested type","type":"text"}],"url":"\/documentation\/factory\/resolve(_:)-52olu","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier","text":"Container"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>) -> "},{"text":"T","kind":"typeIdentifier"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-52olu","role":"symbol"},"doc://Factory/documentation/Factory/Contexts":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","title":"Contexts","type":"topic","role":"article","abstract":[{"text":"Changing injection results under special circumstances.","type":"text"}],"kind":"article","url":"\/documentation\/factory\/contexts"},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"kind":"symbol","type":"topic","title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}]},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","title":"Scopes"},"doc://Factory/documentation/Factory/FactoryRegistration":{"title":"FactoryRegistration","type":"topic","url":"\/documentation\/factory\/factoryregistration","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","role":"symbol","navigatorTitle":[{"text":"FactoryRegistration","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryRegistration","kind":"identifier"}],"kind":"symbol","abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}]},"doc://Factory/documentation/Factory/Functional":{"title":"Functional Injection","identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","url":"\/documentation\/factory\/functional","type":"topic","role":"article","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"kind":"article"},"doc://Factory/documentation/Factory/FactoryContextType":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","url":"\/documentation\/factory\/factorycontexttype"},"doc://Factory/documentation/Factory/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."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"title":"LazyInjected","url":"\/documentation\/factory\/lazyinjected","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Injected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","role":"symbol","type":"topic","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"title":"Injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]},"doc://Factory/documentation/Factory/InjectedType":{"title":"InjectedType","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"InjectedType"}],"role":"symbol","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType","url":"\/documentation\/factory\/injectedtype","abstract":[{"text":"Basic property wrapper for optional injected types","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"InjectedType"}]},"doc://Factory/documentation/Factory/Containers":{"role":"article","abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","title":"Containers","type":"topic","url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory/Modules":{"type":"topic","url":"\/documentation\/factory\/modules","role":"article","kind":"article","title":"Modular Development","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}]},"doc://Factory/documentation/Factory/Previews":{"abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","kind":"article","title":"SwiftUI Previews","url":"\/documentation\/factory\/previews","type":"topic","role":"article"},"doc://Factory/documentation/Factory/resolve(_:)-632zk":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":", "},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"C"},{"text":", ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">>) -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"}],"url":"\/documentation\/factory\/resolve(_:)-632zk","identifier":"doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-632zk","title":"resolve(_:)","role":"symbol","type":"topic","abstract":[{"type":"text","text":"Global function to resolve a keypath on the specified shared container into the requested type"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Optionals":{"type":"topic","kind":"article","abstract":[{"text":"With Factory registrations can be performed at any time.","type":"text"}],"title":"Optionals and Dynamic Registration","identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","url":"\/documentation\/factory\/optionals","role":"article"},"doc://Factory/documentation/Factory/Chains":{"abstract":[{"type":"text","text":"Detecting and solving Circular Dependency Chains."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","kind":"article","title":"Circular Dependency Chains","url":"\/documentation\/factory\/chains","type":"topic","role":"article"},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"kind":"symbol","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer","role":"symbol","url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory/Design":{"url":"\/documentation\/factory\/design","title":"Designing Factory","role":"article","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Design"},"doc://Factory/documentation/Factory/InjectedObject":{"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","role":"symbol","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/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","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"title":"SharedContainer","url":"\/documentation\/factory\/sharedcontainer","navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Container":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Container"}],"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container"},"doc://Factory/documentation/Factory/AutoRegistering":{"url":"\/documentation\/factory\/autoregistering","type":"topic","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AutoRegistering","kind":"identifier"}],"title":"AutoRegistering","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","navigatorTitle":[{"text":"AutoRegistering","kind":"identifier"}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"type":"text","text":"."}],"role":"symbol","kind":"symbol"}}} \ No newline at end of file +{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"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"]},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Migration"],"title":"Additional Topics"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"],"title":"Classes"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","doc:\/\/Factory\/documentation\/Factory\/Resolving","doc:\/\/Factory\/documentation\/Factory\/SharedContainer"],"title":"Protocols"},{"title":"Structures","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext","doc:\/\/Factory\/documentation\/Factory\/FactoryKey","doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","doc:\/\/Factory\/documentation\/Factory\/Injected","doc:\/\/Factory\/documentation\/Factory\/InjectedObject","doc:\/\/Factory\/documentation\/Factory\/InjectedType","doc:\/\/Factory\/documentation\/Factory\/LazyInjected","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]},{"title":"Functions","identifiers":["doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-52olu","doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-632zk"]},{"title":"Type Aliases","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryAutoRegistering","doc:\/\/Factory\/documentation\/Factory\/FactoryContainer","doc:\/\/Factory\/documentation\/Factory\/FactoryContainerManager","doc:\/\/Factory\/documentation\/Factory\/FactoryManagedContainer","doc:\/\/Factory\/documentation\/Factory\/FactoryResolving","doc:\/\/Factory\/documentation\/Factory\/FactoryScope","doc:\/\/Factory\/documentation\/Factory\/FactorySharedContainer"]},{"title":"Enumerations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]}],"sections":[],"metadata":{"roleHeading":"Framework","role":"collection","title":"Factory","symbolKind":"module","modules":[{"name":"Factory"}],"externalID":"Factory"},"primaryContentSections":[{"kind":"content","content":[{"text":"Overview","level":2,"anchor":"Overview","type":"heading"},{"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…"}]},{"items":[{"content":[{"inlineContent":[{"inlineContent":[{"type":"text","text":"Adaptable"}],"type":"strong"},{"text":": Factory doesn’t tie you down to a single dependency injection strategy or technique.","type":"text"}],"type":"paragraph"}]},{"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":[{"inlineContent":[{"text":"Safe","type":"text"}],"type":"strong"},{"text":": Factory is compile-time safe; a factory for a given type must exist or the code simply will not compile.","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"type":"text","text":"Concise"}],"type":"strong"},{"text":": Defining a registration usually takes just a single line of code. Same for resolution.","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"text":"Flexible","type":"text"}]},{"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":[{"inlineContent":[{"type":"text","text":"Documented"}],"type":"strong"},{"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":[{"text":"Lightweight","type":"text"}]},{"text":": With all of that Factory is slim and trim, under 800 lines of executable code.","type":"text"}]}]},{"content":[{"inlineContent":[{"inlineContent":[{"type":"text","text":"Tested"}],"type":"strong"},{"type":"text","text":": Unit tests with 100% code coverage helps ensure correct operation of registrations, resolutions, and scopes."}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"inlineContent":[{"text":"Free","type":"text"}],"type":"strong"},{"type":"text","text":": Factory is free and open source under the MIT License."}],"type":"paragraph"}]}],"type":"unorderedList"},{"inlineContent":[{"type":"text","text":"Ready to get started?"}],"type":"paragraph"}]}],"variants":[{"paths":["\/documentation\/factory"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"patch":0,"minor":3,"major":0},"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory"},"hierarchy":{"paths":[[]]},"references":{"doc://Factory/documentation/Factory/FactoryContext":{"url":"\/documentation\/factory\/factorycontext","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"FactoryContext","kind":"identifier"}],"kind":"symbol","abstract":[],"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"title":"FactoryContext"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Optionals":{"url":"\/documentation\/factory\/optionals","identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","role":"article","kind":"article","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"type":"topic","title":"Optionals and Dynamic Registration"},"doc://Factory/documentation/Factory/Injected":{"kind":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","navigatorTitle":[{"text":"Injected","kind":"identifier"}],"abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Modifiers":{"kind":"article","abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"title":"Factory Modifiers","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","role":"article","type":"topic","url":"\/documentation\/factory\/modifiers"},"doc://Factory/documentation/Factory/AutoRegistering":{"title":"AutoRegistering","abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"text":".","type":"text"}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"AutoRegistering","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"AutoRegistering"}],"url":"\/documentation\/factory\/autoregistering","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering"},"doc://Factory/documentation/Factory/FactoryManagedContainer":{"title":"FactoryManagedContainer","abstract":[],"fragments":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryManagedContainer"}],"navigatorTitle":[{"text":"FactoryManagedContainer","kind":"identifier"}],"url":"\/documentation\/factory\/factorymanagedcontainer","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryManagedContainer"},"doc://Factory/documentation/Factory/Design":{"url":"\/documentation\/factory\/design","identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","role":"article","kind":"article","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"type":"topic","title":"Designing Factory"},"doc://Factory/documentation/Factory/FactoryKey":{"navigatorTitle":[{"text":"FactoryKey","kind":"identifier"}],"kind":"symbol","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryKey"}],"url":"\/documentation\/factory\/factorykey","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey","type":"topic","title":"FactoryKey"},"doc://Factory/documentation/Factory/Contexts":{"abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"type":"topic","role":"article","title":"Contexts","kind":"article","url":"\/documentation\/factory\/contexts","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"},"doc://Factory/documentation/Factory/FactoryAutoRegistering":{"title":"FactoryAutoRegistering","abstract":[],"fragments":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryAutoRegistering","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryAutoRegistering"}],"url":"\/documentation\/factory\/factoryautoregistering","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryAutoRegistering"},"doc://Factory/documentation/Factory/LazyInjected":{"title":"LazyInjected","type":"topic","url":"\/documentation\/factory\/lazyinjected","role":"symbol","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Previews":{"title":"SwiftUI Previews","url":"\/documentation\/factory\/previews","abstract":[{"text":"Mocking dependencies for SwiftUI Previews.","type":"text"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","type":"topic","role":"article"},"doc://Factory/documentation/Factory/FactorySharedContainer":{"title":"FactorySharedContainer","abstract":[],"fragments":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactorySharedContainer"}],"navigatorTitle":[{"text":"FactorySharedContainer","kind":"identifier"}],"url":"\/documentation\/factory\/factorysharedcontainer","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactorySharedContainer"},"doc://Factory/documentation/Factory/Migration":{"title":"Migration","abstract":[{"type":"text","text":"Moving from 1.x to 2.0"}],"url":"\/documentation\/factory\/migration","role":"article","type":"topic","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Migration"},"doc://Factory/documentation/Factory/Cycle":{"url":"\/documentation\/factory\/cycle","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","role":"article","kind":"article","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"type":"topic","title":"Resolution Cycles"},"doc://Factory/documentation/Factory/Resolving":{"title":"Resolving","abstract":[{"type":"text","text":"When protocol is applied to a container it enables a typed registration\/resolution mode."}],"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Resolving"}],"navigatorTitle":[{"text":"Resolving","kind":"identifier"}],"url":"\/documentation\/factory\/resolving","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving"},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","url":"\/documentation\/factory\/containermanager","type":"topic","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}]},"doc://Factory/documentation/Factory/Modules":{"url":"\/documentation\/factory\/modules","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","role":"article","kind":"article","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"type":"topic","title":"Modular Development"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryContextType":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"text":"Context types available for special purpose factory registrations.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","type":"topic","url":"\/documentation\/factory\/factorycontexttype"},"doc://Factory/documentation/Factory/Functional":{"url":"\/documentation\/factory\/functional","identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","role":"article","kind":"article","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"type":"topic","title":"Functional Injection"},"doc://Factory/documentation/Factory/resolve(_:)-632zk":{"title":"resolve(_:)","abstract":[{"type":"text","text":"Global function to resolve a keypath on the specified shared container into the requested type"}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolve"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"C"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">>) -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"}],"url":"\/documentation\/factory\/resolve(_:)-632zk","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-632zk"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"kind":"symbol","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"type":"topic","url":"\/documentation\/factory\/weaklazyinjected"},"doc://Factory/documentation/Factory/FactoryResolving":{"title":"FactoryResolving","abstract":[],"fragments":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResolving"}],"navigatorTitle":[{"text":"FactoryResolving","kind":"identifier"}],"url":"\/documentation\/factory\/factoryresolving","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResolving"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Container","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","navigatorTitle":[{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/InjectedType":{"title":"InjectedType","abstract":[{"text":"Basic property wrapper for optional injected types","type":"text"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"InjectedType"}],"navigatorTitle":[{"text":"InjectedType","kind":"identifier"}],"url":"\/documentation\/factory\/injectedtype","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","title":"FactoryResetOptions","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryResetOptions","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"text":"ManagedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"type":"topic","url":"\/documentation\/factory\/managedcontainer","title":"ManagedContainer"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"InjectedObject","kind":"identifier"}],"abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","kind":"symbol","navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}]},"doc://Factory/documentation/Factory/GettingStarted":{"url":"\/documentation\/factory\/gettingstarted","identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","role":"collectionGroup","kind":"article","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"type":"topic","title":"Getting Started"},"doc://Factory/documentation/Factory/FactoryContainerManager":{"title":"FactoryContainerManager","abstract":[],"fragments":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryContainerManager","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryContainerManager"}],"url":"\/documentation\/factory\/factorycontainermanager","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContainerManager"},"doc://Factory/documentation/Factory/resolve(_:)-52olu":{"title":"resolve(_:)","abstract":[{"type":"text","text":"Global function to resolve a keypath on Container.shared into the requested type"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC","text":"Container"},{"kind":"text","text":", "},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>) -> "},{"text":"T","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/resolve(_:)-52olu","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-52olu"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/Debugging":{"title":"Debugging","url":"\/documentation\/factory\/debugging","abstract":[{"text":"Additional support for debugging resolution cycles, dependency chains and other issue.","type":"text"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","type":"topic","role":"article"},"doc://Factory/documentation/Factory/FactoryContainer":{"url":"\/documentation\/factory\/factorycontainer","title":"FactoryContainer","navigatorTitle":[{"kind":"identifier","text":"FactoryContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContainer","role":"symbol","kind":"symbol","abstract":[],"type":"topic","fragments":[{"text":"typealias","kind":"keyword"},{"text":" ","kind":"text"},{"text":"FactoryContainer","kind":"identifier"}]},"doc://Factory/documentation/Factory/Testing":{"title":"Testing","url":"\/documentation\/factory\/testing","abstract":[{"text":"Using Factory for Unit and UI Testing.","type":"text"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","type":"topic","role":"article"},"doc://Factory/documentation/Factory/FactoryScope":{"title":"FactoryScope","abstract":[],"fragments":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryScope","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryScope"}],"url":"\/documentation\/factory\/factoryscope","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryScope"},"doc://Factory/documentation/Factory/SharedContainer":{"title":"SharedContainer","type":"topic","url":"\/documentation\/factory\/sharedcontainer","role":"symbol","navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"SharedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryRegistration":{"url":"\/documentation\/factory\/factoryregistration","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","title":"FactoryRegistration","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"}],"kind":"symbol","role":"symbol","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"kind":"article"},"doc://Factory/documentation/Factory/Tags":{"url":"\/documentation\/factory\/tags","identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","role":"article","kind":"article","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"type":"topic","title":"Tags"},"doc://Factory/documentation/Factory/Containers":{"type":"topic","role":"article","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","title":"Containers","abstract":[{"text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?","type":"text"}],"url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory/Chains":{"title":"Circular Dependency Chains","url":"\/documentation\/factory\/chains","abstract":[{"text":"Detecting and solving Circular Dependency Chains.","type":"text"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","type":"topic","role":"article"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/autoregistering.json b/docs/data/documentation/factory/autoregistering.json index d889ddf2..098c54a9 100644 --- a/docs/data/documentation/factory/autoregistering.json +++ b/docs/data/documentation/factory/autoregistering.json @@ -1 +1 @@ -{"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"AutoRegistering"}],"languages":["swift"]}]},{"kind":"content","content":[{"level":2,"text":"Overview","anchor":"overview","type":"heading"},{"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."}]},{"code":["extension Container: AutoRegistering {"," func autoRegister() {"," someService.register {"," CrossModuleService()"," }"," }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"autoRegister"},{"type":"text","text":" function is called on each instantiated container prior to"},{"text":" ","type":"text"},{"type":"text","text":"the first resolution of a Factory on that container."}]},{"name":"Warning","type":"aside","style":"warning","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Calling "},{"code":"container.manager.reset(options: .all)","type":"codeVoice"},{"type":"text","text":" restores the container to it’s initial state"},{"type":"text","text":" "},{"text":"and autoRegister will be called again if it exists.","type":"text"}]}]}]}],"sections":[],"topicSections":[{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/AutoRegistering\/autoRegister()"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","interfaceLanguage":"swift"},"metadata":{"roleHeading":"Protocol","navigatorTitle":[{"text":"AutoRegistering","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"text":"AutoRegistering","kind":"identifier"}],"title":"AutoRegistering","modules":[{"name":"Factory"}],"externalID":"s:7Factory15AutoRegisteringP","role":"symbol","symbolKind":"protocol"},"schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/autoregistering"]}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"type":"text","text":"."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"references":{"doc://Factory/documentation/Factory/AutoRegistering":{"url":"\/documentation\/factory\/autoregistering","type":"topic","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AutoRegistering","kind":"identifier"}],"title":"AutoRegistering","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","navigatorTitle":[{"text":"AutoRegistering","kind":"identifier"}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"type":"text","text":"."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/AutoRegistering/autoRegister()":{"required":true,"role":"symbol","url":"\/documentation\/factory\/autoregistering\/autoregister()","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"autoRegister","kind":"identifier"},{"text":"()","kind":"text"}],"kind":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering\/autoRegister()","title":"autoRegister()","abstract":[{"type":"text","text":"User provided function that supports first-time registration of needed dependencies prior to first resolution"},{"text":" ","type":"text"},{"type":"text","text":"of a dependency on that container."}]}}} \ No newline at end of file +{"schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"symbolKind":"protocol","roleHeading":"Protocol","role":"symbol","title":"AutoRegistering","externalID":"s:7Factory15AutoRegisteringP","modules":[{"name":"Factory"}],"navigatorTitle":[{"text":"AutoRegistering","kind":"identifier"}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AutoRegistering","kind":"identifier"}]},"sections":[],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AutoRegistering","kind":"identifier"}]}],"kind":"declarations"},{"kind":"content","content":[{"anchor":"overview","text":"Overview","level":2,"type":"heading"},{"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":" "},{"text":"of a dependency on that container.","type":"text"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["extension Container: AutoRegistering {"," func autoRegister() {"," someService.register {"," CrossModuleService()"," }"," }","}"]},{"type":"paragraph","inlineContent":[{"text":"The ","type":"text"},{"code":"autoRegister","type":"codeVoice"},{"text":" function is called on each instantiated container prior to","type":"text"},{"type":"text","text":" "},{"text":"the first resolution of a Factory on that container.","type":"text"}]},{"content":[{"type":"paragraph","inlineContent":[{"text":"Calling ","type":"text"},{"code":"container.manager.reset(options: .all)","type":"codeVoice"},{"text":" restores the container to it’s initial state","type":"text"},{"type":"text","text":" "},{"text":"and autoRegister will be called again if it exists.","type":"text"}]}],"type":"aside","name":"Warning","style":"warning"}]}],"variants":[{"paths":["\/documentation\/factory\/autoregistering"],"traits":[{"interfaceLanguage":"swift"}]}],"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/AutoRegistering\/autoRegister()"],"title":"Instance Methods"}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"code":"Container","type":"codeVoice"},{"text":".","type":"text"}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering"},"references":{"doc://Factory/documentation/Factory/AutoRegistering/autoRegister()":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"autoRegister","kind":"identifier"},{"text":"()","kind":"text"}],"required":true,"type":"topic","url":"\/documentation\/factory\/autoregistering\/autoregister()","role":"symbol","title":"autoRegister()","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering\/autoRegister()","abstract":[{"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.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/AutoRegistering":{"title":"AutoRegistering","abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"text":".","type":"text"}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"AutoRegistering","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"AutoRegistering"}],"url":"\/documentation\/factory\/autoregistering","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"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 578c0c8f..2a42f442 100644 --- a/docs/data/documentation/factory/autoregistering/autoregister().json +++ b/docs/data/documentation/factory/autoregistering/autoregister().json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/AutoRegistering"]]},"sections":[],"schemaVersion":{"major":0,"patch":0,"minor":3},"abstract":[{"text":"User provided function that supports first-time registration of needed dependencies prior to first resolution","type":"text"},{"type":"text","text":" "},{"text":"of a dependency on that container.","type":"text"}],"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"autoRegister","kind":"identifier"},{"kind":"text","text":"()"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"metadata":{"externalID":"s:7Factory15AutoRegisteringP12autoRegisteryyF","modules":[{"name":"Factory"}],"roleHeading":"Instance Method","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"autoRegister","kind":"identifier"},{"text":"()","kind":"text"}],"symbolKind":"method","title":"autoRegister()","required":true},"variants":[{"paths":["\/documentation\/factory\/autoregistering\/autoregister()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering\/autoRegister()","interfaceLanguage":"swift"},"kind":"symbol","references":{"doc://Factory/documentation/Factory/AutoRegistering/autoRegister()":{"required":true,"role":"symbol","url":"\/documentation\/factory\/autoregistering\/autoregister()","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"autoRegister","kind":"identifier"},{"text":"()","kind":"text"}],"kind":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering\/autoRegister()","title":"autoRegister()","abstract":[{"type":"text","text":"User provided function that supports first-time registration of needed dependencies prior to first resolution"},{"text":" ","type":"text"},{"type":"text","text":"of a dependency on that container."}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/AutoRegistering":{"url":"\/documentation\/factory\/autoregistering","type":"topic","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AutoRegistering","kind":"identifier"}],"title":"AutoRegistering","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","navigatorTitle":[{"text":"AutoRegistering","kind":"identifier"}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"type":"text","text":"."}],"role":"symbol","kind":"symbol"}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/autoregistering\/autoregister()"]}],"sections":[],"abstract":[{"type":"text","text":"User provided function that supports first-time registration of needed dependencies prior to first resolution"},{"text":" ","type":"text"},{"text":"of a dependency on that container.","type":"text"}],"kind":"symbol","metadata":{"symbolKind":"method","roleHeading":"Instance Method","title":"autoRegister()","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"autoRegister","kind":"identifier"},{"kind":"text","text":"()"}],"modules":[{"name":"Factory"}],"role":"symbol","externalID":"s:7Factory15AutoRegisteringP12autoRegisteryyF","required":true},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering\/autoRegister()","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"autoRegister","kind":"identifier"},{"text":"()","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/AutoRegistering"]]},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/AutoRegistering":{"title":"AutoRegistering","abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"text":".","type":"text"}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"AutoRegistering","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"AutoRegistering"}],"url":"\/documentation\/factory\/autoregistering","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering"},"doc://Factory/documentation/Factory/AutoRegistering/autoRegister()":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"autoRegister","kind":"identifier"},{"text":"()","kind":"text"}],"required":true,"type":"topic","url":"\/documentation\/factory\/autoregistering\/autoregister()","role":"symbol","title":"autoRegister()","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering\/autoRegister()","abstract":[{"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.","type":"text"}],"kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/chains.json b/docs/data/documentation/factory/chains.json index 861274c8..96c2634e 100644 --- a/docs/data/documentation/factory/chains.json +++ b/docs/data/documentation/factory/chains.json @@ -1 +1 @@ -{"primaryContentSections":[{"content":[{"text":"Circular Dependency Chain Detection","level":2,"type":"heading","anchor":"Circular-Dependency-Chain-Detection"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Examine the following class definitions."}]},{"syntax":"swift","code":["class CircularA {"," @Injected(\\.circularB) var circularB","}","","class CircularB {"," @Injected(\\.circularC) var circularC","}","","class CircularC {"," @Injected(\\.circularA) var circularA","}"],"type":"codeListing"},{"inlineContent":[{"type":"text","text":"Attempting make an instance of "},{"code":"CircularA","type":"codeVoice"},{"text":" is going to result in an infinite loop.","type":"text"}],"type":"paragraph"},{"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":[{"text":"This is a circular dependency chain.","type":"text"}]},{"type":"heading","level":2,"anchor":"Resolution","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"]},{"inlineContent":[{"type":"text","text":"With the above information in hand we should be able to find the problem and fix it."}],"type":"paragraph"},{"inlineContent":[{"text":"We could fix things by changing CircularC’s injection wrapper to ","type":"text"},{"code":"LazyInjected","type":"codeVoice"},{"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 "},{"code":"CircularC","type":"codeVoice"},{"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."}],"type":"paragraph"},{"type":"aside","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."}]}],"style":"important","name":"Important"},{"type":"heading","level":2,"text":"Disabling CDC Detection","anchor":"Disabling-CDC-Detection"},{"inlineContent":[{"text":"If needed circular dependency chain detecting can be disabled by setting the detection limit to zero.","type":"text"}],"type":"paragraph"},{"code":["Container.shared.manager.dependencyChainTestMax = 0"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"text":"The default value for ","type":"text"},{"code":"dependencyChainTestMax","type":"codeVoice"},{"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"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This value can be increased (or decreased) as needed."}]}],"kind":"content"}],"variants":[{"paths":["\/documentation\/factory\/chains"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"article","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"metadata":{"modules":[{"name":"Factory"}],"role":"article","roleHeading":"Article","title":"Circular Dependency Chains"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Chains","interfaceLanguage":"swift"},"sections":[],"abstract":[{"text":"Detecting and solving Circular Dependency Chains.","type":"text"}],"schemaVersion":{"major":0,"patch":0,"minor":3},"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":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Previews":{"abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","kind":"article","title":"SwiftUI Previews","url":"\/documentation\/factory\/previews","type":"topic","role":"article"},"doc://Factory/documentation/Factory/Debugging":{"abstract":[{"type":"text","text":"Additional support for debugging resolution cycles, dependency chains and other issue."}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","title":"Debugging","url":"\/documentation\/factory\/debugging","type":"topic","role":"article"},"doc://Factory/documentation/Factory/Contexts":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","title":"Contexts","type":"topic","role":"article","abstract":[{"text":"Changing injection results under special circumstances.","type":"text"}],"kind":"article","url":"\/documentation\/factory\/contexts"},"doc://Factory/documentation/Factory/Testing":{"title":"Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"url":"\/documentation\/factory\/testing","kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","role":"article"}}} \ No newline at end of file +{"kind":"article","schemaVersion":{"patch":0,"major":0,"minor":3},"sections":[],"metadata":{"modules":[{"name":"Factory"}],"role":"article","title":"Circular Dependency Chains","roleHeading":"Article"},"seeAlsoSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Previews","doc:\/\/Factory\/documentation\/Factory\/Testing","doc:\/\/Factory\/documentation\/Factory\/Contexts","doc:\/\/Factory\/documentation\/Factory\/Debugging"],"generated":true,"title":"Development and Testing"}],"abstract":[{"text":"Detecting and solving Circular Dependency Chains.","type":"text"}],"primaryContentSections":[{"kind":"content","content":[{"text":"Circular Dependency Chain Detection","anchor":"Circular-Dependency-Chain-Detection","level":2,"type":"heading"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"Examine the following class definitions.","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["class CircularA {"," @Injected(\\.circularB) var circularB","}","","class CircularB {"," @Injected(\\.circularC) var circularC","}","","class CircularC {"," @Injected(\\.circularA) var circularA","}"]},{"inlineContent":[{"type":"text","text":"Attempting make an instance of "},{"code":"CircularA","type":"codeVoice"},{"text":" is going to result in an infinite loop.","type":"text"}],"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."}],"type":"paragraph"},{"anchor":"Resolution","type":"heading","level":2,"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."}]},{"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":"codeListing","syntax":null},{"inlineContent":[{"type":"text","text":"With the above information in hand we should be able to find the problem and fix it."}],"type":"paragraph"},{"inlineContent":[{"text":"We could fix things by changing CircularC’s injection wrapper to ","type":"text"},{"type":"codeVoice","code":"LazyInjected"},{"type":"text","text":" or, better yet, "},{"code":"WeakLazyInjected","type":"codeVoice"},{"text":" in order to avoid a retain cycle.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"But a better solution would probably entail finding and breaking out the functionality that "},{"code":"CircularA","type":"codeVoice"},{"text":" and ","type":"text"},{"code":"CircularC","type":"codeVoice"},{"text":" are depending upon into a ","type":"text"},{"inlineContent":[{"type":"text","text":"third"}],"type":"emphasis"},{"text":" object they both could include.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"Circular dependencies such as this are usually a violation of the Single Responsibility Principle, and should be avoided.","type":"text"}]},{"type":"aside","name":"Important","style":"important","content":[{"type":"paragraph","inlineContent":[{"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":"text"}]}]},{"type":"heading","level":2,"text":"Disabling CDC Detection","anchor":"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","code":["Container.shared.manager.dependencyChainTestMax = 0"],"syntax":"swift"},{"inlineContent":[{"text":"The default value for ","type":"text"},{"type":"codeVoice","code":"dependencyChainTestMax"},{"text":" is 10. That means the detector fires if the same class type appears during a single resolution cycle more than 10 times.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"This value can be increased (or decreased) as needed."}],"type":"paragraph"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Chains"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/chains"]}],"references":{"doc://Factory/documentation/Factory/Previews":{"title":"SwiftUI Previews","url":"\/documentation\/factory\/previews","abstract":[{"text":"Mocking dependencies for SwiftUI Previews.","type":"text"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","type":"topic","role":"article"},"doc://Factory/documentation/Factory/Debugging":{"title":"Debugging","url":"\/documentation\/factory\/debugging","abstract":[{"text":"Additional support for debugging resolution cycles, dependency chains and other issue.","type":"text"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","type":"topic","role":"article"},"doc://Factory/documentation/Factory/Contexts":{"abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"type":"topic","role":"article","title":"Contexts","kind":"article","url":"\/documentation\/factory\/contexts","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Testing":{"title":"Testing","url":"\/documentation\/factory\/testing","abstract":[{"text":"Using Factory for Unit and UI Testing.","type":"text"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","type":"topic","role":"article"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/container.json b/docs/data/documentation/factory/container.json index 4ab18f7d..595cdccb 100644 --- a/docs/data/documentation/factory/container.json +++ b/docs/data/documentation/factory/container.json @@ -1 +1 @@ -{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Container"},"kind":"symbol","topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container\/init()"],"title":"Initializers"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container\/manager"],"title":"Instance Properties"},{"title":"Type Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container\/shared"]},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"],"generated":true,"title":"Default Implementations"}],"metadata":{"title":"Container","role":"symbol","modules":[{"name":"Factory"}],"externalID":"s:7Factory9ContainerC","roleHeading":"Class","navigatorTitle":[{"kind":"identifier","text":"Container"}],"symbolKind":"class","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"final"},{"kind":"text","text":" "},{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}]}],"kind":"declarations"},{"kind":"content","content":[{"text":"Overview","level":2,"anchor":"overview","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Containers are used by Factory to manage object creation, object resolution, and object lifecycles in general."}]},{"syntax":"swift","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"Registrations and scope caches will persist as long as the associated container remains in scope.","type":"text"}]},{"inlineContent":[{"type":"text","text":"See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","type":"reference","isActive":true},{"type":"text","text":" for more information."}],"type":"paragraph"}]}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"schemaVersion":{"minor":3,"major":0,"patch":0},"sections":[],"relationshipsSections":[{"title":"Conforms To","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","doc:\/\/Factory\/documentation\/Factory\/SharedContainer"],"type":"conformsTo","kind":"relationships"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"references":{"doc://Factory/documentation/Factory/Container/shared":{"type":"topic","title":"shared","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/shared","url":"\/documentation\/factory\/container\/shared","kind":"symbol","abstract":[{"text":"Define the default shared container.","type":"text"}],"fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier","text":"Container"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"role":"collectionGroup","abstract":[],"kind":"article","type":"topic","url":"\/documentation\/factory\/container\/managedcontainer-implementations","title":"ManagedContainer Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"},"doc://Factory/documentation/Factory/Container/manager":{"fragments":[{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory16ContainerManagerC","text":"ContainerManager","kind":"typeIdentifier"}],"abstract":[{"text":"Define the container’s manager.","type":"text"}],"url":"\/documentation\/factory\/container\/manager","type":"topic","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/manager","kind":"symbol","title":"manager"},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"kind":"symbol","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer","role":"symbol","url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory/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","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"title":"SharedContainer","url":"\/documentation\/factory\/sharedcontainer","navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Container/init()":{"kind":"symbol","type":"topic","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"url":"\/documentation\/factory\/container\/init()","title":"init()","role":"symbol","abstract":[{"text":"Public initializer","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/init()"},"doc://Factory/documentation/Factory/Containers":{"role":"article","abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","title":"Containers","type":"topic","url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory/Container":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Container"}],"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container"}}} \ No newline at end of file +{"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}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"final"},{"text":" ","kind":"text"},{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Container","kind":"identifier"}]}],"kind":"declarations"},{"kind":"content","content":[{"type":"heading","level":2,"anchor":"overview","text":"Overview"},{"type":"paragraph","inlineContent":[{"text":"Containers are used by Factory to manage object creation, object resolution, and object lifecycles in general.","type":"text"}]},{"code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"text":"Registrations and scope caches will persist as long as the associated container remains in scope.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","type":"reference","isActive":true},{"text":" for more information.","type":"text"}],"type":"paragraph"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container"]}],"relationshipsSections":[{"kind":"relationships","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","doc:\/\/Factory\/documentation\/Factory\/SharedContainer"],"title":"Conforms To","type":"conformsTo"}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"symbolKind":"class","title":"Container","navigatorTitle":[{"text":"Container","kind":"identifier"}],"role":"symbol","roleHeading":"Class","modules":[{"name":"Factory"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Container","kind":"identifier"}],"externalID":"s:7Factory9ContainerC"},"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"references":{"doc://Factory/documentation/Factory/Container/init()":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/init()","abstract":[{"type":"text","text":"Public initializer"}],"type":"topic","url":"\/documentation\/factory\/container\/init()","title":"init()","kind":"symbol","role":"symbol","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}]},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","role":"collectionGroup","abstract":[],"kind":"article","type":"topic","title":"ManagedContainer Implementations","url":"\/documentation\/factory\/container\/managedcontainer-implementations"},"doc://Factory/documentation/Factory/Container/manager":{"abstract":[{"type":"text","text":"Define the container’s manager."}],"type":"topic","url":"\/documentation\/factory\/container\/manager","role":"symbol","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"manager"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ContainerManagerC","text":"ContainerManager"}],"title":"manager","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/manager","kind":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"text":"ManagedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"type":"topic","url":"\/documentation\/factory\/managedcontainer","title":"ManagedContainer"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Container","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","navigatorTitle":[{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Container/shared":{"kind":"symbol","url":"\/documentation\/factory\/container\/shared","role":"symbol","title":"shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/shared","abstract":[{"text":"Define the default shared container.","type":"text"}],"type":"topic","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier","text":"Container"}]},"doc://Factory/documentation/Factory/SharedContainer":{"title":"SharedContainer","type":"topic","url":"\/documentation\/factory\/sharedcontainer","role":"symbol","navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"SharedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Containers":{"type":"topic","role":"article","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","title":"Containers","abstract":[{"text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?","type":"text"}],"url":"\/documentation\/factory\/containers"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/container/callasfunction(key:_:)-40wjo.json b/docs/data/documentation/factory/container/callasfunction(key:_:)-40wjo.json index 136af32f..4d478a96 100644 --- a/docs/data/documentation/factory/container/callasfunction(key:_:)-40wjo.json +++ b/docs/data/documentation/factory/container/callasfunction(key:_:)-40wjo.json @@ -1 +1 @@ -{"abstract":[{"text":"Syntactic sugar allows container to create a properly bound ParameterFactory.","type":"text"}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"text":"<","kind":"text"},{"text":"P","kind":"genericParameter"},{"kind":"text","text":", "},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"StaticString","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":" = "},{"text":"#function","kind":"keyword"},{"kind":"text","text":", "},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"factory"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"text":"<","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/container\/callasfunction(key:_:)-40wjo"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"extendedModule":"Factory","title":"callAsFunction(key:_:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"text":", (","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"symbolKind":"method","externalID":"s:7Factory16ManagedContainerPAAE14callAsFunction3key_AA09ParameterA0Vyqd__qd_0_Gs12StaticStringV_qd_0_qd__ctr0_lF::SYNTHESIZED::s:7Factory9ContainerC","modules":[{"name":"Factory"}],"roleHeading":"Instance Method","role":"symbol"},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-40wjo","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Container":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Container"}],"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container"},"doc://Factory/documentation/Factory/Container/callAsFunction(key:_:)-40wjo":{"type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"text":"<","kind":"text"},{"text":"P","kind":"genericParameter"},{"kind":"text","text":", "},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"text":", (","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"title":"callAsFunction(key:_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-40wjo","abstract":[{"text":"Syntactic sugar allows container to create a properly bound ParameterFactory.","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/container\/callasfunction(key:_:)-40wjo","role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"role":"collectionGroup","abstract":[],"kind":"article","type":"topic","url":"\/documentation\/factory\/container\/managedcontainer-implementations","title":"ManagedContainer Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"}}} \ No newline at end of file +{"variants":[{"paths":["\/documentation\/factory\/container\/callasfunction(key:_:)-40wjo"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound ParameterFactory."}],"sections":[],"metadata":{"extendedModule":"Factory","externalID":"s:7Factory16ManagedContainerPAAE14callAsFunction3key_AA09ParameterA0Vyqd__qd_0_Gs12StaticStringV_qd_0_qd__ctr0_lF::SYNTHESIZED::s:7Factory9ContainerC","modules":[{"name":"Factory"}],"role":"symbol","symbolKind":"method","roleHeading":"Instance Method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"kind":"text","text":"<"},{"text":"P","kind":"genericParameter"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"text":"StaticString","preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier"},{"text":", (","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"text":"<","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"title":"callAsFunction(key:_:)"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"text":"<","kind":"text"},{"text":"P","kind":"genericParameter"},{"text":", ","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"kind":"text","text":" = "},{"kind":"keyword","text":"#function"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"factory"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}]}]}],"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-40wjo"},"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/Container":{"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Container","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","navigatorTitle":[{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","role":"collectionGroup","abstract":[],"kind":"article","type":"topic","title":"ManagedContainer Implementations","url":"\/documentation\/factory\/container\/managedcontainer-implementations"},"doc://Factory/documentation/Factory/Container/callAsFunction(key:_:)-40wjo":{"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound ParameterFactory."}],"title":"callAsFunction(key:_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier","text":"StaticString"},{"kind":"text","text":", ("},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-40wjo","type":"topic","role":"symbol","url":"\/documentation\/factory\/container\/callasfunction(key:_:)-40wjo"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/container/callasfunction(key:_:)-8hpv0.json b/docs/data/documentation/factory/container/callasfunction(key:_:)-8hpv0.json index c97729aa..017bf147 100644 --- a/docs/data/documentation/factory/container/callasfunction(key:_:)-8hpv0.json +++ b/docs/data/documentation/factory/container/callasfunction(key:_:)-8hpv0.json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"text":" = ","kind":"text"},{"text":"#function","kind":"keyword"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"factory","kind":"internalParam"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" () -> "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container\/callasfunction(key:_:)-8hpv0"]}],"metadata":{"symbolKind":"method","title":"callAsFunction(key:_:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"text":", () -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"role":"symbol","roleHeading":"Instance Method","extendedModule":"Factory","modules":[{"name":"Factory"}],"externalID":"s:7Factory16ManagedContainerPAAE14callAsFunction3key_A2AVyqd__Gs12StaticStringV_qd__yctlF::SYNTHESIZED::s:7Factory9ContainerC"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-8hpv0"},"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound Factory."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"sections":[],"kind":"symbol","references":{"doc://Factory/documentation/Factory/Container":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Container"}],"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container"},"doc://Factory/documentation/Factory/Container/callAsFunction(key:_:)-8hpv0":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s12StaticStringV","text":"StaticString","kind":"typeIdentifier"},{"text":", () -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"title":"callAsFunction(key:_:)","role":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-8hpv0","url":"\/documentation\/factory\/container\/callasfunction(key:_:)-8hpv0","abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound Factory."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"role":"collectionGroup","abstract":[],"kind":"article","type":"topic","url":"\/documentation\/factory\/container\/managedcontainer-implementations","title":"ManagedContainer Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]}}} \ No newline at end of file +{"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound Factory."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":" = "},{"text":"#function","kind":"keyword"},{"text":", ","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"factory","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"text":" () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"platforms":["macOS"]}]}],"metadata":{"roleHeading":"Instance Method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s12StaticStringV","text":"StaticString","kind":"typeIdentifier"},{"text":", () -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"modules":[{"name":"Factory"}],"externalID":"s:7Factory16ManagedContainerPAAE14callAsFunction3key_A2AVyqd__Gs12StaticStringV_qd__yctlF::SYNTHESIZED::s:7Factory9ContainerC","title":"callAsFunction(key:_:)","symbolKind":"method","extendedModule":"Factory","role":"symbol"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-8hpv0"},"sections":[],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"variants":[{"paths":["\/documentation\/factory\/container\/callasfunction(key:_:)-8hpv0"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory/Container":{"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Container","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","navigatorTitle":[{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Container/callAsFunction(key:_:)-8hpv0":{"type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"kind":"text","text":", () -> "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-8hpv0","url":"\/documentation\/factory\/container\/callasfunction(key:_:)-8hpv0","abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound Factory."}],"kind":"symbol","role":"symbol","title":"callAsFunction(key:_:)"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","role":"collectionGroup","abstract":[],"kind":"article","type":"topic","title":"ManagedContainer Implementations","url":"\/documentation\/factory\/container\/managedcontainer-implementations"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"}}} \ 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 9cad28e7..cdf47bef 100644 --- a/docs/data/documentation/factory/container/decorator(_:).json +++ b/docs/data/documentation/factory/container/decorator(_:).json @@ -1 +1 @@ -{"schemaVersion":{"minor":3,"major":0,"patch":0},"metadata":{"role":"symbol","roleHeading":"Instance Method","symbolKind":"method","title":"decorator(_:)","externalID":"s:7Factory16ManagedContainerPAAE9decoratoryyyypcSgF::SYNTHESIZED::s:7Factory9ContainerC","extendedModule":"Factory","modules":[{"name":"Factory"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"decorator","kind":"identifier"},{"kind":"text","text":"((("},{"kind":"keyword","text":"Any"},{"text":") -> ())?)","kind":"text"}]},"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"decorator","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"decorator"},{"text":": ((","kind":"text"},{"kind":"keyword","text":"Any"},{"text":") -> ())?)","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/decorator(_:)","interfaceLanguage":"swift"},"abstract":[{"text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container.","type":"text"}],"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/container\/decorator(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"role":"collectionGroup","abstract":[],"kind":"article","type":"topic","url":"\/documentation\/factory\/container\/managedcontainer-implementations","title":"ManagedContainer Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"},"doc://Factory/documentation/Factory/Container":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Container"}],"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container"},"doc://Factory/documentation/Factory/Container/decorator(_:)":{"url":"\/documentation\/factory\/container\/decorator(_:)","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"((("},{"text":"Any","kind":"keyword"},{"kind":"text","text":") -> ())?)"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/decorator(_:)","title":"decorator(_:)","abstract":[{"text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container.","type":"text"}],"kind":"symbol","type":"topic"}}} \ No newline at end of file +{"kind":"symbol","abstract":[{"text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container.","type":"text"}],"schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"modules":[{"name":"Factory"}],"role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"((("},{"text":"Any","kind":"keyword"},{"text":") -> ())?)","kind":"text"}],"roleHeading":"Instance Method","symbolKind":"method","extendedModule":"Factory","externalID":"s:7Factory16ManagedContainerPAAE9decoratoryyyypcSgF::SYNTHESIZED::s:7Factory9ContainerC","title":"decorator(_:)"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container\/decorator(_:)"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Container\/decorator(_:)"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"decorator","kind":"internalParam"},{"kind":"text","text":": (("},{"text":"Any","kind":"keyword"},{"text":") -> ())?)","kind":"text"}],"languages":["swift"]}]}],"references":{"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","role":"collectionGroup","abstract":[],"kind":"article","type":"topic","title":"ManagedContainer Implementations","url":"\/documentation\/factory\/container\/managedcontainer-implementations"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Container","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","navigatorTitle":[{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Container/decorator(_:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/decorator(_:)","role":"symbol","url":"\/documentation\/factory\/container\/decorator(_:)","type":"topic","abstract":[{"type":"text","text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container."}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"decorator","kind":"identifier"},{"kind":"text","text":"((("},{"text":"Any","kind":"keyword"},{"text":") -> ())?)","kind":"text"}],"kind":"symbol","title":"decorator(_:)"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"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 7d504ede..09a02027 100644 --- a/docs/data/documentation/factory/container/init().json +++ b/docs/data/documentation/factory/container/init().json @@ -1 +1 @@ -{"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"text":"()","kind":"text"}],"externalID":"s:7Factory9ContainerCACycfc","title":"init()","roleHeading":"Initializer","role":"symbol","modules":[{"name":"Factory"}],"symbolKind":"init"},"schemaVersion":{"minor":3,"major":0,"patch":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/init()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Public initializer"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container\/init()"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"init","kind":"keyword"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"sections":[],"references":{"doc://Factory/documentation/Factory/Container":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Container"}],"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container"},"doc://Factory/documentation/Factory/Container/init()":{"kind":"symbol","type":"topic","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"url":"\/documentation\/factory\/container\/init()","title":"init()","role":"symbol","abstract":[{"text":"Public initializer","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/init()"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/init()","interfaceLanguage":"swift"},"metadata":{"externalID":"s:7Factory9ContainerCACycfc","role":"symbol","roleHeading":"Initializer","modules":[{"name":"Factory"}],"fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"title":"init()","symbolKind":"init"},"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","sections":[],"abstract":[{"text":"Public initializer","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"init"},{"text":"()","kind":"text"}],"languages":["swift"]}]}],"variants":[{"paths":["\/documentation\/factory\/container\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container"]]},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Container","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","navigatorTitle":[{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Container/init()":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/init()","abstract":[{"type":"text","text":"Public initializer"}],"type":"topic","url":"\/documentation\/factory\/container\/init()","title":"init()","kind":"symbol","role":"symbol","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}]}}} \ 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 921148e2..28814af8 100644 --- a/docs/data/documentation/factory/container/managedcontainer-implementations.json +++ b/docs/data/documentation/factory/container/managedcontainer-implementations.json @@ -1 +1 @@ -{"sections":[],"metadata":{"modules":[{"name":"Factory"}],"role":"collectionGroup","title":"ManagedContainer Implementations"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","interfaceLanguage":"swift"},"schemaVersion":{"patch":0,"minor":3,"major":0},"topicSections":[{"generated":true,"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-40wjo","doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-8hpv0","doc:\/\/Factory\/documentation\/Factory\/Container\/decorator(_:)","doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-6682d","doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-7g95","doc:\/\/Factory\/documentation\/Factory\/Container\/reset(options:)","doc:\/\/Factory\/documentation\/Factory\/Container\/with(_:)"]}],"kind":"article","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container\/managedcontainer-implementations"]}],"references":{"doc://Factory/documentation/Factory/Container/reset(options:)":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"text":"options","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"title":"reset(options:)","role":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/reset(options:)","url":"\/documentation\/factory\/container\/reset(options:)","abstract":[{"type":"text","text":"Defines a thread safe access mechanism to reset the container."}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Container/callAsFunction(key:_:)-8hpv0":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s12StaticStringV","text":"StaticString","kind":"typeIdentifier"},{"text":", () -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"title":"callAsFunction(key:_:)","role":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-8hpv0","url":"\/documentation\/factory\/container\/callasfunction(key:_:)-8hpv0","abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound Factory."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Container/promised(key:)-7g95":{"url":"\/documentation\/factory\/container\/promised(key:)-7g95","abstract":[{"text":"Syntactic sugar allows container to create a factory where registration is promised before resolution.","type":"text"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"text":") -> ","kind":"text"},{"text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?>"}],"kind":"symbol","type":"topic","title":"promised(key:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-7g95","role":"symbol"},"doc://Factory/documentation/Factory/Container/with(_:)":{"type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"with","kind":"identifier"},{"kind":"text","text":"(("},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/with(_:)","title":"with(_:)","abstract":[{"text":"Defines a with function to allow container transformation on assignment.","type":"text"}],"url":"\/documentation\/factory\/container\/with(_:)","kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/Container":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Container"}],"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container"},"doc://Factory/documentation/Factory/Container/promised(key:)-6682d":{"role":"symbol","abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory where registration is promised before resolution."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"promised","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?>"}],"url":"\/documentation\/factory\/container\/promised(key:)-6682d","type":"topic","title":"promised(key:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-6682d"},"doc://Factory/documentation/Factory/Container/callAsFunction(key:_:)-40wjo":{"type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"text":"<","kind":"text"},{"text":"P","kind":"genericParameter"},{"kind":"text","text":", "},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"text":", (","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"title":"callAsFunction(key:_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-40wjo","abstract":[{"text":"Syntactic sugar allows container to create a properly bound ParameterFactory.","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/container\/callasfunction(key:_:)-40wjo","role":"symbol"},"doc://Factory/documentation/Factory/Container/decorator(_:)":{"url":"\/documentation\/factory\/container\/decorator(_:)","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"((("},{"text":"Any","kind":"keyword"},{"kind":"text","text":") -> ())?)"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/decorator(_:)","title":"decorator(_:)","abstract":[{"text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container.","type":"text"}],"kind":"symbol","type":"topic"}}} \ No newline at end of file +{"sections":[],"topicSections":[{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-40wjo","doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-8hpv0","doc:\/\/Factory\/documentation\/Factory\/Container\/decorator(_:)","doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-6682d","doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-7g95","doc:\/\/Factory\/documentation\/Factory\/Container\/reset(options:)","doc:\/\/Factory\/documentation\/Factory\/Container\/with(_:)"],"generated":true}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container"]]},"kind":"article","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container\/managedcontainer-implementations"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"},"metadata":{"modules":[{"name":"Factory"}],"role":"collectionGroup","title":"ManagedContainer Implementations"},"schemaVersion":{"patch":0,"minor":3,"major":0},"references":{"doc://Factory/documentation/Factory/Container/promised(key:)-7g95":{"kind":"symbol","title":"promised(key:)","url":"\/documentation\/factory\/container\/promised(key:)-7g95","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"promised","kind":"identifier"},{"kind":"text","text":"<"},{"text":"P","kind":"genericParameter"},{"kind":"text","text":", "},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s12StaticStringV","text":"StaticString","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?>","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-7g95","abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory where registration is promised before resolution."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Container/callAsFunction(key:_:)-8hpv0":{"type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"kind":"text","text":", () -> "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-8hpv0","url":"\/documentation\/factory\/container\/callasfunction(key:_:)-8hpv0","abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound Factory."}],"kind":"symbol","role":"symbol","title":"callAsFunction(key:_:)"},"doc://Factory/documentation/Factory/Container/promised(key:)-6682d":{"url":"\/documentation\/factory\/container\/promised(key:)-6682d","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"promised","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier","text":"StaticString"},{"kind":"text","text":") -> "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":"?>","kind":"text"}],"abstract":[{"text":"Syntactic sugar allows container to create a factory where registration is promised before resolution.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-6682d","type":"topic","title":"promised(key:)"},"doc://Factory/documentation/Factory/Container/callAsFunction(key:_:)-40wjo":{"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound ParameterFactory."}],"title":"callAsFunction(key:_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier","text":"StaticString"},{"kind":"text","text":", ("},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-40wjo","type":"topic","role":"symbol","url":"\/documentation\/factory\/container\/callasfunction(key:_:)-40wjo"},"doc://Factory/documentation/Factory/Container/with(_:)":{"url":"\/documentation\/factory\/container\/with(_:)","role":"symbol","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"with","kind":"identifier"},{"text":"((","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"text":"Void","preciseIdentifier":"s:s4Voida","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"text":"Defines a with function to allow container transformation on assignment.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/with(_:)","type":"topic","title":"with(_:)"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Container","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","navigatorTitle":[{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Container/decorator(_:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/decorator(_:)","role":"symbol","url":"\/documentation\/factory\/container\/decorator(_:)","type":"topic","abstract":[{"type":"text","text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container."}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"decorator","kind":"identifier"},{"kind":"text","text":"((("},{"text":"Any","kind":"keyword"},{"text":") -> ())?)","kind":"text"}],"kind":"symbol","title":"decorator(_:)"},"doc://Factory/documentation/Factory/Container/reset(options:)":{"url":"\/documentation\/factory\/container\/reset(options:)","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"options"},{"text":": ","kind":"text"},{"text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier"},{"text":")","kind":"text"}],"abstract":[{"text":"Defines a thread safe access mechanism to reset the container.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/reset(options:)","type":"topic","title":"reset(options:)"}}} \ 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 688f22d7..1782f6af 100644 --- a/docs/data/documentation/factory/container/manager.json +++ b/docs/data/documentation/factory/container/manager.json @@ -1 +1 @@ -{"abstract":[{"text":"Define the container’s manager.","type":"text"}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"text":"manager","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC"}]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/container\/manager"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Container\/manager"},"metadata":{"fragments":[{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory16ContainerManagerC","kind":"typeIdentifier","text":"ContainerManager"}],"symbolKind":"property","modules":[{"name":"Factory"}],"role":"symbol","externalID":"s:7Factory9ContainerC7managerAA0B7ManagerCvp","title":"manager","roleHeading":"Instance Property"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container"]]},"references":{"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"ContainerManager","kind":"identifier"}],"role":"symbol","url":"\/documentation\/factory\/containermanager","title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","abstract":[{"text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container.","type":"text"}]},"doc://Factory/documentation/Factory/Container":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Container"}],"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Container/manager":{"fragments":[{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory16ContainerManagerC","text":"ContainerManager","kind":"typeIdentifier"}],"abstract":[{"text":"Define the container’s manager.","type":"text"}],"url":"\/documentation\/factory\/container\/manager","type":"topic","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/manager","kind":"symbol","title":"manager"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"role":"symbol","externalID":"s:7Factory9ContainerC7managerAA0B7ManagerCvp","modules":[{"name":"Factory"}],"symbolKind":"property","title":"manager","fragments":[{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"kind":"text","text":": "},{"text":"ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC","kind":"typeIdentifier"}],"roleHeading":"Instance Property"},"variants":[{"paths":["\/documentation\/factory\/container\/manager"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","sections":[],"abstract":[{"text":"Define the container’s manager.","type":"text"}],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/manager","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/Container/manager":{"abstract":[{"type":"text","text":"Define the container’s manager."}],"type":"topic","url":"\/documentation\/factory\/container\/manager","role":"symbol","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"manager"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ContainerManagerC","text":"ContainerManager"}],"title":"manager","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/manager","kind":"symbol"},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","url":"\/documentation\/factory\/containermanager","type":"topic","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}]},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Container","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","navigatorTitle":[{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/container/promised(key:)-6682d.json b/docs/data/documentation/factory/container/promised(key:)-6682d.json index 0cb46bd2..a1b53169 100644 --- a/docs/data/documentation/factory/container/promised(key:)-6682d.json +++ b/docs/data/documentation/factory/container/promised(key:)-6682d.json @@ -1 +1 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-6682d","interfaceLanguage":"swift"},"kind":"symbol","abstract":[{"text":"Syntactic sugar allows container to create a factory where registration is promised before resolution.","type":"text"}],"metadata":{"symbolKind":"method","role":"symbol","roleHeading":"Instance Method","extendedModule":"Factory","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s12StaticStringV","text":"StaticString","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":"?>","kind":"text"}],"externalID":"s:7Factory16ManagedContainerPAAE8promised3keyA2AVyqd__SgGs12StaticStringV_tlF::SYNTHESIZED::s:7Factory9ContainerC","title":"promised(key:)","modules":[{"name":"Factory"}]},"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":" = "},{"kind":"keyword","text":"#function"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":"?>","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/container\/promised(key:)-6682d"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Container/promised(key:)-6682d":{"role":"symbol","abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory where registration is promised before resolution."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"promised","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?>"}],"url":"\/documentation\/factory\/container\/promised(key:)-6682d","type":"topic","title":"promised(key:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-6682d"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"role":"collectionGroup","abstract":[],"kind":"article","type":"topic","url":"\/documentation\/factory\/container\/managedcontainer-implementations","title":"ManagedContainer Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"},"doc://Factory/documentation/Factory/Container":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Container"}],"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container"},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"promised","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":" = "},{"kind":"keyword","text":"#function"},{"kind":"text","text":") -> "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?>"}]}]}],"variants":[{"paths":["\/documentation\/factory\/container\/promised(key:)-6682d"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-6682d"},"metadata":{"title":"promised(key:)","extendedModule":"Factory","roleHeading":"Instance Method","modules":[{"name":"Factory"}],"externalID":"s:7Factory16ManagedContainerPAAE8promised3keyA2AVyqd__SgGs12StaticStringV_tlF::SYNTHESIZED::s:7Factory9ContainerC","symbolKind":"method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"StaticString","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?>"}],"role":"symbol"},"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory where registration is promised before resolution."}],"sections":[],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","role":"collectionGroup","abstract":[],"kind":"article","type":"topic","title":"ManagedContainer Implementations","url":"\/documentation\/factory\/container\/managedcontainer-implementations"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Container","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","navigatorTitle":[{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Container/promised(key:)-6682d":{"url":"\/documentation\/factory\/container\/promised(key:)-6682d","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"promised","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier","text":"StaticString"},{"kind":"text","text":") -> "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":"?>","kind":"text"}],"abstract":[{"text":"Syntactic sugar allows container to create a factory where registration is promised before resolution.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-6682d","type":"topic","title":"promised(key:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/container/promised(key:)-7g95.json b/docs/data/documentation/factory/container/promised(key:)-7g95.json index acd3f8c8..a8a405a9 100644 --- a/docs/data/documentation/factory/container/promised(key:)-7g95.json +++ b/docs/data/documentation/factory/container/promised(key:)-7g95.json @@ -1 +1 @@ -{"abstract":[{"text":"Syntactic sugar allows container to create a factory where registration is promised before resolution.","type":"text"}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"promised","kind":"identifier"},{"kind":"text","text":"<"},{"text":"P","kind":"genericParameter"},{"kind":"text","text":", "},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"kind":"text","text":" = "},{"text":"#function","kind":"keyword"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"},{"text":"<","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}]}],"kind":"declarations"}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"sections":[],"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"paths":["\/documentation\/factory\/container\/promised(key:)-7g95"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-7g95"},"metadata":{"modules":[{"name":"Factory"}],"externalID":"s:7Factory16ManagedContainerPAAE8promised3keyAA09ParameterA0Vyqd__qd_0_SgGs12StaticStringV_tr0_lF::SYNTHESIZED::s:7Factory9ContainerC","title":"promised(key:)","role":"symbol","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"promised","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":"?>","kind":"text"}],"extendedModule":"Factory","symbolKind":"method"},"references":{"doc://Factory/documentation/Factory/Container/promised(key:)-7g95":{"url":"\/documentation\/factory\/container\/promised(key:)-7g95","abstract":[{"text":"Syntactic sugar allows container to create a factory where registration is promised before resolution.","type":"text"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"text":") -> ","kind":"text"},{"text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?>"}],"kind":"symbol","type":"topic","title":"promised(key:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-7g95","role":"symbol"},"doc://Factory/documentation/Factory/Container":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Container"}],"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"role":"collectionGroup","abstract":[],"kind":"article","type":"topic","url":"\/documentation\/factory\/container\/managedcontainer-implementations","title":"ManagedContainer Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"}}} \ No newline at end of file +{"schemaVersion":{"minor":3,"patch":0,"major":0},"sections":[],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"text":"StaticString","preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier"},{"kind":"text","text":" = "},{"text":"#function","kind":"keyword"},{"kind":"text","text":") -> "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"text":"?>","kind":"text"}],"platforms":["macOS"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container\/promised(key:)-7g95"]}],"metadata":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"promised","kind":"identifier"},{"text":"<","kind":"text"},{"text":"P","kind":"genericParameter"},{"kind":"text","text":", "},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"text":"StaticString","preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"ParameterFactory","kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?>","kind":"text"}],"externalID":"s:7Factory16ManagedContainerPAAE8promised3keyAA09ParameterA0Vyqd__qd_0_SgGs12StaticStringV_tr0_lF::SYNTHESIZED::s:7Factory9ContainerC","title":"promised(key:)","symbolKind":"method","roleHeading":"Instance Method","extendedModule":"Factory","role":"symbol","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"abstract":[{"text":"Syntactic sugar allows container to create a factory where registration is promised before resolution.","type":"text"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-7g95"},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Container","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","navigatorTitle":[{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Container/promised(key:)-7g95":{"kind":"symbol","title":"promised(key:)","url":"\/documentation\/factory\/container\/promised(key:)-7g95","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"promised","kind":"identifier"},{"kind":"text","text":"<"},{"text":"P","kind":"genericParameter"},{"kind":"text","text":", "},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s12StaticStringV","text":"StaticString","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?>","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-7g95","abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory where registration is promised before resolution."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","role":"collectionGroup","abstract":[],"kind":"article","type":"topic","title":"ManagedContainer Implementations","url":"\/documentation\/factory\/container\/managedcontainer-implementations"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/container/reset(options:).json b/docs/data/documentation/factory/container/reset(options:).json index 69715288..b52e4b4e 100644 --- a/docs/data/documentation/factory/container/reset(options:).json +++ b/docs/data/documentation/factory/container/reset(options:).json @@ -1 +1 @@ -{"metadata":{"role":"symbol","modules":[{"name":"Factory"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"text":"options","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier","text":"FactoryResetOptions"},{"kind":"text","text":")"}],"roleHeading":"Instance Method","title":"reset(options:)","externalID":"s:7Factory16ManagedContainerPAAE5reset7optionsyAA0A12ResetOptionsO_tF::SYNTHESIZED::s:7Factory9ContainerC","extendedModule":"Factory","symbolKind":"method"},"abstract":[{"type":"text","text":"Defines a thread safe access mechanism to reset the container."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"options"},{"kind":"text","text":": "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"text":" = .all)","kind":"text"}],"languages":["swift"]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/container\/reset(options:)"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","schemaVersion":{"major":0,"patch":0,"minor":3},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/reset(options:)","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryResetOptions":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"title":"FactoryResetOptions"},"doc://Factory/documentation/Factory/Container":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Container"}],"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container"},"doc://Factory/documentation/Factory/Container/reset(options:)":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"text":"options","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"title":"reset(options:)","role":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/reset(options:)","url":"\/documentation\/factory\/container\/reset(options:)","abstract":[{"type":"text","text":"Defines a thread safe access mechanism to reset the container."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"role":"collectionGroup","abstract":[],"kind":"article","type":"topic","url":"\/documentation\/factory\/container\/managedcontainer-implementations","title":"ManagedContainer Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"}}} \ No newline at end of file +{"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"type":"text","text":"Defines a thread safe access mechanism to reset the container."}],"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container\/reset(options:)"]}],"metadata":{"role":"symbol","extendedModule":"Factory","roleHeading":"Instance Method","title":"reset(options:)","externalID":"s:7Factory16ManagedContainerPAAE5reset7optionsyAA0A12ResetOptionsO_tF::SYNTHESIZED::s:7Factory9ContainerC","symbolKind":"method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"text":"options","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier"},{"text":")","kind":"text"}],"modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/reset(options:)","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"reset","kind":"identifier"},{"text":"(","kind":"text"},{"text":"options","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"},{"text":" = .all)","kind":"text"}],"languages":["swift"]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","title":"FactoryResetOptions","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryResetOptions","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","role":"collectionGroup","abstract":[],"kind":"article","type":"topic","title":"ManagedContainer Implementations","url":"\/documentation\/factory\/container\/managedcontainer-implementations"},"doc://Factory/documentation/Factory/Container/reset(options:)":{"url":"\/documentation\/factory\/container\/reset(options:)","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"options"},{"text":": ","kind":"text"},{"text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier"},{"text":")","kind":"text"}],"abstract":[{"text":"Defines a thread safe access mechanism to reset the container.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/reset(options:)","type":"topic","title":"reset(options:)"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Container","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","navigatorTitle":[{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"type":"topic","role":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/container/shared.json b/docs/data/documentation/factory/container/shared.json index 2f06317f..3d36707d 100644 --- a/docs/data/documentation/factory/container/shared.json +++ b/docs/data/documentation/factory/container/shared.json @@ -1 +1 @@ -{"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"title":"shared","symbolKind":"property","modules":[{"name":"Factory"}],"externalID":"s:7Factory9ContainerC6sharedACvpZ","role":"symbol","roleHeading":"Type Property","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"text":"Container","preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container"]]},"abstract":[{"type":"text","text":"Define the default shared container."}],"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/container\/shared"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Container\/shared"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container"}],"languages":["swift"],"platforms":["macOS"]}]}],"sections":[],"references":{"doc://Factory/documentation/Factory/Container/shared":{"type":"topic","title":"shared","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/shared","url":"\/documentation\/factory\/container\/shared","kind":"symbol","abstract":[{"text":"Define the default shared container.","type":"text"}],"fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier","text":"Container"}]},"doc://Factory/documentation/Factory/Container":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Container"}],"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/shared","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container"]]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier","text":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container"}]}],"kind":"declarations"}],"schemaVersion":{"major":0,"patch":0,"minor":3},"sections":[],"abstract":[{"type":"text","text":"Define the default shared container."}],"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/container\/shared"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"role":"symbol","externalID":"s:7Factory9ContainerC6sharedACvpZ","title":"shared","roleHeading":"Type Property","modules":[{"name":"Factory"}],"fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory9ContainerC","text":"Container","kind":"typeIdentifier"}],"symbolKind":"property"},"references":{"doc://Factory/documentation/Factory/Container/shared":{"kind":"symbol","url":"\/documentation\/factory\/container\/shared","role":"symbol","title":"shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/shared","abstract":[{"text":"Define the default shared container.","type":"text"}],"type":"topic","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier","text":"Container"}]},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Container","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","navigatorTitle":[{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"type":"topic","role":"symbol"}}} \ 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 71984f39..35f4194d 100644 --- a/docs/data/documentation/factory/container/with(_:).json +++ b/docs/data/documentation/factory/container/with(_:).json @@ -1 +1 @@ -{"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"sections":[],"schemaVersion":{"minor":3,"major":0,"patch":0},"metadata":{"externalID":"s:7Factory16ManagedContainerPAAE4withyxyxXEF::SYNTHESIZED::s:7Factory9ContainerC","extendedModule":"Factory","roleHeading":"Instance Method","title":"with(_:)","modules":[{"name":"Factory"}],"role":"symbol","symbolKind":"method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"with","kind":"identifier"},{"text":"((","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:s4Voida","kind":"typeIdentifier","text":"Void"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container\/with(_:)"]}],"abstract":[{"text":"Defines a with function to allow container transformation on assignment.","type":"text"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/with(_:)","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"with"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"transform"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":") -> ","kind":"text"},{"text":"Void","preciseIdentifier":"s:s4Voida","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"]}]}],"references":{"doc://Factory/documentation/Factory/Container":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Container"}],"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"role":"collectionGroup","abstract":[],"kind":"article","type":"topic","url":"\/documentation\/factory\/container\/managedcontainer-implementations","title":"ManagedContainer Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"},"doc://Factory/documentation/Factory/Container/with(_:)":{"type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"with","kind":"identifier"},{"kind":"text","text":"(("},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/with(_:)","title":"with(_:)","abstract":[{"text":"Defines a with function to allow container transformation on assignment.","type":"text"}],"url":"\/documentation\/factory\/container\/with(_:)","kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"schemaVersion":{"minor":3,"patch":0,"major":0},"kind":"symbol","sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"with"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"transform"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"abstract":[{"type":"text","text":"Defines a with function to allow container transformation on assignment."}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container\/with(_:)"]}],"metadata":{"role":"symbol","roleHeading":"Instance Method","title":"with(_:)","modules":[{"name":"Factory"}],"extendedModule":"Factory","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"with","kind":"identifier"},{"kind":"text","text":"(("},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Void","preciseIdentifier":"s:s4Voida","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"externalID":"s:7Factory16ManagedContainerPAAE4withyxyxXEF::SYNTHESIZED::s:7Factory9ContainerC","symbolKind":"method"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/with(_:)","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/Container":{"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Container","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","navigatorTitle":[{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","role":"collectionGroup","abstract":[],"kind":"article","type":"topic","title":"ManagedContainer Implementations","url":"\/documentation\/factory\/container\/managedcontainer-implementations"},"doc://Factory/documentation/Factory/Container/with(_:)":{"url":"\/documentation\/factory\/container\/with(_:)","role":"symbol","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"with","kind":"identifier"},{"text":"((","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"text":"Void","preciseIdentifier":"s:s4Voida","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"text":"Defines a with function to allow container transformation on assignment.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/with(_:)","type":"topic","title":"with(_:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/containermanager.json b/docs/data/documentation/factory/containermanager.json index 04d7f29c..899e7977 100644 --- a/docs/data/documentation/factory/containermanager.json +++ b/docs/data/documentation/factory/containermanager.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager"},"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:)"]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"final"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ContainerManager"}],"languages":["swift"]}]},{"kind":"content","content":[{"text":"Overview","level":2,"anchor":"overview","type":"heading"},{"inlineContent":[{"type":"text","text":"Every container requires a ContainerManager."}],"type":"paragraph"},{"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."}]},{"inlineContent":[{"text":"Those functions are designed primarily for testing.","type":"text"}],"type":"paragraph"}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/containermanager"]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"sections":[],"metadata":{"navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"modules":[{"name":"Factory"}],"roleHeading":"Class","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ContainerManager"}],"title":"ContainerManager","symbolKind":"class","externalID":"s:7Factory16ContainerManagerC"},"kind":"symbol","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"references":{"doc://Factory/documentation/Factory/ContainerManager/defaultScope":{"role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"defaultScope","kind":"identifier"},{"kind":"text","text":": "},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"text":"?","kind":"text"}],"title":"defaultScope","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/defaultScope","url":"\/documentation\/factory\/containermanager\/defaultscope","type":"topic","kind":"symbol","abstract":[{"type":"text","text":"Default scope"}]},"doc://Factory/documentation/Factory/ContainerManager/reset(options:)":{"kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/reset(options:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(options:)","title":"reset(options:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"options"},{"kind":"text","text":": "},{"text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Resets the Container to its original state, removing all registrations and clearing all scope caches."}],"role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ContainerManager/promiseTriggersError":{"role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"promiseTriggersError"},{"text":": ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/promiseTriggersError","title":"promiseTriggersError","url":"\/documentation\/factory\/containermanager\/promisetriggerserror","type":"topic","kind":"symbol","abstract":[{"type":"text","text":"Public variable promise behavior"}]},"doc://Factory/documentation/Factory/ContainerManager/logger":{"abstract":[{"type":"text","text":"Public access to logging facility in debug mode for ALL containers."}],"kind":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"logger"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":") -> "},{"text":"Void","preciseIdentifier":"s:s4Voida","kind":"typeIdentifier"}],"role":"symbol","url":"\/documentation\/factory\/containermanager\/logger","title":"logger","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/logger"},"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"ContainerManager","kind":"identifier"}],"role":"symbol","url":"\/documentation\/factory\/containermanager","title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","abstract":[{"text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container.","type":"text"}]},"doc://Factory/documentation/Factory/ContainerManager/trace":{"role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"trace","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/trace","title":"trace","url":"\/documentation\/factory\/containermanager\/trace","type":"topic","kind":"symbol","abstract":[{"text":"Public var enabling factory resolution trace statements in debug mode for ALL containers.","type":"text"}]},"doc://Factory/documentation/Factory/ContainerManager/init()":{"url":"\/documentation\/factory\/containermanager\/init()","kind":"symbol","abstract":[{"type":"text","text":"Public initializer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/init()","fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"type":"topic","title":"init()","role":"symbol"},"doc://Factory/documentation/Factory/ContainerManager/dependencyChainTestMax":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/dependencyChainTestMax","type":"topic","abstract":[{"text":"Public variable exposing dependency chain test maximum","type":"text"}],"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"dependencyChainTestMax"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"}],"kind":"symbol","url":"\/documentation\/factory\/containermanager\/dependencychaintestmax","title":"dependencyChainTestMax"},"doc://Factory/documentation/Factory/ContainerManager/reset(scope:)":{"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"text":"scope","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"text":")","kind":"text"}],"title":"reset(scope:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(scope:)","url":"\/documentation\/factory\/containermanager\/reset(scope:)","type":"topic","kind":"symbol","abstract":[{"type":"text","text":"Clears any cached values associated with a specific scope, leaving the other scope caches intact."}]},"doc://Factory/documentation/Factory/ContainerManager/push()":{"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"push"},{"text":"()","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/push()","title":"push()","url":"\/documentation\/factory\/containermanager\/push()","type":"topic","kind":"symbol","abstract":[{"type":"text","text":"Test function pushes the current registration and cache states"}]},"doc://Factory/documentation/Factory/ContainerManager/pop()":{"kind":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"pop"},{"text":"()","kind":"text"}],"role":"symbol","url":"\/documentation\/factory\/containermanager\/pop()","title":"pop()","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/pop()","abstract":[{"text":"Test function pops and restores a previously pushed registration and cache state","type":"text"}]}}} \ No newline at end of file +{"metadata":{"role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"ContainerManager","kind":"identifier"}],"roleHeading":"Class","modules":[{"name":"Factory"}],"title":"ContainerManager","externalID":"s:7Factory16ContainerManagerC","symbolKind":"class","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}]},"schemaVersion":{"patch":0,"major":0,"minor":3},"sections":[],"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager"},"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/init()"],"title":"Initializers"},{"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 Properties"},{"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:)"],"title":"Instance Methods"}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"final","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ContainerManager"}],"languages":["swift"]}],"kind":"declarations"},{"content":[{"anchor":"overview","level":2,"text":"Overview","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Every container requires a ContainerManager."}]},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Those functions are designed primarily for testing."}]}],"kind":"content"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/containermanager"]}],"references":{"doc://Factory/documentation/Factory/ContainerManager/dependencyChainTestMax":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/dependencyChainTestMax","title":"dependencyChainTestMax","role":"symbol","url":"\/documentation\/factory\/containermanager\/dependencychaintestmax","abstract":[{"text":"Public variable exposing dependency chain test maximum","type":"text"}],"kind":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"dependencyChainTestMax","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Si","kind":"typeIdentifier","text":"Int"}]},"doc://Factory/documentation/Factory/ContainerManager/push()":{"role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"push","kind":"identifier"},{"text":"()","kind":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/push()","title":"push()","abstract":[{"type":"text","text":"Test function pushes the current registration and cache states"}],"url":"\/documentation\/factory\/containermanager\/push()"},"doc://Factory/documentation/Factory/ContainerManager/reset(scope:)":{"kind":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(scope:)","title":"reset(scope:)","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"text":"scope","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":")"}],"url":"\/documentation\/factory\/containermanager\/reset(scope:)","abstract":[{"type":"text","text":"Clears any cached values associated with a specific scope, leaving the other scope caches intact."}]},"doc://Factory/documentation/Factory/ContainerManager/logger":{"role":"symbol","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"logger","kind":"identifier"},{"kind":"text","text":": ("},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"}],"kind":"symbol","title":"logger","abstract":[{"type":"text","text":"Public access to logging facility in debug mode for ALL containers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/logger","url":"\/documentation\/factory\/containermanager\/logger"},"doc://Factory/documentation/Factory/ContainerManager/pop()":{"role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"pop","kind":"identifier"},{"kind":"text","text":"()"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/pop()","title":"pop()","abstract":[{"type":"text","text":"Test function pops and restores a previously pushed registration and cache state"}],"url":"\/documentation\/factory\/containermanager\/pop()"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ContainerManager/trace":{"role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"trace","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"kind":"symbol","title":"trace","abstract":[{"type":"text","text":"Public var enabling factory resolution trace statements in debug mode for ALL containers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/trace","url":"\/documentation\/factory\/containermanager\/trace"},"doc://Factory/documentation/Factory/ContainerManager/defaultScope":{"role":"symbol","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"defaultScope","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"text":"?","kind":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/defaultScope","title":"defaultScope","abstract":[{"type":"text","text":"Default scope"}],"url":"\/documentation\/factory\/containermanager\/defaultscope"},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","url":"\/documentation\/factory\/containermanager","type":"topic","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}]},"doc://Factory/documentation/Factory/ContainerManager/reset(options:)":{"role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"reset","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"options"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","kind":"typeIdentifier"},{"text":")","kind":"text"}],"kind":"symbol","title":"reset(options:)","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:)","url":"\/documentation\/factory\/containermanager\/reset(options:)"},"doc://Factory/documentation/Factory/ContainerManager/init()":{"kind":"symbol","title":"init()","url":"\/documentation\/factory\/containermanager\/init()","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/init()","abstract":[{"type":"text","text":"Public initializer"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ContainerManager/promiseTriggersError":{"role":"symbol","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"promiseTriggersError","kind":"identifier"},{"kind":"text","text":": "},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/promiseTriggersError","title":"promiseTriggersError","abstract":[{"type":"text","text":"Public variable promise behavior"}],"url":"\/documentation\/factory\/containermanager\/promisetriggerserror"}}} \ 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 360ec0fa..2c0413e4 100644 --- a/docs/data/documentation/factory/containermanager/defaultscope.json +++ b/docs/data/documentation/factory/containermanager/defaultscope.json @@ -1 +1 @@ -{"schemaVersion":{"major":0,"patch":0,"minor":3},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/containermanager\/defaultscope"]}],"metadata":{"externalID":"s:7Factory16ContainerManagerC12defaultScopeAA0E0CSgvp","modules":[{"name":"Factory"}],"title":"defaultScope","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"defaultScope","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory5ScopeC","text":"Scope","kind":"typeIdentifier"},{"kind":"text","text":"?"}]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/defaultScope"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"defaultScope"},{"kind":"text","text":": "},{"text":"Scope","preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"text":"?","kind":"text"}]}],"kind":"declarations"}],"sections":[],"abstract":[{"text":"Default scope","type":"text"}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/ContainerManager/defaultScope":{"role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"defaultScope","kind":"identifier"},{"kind":"text","text":": "},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"text":"?","kind":"text"}],"title":"defaultScope","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/defaultScope","url":"\/documentation\/factory\/containermanager\/defaultscope","type":"topic","kind":"symbol","abstract":[{"type":"text","text":"Default scope"}]},"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"ContainerManager","kind":"identifier"}],"role":"symbol","url":"\/documentation\/factory\/containermanager","title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","abstract":[{"text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container.","type":"text"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"abstract":[{"type":"text","text":"Default scope"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/defaultScope"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/containermanager\/defaultscope"]}],"metadata":{"externalID":"s:7Factory16ContainerManagerC12defaultScopeAA0E0CSgvp","modules":[{"name":"Factory"}],"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"defaultScope"},{"kind":"text","text":": "},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?"}],"title":"defaultScope","role":"symbol","symbolKind":"property","roleHeading":"Instance Property"},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"sections":[],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"defaultScope"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC","text":"Scope","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"text":"?","kind":"text"}],"languages":["swift"]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","url":"\/documentation\/factory\/containermanager","type":"topic","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}]},"doc://Factory/documentation/Factory/ContainerManager/defaultScope":{"role":"symbol","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"defaultScope","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"text":"?","kind":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/defaultScope","title":"defaultScope","abstract":[{"type":"text","text":"Default scope"}],"url":"\/documentation\/factory\/containermanager\/defaultscope"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"}}} \ 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 50300220..3d70a774 100644 --- a/docs/data/documentation/factory/containermanager/dependencychaintestmax.json +++ b/docs/data/documentation/factory/containermanager/dependencychaintestmax.json @@ -1 +1 @@ -{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/dependencyChainTestMax"},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager\/dependencychaintestmax"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"dependencyChainTestMax","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:Si","text":"Int"}],"platforms":["macOS"]}]}],"metadata":{"externalID":"s:7Factory16ContainerManagerC22dependencyChainTestMaxSivp","role":"symbol","symbolKind":"property","roleHeading":"Instance Property","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"dependencyChainTestMax"},{"kind":"text","text":": "},{"text":"Int","kind":"typeIdentifier","preciseIdentifier":"s:Si"}],"modules":[{"name":"Factory"}],"title":"dependencyChainTestMax"},"kind":"symbol","schemaVersion":{"patch":0,"minor":3,"major":0},"abstract":[{"text":"Public variable exposing dependency chain test maximum","type":"text"}],"references":{"doc://Factory/documentation/Factory/ContainerManager/dependencyChainTestMax":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/dependencyChainTestMax","type":"topic","abstract":[{"text":"Public variable exposing dependency chain test maximum","type":"text"}],"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"dependencyChainTestMax"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"}],"kind":"symbol","url":"\/documentation\/factory\/containermanager\/dependencychaintestmax","title":"dependencyChainTestMax"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"ContainerManager","kind":"identifier"}],"role":"symbol","url":"\/documentation\/factory\/containermanager","title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","abstract":[{"text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container.","type":"text"}]}}} \ No newline at end of file +{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/dependencyChainTestMax","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"abstract":[{"text":"Public variable exposing dependency chain test maximum","type":"text"}],"kind":"symbol","sections":[],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"dependencyChainTestMax"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Si","kind":"typeIdentifier","text":"Int"}],"languages":["swift"]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/containermanager\/dependencychaintestmax"]}],"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Instance Property","symbolKind":"property","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"dependencyChainTestMax"},{"text":": ","kind":"text"},{"text":"Int","kind":"typeIdentifier","preciseIdentifier":"s:Si"}],"externalID":"s:7Factory16ContainerManagerC22dependencyChainTestMaxSivp","role":"symbol","title":"dependencyChainTestMax"},"references":{"doc://Factory/documentation/Factory/ContainerManager/dependencyChainTestMax":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/dependencyChainTestMax","title":"dependencyChainTestMax","role":"symbol","url":"\/documentation\/factory\/containermanager\/dependencychaintestmax","abstract":[{"text":"Public variable exposing dependency chain test maximum","type":"text"}],"kind":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"dependencyChainTestMax","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Si","kind":"typeIdentifier","text":"Int"}]},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","url":"\/documentation\/factory\/containermanager","type":"topic","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}]},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/containermanager/init().json b/docs/data/documentation/factory/containermanager/init().json index 7e26af90..75d14251 100644 --- a/docs/data/documentation/factory/containermanager/init().json +++ b/docs/data/documentation/factory/containermanager/init().json @@ -1 +1 @@ -{"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"init","kind":"keyword"},{"kind":"text","text":"()"}],"languages":["swift"]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/init()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Public initializer"}],"variants":[{"paths":["\/documentation\/factory\/containermanager\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"externalID":"s:7Factory16ContainerManagerCACycfc","symbolKind":"init","roleHeading":"Initializer","title":"init()","fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"role":"symbol","modules":[{"name":"Factory"}]},"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"references":{"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"ContainerManager","kind":"identifier"}],"role":"symbol","url":"\/documentation\/factory\/containermanager","title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","abstract":[{"text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container.","type":"text"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ContainerManager/init()":{"url":"\/documentation\/factory\/containermanager\/init()","kind":"symbol","abstract":[{"type":"text","text":"Public initializer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/init()","fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"type":"topic","title":"init()","role":"symbol"}}} \ No newline at end of file +{"abstract":[{"text":"Public initializer","type":"text"}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/init()","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"text":"()","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"kind":"symbol","metadata":{"externalID":"s:7Factory16ContainerManagerCACycfc","modules":[{"name":"Factory"}],"fragments":[{"kind":"identifier","text":"init"},{"text":"()","kind":"text"}],"roleHeading":"Initializer","role":"symbol","symbolKind":"init","title":"init()"},"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"paths":["\/documentation\/factory\/containermanager\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","url":"\/documentation\/factory\/containermanager","type":"topic","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}]},"doc://Factory/documentation/Factory/ContainerManager/init()":{"kind":"symbol","title":"init()","url":"\/documentation\/factory\/containermanager\/init()","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/init()","abstract":[{"type":"text","text":"Public initializer"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ 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 af8c1080..ac247c79 100644 --- a/docs/data/documentation/factory/containermanager/logger.json +++ b/docs/data/documentation/factory/containermanager/logger.json @@ -1 +1 @@ -{"sections":[],"kind":"symbol","metadata":{"symbolKind":"property","externalID":"s:7Factory16ContainerManagerC6loggeryySScvp","title":"logger","modules":[{"name":"Factory"}],"roleHeading":"Instance Property","role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"logger"},{"text":": (","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Void","preciseIdentifier":"s:s4Voida","kind":"typeIdentifier"}]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/logger","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"logger"},{"text":": (","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/containermanager\/logger"]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"abstract":[{"type":"text","text":"Public access to logging facility in debug mode for ALL containers."}],"references":{"doc://Factory/documentation/Factory/ContainerManager/logger":{"abstract":[{"type":"text","text":"Public access to logging facility in debug mode for ALL containers."}],"kind":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"logger"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":") -> "},{"text":"Void","preciseIdentifier":"s:s4Voida","kind":"typeIdentifier"}],"role":"symbol","url":"\/documentation\/factory\/containermanager\/logger","title":"logger","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/logger"},"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"ContainerManager","kind":"identifier"}],"role":"symbol","url":"\/documentation\/factory\/containermanager","title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","abstract":[{"text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container.","type":"text"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/logger","interfaceLanguage":"swift"},"sections":[],"abstract":[{"text":"Public access to logging facility in debug mode for ALL containers.","type":"text"}],"variants":[{"paths":["\/documentation\/factory\/containermanager\/logger"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"logger"},{"text":": (","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:s4Voida","text":"Void","kind":"typeIdentifier"},{"kind":"text","text":" { "},{"text":"get","kind":"keyword"},{"text":" ","kind":"text"},{"text":"set","kind":"keyword"},{"text":" }","kind":"text"}]}]}],"kind":"symbol","metadata":{"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"logger"},{"text":": (","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"}],"symbolKind":"property","title":"logger","modules":[{"name":"Factory"}],"role":"symbol","externalID":"s:7Factory16ContainerManagerC6loggeryySScvp","roleHeading":"Instance Property"},"schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"references":{"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","url":"\/documentation\/factory\/containermanager","type":"topic","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}]},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ContainerManager/logger":{"role":"symbol","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"logger","kind":"identifier"},{"kind":"text","text":": ("},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"}],"kind":"symbol","title":"logger","abstract":[{"type":"text","text":"Public access to logging facility in debug mode for ALL containers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/logger","url":"\/documentation\/factory\/containermanager\/logger"}}} \ 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 7867ca73..5dbc550e 100644 --- a/docs/data/documentation/factory/containermanager/pop().json +++ b/docs/data/documentation/factory/containermanager/pop().json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"schemaVersion":{"patch":0,"minor":3,"major":0},"abstract":[{"type":"text","text":"Test function pops and restores a previously pushed registration and cache state"}],"variants":[{"paths":["\/documentation\/factory\/containermanager\/pop()"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"title":"pop()","modules":[{"name":"Factory"}],"extendedModule":"Factory","symbolKind":"method","externalID":"s:7Factory16ContainerManagerC3popyyF","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"pop"},{"kind":"text","text":"()"}],"roleHeading":"Instance Method","role":"symbol"},"kind":"symbol","primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"pop","kind":"identifier"},{"text":"()","kind":"text"}],"languages":["swift"]}],"kind":"declarations"}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/pop()","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"ContainerManager","kind":"identifier"}],"role":"symbol","url":"\/documentation\/factory\/containermanager","title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","abstract":[{"text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container.","type":"text"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ContainerManager/pop()":{"kind":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"pop"},{"text":"()","kind":"text"}],"role":"symbol","url":"\/documentation\/factory\/containermanager\/pop()","title":"pop()","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/pop()","abstract":[{"text":"Test function pops and restores a previously pushed registration and cache state","type":"text"}]}}} \ No newline at end of file +{"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"pop"},{"kind":"text","text":"()"}],"platforms":["macOS"]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/containermanager\/pop()"]}],"metadata":{"title":"pop()","modules":[{"name":"Factory"}],"extendedModule":"Factory","roleHeading":"Instance Method","externalID":"s:7Factory16ContainerManagerC3popyyF","symbolKind":"method","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"pop","kind":"identifier"},{"kind":"text","text":"()"}],"role":"symbol"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/pop()"},"abstract":[{"text":"Test function pops and restores a previously pushed registration and cache state","type":"text"}],"kind":"symbol","sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"schemaVersion":{"minor":3,"major":0,"patch":0},"references":{"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","url":"\/documentation\/factory\/containermanager","type":"topic","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}]},"doc://Factory/documentation/Factory/ContainerManager/pop()":{"role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"pop","kind":"identifier"},{"kind":"text","text":"()"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/pop()","title":"pop()","abstract":[{"type":"text","text":"Test function pops and restores a previously pushed registration and cache state"}],"url":"\/documentation\/factory\/containermanager\/pop()"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ 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 9ec94631..e8bc4d8d 100644 --- a/docs/data/documentation/factory/containermanager/promisetriggerserror.json +++ b/docs/data/documentation/factory/containermanager/promisetriggerserror.json @@ -1 +1 @@ -{"schemaVersion":{"major":0,"patch":0,"minor":3},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/promiseTriggersError","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"abstract":[{"type":"text","text":"Public variable promise behavior"}],"sections":[],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"promiseTriggersError"},{"text":": ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"languages":["swift"],"platforms":["macOS"]}]}],"metadata":{"modules":[{"name":"Factory"}],"externalID":"s:7Factory16ContainerManagerC20promiseTriggersErrorSbvp","title":"promiseTriggersError","symbolKind":"property","roleHeading":"Instance Property","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"promiseTriggersError","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}],"role":"symbol"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/containermanager\/promisetriggerserror"]}],"references":{"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"ContainerManager","kind":"identifier"}],"role":"symbol","url":"\/documentation\/factory\/containermanager","title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","abstract":[{"text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container.","type":"text"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ContainerManager/promiseTriggersError":{"role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"promiseTriggersError"},{"text":": ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/promiseTriggersError","title":"promiseTriggersError","url":"\/documentation\/factory\/containermanager\/promisetriggerserror","type":"topic","kind":"symbol","abstract":[{"type":"text","text":"Public variable promise behavior"}]}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/containermanager\/promisetriggerserror"]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"metadata":{"modules":[{"name":"Factory"}],"role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"promiseTriggersError"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}],"roleHeading":"Instance Property","externalID":"s:7Factory16ContainerManagerC20promiseTriggersErrorSbvp","symbolKind":"property","title":"promiseTriggersError"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"promiseTriggersError"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"languages":["swift"]}],"kind":"declarations"}],"abstract":[{"type":"text","text":"Public variable promise behavior"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/promiseTriggersError"},"references":{"doc://Factory/documentation/Factory/ContainerManager/promiseTriggersError":{"role":"symbol","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"promiseTriggersError","kind":"identifier"},{"kind":"text","text":": "},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/promiseTriggersError","title":"promiseTriggersError","abstract":[{"type":"text","text":"Public variable promise behavior"}],"url":"\/documentation\/factory\/containermanager\/promisetriggerserror"},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","url":"\/documentation\/factory\/containermanager","type":"topic","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}]},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"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 24bf2d07..a667edff 100644 --- a/docs/data/documentation/factory/containermanager/push().json +++ b/docs/data/documentation/factory/containermanager/push().json @@ -1 +1 @@ -{"kind":"symbol","sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/push()"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/containermanager\/push()"]}],"metadata":{"externalID":"s:7Factory16ContainerManagerC4pushyyF","extendedModule":"Factory","modules":[{"name":"Factory"}],"title":"push()","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","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"}],"schemaVersion":{"minor":3,"patch":0,"major":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"push","kind":"identifier"},{"text":"()","kind":"text"}]}]}],"references":{"doc://Factory/documentation/Factory/ContainerManager/push()":{"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"push"},{"text":"()","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/push()","title":"push()","url":"\/documentation\/factory\/containermanager\/push()","type":"topic","kind":"symbol","abstract":[{"type":"text","text":"Test function pushes the current registration and cache states"}]},"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"ContainerManager","kind":"identifier"}],"role":"symbol","url":"\/documentation\/factory\/containermanager","title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","abstract":[{"text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container.","type":"text"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"sections":[],"schemaVersion":{"minor":3,"major":0,"patch":0},"abstract":[{"text":"Test function pushes the current registration and cache states","type":"text"}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"push"},{"kind":"text","text":"()"}],"languages":["swift"]}],"kind":"declarations"}],"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/push()","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/containermanager\/push()"]}],"metadata":{"extendedModule":"Factory","externalID":"s:7Factory16ContainerManagerC4pushyyF","modules":[{"name":"Factory"}],"title":"push()","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"push","kind":"identifier"},{"text":"()","kind":"text"}],"roleHeading":"Instance Method","role":"symbol","symbolKind":"method"},"references":{"doc://Factory/documentation/Factory/ContainerManager/push()":{"role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"push","kind":"identifier"},{"text":"()","kind":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/push()","title":"push()","abstract":[{"type":"text","text":"Test function pushes the current registration and cache states"}],"url":"\/documentation\/factory\/containermanager\/push()"},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","url":"\/documentation\/factory\/containermanager","type":"topic","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}]},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ 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 39b96643..4d5ec677 100644 --- a/docs/data/documentation/factory/containermanager/reset(options:).json +++ b/docs/data/documentation/factory/containermanager/reset(options:).json @@ -1 +1 @@ -{"variants":[{"paths":["\/documentation\/factory\/containermanager\/reset(options:)"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","schemaVersion":{"patch":0,"minor":3,"major":0},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(options:)","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"options"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"},{"text":" = .all)","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"metadata":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"text":"options","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"text":")","kind":"text"}],"roleHeading":"Instance Method","title":"reset(options:)","externalID":"s:7Factory16ContainerManagerC5reset7optionsyAA0A12ResetOptionsO_tF","extendedModule":"Factory","modules":[{"name":"Factory"}],"role":"symbol","symbolKind":"method"},"abstract":[{"text":"Resets the Container to its original state, removing all registrations and clearing all scope caches.","type":"text"}],"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"title":"FactoryResetOptions"},"doc://Factory/documentation/Factory/ContainerManager/reset(options:)":{"kind":"symbol","type":"topic","url":"\/documentation\/factory\/containermanager\/reset(options:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(options:)","title":"reset(options:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"options"},{"kind":"text","text":": "},{"text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Resets the Container to its original state, removing all registrations and clearing all scope caches."}],"role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"ContainerManager","kind":"identifier"}],"role":"symbol","url":"\/documentation\/factory\/containermanager","title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","abstract":[{"text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container.","type":"text"}]}}} \ No newline at end of file +{"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"options"},{"text":": ","kind":"text"},{"text":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier"},{"text":" = .all)","kind":"text"}],"languages":["swift"]}],"kind":"declarations"}],"metadata":{"roleHeading":"Instance Method","extendedModule":"Factory","externalID":"s:7Factory16ContainerManagerC5reset7optionsyAA0A12ResetOptionsO_tF","title":"reset(options:)","modules":[{"name":"Factory"}],"role":"symbol","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"text":"options","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"text":")","kind":"text"}]},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(options:)","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"abstract":[{"type":"text","text":"Resets the Container to its original state, removing all registrations and clearing all scope caches."}],"variants":[{"paths":["\/documentation\/factory\/containermanager\/reset(options:)"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"references":{"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","url":"\/documentation\/factory\/containermanager","type":"topic","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}]},"doc://Factory/documentation/Factory/FactoryResetOptions":{"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","title":"FactoryResetOptions","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryResetOptions","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ContainerManager/reset(options:)":{"role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"reset","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"options"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","kind":"typeIdentifier"},{"text":")","kind":"text"}],"kind":"symbol","title":"reset(options:)","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:)","url":"\/documentation\/factory\/containermanager\/reset(options:)"}}} \ 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 e5a32662..152817d9 100644 --- a/docs/data/documentation/factory/containermanager/reset(scope:).json +++ b/docs/data/documentation/factory/containermanager/reset(scope:).json @@ -1 +1 @@ -{"schemaVersion":{"patch":0,"minor":3,"major":0},"variants":[{"paths":["\/documentation\/factory\/containermanager\/reset(scope:)"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"metadata":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"text":"Scope","preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier"},{"kind":"text","text":")"}],"roleHeading":"Instance Method","title":"reset(scope:)","externalID":"s:7Factory16ContainerManagerC5reset5scopeyAA5ScopeC_tF","extendedModule":"Factory","modules":[{"name":"Factory"}],"role":"symbol","symbolKind":"method"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"text":"Scope","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"text":")","kind":"text"}],"languages":["swift"]}],"kind":"declarations"}],"kind":"symbol","sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(scope:)"},"abstract":[{"text":"Clears any cached values associated with a specific scope, leaving the other scope caches intact.","type":"text"}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/ContainerManager/reset(scope:)":{"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"text":"scope","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"text":")","kind":"text"}],"title":"reset(scope:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(scope:)","url":"\/documentation\/factory\/containermanager\/reset(scope:)","type":"topic","kind":"symbol","abstract":[{"type":"text","text":"Clears any cached values associated with a specific scope, leaving the other scope caches intact."}]},"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"ContainerManager","kind":"identifier"}],"role":"symbol","url":"\/documentation\/factory\/containermanager","title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","abstract":[{"text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container.","type":"text"}]}}} \ No newline at end of file +{"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"text":"scope","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"text":")","kind":"text"}],"languages":["swift"]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(scope:)","interfaceLanguage":"swift"},"metadata":{"role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"scope"},{"text":": ","kind":"text"},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"text":")","kind":"text"}],"title":"reset(scope:)","modules":[{"name":"Factory"}],"symbolKind":"method","externalID":"s:7Factory16ContainerManagerC5reset5scopeyAA5ScopeC_tF","roleHeading":"Instance Method","extendedModule":"Factory"},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/containermanager\/reset(scope:)"]}],"schemaVersion":{"patch":0,"minor":3,"major":0},"abstract":[{"text":"Clears any cached values associated with a specific scope, leaving the other scope caches intact.","type":"text"}],"sections":[],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","url":"\/documentation\/factory\/containermanager","type":"topic","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}]},"doc://Factory/documentation/Factory/ContainerManager/reset(scope:)":{"kind":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(scope:)","title":"reset(scope:)","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"text":"scope","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":")"}],"url":"\/documentation\/factory\/containermanager\/reset(scope:)","abstract":[{"type":"text","text":"Clears any cached values associated with a specific scope, leaving the other scope caches intact."}]},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"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 43547f5f..c0cb7256 100644 --- a/docs/data/documentation/factory/containermanager/trace.json +++ b/docs/data/documentation/factory/containermanager/trace.json @@ -1 +1 @@ -{"variants":[{"paths":["\/documentation\/factory\/containermanager\/trace"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/trace","interfaceLanguage":"swift"},"sections":[],"abstract":[{"type":"text","text":"Public var enabling factory resolution trace statements in debug mode for ALL containers."}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"trace"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"set"},{"text":" }","kind":"text"}],"languages":["swift"]}],"kind":"declarations"}],"metadata":{"roleHeading":"Instance Property","role":"symbol","modules":[{"name":"Factory"}],"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"trace"},{"kind":"text","text":": "},{"text":"Bool","preciseIdentifier":"s:Sb","kind":"typeIdentifier"}],"title":"trace","symbolKind":"property","externalID":"s:7Factory16ContainerManagerC5traceSbvp"},"references":{"doc://Factory/documentation/Factory/ContainerManager/trace":{"role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"trace","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/trace","title":"trace","url":"\/documentation\/factory\/containermanager\/trace","type":"topic","kind":"symbol","abstract":[{"text":"Public var enabling factory resolution trace statements in debug mode for ALL containers.","type":"text"}]},"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"ContainerManager","kind":"identifier"}],"role":"symbol","url":"\/documentation\/factory\/containermanager","title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","abstract":[{"text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container.","type":"text"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"kind":"symbol","metadata":{"roleHeading":"Instance Property","externalID":"s:7Factory16ContainerManagerC5traceSbvp","title":"trace","modules":[{"name":"Factory"}],"role":"symbol","symbolKind":"property","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"trace"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"trace"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" ","kind":"text"},{"text":"set","kind":"keyword"},{"kind":"text","text":" }"}],"languages":["swift"]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"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."}],"sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ContainerManager/trace":{"role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"trace","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"kind":"symbol","title":"trace","abstract":[{"type":"text","text":"Public var enabling factory resolution trace statements in debug mode for ALL containers."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/trace","url":"\/documentation\/factory\/containermanager\/trace"},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","url":"\/documentation\/factory\/containermanager","type":"topic","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/containers.json b/docs/data/documentation/factory/containers.json index ea240379..00c02a47 100644 --- a/docs/data/documentation/factory/containers.json +++ b/docs/data/documentation/factory/containers.json @@ -1 +1 @@ -{"sections":[],"metadata":{"role":"article","roleHeading":"Article","modules":[{"name":"Factory"}],"title":"Containers"},"primaryContentSections":[{"kind":"content","content":[{"level":2,"text":"Overview","anchor":"Overview","type":"heading"},{"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":[{"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":"text"}]},{"inlineContent":[{"text":"You can even create separate instances of the same container type, each with its own registrations and scope caches.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"Factory 2.0 supports true container-based dependency injection."}],"type":"paragraph"},{"level":2,"text":"Containers and Factories","type":"heading","anchor":"Containers-and-Factories"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"inlineContent":[{"text":"That’s a lot of code, so we usually just ask the enclosing container to make our Factory for us…","type":"text"}],"type":"paragraph"},{"type":"codeListing","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"],"syntax":"swift"},{"inlineContent":[{"type":"text","text":"This process is covered in greater detail in "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","isActive":true},{"text":".","type":"text"}],"type":"paragraph"},{"anchor":"Resolving-a-Dependency","text":"Resolving a Dependency","level":2,"type":"heading"},{"inlineContent":[{"text":"Once you’ve added a Factory to a container you can resolve it.","type":"text"}],"type":"paragraph"},{"syntax":"swift","code":["let service = Container.shared.service()"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"Bingo. You now have your dependency.","type":"text"}]},{"anchor":"The-Default-Container","type":"heading","level":2,"text":"The Default Container"},{"inlineContent":[{"type":"text","text":"Factory ships with a single "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","isActive":true},{"type":"text","text":" already constructed for your convenience."}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["public final class Container: SharedContainer {"," public static let shared = MyContainer()"," public let manager = ContainerManager()","}"]},{"inlineContent":[{"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.","type":"text"}],"type":"paragraph"},{"anchor":"Containershared","level":2,"type":"heading","text":"Container.shared"},{"type":"paragraph","inlineContent":[{"text":"As the default Container definition shows, each container class defined has a statically allocated ","type":"text"},{"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","code":["let service = Container.shared.service()"],"syntax":"swift"},{"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."}]},{"level":2,"anchor":"Passing-Containers","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."}]},{"code":["class ContentViewModel {"," let service2: MyServiceType"," init(container: Container) {"," service2 = container.service()"," }","}"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"type":"text","text":"Additional examples and methods can be seen on the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions"},{"text":" page.","type":"text"}],"type":"paragraph"},{"type":"heading","anchor":"SharedContainer","level":2,"text":"SharedContainer"},{"inlineContent":[{"type":"text","text":"All containers conform to the "},{"code":"SharedContainer","type":"codeVoice"},{"text":" protocol. That basically means that each one must have its own ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager"},{"text":" and implement a static ","type":"text"},{"type":"codeVoice","code":"shared"},{"type":"text","text":" instance."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"SharedContainer also defines some common functionality for each container, like the "},{"code":"unique","type":"codeVoice"},{"type":"text","text":" convenience function we’ve seen used throughout."}]},{"inlineContent":[{"text":"Note that you can extend SharedContainer with your own Factory’s.","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["extension SharedContainer {"," var commonService: Factory {"," self { MyService() }"," }","}"]},{"inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"commonService"},{"type":"text","text":" Factory will now be available on every container created."}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["let common1 = Container.shared.commonService()","let common2 = MyContainer.shared.commonService()"]},{"anchor":"Custom-Containers","text":"Custom Containers","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"text":"In a large project you might want to segregate factories into additional, smaller containers.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"Defining your own container class is simple. Just use the following as a template.","type":"text"}]},{"code":["public final class MyContainer: SharedContainer {"," public static let shared = MyContainer()"," public let manager = ContainerManager()","}","","extension MyContainer {"," var cachedService: Factory {"," self { MyService() }.cached"," }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"As mentioned, a container must derive from ","type":"text"},{"type":"codeVoice","code":"SharedContainer"},{"type":"text","text":", have its own "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager"},{"type":"text","text":", and implement a static "},{"code":"shared","type":"codeVoice"},{"text":" instance. It also must be marked ","type":"text"},{"code":"final","type":"codeVoice"},{"text":".","type":"text"}]},{"name":"Note","type":"aside","style":"note","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Remember to define the “shared” container as a "},{"type":"codeVoice","code":"let"},{"type":"text","text":", not "},{"type":"codeVoice","code":"var"},{"type":"text","text":". Defining it as a "},{"type":"codeVoice","code":"static var"},{"type":"text","text":" will cause Swift to issue concurrency warnings in the future whenever that variable is accessed."}]}]},{"type":"heading","level":2,"anchor":"Referencing-Other-Containers","text":"Referencing Other Containers"},{"inlineContent":[{"text":"Don’t forget that if need be you can reach across containers simply by specifying the full ","type":"text"},{"code":"container.factory","type":"codeVoice"},{"text":" path.","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["extension PaymentsContainer {"," let anotherService = Factory { "," self { AnotherService(using: Container.shared.optionalService()) }"," }","}"]},{"type":"heading","anchor":"Injected-Property-Wrappers","text":"Injected Property Wrappers","level":2},{"inlineContent":[{"type":"text","text":"Property wrappers like "},{"type":"codeVoice","code":"@Injected"},{"type":"text","text":" and "},{"code":"@LazyInjected","type":"codeVoice"},{"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 "},{"code":"cachedService","type":"codeVoice"},{"text":" object we defined above by providing a keypath to the desired class and service.","type":"text"}],"type":"paragraph"},{"code":["class ContentViewModel: ObservableObject {"," @Injected(\\MyContainer.cachedService) var cachedService","}"],"type":"codeListing","syntax":"swift"},{"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 "},{"code":"MyContainer.shared.manager","type":"codeVoice"},{"text":".","type":"text"}]},{"inlineContent":[{"type":"text","text":"See "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","type":"reference"},{"type":"text","text":", "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","type":"reference"},{"text":", ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","type":"reference","isActive":true},{"text":", and ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject"},{"type":"text","text":" for more."}],"type":"paragraph"},{"anchor":"Registration-and-Scope-Management","text":"Registration and Scope Management","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"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() "],"type":"codeListing"},{"anchor":"AutoRegister","level":2,"text":"AutoRegister","type":"heading"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"syntax":"swift","type":"codeListing","code":["extension Container: AutoRegistering {"," func autoRegister() {"," someService.register { ModuleB.SomeService() }"," }","}"]},{"inlineContent":[{"text":"Just make your container conform to ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering"},{"text":" and provide the ","type":"text"},{"type":"codeVoice","code":"autoRegister"},{"type":"text","text":" function. This function will be called "},{"inlineContent":[{"type":"text","text":"once"}],"type":"emphasis"},{"type":"text","text":" prior to the very first Factory service resolution on that container."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"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.","type":"text"}]},{"anchor":"Resetting-a-Container","level":2,"text":"Resetting a Container","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Using "},{"code":"register","type":"codeVoice"},{"type":"text","text":" on a factory lets us change the state of the system. But what if we need to revert to the original behavior?"}]},{"inlineContent":[{"text":"Simple. Just reset it to bring back the original factory closure. Or, if desired, you can reset ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"everything"}]},{"type":"text","text":" back to square one with a single command."}],"type":"paragraph"},{"code":["container.myService.reset() \/\/ resets this factory only","container.manager.reset() \/\/ clears all registrations and caches","container.reset() \/\/ shortcut, same as above"],"type":"codeListing","syntax":"Swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"We can also reset registrations and scope caches specifically, leaving the other intact."}]},{"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":"codeListing","syntax":"swift"},{"inlineContent":[{"text":"You can also reset a specific scope cache while leaving the others intact.","type":"text"}],"type":"paragraph"},{"code":["Container.shared.manager.reset(scope: .cached)"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"type":"text","text":"Note that resetting registrations also resets the container’s auto registration flag."}],"type":"paragraph"},{"style":"important","type":"aside","content":[{"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":"paragraph"}],"name":"Important"},{"anchor":"Pushing-and-Popping-State","text":"Pushing and Popping State","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"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":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing"},{"text":" for more information on this.","type":"text"}]},{"anchor":"Releasing-a-Container","type":"heading","text":"Releasing a Container","level":2},{"name":"Warning","type":"aside","style":"warning","content":[{"inlineContent":[{"text":"If a container ever goes out of scope, so will all of its registrations and cached objects.","type":"text"}],"type":"paragraph"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"To demonstrate, let’s see what happens when we create and then reassign a new container. Doing so releases the previous container, along with any registrations or objects that container may have cached. We’ll use the "},{"code":"cachedService","type":"codeVoice"},{"type":"text","text":" Factory we defined above."}]},{"type":"codeListing","code":["\/\/ Create an instance of our cached service.","var container = MyContainer()","let service1 = container.cachedService()","","\/\/ Repeat, which returns the same cached instance we obtained in service1.","let service2 = container.cachedService()","assert(service1.id == service2.id)","","\/\/ Replace the existing shared container with a new one.","container = MyContainer()","","\/\/ Trying again gets a new instance since the old container and cache was released.","let service3 = container.cachedService()","assert(service1.id != service3.id)","","\/\/ Repeat and receive the same cached instance we obtained in service3.","let service4 = container.cachedService()","assert(service3.id == service4.id)"],"syntax":"swift"},{"inlineContent":[{"text":"From a certain point of view, replacing a container with a new one is the ultimate reset mechanism.","type":"text"}],"type":"paragraph"},{"style":"note","type":"aside","content":[{"inlineContent":[{"type":"text","text":"As of Factory 2.2 it’s no longer possible to reassign the default “shared” container. This change clears several warnings that could be issued by Swift concurrency when “complete” checking is enabled and one attempts to access the container via the shared static variable (e.g. "},{"type":"codeVoice","code":"let s = Container.shared.myService()"},{"type":"text","text":")."}],"type":"paragraph"}],"name":"Note"}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/containers"]}],"seeAlsoSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/GettingStarted","doc:\/\/Factory\/documentation\/Factory\/Scopes"],"generated":true,"title":"The Basics"}],"abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Containers","interfaceLanguage":"swift"},"schemaVersion":{"minor":3,"major":0,"patch":0},"kind":"article","references":{"doc://Factory/documentation/Factory/InjectedObject":{"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","role":"symbol","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Resolutions":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","kind":"article","abstract":[{"text":"There are many ways to use Factory to resolve dependencies. Here are a few examples.","type":"text"}],"title":"Sample Resolutions","url":"\/documentation\/factory\/resolutions","role":"article"},"doc://Factory/documentation/Factory/Testing":{"title":"Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"url":"\/documentation\/factory\/testing","kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","role":"article"},"doc://Factory/documentation/Factory/Container":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Container"}],"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container"},"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"ContainerManager","kind":"identifier"}],"role":"symbol","url":"\/documentation\/factory\/containermanager","title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","abstract":[{"text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container.","type":"text"}]},"doc://Factory/documentation/Factory/GettingStarted":{"url":"\/documentation\/factory\/gettingstarted","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"type":"topic","title":"Getting Started","role":"collectionGroup"},"doc://Factory/documentation/Factory/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."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"title":"LazyInjected","url":"\/documentation\/factory\/lazyinjected","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Injected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","role":"symbol","type":"topic","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"title":"Injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/WeakLazyInjected":{"kind":"symbol","type":"topic","title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}]},"doc://Factory/documentation/Factory/AutoRegistering":{"url":"\/documentation\/factory\/autoregistering","type":"topic","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AutoRegistering","kind":"identifier"}],"title":"AutoRegistering","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","navigatorTitle":[{"text":"AutoRegistering","kind":"identifier"}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"type":"text","text":"."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","title":"Scopes"}}} \ No newline at end of file +{"sections":[],"kind":"article","primaryContentSections":[{"kind":"content","content":[{"type":"heading","level":2,"text":"Overview","anchor":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Containers are used by Factory to manage object creation, object resolution, and object lifecycles in general."}]},{"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"},{"type":"paragraph","inlineContent":[{"text":"You can even create separate instances of the same container type, each with its own registrations and scope caches.","type":"text"}]},{"inlineContent":[{"type":"text","text":"Factory 2.0 supports true container-based dependency injection."}],"type":"paragraph"},{"text":"Containers and Factories","type":"heading","anchor":"Containers-and-Factories","level":2},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"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":[{"text":"This process is covered in greater detail in ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","isActive":true},{"type":"text","text":"."}]},{"type":"heading","level":2,"anchor":"Resolving-a-Dependency","text":"Resolving a Dependency"},{"inlineContent":[{"text":"Once you’ve added a Factory to a container you can resolve it.","type":"text"}],"type":"paragraph"},{"type":"codeListing","code":["let service = Container.shared.service()"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"Bingo. You now have your dependency.","type":"text"}]},{"anchor":"The-Default-Container","level":2,"text":"The Default Container","type":"heading"},{"inlineContent":[{"text":"Factory ships with a single ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"reference","isActive":true},{"text":" already constructed for your convenience.","type":"text"}],"type":"paragraph"},{"code":["public final class Container: SharedContainer {"," public static let shared = MyContainer()"," public let manager = ContainerManager()","}"],"type":"codeListing","syntax":"swift"},{"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."}],"type":"paragraph"},{"text":"Container.shared","anchor":"Containershared","level":2,"type":"heading"},{"inlineContent":[{"type":"text","text":"As the default Container definition shows, each container class defined has a statically allocated "},{"type":"codeVoice","code":"shared"},{"text":" instance associated with it.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"This instance can be referenced directly if you’re using a Service Locator-style pattern.","type":"text"}],"type":"paragraph"},{"code":["let service = Container.shared.service()"],"syntax":"swift","type":"codeListing"},{"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."}]},{"level":2,"anchor":"Passing-Containers","text":"Passing Containers","type":"heading"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"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 "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions"},{"type":"text","text":" page."}]},{"level":2,"anchor":"SharedContainer","type":"heading","text":"SharedContainer"},{"type":"paragraph","inlineContent":[{"type":"text","text":"All containers conform to the "},{"type":"codeVoice","code":"SharedContainer"},{"type":"text","text":" protocol. That basically means that each one must have its own "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager"},{"text":" and implement a static ","type":"text"},{"code":"shared","type":"codeVoice"},{"text":" instance.","type":"text"}]},{"inlineContent":[{"text":"SharedContainer also defines some common functionality for each container, like the ","type":"text"},{"code":"unique","type":"codeVoice"},{"text":" convenience function we’ve seen used throughout.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Note that you can extend SharedContainer with your own Factory’s.","type":"text"}]},{"syntax":"swift","code":["extension SharedContainer {"," var commonService: Factory {"," self { MyService() }"," }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"commonService"},{"text":" Factory will now be available on every container created.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["let common1 = Container.shared.commonService()","let common2 = MyContainer.shared.commonService()"]},{"type":"heading","level":2,"text":"Custom Containers","anchor":"Custom-Containers"},{"inlineContent":[{"type":"text","text":"In a large project you might want to segregate factories into additional, smaller containers."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Defining your own container class is simple. Just use the following as a template."}]},{"code":["public final class MyContainer: SharedContainer {"," public static let shared = MyContainer()"," public let manager = ContainerManager()","}","","extension MyContainer {"," var cachedService: Factory {"," self { MyService() }.cached"," }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As mentioned, a container must derive from "},{"code":"SharedContainer","type":"codeVoice"},{"type":"text","text":", have its own "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","isActive":true},{"text":", and implement a static ","type":"text"},{"type":"codeVoice","code":"shared"},{"type":"text","text":" instance. It also must be marked "},{"code":"final","type":"codeVoice"},{"text":".","type":"text"}]},{"content":[{"inlineContent":[{"text":"Remember to define the “shared” container as a ","type":"text"},{"code":"let","type":"codeVoice"},{"text":", not ","type":"text"},{"code":"var","type":"codeVoice"},{"type":"text","text":". Defining it as a "},{"code":"static var","type":"codeVoice"},{"text":" will cause Swift to issue concurrency warnings in the future whenever that variable is accessed.","type":"text"}],"type":"paragraph"}],"type":"aside","style":"note","name":"Note"},{"text":"Referencing Other Containers","anchor":"Referencing-Other-Containers","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"text":"Don’t forget that if need be you can reach across containers simply by specifying the full ","type":"text"},{"type":"codeVoice","code":"container.factory"},{"type":"text","text":" path."}]},{"code":["extension PaymentsContainer {"," let anotherService = Factory { "," self { AnotherService(using: Container.shared.optionalService()) }"," }","}"],"type":"codeListing","syntax":"swift"},{"type":"heading","text":"Injected Property Wrappers","level":2,"anchor":"Injected-Property-Wrappers"},{"inlineContent":[{"type":"text","text":"Property wrappers like "},{"code":"@Injected","type":"codeVoice"},{"type":"text","text":" and "},{"code":"@LazyInjected","type":"codeVoice"},{"text":" always reference the ","type":"text"},{"type":"codeVoice","code":"shared"},{"type":"text","text":" container for that class type. Let’s get an instance of the "},{"code":"cachedService","type":"codeVoice"},{"type":"text","text":" object we defined above by providing a keypath to the desired class and service."}],"type":"paragraph"},{"syntax":"swift","code":["class ContentViewModel: ObservableObject {"," @Injected(\\MyContainer.cachedService) var cachedService","}"],"type":"codeListing"},{"inlineContent":[{"text":"We now have an instance of ","type":"text"},{"code":"cachedService","type":"codeVoice"},{"type":"text","text":" in our view model, as well as a reference to the same instance cached in "},{"code":"MyContainer.shared.manager","type":"codeVoice"},{"type":"text","text":"."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","isActive":true},{"type":"text","text":", "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","isActive":true},{"type":"text","text":", "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","isActive":true},{"text":", and ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"reference","isActive":true},{"text":" for more.","type":"text"}]},{"type":"heading","text":"Registration and Scope Management","anchor":"Registration-and-Scope-Management","level":2},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"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() "],"type":"codeListing","syntax":"swift"},{"anchor":"AutoRegister","type":"heading","text":"AutoRegister","level":2},{"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":"paragraph"},{"type":"codeListing","syntax":"swift","code":["extension Container: AutoRegistering {"," func autoRegister() {"," someService.register { ModuleB.SomeService() }"," }","}"]},{"type":"paragraph","inlineContent":[{"text":"Just make your container conform to ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","isActive":true},{"text":" and provide the ","type":"text"},{"type":"codeVoice","code":"autoRegister"},{"text":" function. This function will be called ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"once"}]},{"text":" prior to the very first Factory service resolution on that container.","type":"text"}]},{"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."}],"type":"paragraph"},{"text":"Resetting a Container","type":"heading","anchor":"Resetting-a-Container","level":2},{"inlineContent":[{"text":"Using ","type":"text"},{"code":"register","type":"codeVoice"},{"type":"text","text":" on a factory lets us change the state of the system. But what if we need to revert 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 "},{"inlineContent":[{"type":"text","text":"everything"}],"type":"emphasis"},{"type":"text","text":" back to square one with a single command."}],"type":"paragraph"},{"syntax":"Swift","type":"codeListing","code":["container.myService.reset() \/\/ resets this factory only","container.manager.reset() \/\/ clears all registrations and caches","container.reset() \/\/ shortcut, same as above"]},{"inlineContent":[{"type":"text","text":"We can also reset registrations and scope caches specifically, leaving the other intact."}],"type":"paragraph"},{"type":"codeListing","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)"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can also reset a specific scope cache while leaving the others intact."}]},{"syntax":"swift","type":"codeListing","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."}]},{"content":[{"inlineContent":[{"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":"text"},{"inlineContent":[{"text":"next","type":"text"}],"type":"emphasis"},{"type":"text","text":" time a Factory is asked to resolve a dependency that dependency will be a new instance."}],"type":"paragraph"}],"style":"important","type":"aside","name":"Important"},{"type":"heading","level":2,"text":"Pushing and Popping State","anchor":"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 "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","type":"reference","isActive":true},{"type":"text","text":" for more information on this."}]},{"type":"heading","text":"Releasing a Container","level":2,"anchor":"Releasing-a-Container"},{"name":"Warning","style":"warning","type":"aside","content":[{"inlineContent":[{"text":"If a container ever goes out of scope, so will all of its registrations and cached objects.","type":"text"}],"type":"paragraph"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"To demonstrate, let’s see what happens when we create and then reassign a new container. 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."}]},{"code":["\/\/ Create an instance of our cached service.","var container = MyContainer()","let service1 = container.cachedService()","","\/\/ Repeat, which returns the same cached instance we obtained in service1.","let service2 = container.cachedService()","assert(service1.id == service2.id)","","\/\/ Replace the existing shared container with a new one.","container = MyContainer()","","\/\/ Trying again gets a new instance since the old container and cache was released.","let service3 = container.cachedService()","assert(service1.id != service3.id)","","\/\/ Repeat and receive the same cached instance we obtained in service3.","let service4 = container.cachedService()","assert(service3.id == service4.id)"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"type":"text","text":"From a certain point of view, replacing a container with a new one is the ultimate reset mechanism."}],"type":"paragraph"},{"style":"note","name":"Note","type":"aside","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"As of Factory 2.2 it’s no longer possible to reassign the default “shared” container. This change clears several warnings that could be issued by Swift concurrency when “complete” checking is enabled and one attempts to access the container via the shared static variable (e.g. "},{"type":"codeVoice","code":"let s = Container.shared.myService()"},{"text":").","type":"text"}]}]}]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"seeAlsoSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/GettingStarted","doc:\/\/Factory\/documentation\/Factory\/Scopes"],"generated":true,"title":"The Basics"}],"variants":[{"paths":["\/documentation\/factory\/containers"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"title":"Containers","role":"article","roleHeading":"Article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"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?"}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/GettingStarted":{"url":"\/documentation\/factory\/gettingstarted","identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","role":"collectionGroup","kind":"article","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"type":"topic","title":"Getting Started"},"doc://Factory/documentation/Factory/Testing":{"title":"Testing","url":"\/documentation\/factory\/testing","abstract":[{"text":"Using Factory for Unit and UI Testing.","type":"text"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","type":"topic","role":"article"},"doc://Factory/documentation/Factory/AutoRegistering":{"title":"AutoRegistering","abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"text":".","type":"text"}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"AutoRegistering","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"AutoRegistering"}],"url":"\/documentation\/factory\/autoregistering","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"kind":"symbol","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"type":"topic","url":"\/documentation\/factory\/weaklazyinjected"},"doc://Factory/documentation/Factory/Injected":{"kind":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","navigatorTitle":[{"text":"Injected","kind":"identifier"}],"abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/LazyInjected":{"title":"LazyInjected","type":"topic","url":"\/documentation\/factory\/lazyinjected","role":"symbol","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"kind":"symbol"},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","url":"\/documentation\/factory\/containermanager","type":"topic","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}]},"doc://Factory/documentation/Factory/Resolutions":{"url":"\/documentation\/factory\/resolutions","title":"Sample Resolutions","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","role":"article","abstract":[{"text":"There are many ways to use Factory to resolve dependencies. Here are a few examples.","type":"text"}],"kind":"article","type":"topic"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Container","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","navigatorTitle":[{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"kind":"article"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"InjectedObject","kind":"identifier"}],"abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","kind":"symbol","navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/contexts.json b/docs/data/documentation/factory/contexts.json index cae8bc36..084858e5 100644 --- a/docs/data/documentation/factory/contexts.json +++ b/docs/data/documentation/factory/contexts.json @@ -1 +1 @@ -{"primaryContentSections":[{"content":[{"level":2,"type":"heading","text":"Overview","anchor":"Overview"},{"inlineContent":[{"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":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"context"}]},{"text":".","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"What if, for example, you ","type":"text"},{"type":"strong","inlineContent":[{"text":"never","type":"text"}]},{"text":" want your application’s analytics library to be called when running unit tests?","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Piece of cake. Just register a new override for that particular context."}]},{"code":["extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," container.analytics"," .context(.test) { MockAnalyticsEngine() }"," #endif"," }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory makes it easy."}]},{"type":"heading","anchor":"Contexts","text":"Contexts","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory 2.1 provides quite a few predefined contexts for your use. They are:"}]},{"items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"text":"arg(String)","type":"text"}]},{"type":"text","text":" - application is launched with a particular argument."}]}]},{"content":[{"inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"args([String])"}]},{"text":" - application is launched with one of several arguments.","type":"text"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"inlineContent":[{"type":"text","text":"preview"}],"type":"strong"},{"type":"text","text":" - application is running in Xcode Preview mode"}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"text":"test","type":"text"}],"type":"strong"},{"text":" - application is running in Xcode Unit Test mode","type":"text"}]}]},{"content":[{"inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"debug"}]},{"text":" - application is running in Xcode DEBUG mode","type":"text"}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"simulator"}]},{"type":"text","text":" - application is running within an Xcode simulator"}]}]},{"content":[{"inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"device"}]},{"text":" - application is running on an actual device","type":"text"}],"type":"paragraph"}]}],"type":"unorderedList"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s dive in."}]},{"text":"Some Examples","level":2,"anchor":"Some-Examples","type":"heading"},{"anchor":"-onTest","text":"• onTest","type":"heading","level":3},{"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."}]},{"syntax":"swift","type":"codeListing","code":["container.analytics"," .context(.test) { MockAnalyticsEngine() }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"There’s also a shortcut version:"}]},{"type":"codeListing","code":["container.analytics"," .onTest { MockAnalyticsEngine() }"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"codeListing","syntax":"swift","code":["if ProcessInfo.processInfo.environment[\"XCTestConfigurationFilePath\"] != nil {"," container.analytics.register { MockAnalyticsEngine() }","}"]},{"inlineContent":[{"type":"text","text":"Using onTest is much easier."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"emphasis","inlineContent":[{"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.","type":"text"}]}]},{"anchor":"-onPreview","text":"• onPreview","type":"heading","level":3},{"inlineContent":[{"text":"This specifies a dependency that will be used whenever your app or module is running SwiftUI Previews.","type":"text"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["container.myServiceType"," .onPreview { MockService() }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Which obviously makes your preview code itself much simpler."}]},{"syntax":"swift","code":["struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," ContentView()"," }","}"],"type":"codeListing"},{"inlineContent":[{"type":"text","text":"You can, of course, still use the mechanisms shown in "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","type":"reference"},{"type":"text","text":"."}],"type":"paragraph"},{"level":3,"text":"• onDebug","type":"heading","anchor":"-onDebug"},{"type":"paragraph","inlineContent":[{"text":"Triggered whenever your application is running in debug mode in simulators, on a device, or when running unit tests.","type":"text"}]},{"name":"Note","content":[{"inlineContent":[{"type":"text","text":"that there’s no "},{"type":"codeVoice","code":"release"},{"text":" context. Just use the standard ","type":"text"},{"code":"register","type":"codeVoice"},{"text":" syntax in that case.","type":"text"}],"type":"paragraph"}],"type":"aside","style":"note"},{"text":"• onSimulator \/ onDevice","type":"heading","level":3,"anchor":"-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."}]},{"text":"• onArg","type":"heading","level":3,"anchor":"-onArg"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"arg"},{"text":" context is a powerful tool to have when you want to UITest your application and you want to change its behavior.","type":"text"}]},{"inlineContent":[{"text":"As shown in the ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","type":"reference","isActive":true},{"text":" section the test case itself is pretty standard.","type":"text"}],"type":"paragraph"},{"type":"codeListing","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)"," }","} "],"syntax":"swift"},{"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"," }","}"]},{"type":"heading","level":3,"anchor":"-onArgs","text":"• onArgs"},{"inlineContent":[{"text":"Similar to arg, but let’s you use the same factory when any of several arguments are passed.","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["myServiceType"," .onArgs([\"mock0\", \"mock1\", \"mock3\"]) { "," EmptyService()"," }"]},{"level":2,"text":"Runtime Arguments","type":"heading","anchor":"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","type":"heading","level":2,"text":"Multiple Contexts"},{"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":"paragraph"},{"syntax":"swift","code":["container.myServiceType"," .onPreview { MockService() }"," .onTest { UnitTestMockService() }"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"And here’s an example saying we want the same dependency under multiple contexts.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["container.myServiceType"," .context(.simulator, .test) { MockService() }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Which brings us to…"}]},{"type":"heading","anchor":"Context-Precedence","level":2,"text":"Context Precedence"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"text":"arg[s]","type":"text"}]}]}]},{"content":[{"inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"preview"}]},{"type":"text","text":" *"}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"test"}]},{"type":"text","text":" *"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"type":"text","text":"simulator"}],"type":"strong"}]}]},{"content":[{"inlineContent":[{"type":"strong","inlineContent":[{"text":"device","type":"text"}]}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"type":"strong","inlineContent":[{"text":"debug","type":"text"}]},{"text":" *","type":"text"}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"type":"text","text":"registered factory"}],"type":"strong"},{"type":"text","text":" (if any)"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"original factory"}]}]}]}],"type":"unorderedList"},{"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."}],"type":"paragraph"},{"level":2,"anchor":"Global-Context","type":"heading","text":"Global Context"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"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."}]},{"type":"heading","level":2,"text":"Changing a Context","anchor":"Changing-a-Context"},{"type":"paragraph","inlineContent":[{"text":"Keep in mind that if we ever want to change a Factory’s context but that Factory defines a scope, then we’re also going to need to ","type":"text"},{"type":"strong","inlineContent":[{"text":"manually","type":"text"}]},{"text":" clear the scope cache for that object.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.myService"," .onTest { NullAnalyticsEngine() }"," .reset(.scope)"]},{"name":"Warning","content":[{"type":"paragraph","inlineContent":[{"text":"With ","type":"text"},{"code":"reset","type":"codeVoice"},{"type":"text","text":" make sure you specify that you only want to clear the scope. Calling "},{"type":"codeVoice","code":"reset"},{"text":" without a parameter clears everything, including contexts like the one you just set!","type":"text"}]}],"type":"aside","style":"warning"},{"type":"paragraph","inlineContent":[{"type":"text","text":"See the section on "},{"inlineContent":[{"type":"text","text":"The Factory Wins"}],"type":"emphasis"},{"text":" in ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers"},{"text":" for more information on this and other scenarios.","type":"text"}]}],"kind":"content"}],"metadata":{"title":"Contexts","roleHeading":"Article","role":"article","modules":[{"name":"Factory"}]},"variants":[{"paths":["\/documentation\/factory\/contexts"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Contexts","interfaceLanguage":"swift"},"seeAlsoSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Previews","doc:\/\/Factory\/documentation\/Factory\/Testing","doc:\/\/Factory\/documentation\/Factory\/Debugging","doc:\/\/Factory\/documentation\/Factory\/Chains"],"generated":true,"title":"Development and Testing"}],"kind":"article","references":{"doc://Factory/documentation/Factory/Debugging":{"abstract":[{"type":"text","text":"Additional support for debugging resolution cycles, dependency chains and other issue."}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","title":"Debugging","url":"\/documentation\/factory\/debugging","type":"topic","role":"article"},"doc://Factory/documentation/Factory/Testing":{"title":"Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"url":"\/documentation\/factory\/testing","kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","role":"article"},"doc://Factory/documentation/Factory/Chains":{"abstract":[{"type":"text","text":"Detecting and solving Circular Dependency Chains."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","kind":"article","title":"Circular Dependency Chains","url":"\/documentation\/factory\/chains","type":"topic","role":"article"},"doc://Factory/documentation/Factory/Modifiers":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","title":"Factory Modifiers","url":"\/documentation\/factory\/modifiers","abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"role":"article"},"doc://Factory/documentation/Factory/Previews":{"abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","kind":"article","title":"SwiftUI Previews","url":"\/documentation\/factory\/previews","type":"topic","role":"article"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"sections":[],"metadata":{"role":"article","modules":[{"name":"Factory"}],"title":"Contexts","roleHeading":"Article"},"seeAlsoSections":[{"generated":true,"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"]}],"kind":"article","primaryContentSections":[{"content":[{"anchor":"Overview","text":"Overview","level":2,"type":"heading"},{"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 "},{"inlineContent":[{"type":"text","text":"context"}],"type":"emphasis"},{"type":"text","text":"."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"What if, for example, you "},{"type":"strong","inlineContent":[{"text":"never","type":"text"}]},{"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":"paragraph"},{"code":["extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," container.analytics"," .context(.test) { MockAnalyticsEngine() }"," #endif"," }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"Factory makes it easy.","type":"text"}]},{"type":"heading","text":"Contexts","level":2,"anchor":"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":[{"inlineContent":[{"type":"text","text":"arg(String)"}],"type":"strong"},{"type":"text","text":" - application is launched with a particular argument."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"text":"args([String])","type":"text"}],"type":"strong"},{"type":"text","text":" - application is launched with one of several arguments."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"preview"}]},{"text":" - application is running in Xcode Preview mode","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"text":"test","type":"text"}]},{"type":"text","text":" - application is running in Xcode Unit Test mode"}]}]},{"content":[{"inlineContent":[{"type":"strong","inlineContent":[{"text":"debug","type":"text"}]},{"type":"text","text":" - application is running in Xcode DEBUG mode"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"inlineContent":[{"text":"simulator","type":"text"}],"type":"strong"},{"type":"text","text":" - application is running within an Xcode simulator"}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"type":"text","text":"device"}],"type":"strong"},{"type":"text","text":" - application is running on an actual device"}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s dive in."}]},{"text":"Some Examples","level":2,"anchor":"Some-Examples","type":"heading"},{"anchor":"-onTest","type":"heading","text":"• onTest","level":3},{"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."}]},{"code":["container.analytics"," .context(.test) { MockAnalyticsEngine() }"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"There’s also a shortcut version:","type":"text"}]},{"code":["container.analytics"," .onTest { MockAnalyticsEngine() }"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"syntax":"swift","code":["if ProcessInfo.processInfo.environment[\"XCTestConfigurationFilePath\"] != nil {"," container.analytics.register { MockAnalyticsEngine() }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"Using onTest is much easier.","type":"text"}]},{"inlineContent":[{"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."}],"type":"emphasis"}],"type":"paragraph"},{"text":"• onPreview","type":"heading","anchor":"-onPreview","level":3},{"inlineContent":[{"type":"text","text":"This specifies a dependency that will be used whenever your app or module is running SwiftUI Previews."}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["container.myServiceType"," .onPreview { MockService() }"]},{"type":"paragraph","inlineContent":[{"text":"Which obviously makes your preview code itself much simpler.","type":"text"}]},{"code":["struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," ContentView()"," }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"You can, of course, still use the mechanisms shown in ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","isActive":true,"type":"reference"},{"type":"text","text":"."}]},{"level":3,"type":"heading","text":"• onDebug","anchor":"-onDebug"},{"type":"paragraph","inlineContent":[{"text":"Triggered whenever your application is running in debug mode in simulators, on a device, or when running unit tests.","type":"text"}]},{"name":"Note","style":"note","type":"aside","content":[{"inlineContent":[{"type":"text","text":"that there’s no "},{"type":"codeVoice","code":"release"},{"type":"text","text":" context. Just use the standard "},{"code":"register","type":"codeVoice"},{"type":"text","text":" syntax in that case."}],"type":"paragraph"}]},{"level":3,"text":"• onSimulator \/ onDevice","type":"heading","anchor":"-onSimulator--onDevice"},{"inlineContent":[{"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.","type":"text"}],"type":"paragraph"},{"level":3,"anchor":"-onArg","type":"heading","text":"• onArg"},{"type":"paragraph","inlineContent":[{"text":"The ","type":"text"},{"code":"arg","type":"codeVoice"},{"type":"text","text":" context is a powerful tool to have when you want to UITest your application and you want to change its behavior."}]},{"inlineContent":[{"type":"text","text":"As shown in the "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","isActive":true,"type":"reference"},{"text":" section the test case itself is pretty standard.","type":"text"}],"type":"paragraph"},{"type":"codeListing","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)"," }","} "],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"syntax":"swift","type":"codeListing","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"," }","}"]},{"text":"• onArgs","type":"heading","level":3,"anchor":"-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."}]},{"syntax":"swift","type":"codeListing","code":["myServiceType"," .onArgs([\"mock0\", \"mock1\", \"mock3\"]) { "," EmptyService()"," }"]},{"text":"Runtime Arguments","anchor":"Runtime-Arguments","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"text":"You can also add and remove your own arguments at runtime. Consider this…","type":"text"}]},{"code":["FactoryContext.setArg(\"light\", forKey: \"theme\")","FactoryContext.removeArg(forKey: \"theme\")","","myStyleSystem { StandardTheme() }"," .onArg(\"light\") { LightTheme() }"," .onArg(\"dark\") { DarkTheme() }"],"type":"codeListing","syntax":"swift"},{"type":"heading","level":2,"anchor":"Multiple-Contexts","text":"Multiple Contexts"},{"inlineContent":[{"text":"As you may have noticed above in the ","type":"text"},{"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":[{"text":"Here’s an example of specifying separate services depending on context.","type":"text"}],"type":"paragraph"},{"syntax":"swift","code":["container.myServiceType"," .onPreview { MockService() }"," .onTest { UnitTestMockService() }"],"type":"codeListing"},{"inlineContent":[{"text":"And here’s an example saying we want the same dependency under multiple contexts.","type":"text"}],"type":"paragraph"},{"syntax":"swift","code":["container.myServiceType"," .context(.simulator, .test) { MockService() }"],"type":"codeListing"},{"inlineContent":[{"type":"text","text":"Which brings us to…"}],"type":"paragraph"},{"anchor":"Context-Precedence","level":2,"text":"Context Precedence","type":"heading"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"arg[s]"}]}]}]},{"content":[{"inlineContent":[{"inlineContent":[{"type":"text","text":"preview"}],"type":"strong"},{"text":" *","type":"text"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"inlineContent":[{"text":"test","type":"text"}],"type":"strong"},{"type":"text","text":" *"}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"simulator"}]}]}]},{"content":[{"inlineContent":[{"inlineContent":[{"type":"text","text":"device"}],"type":"strong"}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"text":"debug","type":"text"}]},{"text":" *","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"registered factory"}]},{"text":" (if any)","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"text":"original factory","type":"text"}]}]}]}]},{"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."}]},{"type":"heading","anchor":"Global-Context","text":"Global Context","level":2},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"code":"onArg","type":"codeVoice"},{"type":"text","text":" and "},{"code":"onDebug","type":"codeVoice"},{"type":"text","text":" and other context modifiers basically define how the app should respond to that particular context."}]},{"level":2,"type":"heading","text":"Changing a Context","anchor":"Changing-a-Context"},{"inlineContent":[{"text":"Keep in mind that if we ever want to change a Factory’s context but that Factory defines a scope, then we’re also going to need to ","type":"text"},{"type":"strong","inlineContent":[{"text":"manually","type":"text"}]},{"text":" clear the scope cache for that object.","type":"text"}],"type":"paragraph"},{"type":"codeListing","code":["Container.shared.myService"," .onTest { NullAnalyticsEngine() }"," .reset(.scope)"],"syntax":"swift"},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"With "},{"code":"reset","type":"codeVoice"},{"type":"text","text":" make sure you specify that you only want to clear the scope. Calling "},{"code":"reset","type":"codeVoice"},{"text":" without a parameter clears everything, including contexts like the one you just set!","type":"text"}]}],"type":"aside","style":"warning","name":"Warning"},{"type":"paragraph","inlineContent":[{"text":"See the section on ","type":"text"},{"inlineContent":[{"type":"text","text":"The Factory Wins"}],"type":"emphasis"},{"text":" in ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","isActive":true},{"text":" for more information on this and other scenarios.","type":"text"}]}],"kind":"content"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/contexts"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Contexts"},"abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"references":{"doc://Factory/documentation/Factory/Chains":{"title":"Circular Dependency Chains","url":"\/documentation\/factory\/chains","abstract":[{"text":"Detecting and solving Circular Dependency Chains.","type":"text"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","type":"topic","role":"article"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Testing":{"title":"Testing","url":"\/documentation\/factory\/testing","abstract":[{"text":"Using Factory for Unit and UI Testing.","type":"text"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","type":"topic","role":"article"},"doc://Factory/documentation/Factory/Debugging":{"title":"Debugging","url":"\/documentation\/factory\/debugging","abstract":[{"text":"Additional support for debugging resolution cycles, dependency chains and other issue.","type":"text"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","type":"topic","role":"article"},"doc://Factory/documentation/Factory/Previews":{"title":"SwiftUI Previews","url":"\/documentation\/factory\/previews","abstract":[{"text":"Mocking dependencies for SwiftUI Previews.","type":"text"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","type":"topic","role":"article"},"doc://Factory/documentation/Factory/Modifiers":{"kind":"article","abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"title":"Factory Modifiers","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","role":"article","type":"topic","url":"\/documentation\/factory\/modifiers"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/cycle.json b/docs/data/documentation/factory/cycle.json index 4cbd7bd4..6fbd64e5 100644 --- a/docs/data/documentation/factory/cycle.json +++ b/docs/data/documentation/factory/cycle.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"kind":"article","primaryContentSections":[{"kind":"content","content":[{"text":"Overview","anchor":"Overview","type":"heading","level":2},{"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":[{"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":"text"}]},{"syntax":"swift","type":"codeListing","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."}]},{"type":"heading","level":2,"text":"The Players","anchor":"The-Players"},{"inlineContent":[{"type":"text","text":"Consider the following set of classes and protocols:"}],"type":"paragraph"},{"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":"codeListing","syntax":"swift"},{"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."}],"type":"paragraph"},{"type":"heading","level":2,"anchor":"The-Registrations","text":"The Registrations"},{"inlineContent":[{"type":"text","text":"So let’s look next at the Factory registrations."}],"type":"paragraph"},{"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":"codeListing","syntax":"swift"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"So Factory is called again to make an aService. But that Factory punts and calls ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"another"}]},{"type":"text","text":" Factory to get an instance of implementsAB."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"That Factory, in turn, asks Swift to make ImplementsAB, but again, ","type":"text"},{"inlineContent":[{"text":"that","type":"text"}],"type":"emphasis"},{"type":"text","text":" object needs to initialize with a NetworkService. Another call through Factory."}]},{"type":"heading","level":2,"anchor":"Tracing-the-Resolution-Cycle","text":"Tracing the Resolution Cycle"},{"inlineContent":[{"type":"text","text":"Let’s turn on Factory’s trace function and see what we get. (Trace was edited for clarity.)"}],"type":"paragraph"},{"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":"codeListing"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"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":[{"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":"text"}]},{"inlineContent":[{"type":"text","text":"When the initial result is returned that resolution cycle is over."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Until next time."}]},{"level":2,"anchor":"Missing-Preferences","text":"Missing Preferences","type":"heading"},{"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."}],"type":"paragraph"},{"anchor":"The-Missing-Graph","level":2,"text":"The Missing Graph","type":"heading"},{"inlineContent":[{"text":"Just for fun, let’s consider what we’d see if we did:","type":"text"}],"type":"paragraph"},{"code":["let demo = CycleDemo()"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"Here’s the trace.","type":"text"}]},{"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"],"syntax":null,"type":"codeListing"},{"type":"paragraph","inlineContent":[{"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":"text"},{"inlineContent":[{"text":"two","type":"text"}],"type":"strong"},{"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.)"}]},{"inlineContent":[{"type":"text","text":"Why? Let’s look at the class again."}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["class CycleDemo {"," @Injected(\\.aService) var aService: AServiceType"," @Injected(\\.bService) var bService: BServiceType","}"]},{"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"},{"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."}]},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Swap out implementsAB’s graph scope for, say, singleton, and you’d see the following:","type":"text"}]},{"type":"codeListing","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"],"syntax":null},{"type":"paragraph","inlineContent":[{"type":"text","text":"Which is what we’d expect. (Note that now aService and bService are the same instance.)"}]},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"inlineContent":[{"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.","type":"text"}],"type":"paragraph"}]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/cycle"]}],"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}],"abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Article","title":"Resolution Cycles","role":"article"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Cycle","interfaceLanguage":"swift"},"sections":[],"references":{"doc://Factory/documentation/Factory/Functional":{"title":"Functional Injection","identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","url":"\/documentation\/factory\/functional","type":"topic","role":"article","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"kind":"article"},"doc://Factory/documentation/Factory/Tags":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","title":"Tags","url":"\/documentation\/factory\/tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"role":"article"},"doc://Factory/documentation/Factory/Modifiers":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","title":"Factory Modifiers","url":"\/documentation\/factory\/modifiers","abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"role":"article"},"doc://Factory/documentation/Factory/Design":{"url":"\/documentation\/factory\/design","title":"Designing Factory","role":"article","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Design"},"doc://Factory/documentation/Factory/Optionals":{"type":"topic","kind":"article","abstract":[{"text":"With Factory registrations can be performed at any time.","type":"text"}],"title":"Optionals and Dynamic Registration","identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","url":"\/documentation\/factory\/optionals","role":"article"},"doc://Factory/documentation/Factory/Modules":{"type":"topic","url":"\/documentation\/factory\/modules","role":"article","kind":"article","title":"Modular Development","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"seeAlsoSections":[{"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,"title":"Advanced Topics"}],"variants":[{"paths":["\/documentation\/factory\/cycle"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"kind":"article","primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","type":"heading","text":"Overview","level":2},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"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":"paragraph"},{"code":["let demo = Container.shared.cycleDemo()"],"type":"codeListing","syntax":"swift"},{"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."}],"type":"paragraph"},{"text":"The Players","type":"heading","level":2,"anchor":"The-Players"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Consider the following set of classes and protocols:"}]},{"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":"codeListing"},{"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."}],"type":"paragraph"},{"text":"The Registrations","anchor":"The-Registrations","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"text":"So let’s look next at the Factory registrations.","type":"text"}]},{"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":[{"text":"So Factory is called again to make an aService. But that Factory punts and calls ","type":"text"},{"inlineContent":[{"type":"text","text":"another"}],"type":"emphasis"},{"type":"text","text":" Factory to get an instance of implementsAB."}]},{"inlineContent":[{"type":"text","text":"That Factory, in turn, asks Swift to make ImplementsAB, but again, "},{"type":"emphasis","inlineContent":[{"text":"that","type":"text"}]},{"text":" object needs to initialize with a NetworkService. Another call through Factory.","type":"text"}],"type":"paragraph"},{"type":"heading","level":2,"text":"Tracing the Resolution Cycle","anchor":"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.)"}]},{"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":"codeListing","syntax":null},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"And with that Swift provides us with a fully initialized instance of CycleDemo and its dependencies.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"That’s a resolution cycle.","type":"text"}]},{"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"},{"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."}]},{"text":"Missing Preferences","anchor":"Missing-Preferences","type":"heading","level":2},{"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."}]},{"inlineContent":[{"type":"text","text":"Kicking off its own resolution cycle."}],"type":"paragraph"},{"type":"heading","text":"The Missing Graph","level":2,"anchor":"The-Missing-Graph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Just for fun, let’s consider what we’d see if we did:"}]},{"syntax":"swift","code":["let demo = CycleDemo()"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s the trace."}]},{"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":"codeListing"},{"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"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"paragraph","inlineContent":[{"text":"Why? Let’s look at the class again.","type":"text"}]},{"code":["class CycleDemo {"," @Injected(\\.aService) var aService: AServiceType"," @Injected(\\.bService) var bService: BServiceType","}"],"syntax":"swift","type":"codeListing"},{"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."}]},{"inlineContent":[{"text":"And then Swift asks the bService property wrapper to initialize and it does. And so a second resolution cycle starts… and ends.","type":"text"}],"type":"paragraph"},{"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."}]},{"inlineContent":[{"type":"text","text":"Swap out implementsAB’s graph scope for, say, singleton, and you’d see the following:"}],"type":"paragraph"},{"syntax":null,"type":"codeListing","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.)"}]},{"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"},{"type":"paragraph","inlineContent":[{"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.","type":"text"}]}]}],"metadata":{"title":"Resolution Cycles","role":"article","roleHeading":"Article","modules":[{"name":"Factory"}]},"schemaVersion":{"patch":0,"minor":3,"major":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Cycle"},"abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"references":{"doc://Factory/documentation/Factory/Tags":{"url":"\/documentation\/factory\/tags","identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","role":"article","kind":"article","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"type":"topic","title":"Tags"},"doc://Factory/documentation/Factory/Modifiers":{"kind":"article","abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"title":"Factory Modifiers","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","role":"article","type":"topic","url":"\/documentation\/factory\/modifiers"},"doc://Factory/documentation/Factory/Functional":{"url":"\/documentation\/factory\/functional","identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","role":"article","kind":"article","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"type":"topic","title":"Functional Injection"},"doc://Factory/documentation/Factory/Design":{"url":"\/documentation\/factory\/design","identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","role":"article","kind":"article","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"type":"topic","title":"Designing Factory"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Optionals":{"url":"\/documentation\/factory\/optionals","identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","role":"article","kind":"article","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"type":"topic","title":"Optionals and Dynamic Registration"},"doc://Factory/documentation/Factory/Modules":{"url":"\/documentation\/factory\/modules","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","role":"article","kind":"article","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"type":"topic","title":"Modular Development"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/debugging.json b/docs/data/documentation/factory/debugging.json index 45fea8b9..627d067e 100644 --- a/docs/data/documentation/factory/debugging.json +++ b/docs/data/documentation/factory/debugging.json @@ -1 +1 @@ -{"abstract":[{"text":"Additional support for debugging resolution cycles, dependency chains and other issue.","type":"text"}],"primaryContentSections":[{"content":[{"text":"Tracing the Resolution Cycle","level":2,"type":"heading","anchor":"Tracing-the-Resolution-Cycle"},{"type":"paragraph","inlineContent":[{"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":"text"},{"isActive":true,"type":"reference","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"]},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"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":[{"text":"Turning on a trace can be helpful in testing when you want to get an idea of an object’s dependency tree.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that enabling trace logging enables it for "},{"type":"emphasis","inlineContent":[{"type":"text","text":"all"}]},{"text":" containers.","type":"text"}]},{"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."}]},{"text":"Logging","level":2,"type":"heading","anchor":"Logging"},{"type":"paragraph","inlineContent":[{"text":"Trace logs are usually just printed to the system log, but you can change that behavior if needed.","type":"text"}]},{"syntax":"swift","type":"codeListing","code":["Container.shared.manager.logger = {"," MyLogger.debug(\"Factory: \\($0)\")","}"]},{"inlineContent":[{"text":"Note this changes the logging behavior for ","type":"text"},{"type":"emphasis","inlineContent":[{"text":"all","type":"text"}]},{"type":"text","text":" containers."}],"type":"paragraph"},{"type":"heading","anchor":"Circular-Dependency-Chain-Detection","text":"Circular Dependency Chain Detection","level":2},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"inlineContent":[{"type":"text","text":"That’s a Circular Dependency Chain."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Factory can detect such things and warn you about them during the development process.","type":"text"}]},{"inlineContent":[{"text":"The subject’s a bit involved, so there’s an entire page devoted to it.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"See "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","isActive":true},{"text":".","type":"text"}],"type":"paragraph"}],"kind":"content"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/debugging"]}],"kind":"article","schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Debugging"},"metadata":{"roleHeading":"Article","role":"article","modules":[{"name":"Factory"}],"title":"Debugging"},"sections":[],"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}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"references":{"doc://Factory/documentation/Factory/Testing":{"title":"Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"url":"\/documentation\/factory\/testing","kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","role":"article"},"doc://Factory/documentation/Factory/Contexts":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","title":"Contexts","type":"topic","role":"article","abstract":[{"text":"Changing injection results under special circumstances.","type":"text"}],"kind":"article","url":"\/documentation\/factory\/contexts"},"doc://Factory/documentation/Factory/Previews":{"abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","kind":"article","title":"SwiftUI Previews","url":"\/documentation\/factory\/previews","type":"topic","role":"article"},"doc://Factory/documentation/Factory/Chains":{"abstract":[{"type":"text","text":"Detecting and solving Circular Dependency Chains."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","kind":"article","title":"Circular Dependency Chains","url":"\/documentation\/factory\/chains","type":"topic","role":"article"},"doc://Factory/documentation/Factory/Cycle":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","title":"Resolution Cycles","url":"\/documentation\/factory\/cycle","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"role":"article"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"kind":"article","schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"metadata":{"modules":[{"name":"Factory"}],"role":"article","roleHeading":"Article","title":"Debugging"},"seeAlsoSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Previews","doc:\/\/Factory\/documentation\/Factory\/Testing","doc:\/\/Factory\/documentation\/Factory\/Contexts","doc:\/\/Factory\/documentation\/Factory\/Chains"],"generated":true,"title":"Development and Testing"}],"abstract":[{"text":"Additional support for debugging resolution cycles, dependency chains and other issue.","type":"text"}],"primaryContentSections":[{"kind":"content","content":[{"anchor":"Tracing-the-Resolution-Cycle","level":2,"text":"Tracing the Resolution Cycle","type":"heading"},{"inlineContent":[{"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":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle"},{"type":"text","text":"."}],"type":"paragraph"},{"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":"codeListing","syntax":null},{"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"},{"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":[{"text":"Just toggle the trace flag to enable\/disable logging.","type":"text"}]},{"syntax":"swift","code":["Container.shared.manager.trace.toggle()"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"Turning on a trace can be helpful in testing when you want to get an idea of an object’s dependency tree.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"Note that enabling trace logging enables it for ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"all"}]},{"text":" containers.","type":"text"}]},{"type":"paragraph","inlineContent":[{"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.","type":"text"}]},{"text":"Logging","anchor":"Logging","level":2,"type":"heading"},{"inlineContent":[{"type":"text","text":"Trace logs are usually just printed to the system log, but you can change that behavior if needed."}],"type":"paragraph"},{"syntax":"swift","code":["Container.shared.manager.logger = {"," MyLogger.debug(\"Factory: \\($0)\")","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"Note this changes the logging behavior for ","type":"text"},{"inlineContent":[{"text":"all","type":"text"}],"type":"emphasis"},{"type":"text","text":" containers."}]},{"level":2,"text":"Circular Dependency Chain Detection","type":"heading","anchor":"Circular-Dependency-Chain-Detection"},{"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"},{"type":"paragraph","inlineContent":[{"type":"text","text":"That’s a Circular Dependency Chain."}]},{"type":"paragraph","inlineContent":[{"text":"Factory can detect such things and warn you about them during the development process.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The subject’s a bit involved, so there’s an entire page devoted to it."}]},{"type":"paragraph","inlineContent":[{"text":"See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","isActive":true,"type":"reference"},{"type":"text","text":"."}]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Debugging"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/debugging"]}],"references":{"doc://Factory/documentation/Factory/Chains":{"title":"Circular Dependency Chains","url":"\/documentation\/factory\/chains","abstract":[{"text":"Detecting and solving Circular Dependency Chains.","type":"text"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","type":"topic","role":"article"},"doc://Factory/documentation/Factory/Previews":{"title":"SwiftUI Previews","url":"\/documentation\/factory\/previews","abstract":[{"text":"Mocking dependencies for SwiftUI Previews.","type":"text"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","type":"topic","role":"article"},"doc://Factory/documentation/Factory/Contexts":{"abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"type":"topic","role":"article","title":"Contexts","kind":"article","url":"\/documentation\/factory\/contexts","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Cycle":{"url":"\/documentation\/factory\/cycle","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","role":"article","kind":"article","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"type":"topic","title":"Resolution Cycles"},"doc://Factory/documentation/Factory/Testing":{"title":"Testing","url":"\/documentation\/factory\/testing","abstract":[{"text":"Using Factory for Unit and UI Testing.","type":"text"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","type":"topic","role":"article"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/design.json b/docs/data/documentation/factory/design.json index 13eb4d55..eb29db55 100644 --- a/docs/data/documentation/factory/design.json +++ b/docs/data/documentation/factory/design.json @@ -1 +1 @@ -{"primaryContentSections":[{"content":[{"type":"heading","level":2,"text":"Factory 1.0","anchor":"Factory-10"},{"type":"paragraph","inlineContent":[{"text":"The first dependency injection system I wrote was ","type":"text"},{"identifier":"https:\/\/github.com\/hmlongco\/Resolver","type":"reference","isActive":true},{"type":"text","text":". That open source project, while quite powerful and still in use in many applications, suffered from a few drawbacks."}]},{"items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Resolver required pre-registration of all services up front."}]}]},{"content":[{"inlineContent":[{"type":"text","text":"Resolver uses type inference to dynamically find and return registered services from a container."}],"type":"paragraph"}]}],"type":"orderedList"},{"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"},{"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."}]},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"I also wanted something simple, fast, clean, and easy to use.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Could I have my cake and eat it too?"}]},{"inlineContent":[{"type":"text","text":"Turns out I could."}],"type":"paragraph"},{"text":"A Simple Example","type":"heading","anchor":"A-Simple-Example","level":2},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"Factory is no exception. Here’s a simple dependency registration as defined for Factory 1.0.","type":"text"}],"type":"paragraph"},{"code":["extension Container {"," static let myService = Factory { "," MyService()"," }","}"],"type":"codeListing","syntax":"swift"},{"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"},{"type":"paragraph","inlineContent":[{"text":"Injecting and using the service where needed is equally straightforward. Here’s one way to do it.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {"," @Injected(Container.myService) private var myService"," ...","}"]},{"inlineContent":[{"text":"Here our view model uses one of Factory 1.0’s ","type":"text"},{"type":"codeVoice","code":"@Injected"},{"type":"text","text":" property wrappers to request the desired dependency. Similar to "},{"code":"@Environment","type":"codeVoice"},{"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":[{"text":"must","type":"text"}]},{"text":" define a factory. That factory ","type":"text"},{"inlineContent":[{"type":"text","text":"must"}],"type":"emphasis"},{"text":" return the desired type when asked. Fail to do either one and the code will simply not compile.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"As such, Factory is compile-time safe.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"But there was still a problem…","type":"text"}]},{"text":"Service Locator","anchor":"Service-Locator","type":"heading","level":2},{"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","code":["class ContentViewModel: ObservableObject {"," var myService = Container.myService()"," ...","}"],"syntax":"swift"},{"inlineContent":[{"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":"text"}],"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"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s take a look."}]},{"type":"heading","level":2,"text":"Factory 2.0","anchor":"Factory-20"},{"inlineContent":[{"type":"text","text":"Here’s our earlier example, rebuilt for Factory 2.0."}],"type":"paragraph"},{"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":[{"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":"text"}]},{"type":"paragraph","inlineContent":[{"text":"Note that when we create the actual Factory we pass it a reference to the enclosing container.","type":"text"}]},{"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."}]},{"text":"Convenience","level":2,"type":"heading","anchor":"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() }"," }","}"]},{"type":"heading","text":"Scopes","level":2,"anchor":"Scopes"},{"inlineContent":[{"type":"text","text":"Factory scopes work just as they did before, only now they’re defined using a SwiftUI-like modifier syntax."}],"type":"paragraph"},{"type":"codeListing","code":["extension Container {"," var myService: Factory {"," self { MyService() }"," .singleton"," }","}"],"syntax":"swift"},{"level":2,"text":"Container.shared","anchor":"Containershared","type":"heading"},{"type":"paragraph","inlineContent":[{"text":"Each container class defined has a statically allocated ","type":"text"},{"code":"shared","type":"codeVoice"},{"text":" instance associated with it.","type":"text"}]},{"inlineContent":[{"type":"text","text":"This instance can be referenced directly if you still want to use a Service Locator-style pattern."}],"type":"paragraph"},{"syntax":"swift","code":["let service = Container.shared.service()"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"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.","type":"text"}]},{"text":"Passing Containers","type":"heading","anchor":"Passing-Containers","level":2},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["class ContentViewModel {"," let myService: MyServiceType"," init(container: Container) {"," myService = container.myService()"," }","}"]},{"inlineContent":[{"type":"text","text":"Additional examples and methods can be seen on the "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","isActive":true,"type":"reference"},{"text":" page.","type":"text"}],"type":"paragraph"},{"anchor":"Injected-Property-Wrappers","type":"heading","text":"Injected Property Wrappers","level":2},{"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":"paragraph"},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {"," @Injected(\\.myService) var myService","}"]},{"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","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","isActive":true},{"text":", ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","isActive":true},{"type":"text","text":", "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","isActive":true},{"type":"text","text":", and "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"reference","isActive":true},{"text":" for more.","type":"text"}],"type":"paragraph"},{"type":"heading","text":"Breaking Changes","anchor":"Breaking-Changes","level":2},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"I think it’s worth it."}]}],"kind":"content"}],"metadata":{"role":"article","title":"Designing Factory","modules":[{"name":"Factory"}],"roleHeading":"Article"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"generated":true,"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"],"title":"Advanced Topics"}],"kind":"article","schemaVersion":{"minor":3,"major":0,"patch":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/design"]}],"abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Design"},"references":{"doc://Factory/documentation/Factory/Modules":{"type":"topic","url":"\/documentation\/factory\/modules","role":"article","kind":"article","title":"Modular Development","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}]},"doc://Factory/documentation/Factory/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."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"title":"LazyInjected","url":"\/documentation\/factory\/lazyinjected","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Functional":{"title":"Functional Injection","identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","url":"\/documentation\/factory\/functional","type":"topic","role":"article","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"kind":"article"},"doc://Factory/documentation/Factory/Resolutions":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","kind":"article","abstract":[{"text":"There are many ways to use Factory to resolve dependencies. Here are a few examples.","type":"text"}],"title":"Sample Resolutions","url":"\/documentation\/factory\/resolutions","role":"article"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Optionals":{"type":"topic","kind":"article","abstract":[{"text":"With Factory registrations can be performed at any time.","type":"text"}],"title":"Optionals and Dynamic Registration","identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","url":"\/documentation\/factory\/optionals","role":"article"},"doc://Factory/documentation/Factory/Modifiers":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","title":"Factory Modifiers","url":"\/documentation\/factory\/modifiers","abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"role":"article"},"doc://Factory/documentation/Factory/InjectedObject":{"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","role":"symbol","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"kind":"symbol","type":"topic","title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}]},"doc://Factory/documentation/Factory/Injected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","role":"symbol","type":"topic","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"title":"Injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]},"doc://Factory/documentation/Factory/Tags":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","title":"Tags","url":"\/documentation\/factory\/tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"role":"article"},"https://github.com/hmlongco/Resolver":{"url":"https:\/\/github.com\/hmlongco\/Resolver","type":"link","identifier":"https:\/\/github.com\/hmlongco\/Resolver","titleInlineContent":[{"type":"text","text":"Resolver"}],"title":"Resolver"},"doc://Factory/documentation/Factory/Cycle":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","title":"Resolution Cycles","url":"\/documentation\/factory\/cycle","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"role":"article"}}} \ No newline at end of file +{"seeAlsoSections":[{"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"],"title":"Advanced Topics","generated":true}],"variants":[{"paths":["\/documentation\/factory\/design"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"article","primaryContentSections":[{"content":[{"text":"Factory 1.0","anchor":"Factory-10","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"text":"The first dependency injection system I wrote was ","type":"text"},{"isActive":true,"identifier":"https:\/\/github.com\/hmlongco\/Resolver","type":"reference"},{"text":". That open source project, while quite powerful and still in use in many applications, suffered from a few drawbacks.","type":"text"}]},{"items":[{"content":[{"inlineContent":[{"type":"text","text":"Resolver required pre-registration of all services up front."}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Resolver uses type inference to dynamically find and return registered services from a container."}]}]}],"type":"orderedList"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"inlineContent":[{"text":"I also wanted something simple, fast, clean, and easy to use.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"Could I have my cake and eat it too?"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Turns out I could."}]},{"anchor":"A-Simple-Example","text":"A Simple Example","level":2,"type":"heading"},{"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."}]},{"inlineContent":[{"type":"text","text":"Factory is no exception. Here’s a simple dependency registration as defined for Factory 1.0."}],"type":"paragraph"},{"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 "},{"code":"Factory","type":"codeVoice"},{"text":" to the default container. When called, the factory closure is evaluated and returns an instance of our dependency. That’s it.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"Injecting and using the service where needed is equally straightforward. Here’s one way to do it.","type":"text"}]},{"code":["class ContentViewModel: ObservableObject {"," @Injected(Container.myService) private var myService"," ...","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here our view model uses one of Factory 1.0’s "},{"type":"codeVoice","code":"@Injected"},{"text":" property wrappers to request the desired dependency. Similar to ","type":"text"},{"code":"@Environment","type":"codeVoice"},{"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."}]},{"inlineContent":[{"text":"And that’s the core mechanism. In order to use the property wrapper you ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"must"}]},{"text":" define a factory. That factory ","type":"text"},{"type":"emphasis","inlineContent":[{"text":"must","type":"text"}]},{"text":" return the desired type when asked. Fail to do either one and the code will simply not compile.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"As such, Factory is compile-time safe."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"But there was still a problem…"}]},{"anchor":"Service-Locator","text":"Service Locator","type":"heading","level":2},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"type":"codeListing","code":["class ContentViewModel: ObservableObject {"," var myService = Container.myService()"," ...","}"],"syntax":"swift"},{"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."}]},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"Let’s take a look."}],"type":"paragraph"},{"text":"Factory 2.0","type":"heading","anchor":"Factory-20","level":2},{"type":"paragraph","inlineContent":[{"text":"Here’s our earlier example, rebuilt for Factory 2.0.","type":"text"}]},{"syntax":"swift","type":"codeListing","code":["extension Container {"," var myService: Factory {"," Factory(self) { "," MyService()"," }"," }","}"]},{"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":[{"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":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Note that when we create the actual Factory we pass it a reference to the enclosing container.","type":"text"}]},{"inlineContent":[{"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.","type":"text"}],"type":"paragraph"},{"text":"Convenience","anchor":"Convenience","type":"heading","level":2},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"code":["extension Container {"," var myService: Factory {"," self { MyService() }"," }","}"],"type":"codeListing","syntax":"swift"},{"type":"heading","level":2,"text":"Scopes","anchor":"Scopes"},{"inlineContent":[{"type":"text","text":"Factory scopes work just as they did before, only now they’re defined using a SwiftUI-like modifier syntax."}],"type":"paragraph"},{"syntax":"swift","code":["extension Container {"," var myService: Factory {"," self { MyService() }"," .singleton"," }","}"],"type":"codeListing"},{"anchor":"Containershared","level":2,"type":"heading","text":"Container.shared"},{"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"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This instance can be referenced directly if you still want to use a Service Locator-style pattern."}]},{"code":["let service = Container.shared.service()"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"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.","type":"text"}],"type":"paragraph"},{"type":"heading","text":"Passing Containers","level":2,"anchor":"Passing-Containers"},{"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":"paragraph"},{"syntax":"swift","code":["class ContentViewModel {"," let myService: MyServiceType"," init(container: Container) {"," myService = container.myService()"," }","}"],"type":"codeListing"},{"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","text":"Injected Property Wrappers","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"text":"Property wrappers like @Injected and @LazyInjected always reference the ","type":"text"},{"type":"codeVoice","code":"shared"},{"type":"text","text":" container for that class type."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {"," @Injected(\\.myService) var myService","}"]},{"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 "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected"},{"type":"text","text":", "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","type":"reference","isActive":true},{"type":"text","text":", "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"},{"type":"text","text":", and "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject"},{"text":" for more.","type":"text"}],"type":"paragraph"},{"type":"heading","text":"Breaking Changes","anchor":"Breaking-Changes","level":2},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"I think it’s worth it."}]}],"kind":"content"}],"metadata":{"modules":[{"name":"Factory"}],"title":"Designing Factory","roleHeading":"Article","role":"article"},"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"}],"references":{"doc://Factory/documentation/Factory/Resolutions":{"url":"\/documentation\/factory\/resolutions","title":"Sample Resolutions","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","role":"article","abstract":[{"text":"There are many ways to use Factory to resolve dependencies. Here are a few examples.","type":"text"}],"kind":"article","type":"topic"},"doc://Factory/documentation/Factory/Cycle":{"url":"\/documentation\/factory\/cycle","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","role":"article","kind":"article","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"type":"topic","title":"Resolution Cycles"},"doc://Factory/documentation/Factory/Injected":{"kind":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","navigatorTitle":[{"text":"Injected","kind":"identifier"}],"abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"kind":"symbol","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"type":"topic","url":"\/documentation\/factory\/weaklazyinjected"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"InjectedObject","kind":"identifier"}],"abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","kind":"symbol","navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}]},"doc://Factory/documentation/Factory/Optionals":{"url":"\/documentation\/factory\/optionals","identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","role":"article","kind":"article","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"type":"topic","title":"Optionals and Dynamic Registration"},"https://github.com/hmlongco/Resolver":{"titleInlineContent":[{"type":"text","text":"Resolver"}],"title":"Resolver","identifier":"https:\/\/github.com\/hmlongco\/Resolver","type":"link","url":"https:\/\/github.com\/hmlongco\/Resolver"},"doc://Factory/documentation/Factory/Modifiers":{"kind":"article","abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"title":"Factory Modifiers","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","role":"article","type":"topic","url":"\/documentation\/factory\/modifiers"},"doc://Factory/documentation/Factory/Modules":{"url":"\/documentation\/factory\/modules","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","role":"article","kind":"article","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"type":"topic","title":"Modular Development"},"doc://Factory/documentation/Factory/LazyInjected":{"title":"LazyInjected","type":"topic","url":"\/documentation\/factory\/lazyinjected","role":"symbol","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Tags":{"url":"\/documentation\/factory\/tags","identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","role":"article","kind":"article","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"type":"topic","title":"Tags"},"doc://Factory/documentation/Factory/Functional":{"url":"\/documentation\/factory\/functional","identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","role":"article","kind":"article","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"type":"topic","title":"Functional Injection"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory.json b/docs/data/documentation/factory/factory.json index ddca321d..6b6e37c6 100644 --- a/docs/data/documentation/factory/factory.json +++ b/docs/data/documentation/factory/factory.json @@ -1 +1 @@ -{"relationshipsSections":[{"title":"Conforms To","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"],"type":"conformsTo","kind":"relationships"}],"variants":[{"paths":["\/documentation\/factory\/factory"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory","interfaceLanguage":"swift"},"sections":[],"metadata":{"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}],"title":"Factory","role":"symbol","symbolKind":"struct","roleHeading":"Structure","externalID":"s:7FactoryAAV","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"modules":[{"name":"Factory"}]},"kind":"symbol","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"schemaVersion":{"minor":3,"major":0,"patch":0},"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()"]},{"generated":true,"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"],"title":"Default Implementations"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"text":">","kind":"text"}]}]},{"kind":"content","content":[{"text":"Overview","type":"heading","anchor":"overview","level":2},{"type":"paragraph","inlineContent":[{"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"},{"type":"text","text":" "},{"type":"text","text":"return a previously cached value from the specified scope."}]},{"level":2,"text":"Defining a Factory","type":"heading","anchor":"Defining-a-Factory"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s define a Factory that returns an instance of "},{"code":"ServiceType","type":"codeVoice"},{"type":"text","text":". To do that we need to extend a Factory "},{"type":"codeVoice","code":"Container"},{"type":"text","text":" and within"},{"text":" ","type":"text"},{"type":"text","text":"that container we define a new computed variable of type "},{"code":"Factory","type":"codeVoice"},{"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":"text"}]},{"type":"codeListing","code":["extension Container {"," var service: Factory {"," Factory(self) { MyService() }"," }","}"],"syntax":"swift"},{"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":" "},{"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"},{"type":"text","text":" "},{"text":"(see ","type":"text"},{"code":"callAsFunction()","type":"codeVoice"},{"type":"text","text":" below). Every time we resolve this factory we’ll get a new, unique instance of our object."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Factory also provides a bit of syntactic sugar that lets us do the same thing in a more convenient form,","type":"text"}]},{"type":"codeListing","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"],"syntax":"swift"},{"type":"heading","level":2,"text":"Transient","anchor":"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"},{"text":" ","type":"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":[{"text":"Other operations exist for Factory. See ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"},{"text":".","type":"text"}]}]}],"references":{"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","title":"FactoryModifying Implementations","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory/resolve()":{"abstract":[{"type":"text","text":"Unsugared resolution function."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/resolve()","url":"\/documentation\/factory\/factory\/resolve()","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"title":"resolve()","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Factory/registration":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/registration","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A12RegistrationV","text":"FactoryRegistration","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"abstract":[{"text":"Internal parameters for this Factory including id, container, the factory closure itself, the scope,","type":"text"},{"text":" ","type":"text"},{"text":"and others.","type":"text"}],"kind":"symbol","title":"registration","role":"symbol","url":"\/documentation\/factory\/factory\/registration","type":"topic"},"doc://Factory/documentation/Factory/Factory/callAsFunction()":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"role":"symbol","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"},{"text":" ","type":"text"},{"text":"return a cached value from the specified scope.","type":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","url":"\/documentation\/factory\/factory\/callasfunction()","title":"callAsFunction()","type":"topic"},"doc://Factory/documentation/Factory/Factory/init(_:key:_:)":{"title":"init(_:key:_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/init(_:key:_:)","type":"topic","url":"\/documentation\/factory\/factory\/init(_:key:_:)","role":"symbol","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ManagedContainerP","text":"ManagedContainer"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"text":", () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Public initializer creates a Factory capable of managing dependencies of the desired type."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory/register(factory:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/register(factory:)","type":"topic","abstract":[{"text":"Registers a new factory closure capable of producing an object or service of the desired type.","type":"text"}],"url":"\/documentation\/factory\/factory\/register(factory:)","kind":"symbol","title":"register(factory:)","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"register","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": () -> "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}]}}} \ No newline at end of file +{"metadata":{"roleHeading":"Structure","title":"Factory","role":"symbol","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"externalID":"s:7FactoryAAV","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Factory"}],"symbolKind":"struct"},"kind":"symbol","sections":[],"relationshipsSections":[{"type":"conformsTo","kind":"relationships","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"],"title":"Conforms To"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">","kind":"text"}]}],"kind":"declarations"},{"kind":"content","content":[{"anchor":"overview","text":"Overview","type":"heading","level":2},{"type":"paragraph","inlineContent":[{"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.","type":"text"}]},{"text":"Defining a Factory","level":2,"type":"heading","anchor":"Defining-a-Factory"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s define a Factory that returns an instance of "},{"type":"codeVoice","code":"ServiceType"},{"text":". To do that we need to extend a Factory ","type":"text"},{"type":"codeVoice","code":"Container"},{"text":" and within","type":"text"},{"text":" ","type":"text"},{"text":"that container we define a new computed variable of type ","type":"text"},{"code":"Factory","type":"codeVoice"},{"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."}]},{"code":["extension Container {"," var service: Factory {"," Factory(self) { MyService() }"," }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"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"},{"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":[{"text":"Factory also provides a bit of syntactic sugar that lets us do the same thing in a more convenient form,","type":"text"}]},{"syntax":"swift","type":"codeListing","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"]},{"type":"heading","text":"Transient","anchor":"Transient","level":2},{"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":" "},{"text":"are lightweight and transitory. They’re created when needed and then immediately discarded once their purpose has","type":"text"},{"type":"text","text":" "},{"type":"text","text":"been served."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"Other operations exist for Factory. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","type":"reference","isActive":true},{"text":".","type":"text"}],"type":"paragraph"}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory"]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory\/init(_:key:_:)"]},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory\/registration"],"title":"Instance Properties"},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","doc:\/\/Factory\/documentation\/Factory\/Factory\/register(factory:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/resolve()"]},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"],"generated":true,"title":"Default Implementations"}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Factory/registration":{"title":"registration","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/registration","role":"symbol","url":"\/documentation\/factory\/factory\/registration","abstract":[{"text":"Internal parameters for this Factory including id, container, the factory closure itself, the scope,","type":"text"},{"type":"text","text":" "},{"type":"text","text":"and others."}],"type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12RegistrationV","text":"FactoryRegistration"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","type":"topic","kind":"article","title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory/register(factory:)":{"title":"register(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/register(factory:)","role":"symbol","url":"\/documentation\/factory\/factory\/register(factory:)","abstract":[{"text":"Registers a new factory closure capable of producing an object or service of the desired type.","type":"text"}],"type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": () -> "},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory/callAsFunction()":{"type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"() -> "},{"text":"T","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","url":"\/documentation\/factory\/factory\/callasfunction()","abstract":[{"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"},{"type":"text","text":" "},{"type":"text","text":"return a cached value from the specified scope."}],"kind":"symbol","role":"symbol","title":"callAsFunction()"},"doc://Factory/documentation/Factory/Factory/init(_:key:_:)":{"role":"symbol","type":"topic","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"text":"ManagedContainer","kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ManagedContainerP"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"kind":"text","text":", () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":")"}],"kind":"symbol","title":"init(_:key:_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/init(_:key:_:)","abstract":[{"text":"Public initializer creates a Factory capable of managing dependencies of the desired type.","type":"text"}],"url":"\/documentation\/factory\/factory\/init(_:key:_:)"},"doc://Factory/documentation/Factory/Factory/resolve()":{"role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"kind":"symbol","title":"resolve()","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/resolve()","abstract":[{"text":"Unsugared resolution function.","type":"text"}],"url":"\/documentation\/factory\/factory\/resolve()"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"}}} \ 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 3171c2a2..762968c3 100644 --- a/docs/data/documentation/factory/factory/cached.json +++ b/docs/data/documentation/factory/factory/cached.json @@ -1 +1 @@ -{"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"variants":[{"paths":["\/documentation\/factory\/factory\/cached"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"cached"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}]}]},{"content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .cached","}"],"type":"codeListing"}],"kind":"content"}],"metadata":{"role":"symbol","extendedModule":"Factory","symbolKind":"property","modules":[{"name":"Factory"}],"roleHeading":"Instance Property","title":"cached","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"externalID":"s:7Factory0A9ModifyingPAAE6cachedxvp::SYNTHESIZED::s:7FactoryAAV"},"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/cached"},"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"type":"text","text":"."}],"references":{"doc://Factory/documentation/Factory/Factory/cached":{"role":"symbol","type":"topic","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/cached","kind":"symbol","title":"cached","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/factory\/cached"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","title":"FactoryModifying Implementations","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/cached-swift.class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","navigatorTitle":[{"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."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]}}} \ No newline at end of file +{"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/cached"},"metadata":{"role":"symbol","title":"cached","roleHeading":"Instance Property","extendedModule":"Factory","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"cached"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"externalID":"s:7Factory0A9ModifyingPAAE6cachedxvp::SYNTHESIZED::s:7FactoryAAV","modules":[{"name":"Factory"}],"symbolKind":"property"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"text":"get","kind":"keyword"},{"kind":"text","text":" }"}]}],"kind":"declarations"},{"content":[{"text":"Discussion","type":"heading","anchor":"discussion","level":2},{"code":["var service: Factory {"," factory { MyService() }"," .cached","}"],"syntax":"swift","type":"codeListing"}],"kind":"content"}],"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/factory\/cached"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","isActive":true},{"text":".","type":"text"}],"references":{"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Cached","kind":"identifier"}],"type":"topic","navigatorTitle":[{"text":"Cached","kind":"identifier"}],"role":"symbol","kind":"symbol","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","title":"Scope.Cached","url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/Factory/cached":{"url":"\/documentation\/factory\/factory\/cached","abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","isActive":true},{"text":".","type":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/cached","title":"cached","role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"cached","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","type":"topic","kind":"article","title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"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 3d088c5e..fc52d5c6 100644 --- a/docs/data/documentation/factory/factory/callasfunction().json +++ b/docs/data/documentation/factory/factory/callasfunction().json @@ -1 +1 @@ -{"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"},{"text":" ","type":"text"},{"text":"return a cached value from the specified scope.","type":"text"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"callAsFunction","kind":"identifier"},{"kind":"text","text":"() -> "},{"text":"T","kind":"typeIdentifier"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"},{"content":[{"text":"Return Value","level":2,"type":"heading","anchor":"return-value"},{"type":"paragraph","inlineContent":[{"text":"An object or service of the desired type.","type":"text"}]}],"kind":"content"},{"content":[{"text":"Discussion","level":2,"type":"heading","anchor":"discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"To resolve the Factory one simply calls the Factory as a function. Here we use the "},{"code":"shared","type":"codeVoice"},{"text":" container that’s provided for each","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"and every container type."}]},{"code":["let service = Container.shared.service()"],"syntax":"swift","type":"codeListing"},{"inlineContent":[{"text":"The resolved instance may be brand new or Factory may return a cached value from the specified ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"text":".","type":"text"}],"type":"paragraph"},{"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."}]},{"code":["let service = container.service()"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"text":"Finally, you can also use the @Injected property wrapper and specify a keyPaths to the desired dependency.","type":"text"}],"type":"paragraph"},{"code":["@Injected(\\.service) var service: ServiceType"],"type":"codeListing","syntax":"swift"},{"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":" "},{"text":"so the above example is functionally identical to the ","type":"text"},{"code":"Container.shared.service()","type":"codeVoice"},{"type":"text","text":" example shown earlier. Here’s one pointing to"},{"text":" ","type":"text"},{"type":"text","text":"your own container."}],"type":"paragraph"},{"type":"codeListing","code":["@Injected(\\MyCustomContainer.service) var service: ServiceType"],"syntax":"swift"}],"kind":"content"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()"},"sections":[],"metadata":{"role":"symbol","roleHeading":"Instance Method","symbolKind":"method","title":"callAsFunction()","externalID":"s:7FactoryAAV14callAsFunctionxyF","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"callAsFunction","kind":"identifier"},{"text":"() -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"}]},"variants":[{"paths":["\/documentation\/factory\/factory\/callasfunction()"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory/callAsFunction()":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"role":"symbol","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"},{"text":" ","type":"text"},{"text":"return a cached value from the specified scope.","type":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","url":"\/documentation\/factory\/factory\/callasfunction()","title":"callAsFunction()","type":"topic"}}} \ No newline at end of file +{"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"text":"() -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"}]}],"kind":"declarations"},{"kind":"content","content":[{"text":"Return Value","level":2,"type":"heading","anchor":"return-value"},{"type":"paragraph","inlineContent":[{"text":"An object or service of the desired type.","type":"text"}]}]},{"content":[{"type":"heading","anchor":"discussion","text":"Discussion","level":2},{"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"},{"text":" container that’s provided for each","type":"text"},{"text":" ","type":"text"},{"text":"and every container type.","type":"text"}]},{"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 "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"reference","isActive":true},{"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."}]},{"code":["let service = container.service()"],"syntax":"swift","type":"codeListing"},{"inlineContent":[{"text":"Finally, you can also use the @Injected property wrapper and specify a keyPaths to the desired dependency.","type":"text"}],"type":"paragraph"},{"type":"codeListing","code":["@Injected(\\.service) var service: ServiceType"],"syntax":"swift"},{"inlineContent":[{"text":"Unless otherwise specified, the @Injected property wrapper looks for dependencies in the standard shared container provided by Factory,","type":"text"},{"type":"text","text":" "},{"text":"so the above example is functionally identical to the ","type":"text"},{"type":"codeVoice","code":"Container.shared.service()"},{"type":"text","text":" example shown earlier. Here’s one pointing to"},{"text":" ","type":"text"},{"text":"your own container.","type":"text"}],"type":"paragraph"},{"type":"codeListing","code":["@Injected(\\MyCustomContainer.service) var service: ServiceType"],"syntax":"swift"}],"kind":"content"}],"variants":[{"paths":["\/documentation\/factory\/factory\/callasfunction()"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()"},"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"},{"text":" ","type":"text"},{"text":"return a cached value from the specified scope.","type":"text"}],"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"metadata":{"modules":[{"name":"Factory"}],"role":"symbol","roleHeading":"Instance Method","title":"callAsFunction()","externalID":"s:7FactoryAAV14callAsFunctionxyF","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"text":"() -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"}]},"references":{"doc://Factory/documentation/Factory/Factory/callAsFunction()":{"type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"() -> "},{"text":"T","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","url":"\/documentation\/factory\/factory\/callasfunction()","abstract":[{"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"},{"type":"text","text":" "},{"type":"text","text":"return a cached value from the specified scope."}],"kind":"symbol","role":"symbol","title":"callAsFunction()"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"}}} \ 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 ec533220..80096a37 100644 --- a/docs/data/documentation/factory/factory/context(_:factory:).json +++ b/docs/data/documentation/factory/factory/context(_:factory:).json @@ -1 +1 @@ -{"variants":[{"paths":["\/documentation\/factory\/factory\/context(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"sections":[],"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"kind":"symbol","metadata":{"title":"context(_:factory:)","modules":[{"name":"Factory"}],"roleHeading":"Instance Method","extendedModule":"Factory","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE7context_7factoryxAA0A11ContextTypeOd_1TQz1PQzctF::SYNTHESIZED::s:7FactoryAAV","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"context","kind":"identifier"},{"text":"(","kind":"text"},{"text":"FactoryContextType","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A11ContextTypeO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/context(_:factory:)"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"context","kind":"identifier"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"contexts"},{"text":": ","kind":"text"},{"text":"FactoryContextType","preciseIdentifier":"s:7Factory0A11ContextTypeO","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","kind":"typeIdentifier"},{"text":"..., ","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"]}],"kind":"declarations"},{"content":[{"level":2,"type":"heading","text":"Discussion","anchor":"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"}]}],"kind":"content"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory/context(_:factory:)":{"title":"context(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/context(_:factory:)","type":"topic","url":"\/documentation\/factory\/factory\/context(_:factory:)","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"context","kind":"identifier"},{"kind":"text","text":"("},{"text":"FactoryContextType","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A11ContextTypeO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"text":"Registers a factory closure to be used only when running in a specific context.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","type":"topic","kind":"symbol","title":"Factory"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","title":"FactoryModifying Implementations","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/FactoryContextType":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","title":"FactoryContextType","type":"topic","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryContextType","kind":"identifier"}],"role":"symbol","navigatorTitle":[{"text":"FactoryContextType","kind":"identifier"}],"abstract":[{"text":"Context types available for special purpose factory registrations.","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/factorycontexttype"},"doc://Factory/documentation/Factory/Contexts":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","title":"Contexts","type":"topic","role":"article","abstract":[{"text":"Changing injection results under special circumstances.","type":"text"}],"kind":"article","url":"\/documentation\/factory\/contexts"}}} \ No newline at end of file +{"metadata":{"extendedModule":"Factory","roleHeading":"Instance Method","role":"symbol","modules":[{"name":"Factory"}],"symbolKind":"method","title":"context(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"context","kind":"identifier"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:7Factory0A11ContextTypeO","kind":"typeIdentifier","text":"FactoryContextType"},{"kind":"text","text":"..., "},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"externalID":"s:7Factory0A9ModifyingPAAE7context_7factoryxAA0A11ContextTypeOd_1TQz1PQzctF::SYNTHESIZED::s:7FactoryAAV"},"schemaVersion":{"minor":3,"major":0,"patch":0},"sections":[],"kind":"symbol","abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/context(_:factory:)","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"context","kind":"identifier"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"contexts"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","preciseIdentifier":"s:7Factory0A11ContextTypeO","kind":"typeIdentifier","text":"FactoryContextType"},{"kind":"text","text":"..., "},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]},{"content":[{"text":"Discussion","level":2,"type":"heading","anchor":"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":[{"text":"See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","isActive":true}]}],"kind":"content"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/context(_:factory:)"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Factory/context(_:factory:)":{"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"type":"topic","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"context","kind":"identifier"},{"text":"(","kind":"text"},{"text":"FactoryContextType","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A11ContextTypeO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"title":"context(_:factory:)","kind":"symbol","url":"\/documentation\/factory\/factory\/context(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/context(_:factory:)"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","type":"topic","kind":"article","title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/FactoryContextType":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"text":"Context types available for special purpose factory registrations.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","type":"topic","url":"\/documentation\/factory\/factorycontexttype"},"doc://Factory/documentation/Factory/Contexts":{"abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"type":"topic","role":"article","title":"Contexts","kind":"article","url":"\/documentation\/factory\/contexts","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"}}} \ 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 b4e7feda..5c786ff8 100644 --- a/docs/data/documentation/factory/factory/decorator(_:).json +++ b/docs/data/documentation/factory/factory/decorator(_:).json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"decorator"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:s4Voida","text":"Void","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}]}]},{"kind":"content","content":[{"level":2,"type":"heading","anchor":"discussion","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This includes previously created items that may have been cached by a scope."}]},{"code":["var decoratedService: Factory {"," self { ParentChildService() }"," .decorated {"," $0.child.parent = $0"," }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"As shown, decorator can come in handy when you need to perform some operation or manipulation after the fact.","type":"text"}]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/decorator(_:)"]}],"kind":"symbol","sections":[],"metadata":{"roleHeading":"Instance Method","symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE9decoratoryxy1TQzcF::SYNTHESIZED::s:7FactoryAAV","role":"symbol","extendedModule":"Factory","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"decorator","kind":"identifier"},{"kind":"text","text":"(("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"title":"decorator(_:)"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/decorator(_:)","interfaceLanguage":"swift"},"abstract":[{"text":"Adds a factory specific decorator. The decorator will be ","type":"text"},{"inlineContent":[{"text":"always","type":"text"}],"type":"emphasis"},{"text":" be called with the resolved dependency","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"for further examination or manipulation."}],"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/Factory/decorator(_:)":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:s4Voida","text":"Void","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factory\/decorator(_:)","role":"symbol","type":"topic","kind":"symbol","title":"decorator(_:)","abstract":[{"text":"Adds a factory specific decorator. The decorator will be ","type":"text"},{"inlineContent":[{"type":"text","text":"always"}],"type":"emphasis"},{"text":" be called with the resolved dependency","type":"text"},{"text":" ","type":"text"},{"text":"for further examination or manipulation.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/decorator(_:)"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","title":"FactoryModifying Implementations","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/decorator(_:)","interfaceLanguage":"swift"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"inlineContent":[{"type":"text","text":"always"}],"type":"emphasis"},{"type":"text","text":" be called with the resolved dependency"},{"text":" ","type":"text"},{"text":"for further examination or manipulation.","type":"text"}],"variants":[{"paths":["\/documentation\/factory\/factory\/decorator(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"decorator","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"level":2,"text":"Discussion","type":"heading","anchor":"discussion"},{"inlineContent":[{"text":"This includes previously created items that may have been cached by a scope.","type":"text"}],"type":"paragraph"},{"code":["var decoratedService: Factory {"," self { ParentChildService() }"," .decorated {"," $0.child.parent = $0"," }","}"],"syntax":"swift","type":"codeListing"},{"inlineContent":[{"type":"text","text":"As shown, decorator can come in handy when you need to perform some operation or manipulation after the fact."}],"type":"paragraph"}]}],"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"externalID":"s:7Factory0A9ModifyingPAAE9decoratoryxy1TQzcF::SYNTHESIZED::s:7FactoryAAV","role":"symbol","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"text":"((","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"modules":[{"name":"Factory"}],"extendedModule":"Factory","roleHeading":"Instance Method","title":"decorator(_:)"},"references":{"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/Factory/decorator(_:)":{"url":"\/documentation\/factory\/factory\/decorator(_:)","role":"symbol","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"text":"((","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:s4Voida","kind":"typeIdentifier","text":"Void"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"text":"Adds a factory specific decorator. The decorator will be ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"always"}]},{"text":" be called with the resolved dependency","type":"text"},{"type":"text","text":" "},{"type":"text","text":"for further examination or manipulation."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/decorator(_:)","type":"topic","title":"decorator(_:)"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","type":"topic","kind":"article","title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations"}}} \ 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 80e6b5c3..c6edbef4 100644 --- a/docs/data/documentation/factory/factory/factorymodifying-implementations.json +++ b/docs/data/documentation/factory/factory/factorymodifying-implementations.json @@ -1 +1 @@ -{"metadata":{"title":"FactoryModifying Implementations","role":"collectionGroup","modules":[{"name":"Factory"}]},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"topicSections":[{"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"],"title":"Instance Properties","generated":true},{"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\/reset(_:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/scope(_:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/timeToLive(_:)"]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/factorymodifying-implementations"]}],"kind":"article","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"},"references":{"doc://Factory/documentation/Factory/Factory/context(_:factory:)":{"title":"context(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/context(_:factory:)","type":"topic","url":"\/documentation\/factory\/factory\/context(_:factory:)","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"context","kind":"identifier"},{"kind":"text","text":"("},{"text":"FactoryContextType","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A11ContextTypeO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"text":"Registers a factory closure to be used only when running in a specific context.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory/cached":{"role":"symbol","type":"topic","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/cached","kind":"symbol","title":"cached","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/factory\/cached"},"doc://Factory/documentation/Factory/Factory/once()":{"url":"\/documentation\/factory\/factory\/once()","title":"once()","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/once()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"once","kind":"identifier"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory/Factory/onDevice(factory:)":{"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol","url":"\/documentation\/factory\/factory\/ondevice(factory:)","title":"onDevice(factory:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDevice(factory:)"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","url":"\/documentation\/factory\/scope\/singleton-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"type":"topic","role":"symbol","title":"Scope.Singleton","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory/onArg(_:factory:)":{"url":"\/documentation\/factory\/factory\/onarg(_:factory:)","title":"onArg(_:factory:)","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArg(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onArg","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/Factory/graph":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/graph","title":"graph","kind":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"graph","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factory\/graph","role":"symbol","abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"type":"topic","url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Shared"}],"abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"role":"symbol"},"doc://Factory/documentation/Factory/Factory/shared":{"type":"topic","url":"\/documentation\/factory\/factory\/shared","role":"symbol","kind":"symbol","title":"shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/shared","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"shared"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","isActive":true,"type":"reference"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/Factory/unique":{"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factory\/unique","kind":"symbol","title":"unique","abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"reference","isActive":true},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/unique","role":"symbol","type":"topic"},"doc://Factory/documentation/Factory/Factory/scope(_:)":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/scope(_:)","type":"topic","abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"reference","isActive":true},{"type":"text","text":"."}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"scope"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC","text":"Scope","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"title":"scope(_:)","url":"\/documentation\/factory\/factory\/scope(_:)","role":"symbol"},"doc://Factory/documentation/Factory/Factory/onDebug(factory:)":{"role":"symbol","url":"\/documentation\/factory\/factory\/ondebug(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDebug(factory:)","type":"topic","title":"onDebug(factory:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onDebug","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory/Factory/onPreview(factory:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onPreview(factory:)","title":"onPreview(factory:)","role":"symbol","abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onPreview"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"type":"topic","url":"\/documentation\/factory\/factory\/onpreview(factory:)","kind":"symbol"},"doc://Factory/documentation/Factory/Factory/reset(_:)":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"text":"(","kind":"text"},{"text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factory\/reset(_:)","role":"symbol","type":"topic","kind":"symbol","title":"reset(_:)","abstract":[{"text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/reset(_:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Factory/timeToLive(_:)":{"kind":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"preciseIdentifier":"c:@T@NSTimeInterval","text":"TimeInterval","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","url":"\/documentation\/factory\/factory\/timetolive(_:)","title":"timeToLive(_:)","abstract":[{"text":"Adds time to live option for scopes. If the dependency has been cached for longer than the timeToLive period the","type":"text"},{"type":"text","text":" "},{"type":"text","text":"cached item will be discarded and a new instance created."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/timeToLive(_:)"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/cached-swift.class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","navigatorTitle":[{"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."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Factory/onSimulator(factory:)":{"abstract":[{"text":"Factory builder shortcut for context(.simulator) { .. }","type":"text"}],"kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onSimulator"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","url":"\/documentation\/factory\/factory\/onsimulator(factory:)","title":"onSimulator(factory:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onSimulator(factory:)"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"title":"Scope.Graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Factory/decorator(_:)":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:s4Voida","text":"Void","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factory\/decorator(_:)","role":"symbol","type":"topic","kind":"symbol","title":"decorator(_:)","abstract":[{"text":"Adds a factory specific decorator. The decorator will be ","type":"text"},{"inlineContent":[{"type":"text","text":"always"}],"type":"emphasis"},{"text":" be called with the resolved dependency","type":"text"},{"text":" ","type":"text"},{"text":"for further examination or manipulation.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/decorator(_:)"},"doc://Factory/documentation/Factory/Factory/singleton":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/singleton","url":"\/documentation\/factory\/factory\/singleton","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","isActive":true},{"text":".","type":"text"}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"singleton","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"singleton","kind":"symbol","role":"symbol","type":"topic"},"doc://Factory/documentation/Factory/Factory/onTest(factory:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onTest(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onTest","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"type":"topic","role":"symbol","title":"onTest(factory:)","url":"\/documentation\/factory\/factory\/ontest(factory:)","abstract":[{"text":"Factory builder shortcut for context(.test) { .. }","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory/onArgs(_:factory:)":{"title":"onArgs(_:factory:)","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onArgs","kind":"identifier"},{"text":"([","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"], ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/factory\/onargs(_:factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArgs(_:factory:)"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"kind":"article","variants":[{"paths":["\/documentation\/factory\/factory\/factorymodifying-implementations"],"traits":[{"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},{"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\/reset(_:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/scope(_:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/timeToLive(_:)"],"generated":true,"title":"Instance Methods"}],"metadata":{"title":"FactoryModifying Implementations","modules":[{"name":"Factory"}],"role":"collectionGroup"},"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"},"schemaVersion":{"major":0,"patch":0,"minor":3},"references":{"doc://Factory/documentation/Factory/Factory/onArg(_:factory:)":{"url":"\/documentation\/factory\/factory\/onarg(_:factory:)","title":"onArg(_:factory:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArg(_:factory:)","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":", ","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}]},"doc://Factory/documentation/Factory/Factory/decorator(_:)":{"url":"\/documentation\/factory\/factory\/decorator(_:)","role":"symbol","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"text":"((","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:s4Voida","kind":"typeIdentifier","text":"Void"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"text":"Adds a factory specific decorator. The decorator will be ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"always"}]},{"text":" be called with the resolved dependency","type":"text"},{"type":"text","text":" "},{"type":"text","text":"for further examination or manipulation."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/decorator(_:)","type":"topic","title":"decorator(_:)"},"doc://Factory/documentation/Factory/Factory/reset(_:)":{"type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"title":"reset(_:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/reset(_:)","kind":"symbol","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."}],"url":"\/documentation\/factory\/factory\/reset(_:)"},"doc://Factory/documentation/Factory/Factory/singleton":{"kind":"symbol","url":"\/documentation\/factory\/factory\/singleton","title":"singleton","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/singleton","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"type":"topic","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Factory/onDevice(factory:)":{"kind":"symbol","url":"\/documentation\/factory\/factory\/ondevice(factory:)","title":"onDevice(factory:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDevice(factory:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onDevice"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"type":"topic","abstract":[{"text":"Factory builder shortcut for context(.device) { .. }","type":"text"}]},"doc://Factory/documentation/Factory/Factory/graph":{"url":"\/documentation\/factory\/factory\/graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/graph","abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol","type":"topic","title":"graph","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"graph"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Cached","kind":"identifier"}],"type":"topic","navigatorTitle":[{"text":"Cached","kind":"identifier"}],"role":"symbol","kind":"symbol","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","title":"Scope.Cached","url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/Factory/onTest(factory:)":{"kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol","title":"onTest(factory:)","type":"topic","url":"\/documentation\/factory\/factory\/ontest(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onTest(factory:)"},"doc://Factory/documentation/Factory/Factory/shared":{"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"type":"topic","url":"\/documentation\/factory\/factory\/shared","role":"symbol","title":"shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/shared","abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","type":"reference","isActive":true},{"text":".","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","title":"Scope.Singleton","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","title":"Scope.Graph","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"navigatorTitle":[{"text":"Graph","kind":"identifier"}],"role":"symbol","abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory/Factory/onPreview(factory:)":{"title":"onPreview(factory:)","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onPreview(factory:)","abstract":[{"text":"Factory builder shortcut for context(.preview) { .. }","type":"text"}],"url":"\/documentation\/factory\/factory\/onpreview(factory:)","role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onPreview","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory/Factory/timeToLive(_:)":{"kind":"symbol","url":"\/documentation\/factory\/factory\/timetolive(_:)","title":"timeToLive(_:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/timeToLive(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"text":"(","kind":"text"},{"preciseIdentifier":"c:@T@NSTimeInterval","text":"TimeInterval","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"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.","type":"text"}],"type":"topic"},"doc://Factory/documentation/Factory/Factory/context(_:factory:)":{"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"type":"topic","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"context","kind":"identifier"},{"text":"(","kind":"text"},{"text":"FactoryContextType","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A11ContextTypeO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"title":"context(_:factory:)","kind":"symbol","url":"\/documentation\/factory\/factory\/context(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/context(_:factory:)"},"doc://Factory/documentation/Factory/Factory/onSimulator(factory:)":{"role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"kind":"symbol","title":"onSimulator(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onSimulator(factory:)","abstract":[{"text":"Factory builder shortcut for context(.simulator) { .. }","type":"text"}],"url":"\/documentation\/factory\/factory\/onsimulator(factory:)"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Shared","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Factory/onDebug(factory:)":{"role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onDebug","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"kind":"symbol","abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"title":"onDebug(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDebug(factory:)","url":"\/documentation\/factory\/factory\/ondebug(factory:)"},"doc://Factory/documentation/Factory/Factory/scope(_:)":{"title":"scope(_:)","url":"\/documentation\/factory\/factory\/scope(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/scope(_:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"scope"},{"text":"(","kind":"text"},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"text":"Defines a dependency scope for this Factory. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true,"type":"reference"},{"type":"text","text":"."}],"kind":"symbol","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"},"doc://Factory/documentation/Factory/Factory/unique":{"role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"unique","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"kind":"symbol","title":"unique","abstract":[{"text":"Syntactic sugar defines defines unique scope. See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/unique","url":"\/documentation\/factory\/factory\/unique"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/Factory/cached":{"url":"\/documentation\/factory\/factory\/cached","abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","isActive":true},{"text":".","type":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/cached","title":"cached","role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"cached","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory/once()":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"type":"topic","url":"\/documentation\/factory\/factory\/once()","role":"symbol","title":"once()","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/once()","abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory/onArgs(_:factory:)":{"kind":"symbol","url":"\/documentation\/factory\/factory\/onargs(_:factory:)","title":"onArgs(_:factory:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArgs(_:factory:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":"], ","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"type":"topic","abstract":[{"text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }","type":"text"}]}}} \ 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 772a0333..71053f52 100644 --- a/docs/data/documentation/factory/factory/graph.json +++ b/docs/data/documentation/factory/factory/graph.json @@ -1 +1 @@ -{"variants":[{"paths":["\/documentation\/factory\/factory\/graph"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/graph","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"symbolKind":"property","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE5graphxvp::SYNTHESIZED::s:7FactoryAAV","modules":[{"name":"Factory"}],"title":"graph","role":"symbol","roleHeading":"Instance Property"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","isActive":true,"type":"reference"},{"type":"text","text":"."}],"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":" { "},{"text":"get","kind":"keyword"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"kind":"content","content":[{"anchor":"discussion","text":"Discussion","type":"heading","level":2},{"code":["var service: Factory {"," factory { MyService() }"," .graph","}"],"type":"codeListing","syntax":"swift"}]}],"references":{"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"title":"Scope.Graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","title":"FactoryModifying Implementations","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory/graph":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/graph","title":"graph","kind":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"graph","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factory\/graph","role":"symbol","abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/graph"]}],"kind":"symbol","sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"graph","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}],"languages":["swift"]}]},{"kind":"content","content":[{"type":"heading","anchor":"discussion","text":"Discussion","level":2},{"syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .graph","}"],"type":"codeListing"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/graph","interfaceLanguage":"swift"},"metadata":{"externalID":"s:7Factory0A9ModifyingPAAE5graphxvp::SYNTHESIZED::s:7FactoryAAV","role":"symbol","symbolKind":"property","extendedModule":"Factory","title":"graph","roleHeading":"Instance Property","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"graph"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"text":".","type":"text"}],"schemaVersion":{"major":0,"patch":0,"minor":3},"references":{"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","title":"Scope.Graph","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"navigatorTitle":[{"text":"Graph","kind":"identifier"}],"role":"symbol","abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","type":"topic","kind":"article","title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory/graph":{"url":"\/documentation\/factory\/factory\/graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/graph","abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol","type":"topic","title":"graph","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"graph"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/init(_:key:_:).json b/docs/data/documentation/factory/factory/init(_:key:_:).json index 50f355a6..16dd5440 100644 --- a/docs/data/documentation/factory/factory/init(_:key:_:).json +++ b/docs/data/documentation/factory/factory/init(_:key:_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"init","kind":"keyword"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"container","kind":"internalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory16ManagedContainerP","text":"ManagedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier","text":"StaticString"},{"text":" = ","kind":"text"},{"kind":"keyword","text":"#function"},{"kind":"text","text":", "},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"factory"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"text":" () -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":")"}]}]},{"kind":"parameters","parameters":[{"name":"container","content":[{"inlineContent":[{"text":"The bound container that manages registrations and scope caching for this Factory. The scope helper functions bind the","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"current container as well defining the scope."}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Hidden value used to differentiate different instances of the same type in the same container."}]}],"name":"key"},{"name":"factory","content":[{"inlineContent":[{"type":"text","text":"A factory closure that produces an object of the desired type when required."}],"type":"paragraph"}]}]}],"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/init(_:key:_:)","interfaceLanguage":"swift"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"abstract":[{"text":"Public initializer creates a Factory capable of managing dependencies of the desired type.","type":"text"}],"variants":[{"paths":["\/documentation\/factory\/factory\/init(_:key:_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"roleHeading":"Initializer","symbolKind":"init","modules":[{"name":"Factory"}],"externalID":"s:7FactoryAAV_3key_AByxGAA16ManagedContainer_p_s12StaticStringVxyctcfc","title":"init(_:key:_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ManagedContainerP","text":"ManagedContainer"},{"kind":"text","text":", "},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"text":"StaticString","preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier"},{"text":", () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":")","kind":"text"}],"role":"symbol"},"schemaVersion":{"major":0,"patch":0,"minor":3},"references":{"doc://Factory/documentation/Factory/Factory/init(_:key:_:)":{"title":"init(_:key:_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/init(_:key:_:)","type":"topic","url":"\/documentation\/factory\/factory\/init(_:key:_:)","role":"symbol","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ManagedContainerP","text":"ManagedContainer"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"text":", () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"Public initializer creates a Factory capable of managing dependencies of the desired type."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"kind":"symbol","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer","role":"symbol","url":"\/documentation\/factory\/managedcontainer"}}} \ No newline at end of file +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/init(_:key:_:)"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/init(_:key:_:)"]}],"sections":[],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"metadata":{"modules":[{"name":"Factory"}],"fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"preciseIdentifier":"s:7Factory16ManagedContainerP","text":"ManagedContainer","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"text":", () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":")","kind":"text"}],"roleHeading":"Initializer","symbolKind":"init","role":"symbol","externalID":"s:7FactoryAAV_3key_AByxGAA16ManagedContainer_p_s12StaticStringVxyctcfc","title":"init(_:key:_:)"},"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"text":"Public initializer creates a Factory capable of managing dependencies of the desired type.","type":"text"}],"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"container"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory16ManagedContainerP","kind":"typeIdentifier","text":"ManagedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"},{"text":", ","kind":"text"},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier","text":"StaticString"},{"kind":"text","text":" = "},{"kind":"keyword","text":"#function"},{"kind":"text","text":", "},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"factory"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"text":" () -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":")"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"},{"kind":"parameters","parameters":[{"content":[{"inlineContent":[{"type":"text","text":"The bound container that manages registrations and scope caching for this Factory. The scope helper functions bind the"},{"type":"text","text":" "},{"text":"current container as well defining the scope.","type":"text"}],"type":"paragraph"}],"name":"container"},{"content":[{"type":"paragraph","inlineContent":[{"text":"Hidden value used to differentiate different instances of the same type in the same container.","type":"text"}]}],"name":"key"},{"name":"factory","content":[{"type":"paragraph","inlineContent":[{"text":"A factory closure that produces an object of the desired type when required.","type":"text"}]}]}]}],"references":{"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ManagedContainer":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"text":"ManagedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"type":"topic","url":"\/documentation\/factory\/managedcontainer","title":"ManagedContainer"},"doc://Factory/documentation/Factory/Factory/init(_:key:_:)":{"role":"symbol","type":"topic","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"text":"ManagedContainer","kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ManagedContainerP"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"kind":"text","text":", () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":")"}],"kind":"symbol","title":"init(_:key:_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/init(_:key:_:)","abstract":[{"text":"Public initializer creates a Factory capable of managing dependencies of the desired type.","type":"text"}],"url":"\/documentation\/factory\/factory\/init(_:key:_:)"}}} \ 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 3ad8a8e0..273cd0d4 100644 --- a/docs/data/documentation/factory/factory/onarg(_:factory:).json +++ b/docs/data/documentation/factory/factory/onarg(_:factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"argument"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"sections":[],"metadata":{"externalID":"s:7Factory0A9ModifyingPAAE5onArg_7factoryxSS_1TQz1PQzctF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","modules":[{"name":"Factory"}],"title":"onArg(_:factory:)","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}]},"schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/onarg(_:factory:)"]}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArg(_:factory:)"},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory/onArg(_:factory:)":{"url":"\/documentation\/factory\/factory\/onarg(_:factory:)","title":"onArg(_:factory:)","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArg(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onArg","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","title":"FactoryModifying Implementations","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"kind":"article","role":"collectionGroup"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onArg","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"argument","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":", ","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArg(_:factory:)","interfaceLanguage":"swift"},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/onarg(_:factory:)"]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"sections":[],"metadata":{"role":"symbol","title":"onArg(_:factory:)","roleHeading":"Instance Method","extendedModule":"Factory","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"externalID":"s:7Factory0A9ModifyingPAAE5onArg_7factoryxSS_1TQz1PQzctF::SYNTHESIZED::s:7FactoryAAV","modules":[{"name":"Factory"}],"symbolKind":"method"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"references":{"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/Factory/onArg(_:factory:)":{"url":"\/documentation\/factory\/factory\/onarg(_:factory:)","title":"onArg(_:factory:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArg(_:factory:)","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":", ","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}]},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","type":"topic","kind":"article","title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"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 2badc14d..aa9b9a6c 100644 --- a/docs/data/documentation/factory/factory/onargs(_:factory:).json +++ b/docs/data/documentation/factory/factory/onargs(_:factory:).json @@ -1 +1 @@ -{"variants":[{"paths":["\/documentation\/factory\/factory\/onargs(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArgs(_:factory:)","interfaceLanguage":"swift"},"sections":[],"abstract":[{"text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }","type":"text"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"metadata":{"roleHeading":"Instance Method","title":"onArgs(_:factory:)","externalID":"s:7Factory0A9ModifyingPAAE6onArgs_7factoryxSaySSG_1TQz1PQzctF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":"], "},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","modules":[{"name":"Factory"}]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"args","kind":"internalParam"},{"text":": [","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":"], "},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]}]}],"schemaVersion":{"major":0,"patch":0,"minor":3},"references":{"doc://Factory/documentation/Factory/Factory/onArgs(_:factory:)":{"title":"onArgs(_:factory:)","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onArgs","kind":"identifier"},{"text":"([","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"], ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/factory\/onargs(_:factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArgs(_:factory:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","title":"FactoryModifying Implementations","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onArgs","kind":"identifier"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"args","kind":"internalParam"},{"kind":"text","text":": ["},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":"], ","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"platforms":["macOS"],"languages":["swift"]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArgs(_:factory:)","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/onargs(_:factory:)"]}],"kind":"symbol","schemaVersion":{"minor":3,"major":0,"patch":0},"metadata":{"title":"onArgs(_:factory:)","roleHeading":"Instance Method","extendedModule":"Factory","symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE6onArgs_7factoryxSaySSG_1TQz1PQzctF::SYNTHESIZED::s:7FactoryAAV","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":"], ","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"modules":[{"name":"Factory"}],"role":"symbol"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"references":{"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Factory/onArgs(_:factory:)":{"kind":"symbol","url":"\/documentation\/factory\/factory\/onargs(_:factory:)","title":"onArgs(_:factory:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArgs(_:factory:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":"], ","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"type":"topic","abstract":[{"text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }","type":"text"}]},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","type":"topic","kind":"article","title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations"}}} \ 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 2a25f570..67609a3b 100644 --- a/docs/data/documentation/factory/factory/once().json +++ b/docs/data/documentation/factory/factory/once().json @@ -1 +1 @@ -{"kind":"symbol","sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/once()","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"variants":[{"paths":["\/documentation\/factory\/factory\/once()"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"extendedModule":"Factory","symbolKind":"method","title":"once()","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"once","kind":"identifier"},{"kind":"text","text":"() -> "},{"text":"Self","kind":"typeIdentifier"}],"roleHeading":"Instance Method","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE4oncexyF::SYNTHESIZED::s:7FactoryAAV"},"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","title":"FactoryModifying Implementations","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/Factory/once()":{"url":"\/documentation\/factory\/factory\/once()","title":"once()","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/once()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"once","kind":"identifier"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]}}} \ No newline at end of file +{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/once()","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/once()"]}],"kind":"symbol","schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"once"},{"text":"() -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","modules":[{"name":"Factory"}],"symbolKind":"method","title":"once()","externalID":"s:7Factory0A9ModifyingPAAE4oncexyF::SYNTHESIZED::s:7FactoryAAV","roleHeading":"Instance Method","extendedModule":"Factory"},"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"once","kind":"identifier"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}]}],"kind":"declarations"}],"sections":[],"references":{"doc://Factory/documentation/Factory/Factory/once()":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"type":"topic","url":"\/documentation\/factory\/factory\/once()","role":"symbol","title":"once()","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/once()","abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","type":"topic","kind":"article","title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations"}}} \ 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 d14790c0..325a587c 100644 --- a/docs/data/documentation/factory/factory/ondebug(factory:).json +++ b/docs/data/documentation/factory/factory/ondebug(factory:).json @@ -1 +1 @@ -{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/ondebug(factory:)"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"kind":"symbol","sections":[],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onDebug","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDebug(factory:)","interfaceLanguage":"swift"},"metadata":{"modules":[{"name":"Factory"}],"role":"symbol","roleHeading":"Instance Method","symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE7onDebug7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","title":"onDebug(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onDebug","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"references":{"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","title":"FactoryModifying Implementations","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Factory/onDebug(factory:)":{"role":"symbol","url":"\/documentation\/factory\/factory\/ondebug(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDebug(factory:)","type":"topic","title":"onDebug(factory:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onDebug","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/ondebug(factory:)"]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"abstract":[{"text":"Factory builder shortcut for context(.debug) { .. }","type":"text"}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"metadata":{"role":"symbol","roleHeading":"Instance Method","extendedModule":"Factory","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onDebug","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"onDebug(factory:)","externalID":"s:7Factory0A9ModifyingPAAE7onDebug7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7FactoryAAV","modules":[{"name":"Factory"}],"symbolKind":"method"},"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDebug(factory:)"},"references":{"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","type":"topic","kind":"article","title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/Factory/onDebug(factory:)":{"role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onDebug","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"kind":"symbol","abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"title":"onDebug(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDebug(factory:)","url":"\/documentation\/factory\/factory\/ondebug(factory:)"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"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 02b4d15e..7937c788 100644 --- a/docs/data/documentation/factory/factory/ondevice(factory:).json +++ b/docs/data/documentation/factory/factory/ondevice(factory:).json @@ -1 +1 @@ -{"abstract":[{"text":"Factory builder shortcut for context(.device) { .. }","type":"text"}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"]}],"kind":"declarations"}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"variants":[{"paths":["\/documentation\/factory\/factory\/ondevice(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDevice(factory:)"},"metadata":{"extendedModule":"Factory","role":"symbol","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE8onDevice7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7FactoryAAV","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onDevice","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"roleHeading":"Instance Method","title":"onDevice(factory:)","symbolKind":"method"},"references":{"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","title":"FactoryModifying Implementations","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/Factory/onDevice(factory:)":{"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol","url":"\/documentation\/factory\/factory\/ondevice(factory:)","title":"onDevice(factory:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDevice(factory:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"metadata":{"extendedModule":"Factory","roleHeading":"Instance Method","title":"onDevice(factory:)","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE8onDevice7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7FactoryAAV","modules":[{"name":"Factory"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onDevice","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDevice(factory:)","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onDevice"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/ondevice(factory:)"]}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"kind":"symbol","sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Factory/onDevice(factory:)":{"kind":"symbol","url":"\/documentation\/factory\/factory\/ondevice(factory:)","title":"onDevice(factory:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDevice(factory:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onDevice"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"type":"topic","abstract":[{"text":"Factory builder shortcut for context(.device) { .. }","type":"text"}]},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","type":"topic","kind":"article","title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"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 b490c424..b50b8795 100644 --- a/docs/data/documentation/factory/factory/onpreview(factory:).json +++ b/docs/data/documentation/factory/factory/onpreview(factory:).json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"variants":[{"paths":["\/documentation\/factory\/factory\/onpreview(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onPreview","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onPreview(factory:)"},"schemaVersion":{"major":0,"patch":0,"minor":3},"sections":[],"kind":"symbol","metadata":{"role":"symbol","symbolKind":"method","roleHeading":"Instance Method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onPreview","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"modules":[{"name":"Factory"}],"extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE9onPreview7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7FactoryAAV","title":"onPreview(factory:)"},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","title":"FactoryModifying Implementations","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory/onPreview(factory:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onPreview(factory:)","title":"onPreview(factory:)","role":"symbol","abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onPreview"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"type":"topic","url":"\/documentation\/factory\/factory\/onpreview(factory:)","kind":"symbol"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"]}]}],"metadata":{"extendedModule":"Factory","modules":[{"name":"Factory"}],"title":"onPreview(factory:)","externalID":"s:7Factory0A9ModifyingPAAE9onPreview7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7FactoryAAV","roleHeading":"Instance Method","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onPreview","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onPreview(factory:)"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/onpreview(factory:)"]}],"sections":[],"schemaVersion":{"patch":0,"major":0,"minor":3},"abstract":[{"text":"Factory builder shortcut for context(.preview) { .. }","type":"text"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"kind":"symbol","references":{"doc://Factory/documentation/Factory/Factory/onPreview(factory:)":{"title":"onPreview(factory:)","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onPreview(factory:)","abstract":[{"text":"Factory builder shortcut for context(.preview) { .. }","type":"text"}],"url":"\/documentation\/factory\/factory\/onpreview(factory:)","role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onPreview","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","type":"topic","kind":"article","title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations"}}} \ 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 d530e701..243b8910 100644 --- a/docs/data/documentation/factory/factory/onsimulator(factory:).json +++ b/docs/data/documentation/factory/factory/onsimulator(factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onSimulator","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onSimulator(factory:)","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/onsimulator(factory:)"]}],"kind":"symbol","sections":[],"metadata":{"title":"onSimulator(factory:)","modules":[{"name":"Factory"}],"roleHeading":"Instance Method","externalID":"s:7Factory0A9ModifyingPAAE11onSimulator7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7FactoryAAV","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onSimulator","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","role":"symbol","extendedModule":"Factory"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"references":{"doc://Factory/documentation/Factory/Factory/onSimulator(factory:)":{"abstract":[{"text":"Factory builder shortcut for context(.simulator) { .. }","type":"text"}],"kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onSimulator"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","url":"\/documentation\/factory\/factory\/onsimulator(factory:)","title":"onSimulator(factory:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onSimulator(factory:)"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","title":"FactoryModifying Implementations","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]}}} \ No newline at end of file +{"schemaVersion":{"patch":0,"minor":3,"major":0},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}]}],"kind":"declarations"}],"metadata":{"roleHeading":"Instance Method","extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE11onSimulator7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7FactoryAAV","role":"symbol","modules":[{"name":"Factory"}],"title":"onSimulator(factory:)","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onSimulator(factory:)","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"abstract":[{"text":"Factory builder shortcut for context(.simulator) { .. }","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/onsimulator(factory:)"]}],"sections":[],"references":{"doc://Factory/documentation/Factory/Factory/onSimulator(factory:)":{"role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"kind":"symbol","title":"onSimulator(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onSimulator(factory:)","abstract":[{"text":"Factory builder shortcut for context(.simulator) { .. }","type":"text"}],"url":"\/documentation\/factory\/factory\/onsimulator(factory:)"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","type":"topic","kind":"article","title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations"}}} \ 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 6dcbc5a3..30094ea7 100644 --- a/docs/data/documentation/factory/factory/ontest(factory:).json +++ b/docs/data/documentation/factory/factory/ontest(factory:).json @@ -1 +1 @@ -{"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onTest(factory:)","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"sections":[],"kind":"symbol","primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onTest","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]}],"kind":"declarations"}],"metadata":{"roleHeading":"Instance Method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onTest","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"modules":[{"name":"Factory"}],"symbolKind":"method","role":"symbol","title":"onTest(factory:)","extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE6onTest7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7FactoryAAV"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/ontest(factory:)"]}],"references":{"doc://Factory/documentation/Factory/Factory/onTest(factory:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onTest(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onTest","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"type":"topic","role":"symbol","title":"onTest(factory:)","url":"\/documentation\/factory\/factory\/ontest(factory:)","abstract":[{"text":"Factory builder shortcut for context(.test) { .. }","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","title":"FactoryModifying Implementations","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"kind":"article","role":"collectionGroup"}}} \ No newline at end of file +{"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"variants":[{"paths":["\/documentation\/factory\/factory\/ontest(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"schemaVersion":{"minor":3,"major":0,"patch":0},"metadata":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onTest","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE6onTest7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","title":"onTest(factory:)","role":"symbol","symbolKind":"method","roleHeading":"Instance Method"},"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"platforms":["macOS"],"languages":["swift"]}]}],"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onTest(factory:)","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/Factory/onTest(factory:)":{"kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol","title":"onTest(factory:)","type":"topic","url":"\/documentation\/factory\/factory\/ontest(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onTest(factory:)"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","type":"topic","kind":"article","title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"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 1920f177..6f2bf3f3 100644 --- a/docs/data/documentation/factory/factory/register(factory:).json +++ b/docs/data/documentation/factory/factory/register(factory:).json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/register(factory:)"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/register(factory:)"},"metadata":{"roleHeading":"Instance Method","modules":[{"name":"Factory"}],"symbolKind":"method","title":"register(factory:)","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"externalID":"s:7FactoryAAV8register7factoryAByxGxyc_tF"},"abstract":[{"type":"text","text":"Registers a new factory closure capable of producing an object or service of the desired type."}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"register","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}]}],"kind":"declarations"},{"kind":"content","content":[{"level":2,"anchor":"discussion","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":" "},{"text":"Factory will evaluate the new closure and return an instance of the newly registered object instead.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"Here’s an example of registering a new Factory closure.","type":"text"}]},{"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":" "},{"text":"used to provide mocks and testing doubles.","type":"text"}]},{"inlineContent":[{"text":"Registration “overrides” are stored in the associated container. If the container ever goes our of scope, so","type":"text"},{"type":"text","text":" "},{"type":"text","text":"will all of its registrations."}],"type":"paragraph"},{"inlineContent":[{"text":"The original factory closure is preserved, and may be restored by resetting the Factory to its original state.","type":"text"}],"type":"paragraph"},{"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."},{"text":" ","type":"text"},{"type":"text","text":"Allows updating registered factory and scope."}]}]}]}]}],"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"sections":[],"references":{"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory/register(factory:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/register(factory:)","type":"topic","abstract":[{"text":"Registers a new factory closure capable of producing an object or service of the desired type.","type":"text"}],"url":"\/documentation\/factory\/factory\/register(factory:)","kind":"symbol","title":"register(factory:)","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"register","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": () -> "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}]},"doc://Factory/documentation/Factory":{"role":"collection","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","type":"topic","kind":"symbol","title":"Factory"}}} \ No newline at end of file +{"abstract":[{"text":"Registers a new factory closure capable of producing an object or service of the desired type.","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"register","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"text":" () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]},{"content":[{"type":"heading","anchor":"discussion","text":"Discussion","level":2},{"inlineContent":[{"text":"This factory overrides the original factory closure and clears the associated scope so that the next time this factory is resolved","type":"text"},{"type":"text","text":" "},{"type":"text","text":"Factory will evaluate the new closure and return an instance of the newly registered object instead."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Here’s an example of registering a new Factory closure.","type":"text"}]},{"code":["container.service.register {"," SomeService()","}"],"syntax":"swift","type":"codeListing"},{"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":" "},{"text":"used to provide mocks and testing doubles.","type":"text"}]},{"inlineContent":[{"type":"text","text":"Registration “overrides” are stored in the associated container. If the container ever goes our of scope, so"},{"type":"text","text":" "},{"text":"will all of its registrations.","type":"text"}],"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":"paragraph"},{"type":"unorderedList","items":[{"content":[{"inlineContent":[{"text":"factory: A new factory closure that produces an object of the desired type when needed.","type":"text"},{"type":"text","text":" "},{"text":"Allows updating registered factory and scope.","type":"text"}],"type":"paragraph"}]}]}],"kind":"content"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/register(factory:)"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/register(factory:)","interfaceLanguage":"swift"},"metadata":{"role":"symbol","roleHeading":"Instance Method","title":"register(factory:)","modules":[{"name":"Factory"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"register"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"externalID":"s:7FactoryAAV8register7factoryAByxGxyc_tF","symbolKind":"method"},"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"kind":"symbol","references":{"doc://Factory/documentation/Factory/Factory/register(factory:)":{"title":"register(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/register(factory:)","role":"symbol","url":"\/documentation\/factory\/factory\/register(factory:)","abstract":[{"text":"Registers a new factory closure capable of producing an object or service of the desired type.","type":"text"}],"type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": () -> "},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"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 f71f011c..1b0a85e2 100644 --- a/docs/data/documentation/factory/factory/registration.json +++ b/docs/data/documentation/factory/factory/registration.json @@ -1 +1 @@ -{"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."}],"sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/registration"},"variants":[{"paths":["\/documentation\/factory\/factory\/registration"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"title":"registration","modules":[{"name":"Factory"}],"role":"symbol","symbolKind":"property","roleHeading":"Instance Property","externalID":"s:7FactoryAAV12registrationAA0A12RegistrationVyytxGvp","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"registration"},{"text":": ","kind":"text"},{"text":"FactoryRegistration","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"text":", ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"registration","kind":"identifier"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12RegistrationV","text":"FactoryRegistration"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"languages":["swift"]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"references":{"doc://Factory/documentation/Factory/Factory/registration":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/registration","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A12RegistrationV","text":"FactoryRegistration","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"abstract":[{"text":"Internal parameters for this Factory including id, container, the factory closure itself, the scope,","type":"text"},{"text":" ","type":"text"},{"text":"and others.","type":"text"}],"kind":"symbol","title":"registration","role":"symbol","url":"\/documentation\/factory\/factory\/registration","type":"topic"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryRegistration":{"title":"FactoryRegistration","type":"topic","url":"\/documentation\/factory\/factoryregistration","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","role":"symbol","navigatorTitle":[{"text":"FactoryRegistration","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryRegistration","kind":"identifier"}],"kind":"symbol","abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}]}}} \ No newline at end of file +{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/registration","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/registration"]}],"sections":[],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"metadata":{"roleHeading":"Instance Property","title":"registration","symbolKind":"property","externalID":"s:7FactoryAAV12registrationAA0A12RegistrationVyytxGvp","role":"symbol","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"text":"<","kind":"text"},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}]},"schemaVersion":{"minor":3,"major":0,"patch":0},"abstract":[{"text":"Internal parameters for this Factory including id, container, the factory closure itself, the scope,","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"and others."}],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A12RegistrationV","kind":"typeIdentifier","text":"FactoryRegistration","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration"},{"text":"<","kind":"text"},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryRegistration":{"url":"\/documentation\/factory\/factoryregistration","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","title":"FactoryRegistration","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"}],"kind":"symbol","role":"symbol","type":"topic"},"doc://Factory/documentation/Factory/Factory/registration":{"title":"registration","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/registration","role":"symbol","url":"\/documentation\/factory\/factory\/registration","abstract":[{"text":"Internal parameters for this Factory including id, container, the factory closure itself, the scope,","type":"text"},{"type":"text","text":" "},{"type":"text","text":"and others."}],"type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12RegistrationV","text":"FactoryRegistration"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"kind":"symbol"}}} \ 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 b97ec96b..47a5ea1a 100644 --- a/docs/data/documentation/factory/factory/reset(_:).json +++ b/docs/data/documentation/factory/factory/reset(_:).json @@ -1 +1 @@ -{"sections":[],"abstract":[{"text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope.","type":"text"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/reset(_:)","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/factory\/factory\/reset(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","schemaVersion":{"patch":0,"minor":3,"major":0},"metadata":{"symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"externalID":"s:7Factory0A9ModifyingPAAE5resetyxAA0A12ResetOptionsOF::SYNTHESIZED::s:7FactoryAAV","role":"symbol","modules":[{"name":"Factory"}],"roleHeading":"Instance Method","title":"reset(_:)","extendedModule":"Factory"},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"options","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"},{"text":" = .all) -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"platforms":["macOS"]}]},{"parameters":[{"name":"options","content":[{"type":"paragraph","inlineContent":[{"text":"options description","type":"text"}]}]}],"kind":"parameters"}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Factory/reset(_:)":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"text":"(","kind":"text"},{"text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factory\/reset(_:)","role":"symbol","type":"topic","kind":"symbol","title":"reset(_:)","abstract":[{"text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/reset(_:)"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","title":"FactoryModifying Implementations","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryResetOptions":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"title":"FactoryResetOptions"}}} \ No newline at end of file +{"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/reset(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"kind":"symbol","primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"options","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"},{"text":" = .all) -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]}],"kind":"declarations"},{"kind":"parameters","parameters":[{"name":"options","content":[{"type":"paragraph","inlineContent":[{"text":"options description","type":"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":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/reset(_:)","interfaceLanguage":"swift"},"metadata":{"modules":[{"name":"Factory"}],"role":"symbol","symbolKind":"method","roleHeading":"Instance Method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"title":"reset(_:)","externalID":"s:7Factory0A9ModifyingPAAE5resetyxAA0A12ResetOptionsOF::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory"},"schemaVersion":{"minor":3,"major":0,"patch":0},"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","title":"FactoryResetOptions","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryResetOptions","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","type":"topic","kind":"article","title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Factory/reset(_:)":{"type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"title":"reset(_:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/reset(_:)","kind":"symbol","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."}],"url":"\/documentation\/factory\/factory\/reset(_:)"}}} \ 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 669ff944..a474a651 100644 --- a/docs/data/documentation/factory/factory/resolve().json +++ b/docs/data/documentation/factory/factory/resolve().json @@ -1 +1 @@ -{"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/resolve()"]}],"kind":"symbol","sections":[],"abstract":[{"text":"Unsugared resolution function.","type":"text"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"metadata":{"modules":[{"name":"Factory"}],"externalID":"s:7FactoryAAV7resolvexyF","roleHeading":"Instance Method","symbolKind":"method","title":"resolve()","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"}],"role":"symbol"},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"() -> "},{"text":"T","kind":"typeIdentifier"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/resolve()","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory/resolve()":{"abstract":[{"type":"text","text":"Unsugared resolution function."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/resolve()","url":"\/documentation\/factory\/factory\/resolve()","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"title":"resolve()","type":"topic","role":"symbol"}}} \ No newline at end of file +{"sections":[],"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Instance Method","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"externalID":"s:7FactoryAAV7resolvexyF","symbolKind":"method","role":"symbol","title":"resolve()"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/resolve()","interfaceLanguage":"swift"},"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"}]}]}],"kind":"symbol","abstract":[{"type":"text","text":"Unsugared resolution function."}],"variants":[{"paths":["\/documentation\/factory\/factory\/resolve()"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Factory/resolve()":{"role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"kind":"symbol","title":"resolve()","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/resolve()","abstract":[{"text":"Unsugared resolution function.","type":"text"}],"url":"\/documentation\/factory\/factory\/resolve()"}}} \ 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 fff9065c..43fc174f 100644 --- a/docs/data/documentation/factory/factory/scope(_:).json +++ b/docs/data/documentation/factory/factory/scope(_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"scope"},{"text":": ","kind":"text"},{"text":"Scope","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"kind":"content","content":[{"level":2,"type":"heading","text":"Discussion","anchor":"discussion"},{"code":["var service: Factory {"," self { MyService() }"," .scope(.session)","}"],"type":"codeListing","syntax":"swift"}]}],"sections":[],"metadata":{"title":"scope(_:)","extendedModule":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"preciseIdentifier":"s:7Factory5ScopeC","text":"Scope","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"externalID":"s:7Factory0A9ModifyingPAAE5scopeyxAA5ScopeCF::SYNTHESIZED::s:7FactoryAAV","roleHeading":"Instance Method","symbolKind":"method","modules":[{"name":"Factory"}]},"variants":[{"paths":["\/documentation\/factory\/factory\/scope(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true},{"type":"text","text":"."}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/scope(_:)"},"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory/scope(_:)":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/scope(_:)","type":"topic","abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"reference","isActive":true},{"type":"text","text":"."}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"scope"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC","text":"Scope","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"title":"scope(_:)","url":"\/documentation\/factory\/factory\/scope(_:)","role":"symbol"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","title":"FactoryModifying Implementations","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory":{"role":"collection","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","type":"topic","kind":"symbol","title":"Factory"}}} \ No newline at end of file +{"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"text":".","type":"text"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/scope(_:)"},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"scope","kind":"identifier"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"scope"},{"kind":"text","text":": "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"content":[{"anchor":"discussion","type":"heading","level":2,"text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .scope(.session)","}"]}],"kind":"content"}],"metadata":{"title":"scope(_:)","roleHeading":"Instance Method","extendedModule":"Factory","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE5scopeyxAA5ScopeCF::SYNTHESIZED::s:7FactoryAAV","symbolKind":"method","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"scope","kind":"identifier"},{"kind":"text","text":"("},{"text":"Scope","preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol"},"variants":[{"paths":["\/documentation\/factory\/factory\/scope(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"kind":"symbol","sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","type":"topic","kind":"article","title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"},"doc://Factory/documentation/Factory/Factory/scope(_:)":{"title":"scope(_:)","url":"\/documentation\/factory\/factory\/scope(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/scope(_:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"scope"},{"text":"(","kind":"text"},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"text":"Defines a dependency scope for this Factory. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true,"type":"reference"},{"type":"text","text":"."}],"kind":"symbol","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"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 909cd793..60d2ab93 100644 --- a/docs/data/documentation/factory/factory/shared.json +++ b/docs/data/documentation/factory/factory/shared.json @@ -1 +1 @@ -{"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"kind":"content","content":[{"anchor":"discussion","text":"Discussion","level":2,"type":"heading"},{"syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .shared","}"],"type":"codeListing"}]}],"variants":[{"paths":["\/documentation\/factory\/factory\/shared"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"role":"symbol","roleHeading":"Instance Property","symbolKind":"property","title":"shared","extendedModule":"Factory","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE6sharedxvp::SYNTHESIZED::s:7FactoryAAV","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"sections":[],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","type":"reference"},{"text":".","type":"text"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/shared"},"references":{"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"type":"topic","url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Shared"}],"abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Factory/shared":{"type":"topic","url":"\/documentation\/factory\/factory\/shared","role":"symbol","kind":"symbol","title":"shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/shared","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"shared"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","isActive":true,"type":"reference"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","title":"FactoryModifying Implementations","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"kind":"article","role":"collectionGroup"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"metadata":{"symbolKind":"property","title":"shared","role":"symbol","roleHeading":"Instance Property","modules":[{"name":"Factory"}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE6sharedxvp::SYNTHESIZED::s:7FactoryAAV"},"variants":[{"paths":["\/documentation\/factory\/factory\/shared"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}]}]},{"kind":"content","content":[{"level":2,"type":"heading","text":"Discussion","anchor":"discussion"},{"syntax":"swift","type":"codeListing","code":["var service: Factory {"," self { MyService() }"," .shared","}"]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/shared","interfaceLanguage":"swift"},"schemaVersion":{"patch":0,"major":0,"minor":3},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","isActive":true,"type":"reference"},{"type":"text","text":"."}],"references":{"doc://Factory/documentation/Factory/Factory/shared":{"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"type":"topic","url":"\/documentation\/factory\/factory\/shared","role":"symbol","title":"shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/shared","abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","type":"reference","isActive":true},{"text":".","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Shared","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","type":"topic","kind":"article","title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"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 629da23c..b75cc950 100644 --- a/docs/data/documentation/factory/factory/singleton.json +++ b/docs/data/documentation/factory/factory/singleton.json @@ -1 +1 @@ -{"sections":[],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"},{"content":[{"text":"Discussion","type":"heading","anchor":"discussion","level":2},{"syntax":"swift","type":"codeListing","code":["var service: Factory {"," self { MyService() }"," .singleton","}"]}],"kind":"content"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/singleton"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/singleton","interfaceLanguage":"swift"},"metadata":{"title":"singleton","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE9singletonxvp::SYNTHESIZED::s:7FactoryAAV","roleHeading":"Instance Property","extendedModule":"Factory","role":"symbol","symbolKind":"property"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","type":"reference","isActive":true},{"text":".","type":"text"}],"schemaVersion":{"minor":3,"patch":0,"major":0},"kind":"symbol","references":{"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","url":"\/documentation\/factory\/scope\/singleton-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"type":"topic","role":"symbol","title":"Scope.Singleton","kind":"symbol"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","title":"FactoryModifying Implementations","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/Factory/singleton":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/singleton","url":"\/documentation\/factory\/factory\/singleton","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","isActive":true},{"text":".","type":"text"}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"singleton","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"singleton","kind":"symbol","role":"symbol","type":"topic"}}} \ No newline at end of file +{"abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","type":"reference","isActive":true},{"type":"text","text":"."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/singleton","interfaceLanguage":"swift"},"metadata":{"roleHeading":"Instance Property","extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE9singletonxvp::SYNTHESIZED::s:7FactoryAAV","title":"singleton","role":"symbol","modules":[{"name":"Factory"}],"symbolKind":"property","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}]},"schemaVersion":{"minor":3,"patch":0,"major":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}]},{"content":[{"level":2,"text":"Discussion","type":"heading","anchor":"discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .singleton","}"]}],"kind":"content"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/singleton"]}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","type":"topic","kind":"article","title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","title":"Scope.Singleton","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/Factory/singleton":{"kind":"symbol","url":"\/documentation\/factory\/factory\/singleton","title":"singleton","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/singleton","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"type":"topic","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"},{"type":"text","text":"."}]}}} \ 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 556a8ff6..19d82b45 100644 --- a/docs/data/documentation/factory/factory/timetolive(_:).json +++ b/docs/data/documentation/factory/factory/timetolive(_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"timeToLive"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"seconds","kind":"internalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"c:@T@NSTimeInterval","kind":"typeIdentifier","text":"TimeInterval"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/timetolive(_:)"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/timeToLive(_:)","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"patch":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"sections":[],"metadata":{"symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"timeToLive","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"extendedModule":"Factory","roleHeading":"Instance Method","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE10timeToLiveyxSdF::SYNTHESIZED::s:7FactoryAAV","title":"timeToLive(_:)","modules":[{"name":"Factory"}]},"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":" "},{"text":"cached item will be discarded and a new instance created.","type":"text"}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/Factory/timeToLive(_:)":{"kind":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"preciseIdentifier":"c:@T@NSTimeInterval","text":"TimeInterval","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","url":"\/documentation\/factory\/factory\/timetolive(_:)","title":"timeToLive(_:)","abstract":[{"text":"Adds time to live option for scopes. If the dependency has been cached for longer than the timeToLive period the","type":"text"},{"type":"text","text":" "},{"type":"text","text":"cached item will be discarded and a new instance created."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/timeToLive(_:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","title":"FactoryModifying Implementations","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"kind":"article","role":"collectionGroup"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/factory\/timetolive(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"timeToLive","kind":"identifier"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"seconds","kind":"internalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"c:@T@NSTimeInterval","text":"TimeInterval","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]}]}],"metadata":{"roleHeading":"Instance Method","extendedModule":"Factory","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"text":"(","kind":"text"},{"preciseIdentifier":"c:@T@NSTimeInterval","text":"TimeInterval","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"title":"timeToLive(_:)","externalID":"s:7Factory0A9ModifyingPAAE10timeToLiveyxSdF::SYNTHESIZED::s:7FactoryAAV","modules":[{"name":"Factory"}],"symbolKind":"method"},"sections":[],"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."}],"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","type":"topic","kind":"article","title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory/timeToLive(_:)":{"kind":"symbol","url":"\/documentation\/factory\/factory\/timetolive(_:)","title":"timeToLive(_:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/timeToLive(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"text":"(","kind":"text"},{"preciseIdentifier":"c:@T@NSTimeInterval","text":"TimeInterval","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"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.","type":"text"}],"type":"topic"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"}}} \ 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 51232926..e80bbf59 100644 --- a/docs/data/documentation/factory/factory/unique.json +++ b/docs/data/documentation/factory/factory/unique.json @@ -1 +1 @@ -{"abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true,"type":"reference"},{"type":"text","text":"."}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}],"platforms":["macOS"]}],"kind":"declarations"},{"content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"code":["var service: Factory {"," self { MyService() }"," .unique","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"While you can add the modifier, Factory’s are unique by default."}]}],"kind":"content"}],"kind":"symbol","metadata":{"symbolKind":"property","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"extendedModule":"Factory","title":"unique","externalID":"s:7Factory0A9ModifyingPAAE6uniquexvp::SYNTHESIZED::s:7FactoryAAV","modules":[{"name":"Factory"}],"roleHeading":"Instance Property","role":"symbol"},"schemaVersion":{"minor":3,"patch":0,"major":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/unique","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/unique"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"sections":[],"references":{"doc://Factory/documentation/Factory/Factory/unique":{"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factory\/unique","kind":"symbol","title":"unique","abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"reference","isActive":true},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/unique","role":"symbol","type":"topic"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","title":"FactoryModifying Implementations","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"kind":"article","role":"collectionGroup"}}} \ No newline at end of file +{"metadata":{"extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE6uniquexvp::SYNTHESIZED::s:7FactoryAAV","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","symbolKind":"property","title":"unique","roleHeading":"Instance Property","modules":[{"name":"Factory"}]},"variants":[{"paths":["\/documentation\/factory\/factory\/unique"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/unique","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"unique","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"kind":"text","text":" }"}]}],"kind":"declarations"},{"kind":"content","content":[{"text":"Discussion","level":2,"type":"heading","anchor":"discussion"},{"code":["var service: Factory {"," self { MyService() }"," .unique","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"While you can add the modifier, Factory’s are unique by default."}]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"symbol","abstract":[{"text":"Syntactic sugar defines defines unique scope. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true,"type":"reference"},{"type":"text","text":"."}],"sections":[],"references":{"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"role":"collectionGroup","type":"topic","kind":"article","title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/Factory/unique":{"role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"unique","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"kind":"symbol","title":"unique","abstract":[{"text":"Syntactic sugar defines defines unique scope. See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/unique","url":"\/documentation\/factory\/factory\/unique"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factoryautoregistering.json b/docs/data/documentation/factory/factoryautoregistering.json new file mode 100644 index 00000000..ceb41f66 --- /dev/null +++ b/docs/data/documentation/factory/factoryautoregistering.json @@ -0,0 +1 @@ +{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryAutoRegistering","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryautoregistering"]}],"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"role":"symbol","fragments":[{"kind":"keyword","text":"typealias"},{"kind":"text","text":" "},{"text":"FactoryAutoRegistering","kind":"identifier"}],"roleHeading":"Type Alias","modules":[{"name":"Factory"}],"title":"FactoryAutoRegistering","externalID":"s:7Factory0A15AutoRegisteringa","symbolKind":"typealias","navigatorTitle":[{"text":"FactoryAutoRegistering","kind":"identifier"}]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"typealias","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryAutoRegistering"},{"text":" = ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","preciseIdentifier":"s:7Factory15AutoRegisteringP","kind":"typeIdentifier","text":"AutoRegistering"}]}],"kind":"declarations"}],"sections":[],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/AutoRegistering":{"title":"AutoRegistering","abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"text":".","type":"text"}],"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"AutoRegistering","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"AutoRegistering"}],"url":"\/documentation\/factory\/autoregistering","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering"},"doc://Factory/documentation/Factory/FactoryAutoRegistering":{"title":"FactoryAutoRegistering","abstract":[],"fragments":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryAutoRegistering","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryAutoRegistering"}],"url":"\/documentation\/factory\/factoryautoregistering","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryAutoRegistering"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontainer.json b/docs/data/documentation/factory/factorycontainer.json new file mode 100644 index 00000000..a43cd3b1 --- /dev/null +++ b/docs/data/documentation/factory/factorycontainer.json @@ -0,0 +1 @@ +{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContainer","interfaceLanguage":"swift"},"kind":"symbol","sections":[],"metadata":{"externalID":"s:7Factory0A9Containera","symbolKind":"typealias","roleHeading":"Type Alias","navigatorTitle":[{"text":"FactoryContainer","kind":"identifier"}],"fragments":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryContainer","kind":"identifier"}],"modules":[{"name":"Factory"}],"title":"FactoryContainer","role":"symbol"},"schemaVersion":{"minor":3,"patch":0,"major":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"text":"FactoryContainer","kind":"identifier"},{"kind":"text","text":" = "},{"text":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC"}],"platforms":["macOS"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontainer"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Container","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","navigatorTitle":[{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/FactoryContainer":{"url":"\/documentation\/factory\/factorycontainer","title":"FactoryContainer","navigatorTitle":[{"kind":"identifier","text":"FactoryContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContainer","role":"symbol","kind":"symbol","abstract":[],"type":"topic","fragments":[{"text":"typealias","kind":"keyword"},{"text":" ","kind":"text"},{"text":"FactoryContainer","kind":"identifier"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontainermanager.json b/docs/data/documentation/factory/factorycontainermanager.json new file mode 100644 index 00000000..d63716c0 --- /dev/null +++ b/docs/data/documentation/factory/factorycontainermanager.json @@ -0,0 +1 @@ +{"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContainerManager"},{"kind":"text","text":" = "},{"preciseIdentifier":"s:7Factory16ContainerManagerC","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","text":"ContainerManager"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"sections":[],"kind":"symbol","metadata":{"roleHeading":"Type Alias","role":"symbol","fragments":[{"text":"typealias","kind":"keyword"},{"text":" ","kind":"text"},{"text":"FactoryContainerManager","kind":"identifier"}],"title":"FactoryContainerManager","externalID":"s:7Factory0A16ContainerManagera","modules":[{"name":"Factory"}],"symbolKind":"typealias","navigatorTitle":[{"text":"FactoryContainerManager","kind":"identifier"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"schemaVersion":{"minor":3,"major":0,"patch":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContainerManager"},"variants":[{"paths":["\/documentation\/factory\/factorycontainermanager"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","url":"\/documentation\/factory\/containermanager","type":"topic","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}]},"doc://Factory/documentation/Factory/FactoryContainerManager":{"title":"FactoryContainerManager","abstract":[],"fragments":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryContainerManager","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryContainerManager"}],"url":"\/documentation\/factory\/factorycontainermanager","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContainerManager"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontext.json b/docs/data/documentation/factory/factorycontext.json index dcba7895..398b1783 100644 --- a/docs/data/documentation/factory/factorycontext.json +++ b/docs/data/documentation/factory/factorycontext.json @@ -1 +1 @@ -{"metadata":{"roleHeading":"Structure","role":"symbol","externalID":"s:7Factory0A7ContextV","navigatorTitle":[{"text":"FactoryContext","kind":"identifier"}],"symbolKind":"struct","title":"FactoryContext","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"FactoryContext","kind":"identifier"}],"modules":[{"name":"Factory"}]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"FactoryContext","kind":"identifier"}],"languages":["swift"]}]}],"schemaVersion":{"patch":0,"minor":3,"major":0},"topicSections":[{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/arguments","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isDebug","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isPreview","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isSimulator","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isTest","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/runtimeArguments"]},{"title":"Type Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/current"]},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/removeArg(forKey:)","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/setArg(_:forKey:)"],"title":"Type Methods"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"kind":"symbol","sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontext"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext"},"references":{"doc://Factory/documentation/Factory/FactoryContext/isPreview":{"role":"symbol","abstract":[{"text":"Proxy check for application running in preview mode.","type":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isPreview","kind":"symbol","title":"isPreview","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"isPreview","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorycontext\/ispreview"},"doc://Factory/documentation/Factory/FactoryContext/isDebug":{"role":"symbol","abstract":[{"text":"Proxy checks for application running in DEBUG mode.","type":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isDebug","title":"isDebug","kind":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"isDebug","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"}],"url":"\/documentation\/factory\/factorycontext\/isdebug"},"doc://Factory/documentation/Factory/FactoryContext/runtimeArguments":{"role":"symbol","abstract":[{"text":"Runtime arguments","type":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/runtimeArguments","kind":"symbol","title":"runtimeArguments","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"runtimeArguments","kind":"identifier"},{"kind":"text","text":": ["},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":" : "},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"]","kind":"text"}],"url":"\/documentation\/factory\/factorycontext\/runtimearguments"},"doc://Factory/documentation/Factory/FactoryContext/isSimulator":{"role":"symbol","abstract":[{"type":"text","text":"Proxy check for application running in simulator."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isSimulator","title":"isSimulator","kind":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"isSimulator","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorycontext\/issimulator"},"doc://Factory/documentation/Factory/FactoryContext/current":{"role":"symbol","abstract":[{"type":"text","text":"Global current context."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/current","kind":"symbol","title":"current","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"current","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"FactoryContext","preciseIdentifier":"s:7Factory0A7ContextV"}],"url":"\/documentation\/factory\/factorycontext\/current"},"doc://Factory/documentation/Factory/FactoryContext/removeArg(forKey:)":{"role":"symbol","abstract":[{"type":"text","text":"Add argument to global context."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/removeArg(forKey:)","title":"removeArg(forKey:)","kind":"symbol","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"removeArg","kind":"identifier"},{"kind":"text","text":"("},{"text":"forKey","kind":"externalParam"},{"kind":"text","text":": "},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"url":"\/documentation\/factory\/factorycontext\/removearg(forkey:)"},"doc://Factory/documentation/Factory/FactoryContext/arguments":{"role":"symbol","abstract":[{"type":"text","text":"Proxy for application arguments."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/arguments","kind":"symbol","title":"arguments","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"arguments","kind":"identifier"},{"kind":"text","text":": ["},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":"]"}],"url":"\/documentation\/factory\/factorycontext\/arguments"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryContext/setArg(_:forKey:)":{"role":"symbol","abstract":[{"text":"Add argument to global context.","type":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/setArg(_:forKey:)","title":"setArg(_:forKey:)","kind":"symbol","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"setArg","kind":"identifier"},{"kind":"text","text":"("},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":", ","kind":"text"},{"text":"forKey","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":")"}],"url":"\/documentation\/factory\/factorycontext\/setarg(_:forkey:)"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","navigatorTitle":[{"text":"FactoryContext","kind":"identifier"}],"abstract":[],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory/FactoryContext/isTest":{"role":"symbol","abstract":[{"type":"text","text":"Proxy check for application running in test mode."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isTest","title":"isTest","kind":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"isTest","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"url":"\/documentation\/factory\/factorycontext\/istest"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContext"}],"languages":["swift"]}]}],"variants":[{"paths":["\/documentation\/factory\/factorycontext"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","interfaceLanguage":"swift"},"metadata":{"title":"FactoryContext","roleHeading":"Structure","modules":[{"name":"Factory"}],"symbolKind":"struct","externalID":"s:7Factory0A7ContextV","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"FactoryContext","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"role":"symbol"},"topicSections":[{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/arguments","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isDebug","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isPreview","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isSimulator","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isTest","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/runtimeArguments"]},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/current"],"title":"Type Properties"},{"title":"Type Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/removeArg(forKey:)","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/setArg(_:forKey:)"]}],"kind":"symbol","sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory/FactoryContext/setArg(_:forKey:)":{"type":"topic","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"setArg","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":", ","kind":"text"},{"text":"forKey","kind":"externalParam"},{"kind":"text","text":": "},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/setArg(_:forKey:)","url":"\/documentation\/factory\/factorycontext\/setarg(_:forkey:)","abstract":[{"text":"Add argument to global context.","type":"text"}],"kind":"symbol","role":"symbol","title":"setArg(_:forKey:)"},"doc://Factory/documentation/Factory/FactoryContext/removeArg(forKey:)":{"role":"symbol","type":"topic","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"removeArg"},{"text":"(","kind":"text"},{"text":"forKey","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":")"}],"kind":"symbol","title":"removeArg(forKey:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/removeArg(forKey:)","abstract":[{"type":"text","text":"Add argument to global context."}],"url":"\/documentation\/factory\/factorycontext\/removearg(forkey:)"},"doc://Factory/documentation/Factory/FactoryContext/isPreview":{"kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontext\/ispreview","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isPreview","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"isPreview"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}],"abstract":[{"text":"Proxy check for application running in preview mode.","type":"text"}],"type":"topic","title":"isPreview"},"doc://Factory/documentation/Factory/FactoryContext/isDebug":{"abstract":[{"type":"text","text":"Proxy checks for application running in DEBUG mode."}],"type":"topic","kind":"symbol","title":"isDebug","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isDebug","url":"\/documentation\/factory\/factorycontext\/isdebug","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"isDebug"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryContext/current":{"type":"topic","abstract":[{"text":"Global current context.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/current","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"current"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A7ContextV","text":"FactoryContext","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorycontext\/current","role":"symbol","kind":"symbol","title":"current"},"doc://Factory/documentation/Factory/FactoryContext/runtimeArguments":{"kind":"symbol","title":"runtimeArguments","type":"topic","url":"\/documentation\/factory\/factorycontext\/runtimearguments","abstract":[{"type":"text","text":"Runtime arguments"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/runtimeArguments","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"runtimeArguments","kind":"identifier"},{"kind":"text","text":": ["},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":" : ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":"]"}]},"doc://Factory/documentation/Factory/FactoryContext/isTest":{"abstract":[{"type":"text","text":"Proxy check for application running in test mode."}],"url":"\/documentation\/factory\/factorycontext\/istest","type":"topic","title":"isTest","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isTest","kind":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"isTest","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"}],"role":"symbol"},"doc://Factory/documentation/Factory/FactoryContext/isSimulator":{"url":"\/documentation\/factory\/factorycontext\/issimulator","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isSimulator","role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"isSimulator"},{"text":": ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"kind":"symbol","abstract":[{"text":"Proxy check for application running in simulator.","type":"text"}],"type":"topic","title":"isSimulator"},"doc://Factory/documentation/Factory/FactoryContext/arguments":{"title":"arguments","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"arguments","kind":"identifier"},{"text":": [","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":"]","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/arguments","url":"\/documentation\/factory\/factorycontext\/arguments","abstract":[{"text":"Proxy for application arguments.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContext":{"url":"\/documentation\/factory\/factorycontext","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"FactoryContext","kind":"identifier"}],"kind":"symbol","abstract":[],"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"title":"FactoryContext"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontext/arguments.json b/docs/data/documentation/factory/factorycontext/arguments.json index 8406342a..eb4567b6 100644 --- a/docs/data/documentation/factory/factorycontext/arguments.json +++ b/docs/data/documentation/factory/factorycontext/arguments.json @@ -1 +1 @@ -{"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"roleHeading":"Instance Property","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"arguments"},{"text":": [","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":"]"}],"modules":[{"name":"Factory"}],"externalID":"s:7Factory0A7ContextV9argumentsSaySSGvp","role":"symbol","title":"arguments","symbolKind":"property"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontext\/arguments"]}],"abstract":[{"type":"text","text":"Proxy for application arguments."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/arguments","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"arguments"},{"text":": [","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":"]"}],"languages":["swift"]}]}],"references":{"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","navigatorTitle":[{"text":"FactoryContext","kind":"identifier"}],"abstract":[],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory/FactoryContext/arguments":{"role":"symbol","abstract":[{"type":"text","text":"Proxy for application arguments."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/arguments","kind":"symbol","title":"arguments","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"arguments","kind":"identifier"},{"kind":"text","text":": ["},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":"]"}],"url":"\/documentation\/factory\/factorycontext\/arguments"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/arguments","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"arguments"},{"kind":"text","text":": ["},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":"]","kind":"text"}],"languages":["swift"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontext\/arguments"]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"text":"Proxy for application arguments.","type":"text"}],"metadata":{"title":"arguments","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"arguments","kind":"identifier"},{"text":": [","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"]"}],"modules":[{"name":"Factory"}],"symbolKind":"property","roleHeading":"Instance Property","externalID":"s:7Factory0A7ContextV9argumentsSaySSGvp","role":"symbol"},"kind":"symbol","references":{"doc://Factory/documentation/Factory/FactoryContext/arguments":{"title":"arguments","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"arguments","kind":"identifier"},{"text":": [","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":"]","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/arguments","url":"\/documentation\/factory\/factorycontext\/arguments","abstract":[{"text":"Proxy for application arguments.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContext":{"url":"\/documentation\/factory\/factorycontext","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"FactoryContext","kind":"identifier"}],"kind":"symbol","abstract":[],"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"title":"FactoryContext"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontext/current.json b/docs/data/documentation/factory/factorycontext/current.json index 793378a2..20151ca7 100644 --- a/docs/data/documentation/factory/factorycontext/current.json +++ b/docs/data/documentation/factory/factorycontext/current.json @@ -1 +1 @@ -{"sections":[],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"current"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","text":"FactoryContext","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A7ContextV"}]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/current"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"text":"Global current context.","type":"text"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/current","interfaceLanguage":"swift"},"metadata":{"role":"symbol","symbolKind":"property","roleHeading":"Type Property","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"current","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A7ContextV","text":"FactoryContext","kind":"typeIdentifier"}],"modules":[{"name":"Factory"}],"extendedModule":"Factory","externalID":"s:7Factory0A7ContextV7currentACvpZ","title":"current"},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","navigatorTitle":[{"text":"FactoryContext","kind":"identifier"}],"abstract":[],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory/FactoryContext/current":{"role":"symbol","abstract":[{"type":"text","text":"Global current context."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/current","kind":"symbol","title":"current","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"current","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"FactoryContext","preciseIdentifier":"s:7Factory0A7ContextV"}],"url":"\/documentation\/factory\/factorycontext\/current"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"current"},{"text":": ","kind":"text"},{"text":"FactoryContext","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","preciseIdentifier":"s:7Factory0A7ContextV"}],"platforms":["macOS"],"languages":["swift"]}]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"paths":["\/documentation\/factory\/factorycontext\/current"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"type":"text","text":"Global current context."}],"kind":"symbol","metadata":{"extendedModule":"Factory","title":"current","modules":[{"name":"Factory"}],"symbolKind":"property","roleHeading":"Type Property","externalID":"s:7Factory0A7ContextV7currentACvpZ","role":"symbol","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"current","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A7ContextV","text":"FactoryContext","kind":"typeIdentifier"}]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/current"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"sections":[],"references":{"doc://Factory/documentation/Factory/FactoryContext":{"url":"\/documentation\/factory\/factorycontext","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"FactoryContext","kind":"identifier"}],"kind":"symbol","abstract":[],"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"title":"FactoryContext"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryContext/current":{"type":"topic","abstract":[{"text":"Global current context.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/current","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"current"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A7ContextV","text":"FactoryContext","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorycontext\/current","role":"symbol","kind":"symbol","title":"current"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontext/isdebug.json b/docs/data/documentation/factory/factorycontext/isdebug.json index 8f82401f..ebe07aaa 100644 --- a/docs/data/documentation/factory/factorycontext/isdebug.json +++ b/docs/data/documentation/factory/factorycontext/isdebug.json @@ -1 +1 @@ -{"kind":"symbol","sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isDebug"},"metadata":{"roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:7Factory0A7ContextV7isDebugSbvp","modules":[{"name":"Factory"}],"title":"isDebug","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"isDebug"},{"text":": ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontext\/isdebug"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"isDebug","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"}]}],"kind":"declarations"}],"abstract":[{"type":"text","text":"Proxy checks for application running in DEBUG mode."}],"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory/FactoryContext/isDebug":{"role":"symbol","abstract":[{"text":"Proxy checks for application running in DEBUG mode.","type":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isDebug","title":"isDebug","kind":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"isDebug","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"}],"url":"\/documentation\/factory\/factorycontext\/isdebug"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","navigatorTitle":[{"text":"FactoryContext","kind":"identifier"}],"abstract":[],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"sections":[],"metadata":{"externalID":"s:7Factory0A7ContextV7isDebugSbvp","symbolKind":"property","title":"isDebug","modules":[{"name":"Factory"}],"role":"symbol","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"isDebug"},{"kind":"text","text":": "},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"isDebug"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}]}]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isDebug","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/factory\/factorycontext\/isdebug"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","abstract":[{"type":"text","text":"Proxy checks for application running in DEBUG mode."}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryContext":{"url":"\/documentation\/factory\/factorycontext","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"FactoryContext","kind":"identifier"}],"kind":"symbol","abstract":[],"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"title":"FactoryContext"},"doc://Factory/documentation/Factory/FactoryContext/isDebug":{"abstract":[{"type":"text","text":"Proxy checks for application running in DEBUG mode."}],"type":"topic","kind":"symbol","title":"isDebug","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isDebug","url":"\/documentation\/factory\/factorycontext\/isdebug","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"isDebug"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"role":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontext/ispreview.json b/docs/data/documentation/factory/factorycontext/ispreview.json index 78e0f624..61cbfaed 100644 --- a/docs/data/documentation/factory/factorycontext/ispreview.json +++ b/docs/data/documentation/factory/factorycontext/ispreview.json @@ -1 +1 @@ -{"sections":[],"metadata":{"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"isPreview"},{"kind":"text","text":": "},{"text":"Bool","preciseIdentifier":"s:Sb","kind":"typeIdentifier"}],"title":"isPreview","role":"symbol","modules":[{"name":"Factory"}],"symbolKind":"property","roleHeading":"Instance Property","externalID":"s:7Factory0A7ContextV9isPreviewSbvp"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isPreview"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"abstract":[{"type":"text","text":"Proxy check for application running in preview mode."}],"kind":"symbol","schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontext\/ispreview"]}],"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"isPreview","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory/FactoryContext/isPreview":{"role":"symbol","abstract":[{"text":"Proxy check for application running in preview mode.","type":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isPreview","kind":"symbol","title":"isPreview","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"isPreview","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorycontext\/ispreview"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","navigatorTitle":[{"text":"FactoryContext","kind":"identifier"}],"abstract":[],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"abstract":[{"text":"Proxy check for application running in preview mode.","type":"text"}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"isPreview"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"}],"languages":["swift"]}],"kind":"declarations"}],"metadata":{"role":"symbol","roleHeading":"Instance Property","title":"isPreview","externalID":"s:7Factory0A7ContextV9isPreviewSbvp","symbolKind":"property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"isPreview"},{"text":": ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"modules":[{"name":"Factory"}]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isPreview"},"sections":[],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"variants":[{"paths":["\/documentation\/factory\/factorycontext\/ispreview"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryContext":{"url":"\/documentation\/factory\/factorycontext","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"FactoryContext","kind":"identifier"}],"kind":"symbol","abstract":[],"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"title":"FactoryContext"},"doc://Factory/documentation/Factory/FactoryContext/isPreview":{"kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontext\/ispreview","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isPreview","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"isPreview"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}],"abstract":[{"text":"Proxy check for application running in preview mode.","type":"text"}],"type":"topic","title":"isPreview"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontext/issimulator.json b/docs/data/documentation/factory/factorycontext/issimulator.json index ac2a5ddd..21713bfa 100644 --- a/docs/data/documentation/factory/factorycontext/issimulator.json +++ b/docs/data/documentation/factory/factorycontext/issimulator.json @@ -1 +1 @@ -{"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"abstract":[{"type":"text","text":"Proxy check for application running in simulator."}],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"isSimulator"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"schemaVersion":{"major":0,"patch":0,"minor":3},"variants":[{"paths":["\/documentation\/factory\/factorycontext\/issimulator"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"roleHeading":"Instance Property","symbolKind":"property","title":"isSimulator","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"isSimulator"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"modules":[{"name":"Factory"}],"externalID":"s:7Factory0A7ContextV11isSimulatorSbvp","role":"symbol"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isSimulator","interfaceLanguage":"swift"},"kind":"symbol","references":{"doc://Factory/documentation/Factory/FactoryContext/isSimulator":{"role":"symbol","abstract":[{"type":"text","text":"Proxy check for application running in simulator."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isSimulator","title":"isSimulator","kind":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"isSimulator","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorycontext\/issimulator"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","navigatorTitle":[{"text":"FactoryContext","kind":"identifier"}],"abstract":[],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"}}} \ No newline at end of file +{"abstract":[{"text":"Proxy check for application running in simulator.","type":"text"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isSimulator","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"isSimulator","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"}],"languages":["swift"]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/issimulator"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"isSimulator"},{"text":": ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"roleHeading":"Instance Property","role":"symbol","title":"isSimulator","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A7ContextV11isSimulatorSbvp","symbolKind":"property"},"sections":[],"references":{"doc://Factory/documentation/Factory/FactoryContext/isSimulator":{"url":"\/documentation\/factory\/factorycontext\/issimulator","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isSimulator","role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"isSimulator"},{"text":": ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"kind":"symbol","abstract":[{"text":"Proxy check for application running in simulator.","type":"text"}],"type":"topic","title":"isSimulator"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryContext":{"url":"\/documentation\/factory\/factorycontext","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"FactoryContext","kind":"identifier"}],"kind":"symbol","abstract":[],"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"title":"FactoryContext"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontext/istest.json b/docs/data/documentation/factory/factorycontext/istest.json index 2331880b..b4667c5b 100644 --- a/docs/data/documentation/factory/factorycontext/istest.json +++ b/docs/data/documentation/factory/factorycontext/istest.json @@ -1 +1 @@ -{"schemaVersion":{"major":0,"patch":0,"minor":3},"kind":"symbol","abstract":[{"text":"Proxy check for application running in test mode.","type":"text"}],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/istest"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"isTest"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"platforms":["macOS"],"languages":["swift"]}]}],"metadata":{"externalID":"s:7Factory0A7ContextV6isTestSbvp","title":"isTest","modules":[{"name":"Factory"}],"role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"isTest","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"}],"symbolKind":"property","roleHeading":"Instance Property"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isTest"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"sections":[],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","navigatorTitle":[{"text":"FactoryContext","kind":"identifier"}],"abstract":[],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory/FactoryContext/isTest":{"role":"symbol","abstract":[{"type":"text","text":"Proxy check for application running in test mode."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isTest","title":"isTest","kind":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"isTest","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"url":"\/documentation\/factory\/factorycontext\/istest"}}} \ No newline at end of file +{"variants":[{"paths":["\/documentation\/factory\/factorycontext\/istest"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"patch":0,"minor":3,"major":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isTest"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"metadata":{"roleHeading":"Instance Property","externalID":"s:7Factory0A7ContextV6isTestSbvp","symbolKind":"property","title":"isTest","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"isTest","kind":"identifier"},{"kind":"text","text":": "},{"text":"Bool","preciseIdentifier":"s:Sb","kind":"typeIdentifier"}],"modules":[{"name":"Factory"}],"role":"symbol"},"kind":"symbol","abstract":[{"text":"Proxy check for application running in test mode.","type":"text"}],"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"isTest","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}],"platforms":["macOS"],"languages":["swift"]}]}],"references":{"doc://Factory/documentation/Factory/FactoryContext/isTest":{"abstract":[{"type":"text","text":"Proxy check for application running in test mode."}],"url":"\/documentation\/factory\/factorycontext\/istest","type":"topic","title":"isTest","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isTest","kind":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"isTest","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryContext":{"url":"\/documentation\/factory\/factorycontext","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"FactoryContext","kind":"identifier"}],"kind":"symbol","abstract":[],"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"title":"FactoryContext"}}} \ 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 75525e42..83dce786 100644 --- a/docs/data/documentation/factory/factorycontext/removearg(forkey:).json +++ b/docs/data/documentation/factory/factorycontext/removearg(forkey:).json @@ -1 +1 @@ -{"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"sections":[],"schemaVersion":{"patch":0,"minor":3,"major":0},"metadata":{"roleHeading":"Type Method","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"removeArg"},{"text":"(","kind":"text"},{"text":"forKey","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"kind":"text","text":")"}],"extendedModule":"Factory","title":"removeArg(forKey:)","modules":[{"name":"Factory"}],"role":"symbol","externalID":"s:7Factory0A7ContextV9removeArg6forKeyySS_tFZ","symbolKind":"method"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontext\/removearg(forkey:)"]}],"abstract":[{"type":"text","text":"Add argument to global context."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/removeArg(forKey:)","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"removeArg"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"forKey"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"key"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":")","kind":"text"}]}]}],"references":{"doc://Factory/documentation/Factory/FactoryContext/removeArg(forKey:)":{"role":"symbol","abstract":[{"type":"text","text":"Add argument to global context."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/removeArg(forKey:)","title":"removeArg(forKey:)","kind":"symbol","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"removeArg","kind":"identifier"},{"kind":"text","text":"("},{"text":"forKey","kind":"externalParam"},{"kind":"text","text":": "},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"url":"\/documentation\/factory\/factorycontext\/removearg(forkey:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","navigatorTitle":[{"text":"FactoryContext","kind":"identifier"}],"abstract":[],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"}}} \ No newline at end of file +{"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/removeArg(forKey:)","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"removeArg"},{"kind":"text","text":"("},{"kind":"externalParam","text":"forKey"},{"text":" ","kind":"text"},{"text":"key","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":")"}],"languages":["swift"]}]}],"abstract":[{"type":"text","text":"Add argument to global context."}],"metadata":{"role":"symbol","extendedModule":"Factory","roleHeading":"Type Method","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"removeArg","kind":"identifier"},{"kind":"text","text":"("},{"text":"forKey","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":")","kind":"text"}],"title":"removeArg(forKey:)","externalID":"s:7Factory0A7ContextV9removeArg6forKeyySS_tFZ","modules":[{"name":"Factory"}],"symbolKind":"method"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontext\/removearg(forkey:)"]}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/FactoryContext":{"url":"\/documentation\/factory\/factorycontext","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"FactoryContext","kind":"identifier"}],"kind":"symbol","abstract":[],"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"title":"FactoryContext"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryContext/removeArg(forKey:)":{"role":"symbol","type":"topic","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"removeArg"},{"text":"(","kind":"text"},{"text":"forKey","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":")"}],"kind":"symbol","title":"removeArg(forKey:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/removeArg(forKey:)","abstract":[{"type":"text","text":"Add argument to global context."}],"url":"\/documentation\/factory\/factorycontext\/removearg(forkey:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontext/runtimearguments.json b/docs/data/documentation/factory/factorycontext/runtimearguments.json index 2e7957d2..77cf6186 100644 --- a/docs/data/documentation/factory/factorycontext/runtimearguments.json +++ b/docs/data/documentation/factory/factorycontext/runtimearguments.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/runtimeArguments"},"abstract":[{"type":"text","text":"Runtime arguments"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"runtimeArguments"},{"text":": [","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"]"}]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontext\/runtimearguments"]}],"metadata":{"role":"symbol","modules":[{"name":"Factory"}],"roleHeading":"Instance Property","externalID":"s:7Factory0A7ContextV16runtimeArgumentsSDyS2SGvp","title":"runtimeArguments","symbolKind":"property","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"runtimeArguments"},{"kind":"text","text":": ["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":" : ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":"]"}]},"sections":[],"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","navigatorTitle":[{"text":"FactoryContext","kind":"identifier"}],"abstract":[],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory/FactoryContext/runtimeArguments":{"role":"symbol","abstract":[{"text":"Runtime arguments","type":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/runtimeArguments","kind":"symbol","title":"runtimeArguments","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"runtimeArguments","kind":"identifier"},{"kind":"text","text":": ["},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":" : "},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"]","kind":"text"}],"url":"\/documentation\/factory\/factorycontext\/runtimearguments"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/runtimeArguments"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"runtimeArguments","kind":"identifier"},{"kind":"text","text":": ["},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"text":" : ","kind":"text"},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":"]"}],"languages":["swift"]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/runtimearguments"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"kind":"symbol","metadata":{"externalID":"s:7Factory0A7ContextV16runtimeArgumentsSDyS2SGvp","symbolKind":"property","title":"runtimeArguments","roleHeading":"Instance Property","role":"symbol","modules":[{"name":"Factory"}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"runtimeArguments","kind":"identifier"},{"text":": [","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":" : "},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"]","kind":"text"}]},"abstract":[{"type":"text","text":"Runtime arguments"}],"schemaVersion":{"major":0,"patch":0,"minor":3},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryContext/runtimeArguments":{"kind":"symbol","title":"runtimeArguments","type":"topic","url":"\/documentation\/factory\/factorycontext\/runtimearguments","abstract":[{"type":"text","text":"Runtime arguments"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/runtimeArguments","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"runtimeArguments","kind":"identifier"},{"kind":"text","text":": ["},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":" : ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":"]"}]},"doc://Factory/documentation/Factory/FactoryContext":{"url":"\/documentation\/factory\/factorycontext","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"FactoryContext","kind":"identifier"}],"kind":"symbol","abstract":[],"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"title":"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 bd63f0b8..caeb68ec 100644 --- a/docs/data/documentation/factory/factorycontext/setarg(_:forkey:).json +++ b/docs/data/documentation/factory/factorycontext/setarg(_:forkey:).json @@ -1 +1 @@ -{"sections":[],"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"setArg","kind":"identifier"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"arg","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"forKey"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"key"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":")"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/setArg(_:forKey:)","interfaceLanguage":"swift"},"schemaVersion":{"minor":3,"patch":0,"major":0},"abstract":[{"text":"Add argument to global context.","type":"text"}],"metadata":{"roleHeading":"Type Method","extendedModule":"Factory","modules":[{"name":"Factory"}],"symbolKind":"method","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"setArg","kind":"identifier"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":", "},{"text":"forKey","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"externalID":"s:7Factory0A7ContextV6setArg_6forKeyySS_SStFZ","role":"symbol","title":"setArg(_:forKey:)"},"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/factorycontext\/setarg(_:forkey:)"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory/FactoryContext/setArg(_:forKey:)":{"role":"symbol","abstract":[{"text":"Add argument to global context.","type":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/setArg(_:forKey:)","title":"setArg(_:forKey:)","kind":"symbol","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"setArg","kind":"identifier"},{"kind":"text","text":"("},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":", ","kind":"text"},{"text":"forKey","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":")"}],"url":"\/documentation\/factory\/factorycontext\/setarg(_:forkey:)"},"doc://Factory/documentation/Factory/FactoryContext":{"role":"symbol","navigatorTitle":[{"text":"FactoryContext","kind":"identifier"}],"abstract":[],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","kind":"symbol","title":"FactoryContext","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"abstract":[{"text":"Add argument to global context.","type":"text"}],"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"setArg","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"arg","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":", ","kind":"text"},{"text":"forKey","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"key","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":")"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"variants":[{"paths":["\/documentation\/factory\/factorycontext\/setarg(_:forkey:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/setArg(_:forKey:)","interfaceLanguage":"swift"},"metadata":{"title":"setArg(_:forKey:)","role":"symbol","roleHeading":"Type Method","modules":[{"name":"Factory"}],"extendedModule":"Factory","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"setArg"},{"kind":"text","text":"("},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"forKey"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":")","kind":"text"}],"externalID":"s:7Factory0A7ContextV6setArg_6forKeyySS_SStFZ","symbolKind":"method"},"sections":[],"schemaVersion":{"major":0,"patch":0,"minor":3},"kind":"symbol","references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryContext/setArg(_:forKey:)":{"type":"topic","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"setArg","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":", ","kind":"text"},{"text":"forKey","kind":"externalParam"},{"kind":"text","text":": "},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/setArg(_:forKey:)","url":"\/documentation\/factory\/factorycontext\/setarg(_:forkey:)","abstract":[{"text":"Add argument to global context.","type":"text"}],"kind":"symbol","role":"symbol","title":"setArg(_:forKey:)"},"doc://Factory/documentation/Factory/FactoryContext":{"url":"\/documentation\/factory\/factorycontext","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"FactoryContext","kind":"identifier"}],"kind":"symbol","abstract":[],"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"title":"FactoryContext"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontexttype.json b/docs/data/documentation/factory/factorycontexttype.json index 2e9f81d7..af5a8909 100644 --- a/docs/data/documentation/factory/factorycontexttype.json +++ b/docs/data/documentation/factory/factorycontexttype.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContextType"}],"languages":["swift"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontexttype"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"},"sections":[],"metadata":{"navigatorTitle":[{"text":"FactoryContextType","kind":"identifier"}],"modules":[{"name":"Factory"}],"title":"FactoryContextType","externalID":"s:7Factory0A11ContextTypeO","role":"symbol","symbolKind":"enum","fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContextType"}],"roleHeading":"Enumeration"},"schemaVersion":{"major":0,"minor":3,"patch":0},"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/SQ"],"kind":"relationships","type":"conformsTo","title":"Conforms To"}],"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/arg(_:)","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/args(_:)","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/debug","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/device","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/preview","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/simulator","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/test"],"title":"Enumeration Cases"},{"generated":true,"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/Equatable-Implementations"],"title":"Default Implementations"}],"kind":"symbol","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"references":{"doc://Factory/documentation/Factory/FactoryContextType":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","url":"\/documentation\/factory\/factorycontexttype"},"doc://Factory/documentation/Factory/FactoryContextType/preview":{"title":"FactoryContextType.preview","url":"\/documentation\/factory\/factorycontexttype\/preview","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"preview","kind":"identifier"}],"type":"topic","abstract":[{"type":"text","text":"Context used when application is running in Xcode Preview mode."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/preview"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryContextType/simulator":{"url":"\/documentation\/factory\/factorycontexttype\/simulator","abstract":[{"text":"Context used when application is running within an Xcode simulator.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/simulator","kind":"symbol","type":"topic","role":"symbol","title":"FactoryContextType.simulator","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"simulator","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryContextType/device":{"abstract":[{"text":"Context used when application is running on an actual device.","type":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/device","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"device","kind":"identifier"}],"title":"FactoryContextType.device","url":"\/documentation\/factory\/factorycontexttype\/device","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/FactoryContextType/arg(_:)":{"kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontexttype\/arg(_:)","title":"FactoryContextType.arg(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/arg(_:)","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"arg","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":")","kind":"text"}],"abstract":[{"text":"Context used when application is launched with a particular argument.","type":"text"}],"role":"symbol"},"doc://Factory/documentation/Factory/FactoryContextType/debug":{"abstract":[{"text":"Context used when application is running in Xcode DEBUG mode.","type":"text"}],"url":"\/documentation\/factory\/factorycontexttype\/debug","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/debug","kind":"symbol","type":"topic","role":"symbol","title":"FactoryContextType.debug","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"debug"}]},"doc://Factory/documentation/Factory/FactoryContextType/test":{"role":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontexttype\/test","kind":"symbol","title":"FactoryContextType.test","abstract":[{"text":"Context used when application is running in Xcode Unit Test mode.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/test","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"text":"test","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryContextType/args(_:)":{"abstract":[{"type":"text","text":"Context used when application is launched with a particular argument or arguments."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/args(_:)","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"args","kind":"identifier"},{"text":"([","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"])","kind":"text"}],"title":"FactoryContextType.args(_:)","url":"\/documentation\/factory\/factorycontexttype\/args(_:)","type":"topic","role":"symbol"},"doc://Factory/SQ":{"identifier":"doc:\/\/Factory\/SQ","type":"unresolvable","title":"Swift.Equatable"},"doc://Factory/documentation/Factory/FactoryContextType/Equatable-Implementations":{"url":"\/documentation\/factory\/factorycontexttype\/equatable-implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/Equatable-Implementations","kind":"article","type":"topic","role":"collectionGroup","title":"Equatable Implementations"}}} \ No newline at end of file +{"schemaVersion":{"minor":3,"major":0,"patch":0},"metadata":{"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"symbolKind":"enum","role":"symbol","navigatorTitle":[{"text":"FactoryContextType","kind":"identifier"}],"externalID":"s:7Factory0A11ContextTypeO","modules":[{"name":"Factory"}],"title":"FactoryContextType","roleHeading":"Enumeration"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"text":"FactoryContextType","kind":"identifier"}],"languages":["swift"]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontexttype"]}],"kind":"symbol","topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/arg(_:)","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/args(_:)","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/debug","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/device","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/preview","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/simulator","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/test"],"title":"Enumeration Cases"},{"generated":true,"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/Equatable-Implementations"],"title":"Default Implementations"}],"relationshipsSections":[{"title":"Conforms To","kind":"relationships","type":"conformsTo","identifiers":["doc:\/\/Factory\/SQ"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"sections":[],"abstract":[{"text":"Context types available for special purpose factory registrations.","type":"text"}],"references":{"doc://Factory/documentation/Factory/FactoryContextType":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"text":"Context types available for special purpose factory registrations.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","type":"topic","url":"\/documentation\/factory\/factorycontexttype"},"doc://Factory/documentation/Factory/FactoryContextType/device":{"title":"FactoryContextType.device","url":"\/documentation\/factory\/factorycontexttype\/device","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"device","kind":"identifier"}],"abstract":[{"text":"Context used when application is running on an actual device.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/device","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContextType/preview":{"title":"FactoryContextType.preview","url":"\/documentation\/factory\/factorycontexttype\/preview","type":"topic","role":"symbol","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"preview"}],"abstract":[{"text":"Context used when application is running in Xcode Preview mode.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/preview","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContextType/simulator":{"title":"FactoryContextType.simulator","url":"\/documentation\/factory\/factorycontexttype\/simulator","kind":"symbol","abstract":[{"text":"Context used when application is running within an Xcode simulator.","type":"text"}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/simulator","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"simulator","kind":"identifier"}],"type":"topic"},"doc://Factory/documentation/Factory/FactoryContextType/Equatable-Implementations":{"url":"\/documentation\/factory\/factorycontexttype\/equatable-implementations","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/Equatable-Implementations","type":"topic","role":"collectionGroup","title":"Equatable Implementations","abstract":[]},"doc://Factory/documentation/Factory/FactoryContextType/debug":{"title":"FactoryContextType.debug","url":"\/documentation\/factory\/factorycontexttype\/debug","kind":"symbol","abstract":[{"text":"Context used when application is running in Xcode DEBUG mode.","type":"text"}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/debug","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"debug","kind":"identifier"}],"type":"topic"},"doc://Factory/documentation/Factory/FactoryContextType/test":{"url":"\/documentation\/factory\/factorycontexttype\/test","title":"FactoryContextType.test","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/test","role":"symbol","abstract":[{"text":"Context used when application is running in Xcode Unit Test mode.","type":"text"}],"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"test","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryContextType/arg(_:)":{"title":"FactoryContextType.arg(_:)","url":"\/documentation\/factory\/factorycontexttype\/arg(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/arg(_:)","role":"symbol","kind":"symbol","abstract":[{"text":"Context used when application is launched with a particular argument.","type":"text"}],"type":"topic","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"arg","kind":"identifier"},{"kind":"text","text":"("},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":")","kind":"text"}]},"doc://Factory/SQ":{"type":"unresolvable","identifier":"doc:\/\/Factory\/SQ","title":"Swift.Equatable"},"doc://Factory/documentation/Factory/FactoryContextType/args(_:)":{"title":"FactoryContextType.args(_:)","url":"\/documentation\/factory\/factorycontexttype\/args(_:)","kind":"symbol","abstract":[{"type":"text","text":"Context used when application is launched with a particular argument or arguments."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/args(_:)","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"text":"args","kind":"identifier"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":"])","kind":"text"}],"type":"topic"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontexttype/!=(_:_:).json b/docs/data/documentation/factory/factorycontexttype/!=(_:_:).json index 172b7c14..b425ffc9 100644 --- a/docs/data/documentation/factory/factorycontexttype/!=(_:_:).json +++ b/docs/data/documentation/factory/factorycontexttype/!=(_:_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"!=","kind":"identifier"},{"kind":"text","text":" "},{"text":"(","kind":"text"},{"text":"lhs","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"internalParam","text":"rhs"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/factorycontexttype\/!=(_:_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/Equatable-Implementations"]]},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/!=(_:_:)","interfaceLanguage":"swift"},"sections":[],"metadata":{"externalID":"s:SQsE2neoiySbx_xtFZ::SYNTHESIZED::s:7Factory0A11ContextTypeO","role":"symbol","symbolKind":"op","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"text":"(","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"extendedModule":"Swift","title":"!=(_:_:)","modules":[{"name":"Factory","relatedModules":["Swift"]}],"roleHeading":"Operator"},"schemaVersion":{"patch":0,"minor":3,"major":0},"abstract":[{"type":"text","text":"Inherited from "},{"code":"Equatable.!=(_:_:)","type":"codeVoice"},{"text":".","type":"text"}],"references":{"doc://Factory/documentation/Factory/FactoryContextType/Equatable-Implementations":{"url":"\/documentation\/factory\/factorycontexttype\/equatable-implementations","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/Equatable-Implementations","kind":"article","type":"topic","role":"collectionGroup","title":"Equatable Implementations"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryContextType":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","url":"\/documentation\/factory\/factorycontexttype"},"doc://Factory/documentation/Factory/FactoryContextType/!=(_:_:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/!=(_:_:)","role":"symbol","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"text":" ","kind":"text"},{"text":"(","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}],"abstract":[],"url":"\/documentation\/factory\/factorycontexttype\/!=(_:_:)","type":"topic","title":"!=(_:_:)","kind":"symbol"}}} \ No newline at end of file +{"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"text":" ","kind":"text"},{"kind":"text","text":"("},{"text":"lhs","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"internalParam","text":"rhs"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}],"platforms":["macOS"],"languages":["swift"]}]}],"variants":[{"paths":["\/documentation\/factory\/factorycontexttype\/!=(_:_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"symbolKind":"op","extendedModule":"Swift","modules":[{"relatedModules":["Swift"],"name":"Factory"}],"externalID":"s:SQsE2neoiySbx_xtFZ::SYNTHESIZED::s:7Factory0A11ContextTypeO","role":"symbol","roleHeading":"Operator","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"!=","kind":"identifier"},{"text":" ","kind":"text"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"title":"!=(_:_:)"},"kind":"symbol","abstract":[{"type":"text","text":"Inherited from "},{"type":"codeVoice","code":"Equatable.!=(_:_:)"},{"type":"text","text":"."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/Equatable-Implementations"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/!=(_:_:)"},"sections":[],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryContextType/!=(_:_:)":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/!=(_:_:)","abstract":[],"role":"symbol","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"!="},{"text":" ","kind":"text"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"text":", ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Bool","preciseIdentifier":"s:Sb","kind":"typeIdentifier"}],"title":"!=(_:_:)","type":"topic","url":"\/documentation\/factory\/factorycontexttype\/!=(_:_:)"},"doc://Factory/documentation/Factory/FactoryContextType/Equatable-Implementations":{"url":"\/documentation\/factory\/factorycontexttype\/equatable-implementations","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/Equatable-Implementations","type":"topic","role":"collectionGroup","title":"Equatable Implementations","abstract":[]},"doc://Factory/documentation/Factory/FactoryContextType":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"text":"Context types available for special purpose factory registrations.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","type":"topic","url":"\/documentation\/factory\/factorycontexttype"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontexttype/arg(_:).json b/docs/data/documentation/factory/factorycontexttype/arg(_:).json index 812317b6..9e028799 100644 --- a/docs/data/documentation/factory/factorycontexttype/arg(_:).json +++ b/docs/data/documentation/factory/factorycontexttype/arg(_:).json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"abstract":[{"type":"text","text":"Context used when application is launched with a particular argument."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"arg","kind":"identifier"},{"kind":"text","text":"("},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":")","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}]}],"metadata":{"externalID":"s:7Factory0A11ContextTypeO3argyACSScACmF","modules":[{"name":"Factory"}],"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":")"}],"role":"symbol","roleHeading":"Case","symbolKind":"case","title":"FactoryContextType.arg(_:)"},"schemaVersion":{"minor":3,"patch":0,"major":0},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontexttype\/arg(_:)"]}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/arg(_:)","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/FactoryContextType":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","url":"\/documentation\/factory\/factorycontexttype"},"doc://Factory/documentation/Factory/FactoryContextType/arg(_:)":{"kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontexttype\/arg(_:)","title":"FactoryContextType.arg(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/arg(_:)","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"arg","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":")","kind":"text"}],"abstract":[{"text":"Context used when application is launched with a particular argument.","type":"text"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/arg(_:)"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"text":"arg","kind":"identifier"},{"text":"(","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"languages":["swift"]}],"kind":"declarations"}],"schemaVersion":{"patch":0,"minor":3,"major":0},"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Case","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"arg","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":")","kind":"text"}],"externalID":"s:7Factory0A11ContextTypeO3argyACSScACmF","symbolKind":"case","role":"symbol","title":"FactoryContextType.arg(_:)"},"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontexttype\/arg(_:)"]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"abstract":[{"type":"text","text":"Context used when application is launched with a particular argument."}],"references":{"doc://Factory/documentation/Factory/FactoryContextType/arg(_:)":{"title":"FactoryContextType.arg(_:)","url":"\/documentation\/factory\/factorycontexttype\/arg(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/arg(_:)","role":"symbol","kind":"symbol","abstract":[{"text":"Context used when application is launched with a particular argument.","type":"text"}],"type":"topic","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"arg","kind":"identifier"},{"kind":"text","text":"("},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":")","kind":"text"}]},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryContextType":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"text":"Context types available for special purpose factory registrations.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","type":"topic","url":"\/documentation\/factory\/factorycontexttype"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontexttype/args(_:).json b/docs/data/documentation/factory/factorycontexttype/args(_:).json index e193371f..b34242fd 100644 --- a/docs/data/documentation/factory/factorycontexttype/args(_:).json +++ b/docs/data/documentation/factory/factorycontexttype/args(_:).json @@ -1 +1 @@ -{"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","metadata":{"title":"FactoryContextType.args(_:)","roleHeading":"Case","externalID":"s:7Factory0A11ContextTypeO4argsyACSaySSGcACmF","modules":[{"name":"Factory"}],"symbolKind":"case","role":"symbol","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"args"},{"text":"([","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"])","kind":"text"}]},"abstract":[{"type":"text","text":"Context used when application is launched with a particular argument or arguments."}],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"args"},{"text":"([","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":"])","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/factorycontexttype\/args(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/args(_:)"},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryContextType/args(_:)":{"abstract":[{"type":"text","text":"Context used when application is launched with a particular argument or arguments."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/args(_:)","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"args","kind":"identifier"},{"text":"([","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"])","kind":"text"}],"title":"FactoryContextType.args(_:)","url":"\/documentation\/factory\/factorycontexttype\/args(_:)","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/FactoryContextType":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","url":"\/documentation\/factory\/factorycontexttype"}}} \ No newline at end of file +{"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"args","kind":"identifier"},{"kind":"text","text":"(["},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":"])"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"metadata":{"roleHeading":"Case","externalID":"s:7Factory0A11ContextTypeO4argsyACSaySSGcACmF","role":"symbol","title":"FactoryContextType.args(_:)","modules":[{"name":"Factory"}],"symbolKind":"case","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"args"},{"kind":"text","text":"(["},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":"])"}]},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/args(_:)","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"abstract":[{"type":"text","text":"Context used when application is launched with a particular argument or arguments."}],"variants":[{"paths":["\/documentation\/factory\/factorycontexttype\/args(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryContextType/args(_:)":{"title":"FactoryContextType.args(_:)","url":"\/documentation\/factory\/factorycontexttype\/args(_:)","kind":"symbol","abstract":[{"type":"text","text":"Context used when application is launched with a particular argument or arguments."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/args(_:)","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"text":"args","kind":"identifier"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":"])","kind":"text"}],"type":"topic"},"doc://Factory/documentation/Factory/FactoryContextType":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"text":"Context types available for special purpose factory registrations.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","type":"topic","url":"\/documentation\/factory\/factorycontexttype"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontexttype/debug.json b/docs/data/documentation/factory/factorycontexttype/debug.json index 7da29e40..39f489cc 100644 --- a/docs/data/documentation/factory/factorycontexttype/debug.json +++ b/docs/data/documentation/factory/factorycontexttype/debug.json @@ -1 +1 @@ -{"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"debug","kind":"identifier"}],"languages":["swift"],"platforms":["macOS"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontexttype\/debug"]}],"abstract":[{"type":"text","text":"Context used when application is running in Xcode DEBUG mode."}],"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/debug"},"metadata":{"externalID":"s:7Factory0A11ContextTypeO5debugyA2CmF","roleHeading":"Case","role":"symbol","symbolKind":"case","title":"FactoryContextType.debug","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"debug"}],"modules":[{"name":"Factory"}]},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"references":{"doc://Factory/documentation/Factory/FactoryContextType/debug":{"abstract":[{"text":"Context used when application is running in Xcode DEBUG mode.","type":"text"}],"url":"\/documentation\/factory\/factorycontexttype\/debug","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/debug","kind":"symbol","type":"topic","role":"symbol","title":"FactoryContextType.debug","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"debug"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryContextType":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","url":"\/documentation\/factory\/factorycontexttype"}}} \ No newline at end of file +{"schemaVersion":{"minor":3,"major":0,"patch":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontexttype\/debug"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/debug","interfaceLanguage":"swift"},"metadata":{"title":"FactoryContextType.debug","externalID":"s:7Factory0A11ContextTypeO5debugyA2CmF","role":"symbol","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"debug"}],"roleHeading":"Case","modules":[{"name":"Factory"}],"symbolKind":"case"},"sections":[],"abstract":[{"type":"text","text":"Context used when application is running in Xcode DEBUG mode."}],"kind":"symbol","primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"debug"}],"languages":["swift"]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"references":{"doc://Factory/documentation/Factory/FactoryContextType":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"text":"Context types available for special purpose factory registrations.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","type":"topic","url":"\/documentation\/factory\/factorycontexttype"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryContextType/debug":{"title":"FactoryContextType.debug","url":"\/documentation\/factory\/factorycontexttype\/debug","kind":"symbol","abstract":[{"text":"Context used when application is running in Xcode DEBUG mode.","type":"text"}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/debug","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"debug","kind":"identifier"}],"type":"topic"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontexttype/device.json b/docs/data/documentation/factory/factorycontexttype/device.json index 29a31e93..a51403c8 100644 --- a/docs/data/documentation/factory/factorycontexttype/device.json +++ b/docs/data/documentation/factory/factorycontexttype/device.json @@ -1 +1 @@ -{"kind":"symbol","sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/device"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontexttype\/device"]}],"metadata":{"externalID":"s:7Factory0A11ContextTypeO6deviceyA2CmF","roleHeading":"Case","title":"FactoryContextType.device","modules":[{"name":"Factory"}],"role":"symbol","symbolKind":"case","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"device","kind":"identifier"}]},"abstract":[{"text":"Context used when application is running on an actual device.","type":"text"}],"schemaVersion":{"patch":0,"minor":3,"major":0},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"device"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory/FactoryContextType":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","url":"\/documentation\/factory\/factorycontexttype"},"doc://Factory/documentation/Factory/FactoryContextType/device":{"abstract":[{"text":"Context used when application is running on an actual device.","type":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/device","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"device","kind":"identifier"}],"title":"FactoryContextType.device","url":"\/documentation\/factory\/factorycontexttype\/device","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/device"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"abstract":[{"text":"Context used when application is running on an actual device.","type":"text"}],"variants":[{"paths":["\/documentation\/factory\/factorycontexttype\/device"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","sections":[],"metadata":{"symbolKind":"case","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"text":"device","kind":"identifier"}],"modules":[{"name":"Factory"}],"externalID":"s:7Factory0A11ContextTypeO6deviceyA2CmF","role":"symbol","roleHeading":"Case","title":"FactoryContextType.device"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"device","kind":"identifier"}]}]}],"references":{"doc://Factory/documentation/Factory/FactoryContextType/device":{"title":"FactoryContextType.device","url":"\/documentation\/factory\/factorycontexttype\/device","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"device","kind":"identifier"}],"abstract":[{"text":"Context used when application is running on an actual device.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/device","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContextType":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"text":"Context types available for special purpose factory registrations.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","type":"topic","url":"\/documentation\/factory\/factorycontexttype"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontexttype/equatable-implementations.json b/docs/data/documentation/factory/factorycontexttype/equatable-implementations.json index 89fc6ebf..3e93f776 100644 --- a/docs/data/documentation/factory/factorycontexttype/equatable-implementations.json +++ b/docs/data/documentation/factory/factorycontexttype/equatable-implementations.json @@ -1 +1 @@ -{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontexttype\/equatable-implementations"]}],"metadata":{"title":"Equatable Implementations","modules":[{"name":"Factory"}],"role":"collectionGroup"},"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/!=(_:_:)"],"title":"Operators","generated":true}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/Equatable-Implementations","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"patch":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"sections":[],"kind":"article","references":{"doc://Factory/documentation/Factory/FactoryContextType/!=(_:_:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/!=(_:_:)","role":"symbol","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"text":" ","kind":"text"},{"text":"(","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}],"abstract":[],"url":"\/documentation\/factory\/factorycontexttype\/!=(_:_:)","type":"topic","title":"!=(_:_:)","kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryContextType":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","url":"\/documentation\/factory\/factorycontexttype"}}} \ No newline at end of file +{"sections":[],"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/!=(_:_:)"],"title":"Operators","generated":true}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontexttype\/equatable-implementations"]}],"kind":"article","schemaVersion":{"major":0,"minor":3,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"metadata":{"modules":[{"name":"Factory"}],"role":"collectionGroup","title":"Equatable Implementations"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/Equatable-Implementations"},"references":{"doc://Factory/documentation/Factory/FactoryContextType":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"text":"Context types available for special purpose factory registrations.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","type":"topic","url":"\/documentation\/factory\/factorycontexttype"},"doc://Factory/documentation/Factory/FactoryContextType/!=(_:_:)":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/!=(_:_:)","abstract":[],"role":"symbol","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"!="},{"text":" ","kind":"text"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"text":", ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Bool","preciseIdentifier":"s:Sb","kind":"typeIdentifier"}],"title":"!=(_:_:)","type":"topic","url":"\/documentation\/factory\/factorycontexttype\/!=(_:_:)"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontexttype/preview.json b/docs/data/documentation/factory/factorycontexttype/preview.json index 249cb61b..71edf5cc 100644 --- a/docs/data/documentation/factory/factorycontexttype/preview.json +++ b/docs/data/documentation/factory/factorycontexttype/preview.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"preview"}]}]}],"metadata":{"symbolKind":"case","modules":[{"name":"Factory"}],"role":"symbol","title":"FactoryContextType.preview","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"text":"preview","kind":"identifier"}],"roleHeading":"Case","externalID":"s:7Factory0A11ContextTypeO7previewyA2CmF"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"sections":[],"kind":"symbol","schemaVersion":{"patch":0,"minor":3,"major":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontexttype\/preview"]}],"abstract":[{"type":"text","text":"Context used when application is running in Xcode Preview mode."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/preview","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/FactoryContextType":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","url":"\/documentation\/factory\/factorycontexttype"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryContextType/preview":{"title":"FactoryContextType.preview","url":"\/documentation\/factory\/factorycontexttype\/preview","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"preview","kind":"identifier"}],"type":"topic","abstract":[{"type":"text","text":"Context used when application is running in Xcode Preview mode."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/preview"}}} \ No newline at end of file +{"variants":[{"paths":["\/documentation\/factory\/factorycontexttype\/preview"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"schemaVersion":{"patch":0,"minor":3,"major":0},"kind":"symbol","primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"preview","kind":"identifier"}],"languages":["swift"]}],"kind":"declarations"}],"metadata":{"modules":[{"name":"Factory"}],"fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"preview"}],"roleHeading":"Case","symbolKind":"case","title":"FactoryContextType.preview","externalID":"s:7Factory0A11ContextTypeO7previewyA2CmF","role":"symbol"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/preview","interfaceLanguage":"swift"},"abstract":[{"text":"Context used when application is running in Xcode Preview mode.","type":"text"}],"references":{"doc://Factory/documentation/Factory/FactoryContextType":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"text":"Context types available for special purpose factory registrations.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","type":"topic","url":"\/documentation\/factory\/factorycontexttype"},"doc://Factory/documentation/Factory/FactoryContextType/preview":{"title":"FactoryContextType.preview","url":"\/documentation\/factory\/factorycontexttype\/preview","type":"topic","role":"symbol","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"preview"}],"abstract":[{"text":"Context used when application is running in Xcode Preview mode.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/preview","kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontexttype/simulator.json b/docs/data/documentation/factory/factorycontexttype/simulator.json index f296d8a9..f73d6933 100644 --- a/docs/data/documentation/factory/factorycontexttype/simulator.json +++ b/docs/data/documentation/factory/factorycontexttype/simulator.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontexttype\/simulator"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"simulator","kind":"identifier"}]}]}],"metadata":{"role":"symbol","externalID":"s:7Factory0A11ContextTypeO9simulatoryA2CmF","roleHeading":"Case","symbolKind":"case","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"simulator"}],"title":"FactoryContextType.simulator","modules":[{"name":"Factory"}]},"abstract":[{"type":"text","text":"Context used when application is running within an Xcode simulator."}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/simulator"},"kind":"symbol","references":{"doc://Factory/documentation/Factory/FactoryContextType/simulator":{"url":"\/documentation\/factory\/factorycontexttype\/simulator","abstract":[{"text":"Context used when application is running within an Xcode simulator.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/simulator","kind":"symbol","type":"topic","role":"symbol","title":"FactoryContextType.simulator","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"simulator","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryContextType":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","url":"\/documentation\/factory\/factorycontexttype"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"abstract":[{"type":"text","text":"Context used when application is running within an Xcode simulator."}],"variants":[{"paths":["\/documentation\/factory\/factorycontexttype\/simulator"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"role":"symbol","externalID":"s:7Factory0A11ContextTypeO9simulatoryA2CmF","modules":[{"name":"Factory"}],"fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"text":"simulator","kind":"identifier"}],"symbolKind":"case","title":"FactoryContextType.simulator","roleHeading":"Case"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"simulator","kind":"identifier"}],"languages":["swift"],"platforms":["macOS"]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/simulator","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryContextType/simulator":{"title":"FactoryContextType.simulator","url":"\/documentation\/factory\/factorycontexttype\/simulator","kind":"symbol","abstract":[{"text":"Context used when application is running within an Xcode simulator.","type":"text"}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/simulator","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"simulator","kind":"identifier"}],"type":"topic"},"doc://Factory/documentation/Factory/FactoryContextType":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"text":"Context types available for special purpose factory registrations.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","type":"topic","url":"\/documentation\/factory\/factorycontexttype"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontexttype/test.json b/docs/data/documentation/factory/factorycontexttype/test.json index c90c2231..d270fb02 100644 --- a/docs/data/documentation/factory/factorycontexttype/test.json +++ b/docs/data/documentation/factory/factorycontexttype/test.json @@ -1 +1 @@ -{"schemaVersion":{"minor":3,"major":0,"patch":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/test"},"metadata":{"title":"FactoryContextType.test","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"test"}],"symbolKind":"case","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A11ContextTypeO4testyA2CmF","role":"symbol","roleHeading":"Case"},"abstract":[{"text":"Context used when application is running in Xcode Unit Test mode.","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontexttype\/test"]}],"sections":[],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"test"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory/FactoryContextType/test":{"role":"symbol","type":"topic","url":"\/documentation\/factory\/factorycontexttype\/test","kind":"symbol","title":"FactoryContextType.test","abstract":[{"text":"Context used when application is running in Xcode Unit Test mode.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/test","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"text":"test","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryContextType":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","url":"\/documentation\/factory\/factorycontexttype"}}} \ No newline at end of file +{"abstract":[{"type":"text","text":"Context used when application is running in Xcode Unit Test mode."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/test","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"externalID":"s:7Factory0A11ContextTypeO4testyA2CmF","roleHeading":"Case","title":"FactoryContextType.test","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"test","kind":"identifier"}],"role":"symbol","symbolKind":"case","modules":[{"name":"Factory"}]},"schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"paths":["\/documentation\/factory\/factorycontexttype\/test"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"test","kind":"identifier"}],"platforms":["macOS"]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"references":{"doc://Factory/documentation/Factory/FactoryContextType/test":{"url":"\/documentation\/factory\/factorycontexttype\/test","title":"FactoryContextType.test","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/test","role":"symbol","abstract":[{"text":"Context used when application is running in Xcode Unit Test mode.","type":"text"}],"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"test","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryContextType":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"text":"Context types available for special purpose factory registrations.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","type":"topic","url":"\/documentation\/factory\/factorycontexttype"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorykey.json b/docs/data/documentation/factory/factorykey.json index dc7f039d..f1f9cb69 100644 --- a/docs/data/documentation/factory/factorykey.json +++ b/docs/data/documentation/factory/factorykey.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey"},"topicSections":[{"title":"Operators","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/==(_:_:)"]},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/hash(into:)"]},{"title":"Default Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/Equatable-Implementations"],"generated":true}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryKey","kind":"identifier"}],"languages":["swift"]}]}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/SQ","doc:\/\/Factory\/SH"],"kind":"relationships","type":"conformsTo","title":"Conforms To"}],"variants":[{"paths":["\/documentation\/factory\/factorykey"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"schemaVersion":{"major":0,"patch":0,"minor":3},"metadata":{"navigatorTitle":[{"text":"FactoryKey","kind":"identifier"}],"roleHeading":"Structure","role":"symbol","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"FactoryKey","kind":"identifier"}],"title":"FactoryKey","symbolKind":"struct","externalID":"s:7Factory0A3KeyV"},"kind":"symbol","references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/SQ":{"identifier":"doc:\/\/Factory\/SQ","type":"unresolvable","title":"Swift.Equatable"},"doc://Factory/documentation/Factory/FactoryKey":{"title":"FactoryKey","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey","url":"\/documentation\/factory\/factorykey","type":"topic","role":"symbol","navigatorTitle":[{"text":"FactoryKey","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryKey"}],"kind":"symbol","abstract":[]},"doc://Factory/documentation/Factory/FactoryKey/hash(into:)":{"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"hash"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"into"},{"kind":"text","text":": "},{"kind":"keyword","text":"inout"},{"kind":"text","text":" "},{"preciseIdentifier":"s:s6HasherV","text":"Hasher","kind":"typeIdentifier"},{"kind":"text","text":")"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/hash(into:)","title":"hash(into:)","url":"\/documentation\/factory\/factorykey\/hash(into:)","type":"topic","kind":"symbol","abstract":[]},"doc://Factory/documentation/Factory/FactoryKey/==(_:_:)":{"role":"symbol","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"=="},{"kind":"text","text":" "},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"FactoryKey","preciseIdentifier":"s:7Factory0A3KeyV"},{"text":", ","kind":"text"},{"text":"FactoryKey","preciseIdentifier":"s:7Factory0A3KeyV","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/==(_:_:)","title":"==(_:_:)","url":"\/documentation\/factory\/factorykey\/==(_:_:)","type":"topic","kind":"symbol","abstract":[]},"doc://Factory/documentation/Factory/FactoryKey/Equatable-Implementations":{"role":"collectionGroup","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/Equatable-Implementations","title":"Equatable Implementations","url":"\/documentation\/factory\/factorykey\/equatable-implementations","type":"topic","kind":"article","abstract":[]},"doc://Factory/SH":{"type":"unresolvable","identifier":"doc:\/\/Factory\/SH","title":"Swift.Hashable"}}} \ No newline at end of file +{"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"FactoryKey","kind":"identifier"}]}],"kind":"declarations"}],"relationshipsSections":[{"kind":"relationships","title":"Conforms To","type":"conformsTo","identifiers":["doc:\/\/Factory\/SQ","doc:\/\/Factory\/SH"]}],"variants":[{"paths":["\/documentation\/factory\/factorykey"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"title":"FactoryKey","modules":[{"name":"Factory"}],"roleHeading":"Structure","symbolKind":"struct","externalID":"s:7Factory0A3KeyV","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"FactoryKey","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryKey"}],"role":"symbol"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey"},"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/==(_:_:)"],"title":"Operators"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/hash(into:)"],"title":"Instance Methods"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/Equatable-Implementations"],"generated":true,"title":"Default Implementations"}],"sections":[],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory/FactoryKey/hash(into:)":{"role":"symbol","url":"\/documentation\/factory\/factorykey\/hash(into:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/hash(into:)","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"hash","kind":"identifier"},{"kind":"text","text":"("},{"text":"into","kind":"externalParam"},{"kind":"text","text":": "},{"text":"inout","kind":"keyword"},{"kind":"text","text":" "},{"text":"Hasher","kind":"typeIdentifier","preciseIdentifier":"s:s6HasherV"},{"text":")","kind":"text"}],"abstract":[],"title":"hash(into:)","kind":"symbol"},"doc://Factory/SQ":{"title":"Swift.Equatable","type":"unresolvable","identifier":"doc:\/\/Factory\/SQ"},"doc://Factory/documentation/Factory/FactoryKey/Equatable-Implementations":{"url":"\/documentation\/factory\/factorykey\/equatable-implementations","title":"Equatable Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/Equatable-Implementations","role":"collectionGroup","abstract":[],"kind":"article","type":"topic"},"doc://Factory/SH":{"title":"Swift.Hashable","type":"unresolvable","identifier":"doc:\/\/Factory\/SH"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryKey":{"navigatorTitle":[{"text":"FactoryKey","kind":"identifier"}],"kind":"symbol","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryKey"}],"url":"\/documentation\/factory\/factorykey","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey","type":"topic","title":"FactoryKey"},"doc://Factory/documentation/Factory/FactoryKey/==(_:_:)":{"title":"==(_:_:)","abstract":[],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/==(_:_:)","kind":"symbol","url":"\/documentation\/factory\/factorykey\/==(_:_:)","role":"symbol","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"=="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"text":"FactoryKey","preciseIdentifier":"s:7Factory0A3KeyV","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"FactoryKey","preciseIdentifier":"s:7Factory0A3KeyV"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorykey/!=(_:_:).json b/docs/data/documentation/factory/factorykey/!=(_:_:).json index d10ae68f..2e92e4a7 100644 --- a/docs/data/documentation/factory/factorykey/!=(_:_:).json +++ b/docs/data/documentation/factory/factorykey/!=(_:_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"text":"lhs","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"rhs","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}],"languages":["swift"]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/!=(_:_:)"},"kind":"symbol","metadata":{"role":"symbol","modules":[{"name":"Factory","relatedModules":["Swift"]}],"roleHeading":"Operator","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"text":" ","kind":"text"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"extendedModule":"Swift","title":"!=(_:_:)","symbolKind":"op","externalID":"s:SQsE2neoiySbx_xtFZ::SYNTHESIZED::s:7Factory0A3KeyV"},"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryKey","doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/Equatable-Implementations"]]},"abstract":[{"type":"text","text":"Inherited from "},{"type":"codeVoice","code":"Equatable.!=(_:_:)"},{"text":".","type":"text"}],"variants":[{"paths":["\/documentation\/factory\/factorykey\/!=(_:_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryKey/!=(_:_:)":{"role":"symbol","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"!=","kind":"identifier"},{"text":" ","kind":"text"},{"text":"(","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/!=(_:_:)","title":"!=(_:_:)","url":"\/documentation\/factory\/factorykey\/!=(_:_:)","type":"topic","kind":"symbol","abstract":[]},"doc://Factory/documentation/Factory/FactoryKey":{"title":"FactoryKey","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey","url":"\/documentation\/factory\/factorykey","type":"topic","role":"symbol","navigatorTitle":[{"text":"FactoryKey","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryKey"}],"kind":"symbol","abstract":[]},"doc://Factory/documentation/Factory/FactoryKey/Equatable-Implementations":{"role":"collectionGroup","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/Equatable-Implementations","title":"Equatable Implementations","url":"\/documentation\/factory\/factorykey\/equatable-implementations","type":"topic","kind":"article","abstract":[]}}} \ No newline at end of file +{"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryKey","doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/Equatable-Implementations"]]},"abstract":[{"text":"Inherited from ","type":"text"},{"type":"codeVoice","code":"Equatable.!=(_:_:)"},{"type":"text","text":"."}],"metadata":{"fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"externalID":"s:SQsE2neoiySbx_xtFZ::SYNTHESIZED::s:7Factory0A3KeyV","symbolKind":"op","modules":[{"name":"Factory","relatedModules":["Swift"]}],"title":"!=(_:_:)","extendedModule":"Swift","roleHeading":"Operator","role":"symbol"},"schemaVersion":{"major":0,"patch":0,"minor":3},"variants":[{"paths":["\/documentation\/factory\/factorykey\/!=(_:_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/!=(_:_:)"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"text":"lhs","kind":"internalParam"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"rhs","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}],"languages":["swift"]}]}],"sections":[],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryKey/!=(_:_:)":{"kind":"symbol","role":"symbol","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"!=","kind":"identifier"},{"kind":"text","text":" "},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorykey\/!=(_:_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/!=(_:_:)","abstract":[],"type":"topic","title":"!=(_:_:)"},"doc://Factory/documentation/Factory/FactoryKey":{"navigatorTitle":[{"text":"FactoryKey","kind":"identifier"}],"kind":"symbol","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryKey"}],"url":"\/documentation\/factory\/factorykey","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey","type":"topic","title":"FactoryKey"},"doc://Factory/documentation/Factory/FactoryKey/Equatable-Implementations":{"url":"\/documentation\/factory\/factorykey\/equatable-implementations","title":"Equatable Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/Equatable-Implementations","role":"collectionGroup","abstract":[],"kind":"article","type":"topic"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorykey/==(_:_:).json b/docs/data/documentation/factory/factorykey/==(_:_:).json index 883fac00..254a465e 100644 --- a/docs/data/documentation/factory/factorykey/==(_:_:).json +++ b/docs/data/documentation/factory/factorykey/==(_:_:).json @@ -1 +1 @@ -{"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/==(_:_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Inherited from "},{"code":"Equatable.==(_:_:)","type":"codeVoice"},{"text":".","type":"text"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryKey"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"==","kind":"identifier"},{"kind":"text","text":" "},{"text":"(","kind":"text"},{"kind":"internalParam","text":"lhs"},{"text":": ","kind":"text"},{"text":"FactoryKey","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A3KeyV","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey"},{"text":", ","kind":"text"},{"kind":"internalParam","text":"rhs"},{"kind":"text","text":": "},{"text":"FactoryKey","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey","preciseIdentifier":"s:7Factory0A3KeyV"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}]}]}],"kind":"symbol","metadata":{"externalID":"s:7Factory0A3KeyV2eeoiySbAC_ACtFZ","symbolKind":"op","role":"symbol","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"=="},{"kind":"text","text":" "},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"FactoryKey","preciseIdentifier":"s:7Factory0A3KeyV"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"FactoryKey","preciseIdentifier":"s:7Factory0A3KeyV"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"title":"==(_:_:)","modules":[{"name":"Factory"}],"roleHeading":"Operator"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorykey\/==(_:_:)"]}],"sections":[],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryKey/==(_:_:)":{"role":"symbol","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"=="},{"kind":"text","text":" "},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"FactoryKey","preciseIdentifier":"s:7Factory0A3KeyV"},{"text":", ","kind":"text"},{"text":"FactoryKey","preciseIdentifier":"s:7Factory0A3KeyV","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/==(_:_:)","title":"==(_:_:)","url":"\/documentation\/factory\/factorykey\/==(_:_:)","type":"topic","kind":"symbol","abstract":[]},"doc://Factory/documentation/Factory/FactoryKey":{"title":"FactoryKey","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey","url":"\/documentation\/factory\/factorykey","type":"topic","role":"symbol","navigatorTitle":[{"text":"FactoryKey","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryKey"}],"kind":"symbol","abstract":[]}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"=="},{"text":" ","kind":"text"},{"text":"(","kind":"text"},{"text":"lhs","kind":"internalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A3KeyV","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey","text":"FactoryKey","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"internalParam","text":"rhs"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A3KeyV","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey","text":"FactoryKey"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}]}]}],"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryKey"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorykey\/==(_:_:)"]}],"kind":"symbol","abstract":[{"text":"Inherited from ","type":"text"},{"type":"codeVoice","code":"Equatable.==(_:_:)"},{"type":"text","text":"."}],"schemaVersion":{"major":0,"patch":0,"minor":3},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/==(_:_:)"},"metadata":{"roleHeading":"Operator","title":"==(_:_:)","externalID":"s:7Factory0A3KeyV2eeoiySbAC_ACtFZ","modules":[{"name":"Factory"}],"role":"symbol","symbolKind":"op","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"==","kind":"identifier"},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A3KeyV","text":"FactoryKey"},{"kind":"text","text":", "},{"preciseIdentifier":"s:7Factory0A3KeyV","text":"FactoryKey","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}]},"references":{"doc://Factory/documentation/Factory/FactoryKey":{"navigatorTitle":[{"text":"FactoryKey","kind":"identifier"}],"kind":"symbol","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryKey"}],"url":"\/documentation\/factory\/factorykey","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey","type":"topic","title":"FactoryKey"},"doc://Factory/documentation/Factory/FactoryKey/==(_:_:)":{"title":"==(_:_:)","abstract":[],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/==(_:_:)","kind":"symbol","url":"\/documentation\/factory\/factorykey\/==(_:_:)","role":"symbol","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"=="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"text":"FactoryKey","preciseIdentifier":"s:7Factory0A3KeyV","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"FactoryKey","preciseIdentifier":"s:7Factory0A3KeyV"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorykey/equatable-implementations.json b/docs/data/documentation/factory/factorykey/equatable-implementations.json index f0cd1f52..955c6db4 100644 --- a/docs/data/documentation/factory/factorykey/equatable-implementations.json +++ b/docs/data/documentation/factory/factorykey/equatable-implementations.json @@ -1 +1 @@ -{"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/!=(_:_:)"],"title":"Operators","generated":true}],"kind":"article","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryKey"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/Equatable-Implementations","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/factory\/factorykey\/equatable-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"role":"collectionGroup","title":"Equatable Implementations","modules":[{"name":"Factory"}]},"schemaVersion":{"minor":3,"patch":0,"major":0},"sections":[],"references":{"doc://Factory/documentation/Factory/FactoryKey":{"title":"FactoryKey","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey","url":"\/documentation\/factory\/factorykey","type":"topic","role":"symbol","navigatorTitle":[{"text":"FactoryKey","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryKey"}],"kind":"symbol","abstract":[]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryKey/!=(_:_:)":{"role":"symbol","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"!=","kind":"identifier"},{"text":" ","kind":"text"},{"text":"(","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/!=(_:_:)","title":"!=(_:_:)","url":"\/documentation\/factory\/factorykey\/!=(_:_:)","type":"topic","kind":"symbol","abstract":[]}}} \ No newline at end of file +{"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"modules":[{"name":"Factory"}],"title":"Equatable Implementations","role":"collectionGroup"},"kind":"article","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/Equatable-Implementations"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryKey"]]},"topicSections":[{"generated":true,"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/!=(_:_:)"],"title":"Operators"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorykey\/equatable-implementations"]}],"sections":[],"references":{"doc://Factory/documentation/Factory/FactoryKey":{"navigatorTitle":[{"text":"FactoryKey","kind":"identifier"}],"kind":"symbol","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryKey"}],"url":"\/documentation\/factory\/factorykey","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey","type":"topic","title":"FactoryKey"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryKey/!=(_:_:)":{"kind":"symbol","role":"symbol","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"!=","kind":"identifier"},{"kind":"text","text":" "},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorykey\/!=(_:_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/!=(_:_:)","abstract":[],"type":"topic","title":"!=(_:_:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorykey/hash(into:).json b/docs/data/documentation/factory/factorykey/hash(into:).json index 00ce2dd3..c90f1a51 100644 --- a/docs/data/documentation/factory/factorykey/hash(into:).json +++ b/docs/data/documentation/factory/factorykey/hash(into:).json @@ -1 +1 @@ -{"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/hash(into:)","interfaceLanguage":"swift"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryKey"]]},"abstract":[{"text":"Inherited from ","type":"text"},{"type":"codeVoice","code":"Hashable.hash(into:)"},{"text":".","type":"text"}],"metadata":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"hash"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"into"},{"kind":"text","text":": "},{"kind":"keyword","text":"inout"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s6HasherV","text":"Hasher"},{"kind":"text","text":")"}],"roleHeading":"Instance Method","modules":[{"name":"Factory"}],"title":"hash(into:)","symbolKind":"method","externalID":"s:7Factory0A3KeyV4hash4intoys6HasherVz_tF","role":"symbol"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"hash"},{"text":"(","kind":"text"},{"text":"into","kind":"externalParam"},{"kind":"text","text":" "},{"text":"hasher","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"keyword","text":"inout"},{"text":" ","kind":"text"},{"text":"Hasher","kind":"typeIdentifier","preciseIdentifier":"s:s6HasherV"},{"text":")","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}]}],"variants":[{"paths":["\/documentation\/factory\/factorykey\/hash(into:)"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/FactoryKey/hash(into:)":{"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"hash"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"into"},{"kind":"text","text":": "},{"kind":"keyword","text":"inout"},{"kind":"text","text":" "},{"preciseIdentifier":"s:s6HasherV","text":"Hasher","kind":"typeIdentifier"},{"kind":"text","text":")"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/hash(into:)","title":"hash(into:)","url":"\/documentation\/factory\/factorykey\/hash(into:)","type":"topic","kind":"symbol","abstract":[]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryKey":{"title":"FactoryKey","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey","url":"\/documentation\/factory\/factorykey","type":"topic","role":"symbol","navigatorTitle":[{"text":"FactoryKey","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryKey"}],"kind":"symbol","abstract":[]}}} \ No newline at end of file +{"sections":[],"metadata":{"title":"hash(into:)","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"hash","kind":"identifier"},{"kind":"text","text":"("},{"text":"into","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"keyword","text":"inout"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s6HasherV","text":"Hasher"},{"text":")","kind":"text"}],"externalID":"s:7Factory0A3KeyV4hash4intoys6HasherVz_tF","symbolKind":"method","roleHeading":"Instance Method","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryKey"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/hash(into:)","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/factory\/factorykey\/hash(into:)"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"hash"},{"text":"(","kind":"text"},{"text":"into","kind":"externalParam"},{"kind":"text","text":" "},{"text":"hasher","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"inout","kind":"keyword"},{"kind":"text","text":" "},{"preciseIdentifier":"s:s6HasherV","text":"Hasher","kind":"typeIdentifier"},{"kind":"text","text":")"}]}]}],"abstract":[{"text":"Inherited from ","type":"text"},{"code":"Hashable.hash(into:)","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryKey":{"navigatorTitle":[{"text":"FactoryKey","kind":"identifier"}],"kind":"symbol","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryKey"}],"url":"\/documentation\/factory\/factorykey","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey","type":"topic","title":"FactoryKey"},"doc://Factory/documentation/Factory/FactoryKey/hash(into:)":{"role":"symbol","url":"\/documentation\/factory\/factorykey\/hash(into:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey\/hash(into:)","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"hash","kind":"identifier"},{"kind":"text","text":"("},{"text":"into","kind":"externalParam"},{"kind":"text","text":": "},{"text":"inout","kind":"keyword"},{"kind":"text","text":" "},{"text":"Hasher","kind":"typeIdentifier","preciseIdentifier":"s:s6HasherV"},{"text":")","kind":"text"}],"abstract":[],"title":"hash(into:)","kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymanagedcontainer.json b/docs/data/documentation/factory/factorymanagedcontainer.json new file mode 100644 index 00000000..b2c61c49 --- /dev/null +++ b/docs/data/documentation/factory/factorymanagedcontainer.json @@ -0,0 +1 @@ +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymanagedcontainer"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"sections":[],"kind":"symbol","primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"text":"FactoryManagedContainer","kind":"identifier"},{"kind":"text","text":" = "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","text":"ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP","kind":"typeIdentifier"}]}],"kind":"declarations"}],"metadata":{"role":"symbol","modules":[{"name":"Factory"}],"roleHeading":"Type Alias","externalID":"s:7Factory0A16ManagedContainera","fragments":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryManagedContainer"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryManagedContainer"}],"symbolKind":"typealias","title":"FactoryManagedContainer"},"schemaVersion":{"minor":3,"patch":0,"major":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryManagedContainer","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/FactoryManagedContainer":{"title":"FactoryManagedContainer","abstract":[],"fragments":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryManagedContainer"}],"navigatorTitle":[{"text":"FactoryManagedContainer","kind":"identifier"}],"url":"\/documentation\/factory\/factorymanagedcontainer","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryManagedContainer"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ManagedContainer":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"text":"ManagedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"type":"topic","url":"\/documentation\/factory\/managedcontainer","title":"ManagedContainer"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying.json b/docs/data/documentation/factory/factorymodifying.json index 49bf1a01..6a5dc6ac 100644 --- a/docs/data/documentation/factory/factorymodifying.json +++ b/docs/data/documentation/factory/factorymodifying.json @@ -1 +1 @@ -{"variants":[{"paths":["\/documentation\/factory\/factorymodifying"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"topicSections":[{"title":"Associated Types","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T"]},{"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 Properties"},{"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\/reset(_:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/scope(_:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/timeToLive(_:)"],"title":"Instance Methods"}],"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"},"relationshipsSections":[{"kind":"relationships","type":"conformingTypes","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"],"title":"Conforming Types"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"metadata":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"roleHeading":"Protocol","title":"FactoryModifying","externalID":"s:7Factory0A9ModifyingP","role":"symbol","symbolKind":"protocol","modules":[{"name":"Factory"}]},"abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"references":{"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"type":"topic","url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Shared"}],"abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"role":"symbol"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/unique":{"kind":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/unique","title":"unique","url":"\/documentation\/factory\/factorymodifying\/unique","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"unique","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"text":"Syntactic sugar defines defines unique scope. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"reference","isActive":true},{"text":".","type":"text"}],"role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/registration":{"kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/factorymodifying\/registration","title":"registration","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/registration","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"text":"FactoryRegistration","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"abstract":[{"text":"Internal information that describes this Factory.","type":"text"}],"role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/timeToLive(_:)":{"kind":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/timeToLive(_:)","title":"timeToLive(_:)","url":"\/documentation\/factory\/factorymodifying\/timetolive(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"text":"TimeInterval","kind":"typeIdentifier","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"text":"Adds time to live option for scopes. If the dependency has been cached for longer than the timeToLive period the","type":"text"},{"type":"text","text":" "},{"type":"text","text":"cached item will be discarded and a new instance created."}],"role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/cached":{"kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/cached","title":"cached","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"cached","kind":"identifier"},{"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","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","isActive":true},{"text":".","type":"text"}],"role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/shared":{"kind":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/shared","title":"shared","url":"\/documentation\/factory\/factorymodifying\/shared","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","isActive":true},{"type":"text","text":"."}],"role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/reset(_:)":{"kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/reset(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/reset(_:)","title":"reset(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"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."}],"role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/onTest(factory:)":{"type":"topic","url":"\/documentation\/factory\/factorymodifying\/ontest(factory:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onTest","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"title":"onTest(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onTest(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/onPreview(factory:)":{"type":"topic","url":"\/documentation\/factory\/factorymodifying\/onpreview(factory:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onPreview","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"title":"onPreview(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onPreview(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/cached-swift.class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","navigatorTitle":[{"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."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","url":"\/documentation\/factory\/scope\/singleton-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"type":"topic","role":"symbol","title":"Scope.Singleton","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/graph":{"type":"topic","url":"\/documentation\/factory\/factorymodifying\/graph","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"graph"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/graph","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","isActive":true,"type":"reference"},{"text":".","type":"text"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/scope(_:)":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorymodifying\/scope(_:)","title":"scope(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/scope(_:)","role":"symbol","type":"topic","abstract":[{"text":"Defines a dependency scope for this Factory. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true,"type":"reference"},{"text":".","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"type":"topic","url":"\/documentation\/factory\/factorymodifying\/t","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}],"title":"T","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"title":"Scope.Graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/singleton":{"type":"topic","url":"\/documentation\/factory\/factorymodifying\/singleton","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/singleton","abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See ","type":"text"},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","type":"reference"},{"type":"text","text":"."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/onArgs(_:factory:)":{"type":"topic","url":"\/documentation\/factory\/factorymodifying\/onargs(_:factory:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArgs"},{"text":"([","kind":"text"},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"title":"onArgs(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArgs(_:factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryModifying/onDevice(factory:)":{"type":"topic","url":"\/documentation\/factory\/factorymodifying\/ondevice(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onDevice","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"onDevice(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDevice(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/onSimulator(factory:)":{"type":"topic","url":"\/documentation\/factory\/factorymodifying\/onsimulator(factory:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"title":"onSimulator(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onSimulator(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/onArg(_:factory:)":{"type":"topic","url":"\/documentation\/factory\/factorymodifying\/onarg(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArg"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"onArg(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArg(_:factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/decorator(_:)":{"role":"symbol","title":"decorator(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"decorator","kind":"identifier"},{"kind":"text","text":"(("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:s4Voida","text":"Void","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/decorator(_:)","kind":"symbol","url":"\/documentation\/factory\/factorymodifying\/decorator(_:)","abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"type":"emphasis","inlineContent":[{"type":"text","text":"always"}]},{"text":" be called with the resolved dependency","type":"text"},{"type":"text","text":" "},{"text":"for further examination or manipulation.","type":"text"}]},"doc://Factory/documentation/Factory/FactoryModifying/context(_:factory:)":{"type":"topic","url":"\/documentation\/factory\/factorymodifying\/context(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"context","kind":"identifier"},{"kind":"text","text":"("},{"text":"FactoryContextType","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A11ContextTypeO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"title":"context(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/context(_:factory:)","abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"required":true,"type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"title":"P","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","abstract":[{"type":"text","text":"The parameter type of the Factory, if any. Will be "},{"code":"Void","type":"codeVoice"},{"text":" on the standard Factory.","type":"text"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/onDebug(factory:)":{"url":"\/documentation\/factory\/factorymodifying\/ondebug(factory:)","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"title":"onDebug(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDebug(factory:)","abstract":[{"text":"Factory builder shortcut for context(.debug) { .. }","type":"text"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/once()":{"type":"topic","url":"\/documentation\/factory\/factorymodifying\/once()","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"once()","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/once()","abstract":[{"text":"Adds ability to mutate Factory on first instantiation only.","type":"text"}],"role":"symbol","kind":"symbol"}}} \ No newline at end of file +{"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/factorymodifying"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"sections":[],"abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"externalID":"s:7Factory0A9ModifyingP","role":"symbol","roleHeading":"Protocol","symbolKind":"protocol","title":"FactoryModifying","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"text":"FactoryModifying","kind":"identifier"}],"modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}]},"topicSections":[{"title":"Associated Types","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T"]},{"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 Properties"},{"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\/reset(_:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/scope(_:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/timeToLive(_:)"],"title":"Instance Methods"}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"],"kind":"relationships","title":"Conforming Types","type":"conformingTypes"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"languages":["swift"]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/onDebug(factory:)":{"type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"text":"Factory builder shortcut for context(.debug) { .. }","type":"text"}],"title":"onDebug(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDebug(factory:)","url":"\/documentation\/factory\/factorymodifying\/ondebug(factory:)"},"doc://Factory/documentation/Factory/FactoryModifying/context(_:factory:)":{"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"context","kind":"identifier"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:7Factory0A11ContextTypeO","text":"FactoryContextType","kind":"typeIdentifier"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/factorymodifying\/context(_:factory:)","title":"context(_:factory:)","abstract":[{"text":"Registers a factory closure to be used only when running in a specific context.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/context(_:factory:)","role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/onArg(_:factory:)":{"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onArg","kind":"identifier"},{"kind":"text","text":"("},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/factorymodifying\/onarg(_:factory:)","title":"onArg(_:factory:)","abstract":[{"text":"Factory builder shortcut for context(.arg(“test”) { .. }","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArg(_:factory:)","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Shared","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"},"doc://Factory/documentation/Factory/FactoryModifying/onSimulator(factory:)":{"kind":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorymodifying\/onsimulator(factory:)","title":"onSimulator(factory:)","abstract":[{"text":"Factory builder shortcut for context(.simulator) { .. }","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onSimulator(factory:)","role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"kind":"symbol","type":"topic","fragments":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"text":"T","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"required":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","title":"Scope.Singleton","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/singleton":{"kind":"symbol","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/factorymodifying\/singleton","title":"singleton","abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","isActive":true,"type":"reference"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/singleton","role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/cached":{"url":"\/documentation\/factory\/factorymodifying\/cached","kind":"symbol","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","isActive":true,"type":"reference"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/cached","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"cached","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"title":"cached","role":"symbol","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying/onArgs(_:factory:)":{"type":"topic","title":"onArgs(_:factory:)","kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArgs(_:factory:)","url":"\/documentation\/factory\/factorymodifying\/onargs(_:factory:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}]},"doc://Factory/documentation/Factory/FactoryModifying/timeToLive(_:)":{"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":" "},{"text":"cached item will be discarded and a new instance created.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"c:@T@NSTimeInterval","text":"TimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/factorymodifying\/timetolive(_:)","kind":"symbol","type":"topic","title":"timeToLive(_:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/timeToLive(_:)"},"doc://Factory/documentation/Factory/FactoryModifying/onPreview(factory:)":{"type":"topic","title":"onPreview(factory:)","kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onPreview(factory:)","url":"\/documentation\/factory\/factorymodifying\/onpreview(factory:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onPreview","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"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) { .. }"}]},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"type":"topic","title":"Scope.Cached","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","url":"\/documentation\/factory\/scope\/cached-swift.class","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."}]},"doc://Factory/documentation/Factory/FactoryModifying/registration":{"type":"topic","title":"registration","kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/registration","url":"\/documentation\/factory\/factorymodifying\/registration","required":true,"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12RegistrationV","text":"FactoryRegistration"},{"text":"<","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":", ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Internal information that describes this Factory."}]},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"},"doc://Factory/documentation/Factory/FactoryModifying/onDevice(factory:)":{"type":"topic","title":"onDevice(factory:)","kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDevice(factory:)","url":"\/documentation\/factory\/factorymodifying\/ondevice(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}]},"doc://Factory/documentation/Factory/FactoryModifying/onTest(factory:)":{"type":"topic","title":"onTest(factory:)","kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onTest(factory:)","url":"\/documentation\/factory\/factorymodifying\/ontest(factory:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}]},"doc://Factory/documentation/Factory/FactoryModifying/reset(_:)":{"url":"\/documentation\/factory\/factorymodifying\/reset(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"reset","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"type":"topic","title":"reset(_:)","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."}],"role":"symbol","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/reset(_:)"},"doc://Factory/documentation/Factory/FactoryModifying/shared":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/shared","title":"shared","role":"symbol","url":"\/documentation\/factory\/factorymodifying\/shared","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","isActive":true,"type":"reference"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","title":"P","role":"symbol","url":"\/documentation\/factory\/factorymodifying\/p","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"text":"P","kind":"identifier"}],"required":true,"abstract":[{"type":"text","text":"The parameter type of the Factory, if any. Will be "},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}]},"doc://Factory/documentation/Factory/FactoryModifying/decorator(_:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/decorator(_:)","title":"decorator(_:)","role":"symbol","url":"\/documentation\/factory\/factorymodifying\/decorator(_:)","type":"topic","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"type":"emphasis","inlineContent":[{"text":"always","type":"text"}]},{"text":" be called with the resolved dependency","type":"text"},{"type":"text","text":" "},{"type":"text","text":"for further examination or manipulation."}]},"doc://Factory/documentation/Factory/FactoryModifying/unique":{"url":"\/documentation\/factory\/factorymodifying\/unique","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"unique","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"type":"topic","title":"unique","abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"text":".","type":"text"}],"role":"symbol","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/unique"},"doc://Factory/documentation/Factory/FactoryModifying/once()":{"url":"\/documentation\/factory\/factorymodifying\/once()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"once","kind":"identifier"},{"text":"() -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"type":"topic","title":"once()","abstract":[{"text":"Adds ability to mutate Factory on first instantiation only.","type":"text"}],"role":"symbol","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/once()"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","title":"Scope.Graph","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"navigatorTitle":[{"text":"Graph","kind":"identifier"}],"role":"symbol","abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory/FactoryModifying/graph":{"url":"\/documentation\/factory\/factorymodifying\/graph","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"type":"topic","title":"graph","abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","isActive":true},{"type":"text","text":"."}],"role":"symbol","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/graph"},"doc://Factory/documentation/Factory/FactoryModifying/scope(_:)":{"url":"\/documentation\/factory\/factorymodifying\/scope(_:)","role":"symbol","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"preciseIdentifier":"s:7Factory5ScopeC","text":"Scope","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/scope(_:)","type":"topic","title":"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 48246291..94795541 100644 --- a/docs/data/documentation/factory/factorymodifying/cached.json +++ b/docs/data/documentation/factory/factorymodifying/cached.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"cached"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":" { "},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","type":"heading","text":"Discussion","level":2},{"type":"codeListing","code":["var service: Factory {"," factory { MyService() }"," .cached","}"],"syntax":"swift"}]}],"metadata":{"modules":[{"name":"Factory"}],"extendedModule":"Factory","title":"cached","role":"symbol","symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE6cachedxvp","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"roleHeading":"Instance Property"},"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/cached"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/cached","interfaceLanguage":"swift"},"schemaVersion":{"patch":0,"major":0,"minor":3},"sections":[],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"text":".","type":"text"}],"references":{"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/cached-swift.class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","navigatorTitle":[{"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."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/cached":{"kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/cached","title":"cached","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"cached","kind":"identifier"},{"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","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","isActive":true},{"text":".","type":"text"}],"role":"symbol"}}} \ No newline at end of file +{"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"type":"text","text":"."}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/cached","interfaceLanguage":"swift"},"schemaVersion":{"minor":3,"major":0,"patch":0},"metadata":{"symbolKind":"property","roleHeading":"Instance Property","role":"symbol","title":"cached","extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE6cachedxvp","modules":[{"name":"Factory"}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"cached","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"sections":[],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"]}],"kind":"declarations"},{"kind":"content","content":[{"anchor":"discussion","type":"heading","level":2,"text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .cached","}"]}]}],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/cached"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryModifying/cached":{"url":"\/documentation\/factory\/factorymodifying\/cached","kind":"symbol","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","isActive":true,"type":"reference"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/cached","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"cached","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"title":"cached","role":"symbol","type":"topic"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Cached","kind":"identifier"}],"type":"topic","navigatorTitle":[{"text":"Cached","kind":"identifier"}],"role":"symbol","kind":"symbol","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","title":"Scope.Cached","url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"}}} \ 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 1d3d2532..34c69b54 100644 --- a/docs/data/documentation/factory/factorymodifying/context(_:factory:).json +++ b/docs/data/documentation/factory/factorymodifying/context(_:factory:).json @@ -1 +1 @@ -{"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"context","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"contexts"},{"text":": ","kind":"text"},{"text":"FactoryContextType","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A11ContextTypeO"},{"text":"..., ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"platforms":["macOS"]}],"kind":"declarations"},{"content":[{"level":2,"anchor":"discussion","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":[{"text":"See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","type":"reference","isActive":true}]}],"kind":"content"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/context(_:factory:)"]}],"metadata":{"extendedModule":"Factory","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"context","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"FactoryContextType","preciseIdentifier":"s:7Factory0A11ContextTypeO"},{"text":"..., ","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE7context_7factoryxAA0A11ContextTypeOd_1TQz1PQzctF","modules":[{"name":"Factory"}],"roleHeading":"Instance Method","title":"context(_:factory:)"},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/context(_:factory:)","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/FactoryModifying/context(_:factory:)":{"type":"topic","url":"\/documentation\/factory\/factorymodifying\/context(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"context","kind":"identifier"},{"kind":"text","text":"("},{"text":"FactoryContextType","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A11ContextTypeO"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"title":"context(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/context(_:factory:)","abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContextType":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","url":"\/documentation\/factory\/factorycontexttype"},"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Contexts":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","title":"Contexts","type":"topic","role":"article","abstract":[{"text":"Changing injection results under special circumstances.","type":"text"}],"kind":"article","url":"\/documentation\/factory\/contexts"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/context(_:factory:)","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/context(_:factory:)"]}],"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"context","kind":"identifier"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"contexts"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A11ContextTypeO","text":"FactoryContextType"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"content":[{"type":"heading","text":"Discussion","level":2,"anchor":"discussion"},{"inlineContent":[{"type":"text","text":"A context might be be when running in SwiftUI preview mode, or when running unit tests."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","type":"reference","isActive":true}]}],"kind":"content"}],"metadata":{"externalID":"s:7Factory0A9ModifyingPAAE7context_7factoryxAA0A11ContextTypeOd_1TQz1PQzctF","roleHeading":"Instance Method","symbolKind":"method","modules":[{"name":"Factory"}],"title":"context(_:factory:)","role":"symbol","extendedModule":"Factory","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:7Factory0A11ContextTypeO","text":"FactoryContextType","kind":"typeIdentifier"},{"text":"..., ","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}]},"kind":"symbol","sections":[],"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"references":{"doc://Factory/documentation/Factory/FactoryContextType":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"text":"Context types available for special purpose factory registrations.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","type":"topic","url":"\/documentation\/factory\/factorycontexttype"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"},"doc://Factory/documentation/Factory/Contexts":{"abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"type":"topic","role":"article","title":"Contexts","kind":"article","url":"\/documentation\/factory\/contexts","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"},"doc://Factory/documentation/Factory/FactoryModifying/context(_:factory:)":{"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"context","kind":"identifier"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:7Factory0A11ContextTypeO","text":"FactoryContextType","kind":"typeIdentifier"},{"kind":"text","text":"..., "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/factorymodifying\/context(_:factory:)","title":"context(_:factory:)","abstract":[{"text":"Registers a factory closure to be used only when running in a specific context.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/context(_:factory:)","role":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying/decorator(_:).json b/docs/data/documentation/factory/factorymodifying/decorator(_:).json index d434bc93..1ee16992 100644 --- a/docs/data/documentation/factory/factorymodifying/decorator(_:).json +++ b/docs/data/documentation/factory/factorymodifying/decorator(_:).json @@ -1 +1 @@ -{"sections":[],"metadata":{"symbolKind":"method","modules":[{"name":"Factory"}],"roleHeading":"Instance Method","title":"decorator(_:)","externalID":"s:7Factory0A9ModifyingPAAE9decoratoryxy1TQzcF","extendedModule":"Factory","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"decorator","kind":"identifier"},{"text":"((","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol"},"schemaVersion":{"major":0,"patch":0,"minor":3},"kind":"symbol","abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"inlineContent":[{"type":"text","text":"always"}],"type":"emphasis"},{"text":" be called with the resolved dependency","type":"text"},{"type":"text","text":" "},{"type":"text","text":"for further examination or manipulation."}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/decorator(_:)"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"decorator","kind":"identifier"},{"text":"(","kind":"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"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"]}],"kind":"declarations"},{"kind":"content","content":[{"text":"Discussion","level":2,"type":"heading","anchor":"discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This includes previously created items that may have been cached by a scope."}]},{"syntax":"swift","code":["var decoratedService: Factory {"," self { ParentChildService() }"," .decorated {"," $0.child.parent = $0"," }","}"],"type":"codeListing"},{"inlineContent":[{"text":"As shown, decorator can come in handy when you need to perform some operation or manipulation after the fact.","type":"text"}],"type":"paragraph"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/decorator(_:)","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryModifying/decorator(_:)":{"role":"symbol","title":"decorator(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"decorator","kind":"identifier"},{"kind":"text","text":"(("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:s4Voida","text":"Void","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/decorator(_:)","kind":"symbol","url":"\/documentation\/factory\/factorymodifying\/decorator(_:)","abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"type":"emphasis","inlineContent":[{"type":"text","text":"always"}]},{"text":" be called with the resolved dependency","type":"text"},{"type":"text","text":" "},{"text":"for further examination or manipulation.","type":"text"}]},"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"}}} \ No newline at end of file +{"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/decorator(_:)"},"abstract":[{"text":"Adds a factory specific decorator. The decorator will be ","type":"text"},{"inlineContent":[{"text":"always","type":"text"}],"type":"emphasis"},{"text":" be called with the resolved dependency","type":"text"},{"type":"text","text":" "},{"type":"text","text":"for further examination or manipulation."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Instance Method","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"decorator","kind":"identifier"},{"text":"((","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"externalID":"s:7Factory0A9ModifyingPAAE9decoratoryxy1TQzcF","symbolKind":"method","role":"symbol","title":"decorator(_:)","extendedModule":"Factory"},"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/factorymodifying\/decorator(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"decorator"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:s4Voida","text":"Void","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"]}]},{"kind":"content","content":[{"type":"heading","anchor":"discussion","level":2,"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":[{"text":"As shown, decorator can come in handy when you need to perform some operation or manipulation after the fact.","type":"text"}]}]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryModifying/decorator(_:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/decorator(_:)","title":"decorator(_:)","role":"symbol","url":"\/documentation\/factory\/factorymodifying\/decorator(_:)","type":"topic","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"type":"emphasis","inlineContent":[{"text":"always","type":"text"}]},{"text":" be called with the resolved dependency","type":"text"},{"type":"text","text":" "},{"type":"text","text":"for further examination or manipulation."}]},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"}}} \ 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 00a342c3..ec8c0717 100644 --- a/docs/data/documentation/factory/factorymodifying/graph.json +++ b/docs/data/documentation/factory/factorymodifying/graph.json @@ -1 +1 @@ -{"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/graph"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/graph"},"schemaVersion":{"patch":0,"minor":3,"major":0},"metadata":{"title":"graph","externalID":"s:7Factory0A9ModifyingPAAE5graphxvp","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"graph","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol","roleHeading":"Instance Property","symbolKind":"property","extendedModule":"Factory","modules":[{"name":"Factory"}]},"abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","isActive":true},{"text":".","type":"text"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"kind":"text","text":" }"}]}]},{"content":[{"level":2,"type":"heading","text":"Discussion","anchor":"discussion"},{"syntax":"swift","type":"codeListing","code":["var service: Factory {"," factory { MyService() }"," .graph","}"]}],"kind":"content"}],"references":{"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"title":"Scope.Graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/graph":{"type":"topic","url":"\/documentation\/factory\/factorymodifying\/graph","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"graph"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/graph","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","isActive":true,"type":"reference"},{"text":".","type":"text"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/graph","interfaceLanguage":"swift"},"schemaVersion":{"minor":3,"major":0,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/graph"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"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":" { "},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"level":2,"type":"heading","text":"Discussion","anchor":"discussion"},{"syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .graph","}"],"type":"codeListing"}]}],"metadata":{"roleHeading":"Instance Property","modules":[{"name":"Factory"}],"title":"graph","externalID":"s:7Factory0A9ModifyingPAAE5graphxvp","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"symbolKind":"property","extendedModule":"Factory","role":"symbol"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"text":".","type":"text"}],"references":{"doc://Factory/documentation/Factory/FactoryModifying/graph":{"url":"\/documentation\/factory\/factorymodifying\/graph","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"type":"topic","title":"graph","abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","isActive":true},{"type":"text","text":"."}],"role":"symbol","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/graph"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","title":"Scope.Graph","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"navigatorTitle":[{"text":"Graph","kind":"identifier"}],"role":"symbol","abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/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 fcb2890d..bda5d8cd 100644 --- a/docs/data/documentation/factory/factorymodifying/onarg(_:factory:).json +++ b/docs/data/documentation/factory/factorymodifying/onarg(_:factory:).json @@ -1 +1 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArg(_:factory:)","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onArg","kind":"identifier"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"argument","kind":"internalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"text":", ","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"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"}],"platforms":["macOS"],"languages":["swift"]}]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"metadata":{"symbolKind":"method","roleHeading":"Instance Method","extendedModule":"Factory","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArg"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":", "},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"onArg(_:factory:)","externalID":"s:7Factory0A9ModifyingPAAE5onArg_7factoryxSS_1TQz1PQzctF","modules":[{"name":"Factory"}],"role":"symbol"},"kind":"symbol","sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/onarg(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryModifying/onArg(_:factory:)":{"type":"topic","url":"\/documentation\/factory\/factorymodifying\/onarg(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArg"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"onArg(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArg(_:factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"role":"symbol","kind":"symbol"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onArg","kind":"identifier"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"argument"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"text":", ","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"platforms":["macOS"],"languages":["swift"]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArg(_:factory:)"},"metadata":{"roleHeading":"Instance Method","extendedModule":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"onArg(_:factory:)","externalID":"s:7Factory0A9ModifyingPAAE5onArg_7factoryxSS_1TQz1PQzctF","modules":[{"name":"Factory"}],"symbolKind":"method"},"sections":[],"schemaVersion":{"patch":0,"minor":3,"major":0},"abstract":[{"text":"Factory builder shortcut for context(.arg(“test”) { .. }","type":"text"}],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/onarg(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/FactoryModifying/onArg(_:factory:)":{"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onArg","kind":"identifier"},{"kind":"text","text":"("},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/factorymodifying\/onarg(_:factory:)","title":"onArg(_:factory:)","abstract":[{"text":"Factory builder shortcut for context(.arg(“test”) { .. }","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArg(_:factory:)","role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ 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 8f7d9f2e..5f39ce9c 100644 --- a/docs/data/documentation/factory/factorymodifying/onargs(_:factory:).json +++ b/docs/data/documentation/factory/factorymodifying/onargs(_:factory:).json @@ -1 +1 @@ -{"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onArgs","kind":"identifier"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":"], ","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"extendedModule":"Factory","modules":[{"name":"Factory"}],"title":"onArgs(_:factory:)","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE6onArgs_7factoryxSaySSG_1TQz1PQzctF","symbolKind":"method"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/onargs(_:factory:)"]}],"abstract":[{"text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }","type":"text"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArgs(_:factory:)","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArgs"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"args"},{"text":": [","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":"], ","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"]}]}],"references":{"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryModifying/onArgs(_:factory:)":{"type":"topic","url":"\/documentation\/factory\/factorymodifying\/onargs(_:factory:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArgs"},{"text":"([","kind":"text"},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"title":"onArgs(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArgs(_:factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"role":"symbol","kind":"symbol"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArgs"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"args"},{"kind":"text","text":": ["},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/onargs(_:factory:)"]}],"metadata":{"title":"onArgs(_:factory:)","modules":[{"name":"Factory"}],"extendedModule":"Factory","roleHeading":"Instance Method","externalID":"s:7Factory0A9ModifyingPAAE6onArgs_7factoryxSaySSG_1TQz1PQzctF","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"text":"([","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArgs(_:factory:)","interfaceLanguage":"swift"},"abstract":[{"text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }","type":"text"}],"kind":"symbol","sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/FactoryModifying/onArgs(_:factory:)":{"type":"topic","title":"onArgs(_:factory:)","kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArgs(_:factory:)","url":"\/documentation\/factory\/factorymodifying\/onargs(_:factory:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}]},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"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 e5796fd4..23be1edb 100644 --- a/docs/data/documentation/factory/factorymodifying/once().json +++ b/docs/data/documentation/factory/factorymodifying/once().json @@ -1 +1 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/once()","interfaceLanguage":"swift"},"kind":"symbol","abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"schemaVersion":{"patch":0,"minor":3,"major":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/once()"]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}]}],"sections":[],"metadata":{"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"once","kind":"identifier"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"modules":[{"name":"Factory"}],"title":"once()","externalID":"s:7Factory0A9ModifyingPAAE4oncexyF","roleHeading":"Instance Method","extendedModule":"Factory","symbolKind":"method"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/FactoryModifying/once()":{"type":"topic","url":"\/documentation\/factory\/factorymodifying\/once()","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"once()","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/once()","abstract":[{"text":"Adds ability to mutate Factory on first instantiation only.","type":"text"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"abstract":[{"text":"Adds ability to mutate Factory on first instantiation only.","type":"text"}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"once","kind":"identifier"},{"text":"() -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"]}],"kind":"declarations"}],"schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"symbolKind":"method","extendedModule":"Factory","modules":[{"name":"Factory"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"once"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"externalID":"s:7Factory0A9ModifyingPAAE4oncexyF","role":"symbol","title":"once()","roleHeading":"Instance Method"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/once()","interfaceLanguage":"swift"},"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/once()"]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryModifying/once()":{"url":"\/documentation\/factory\/factorymodifying\/once()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"once","kind":"identifier"},{"text":"() -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"type":"topic","title":"once()","abstract":[{"text":"Adds ability to mutate Factory on first instantiation only.","type":"text"}],"role":"symbol","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/once()"},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"}}} \ 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 dcee2870..588d5003 100644 --- a/docs/data/documentation/factory/factorymodifying/ondebug(factory:).json +++ b/docs/data/documentation/factory/factorymodifying/ondebug(factory:).json @@ -1 +1 @@ -{"sections":[],"metadata":{"externalID":"s:7Factory0A9ModifyingPAAE7onDebug7factoryx1TQz1PQzc_tF","extendedModule":"Factory","modules":[{"name":"Factory"}],"title":"onDebug(factory:)","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onDebug"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onDebug","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"]}]}],"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDebug(factory:)","interfaceLanguage":"swift"},"schemaVersion":{"patch":0,"major":0,"minor":3},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/ondebug(factory:)"]}],"references":{"doc://Factory/documentation/Factory/FactoryModifying/onDebug(factory:)":{"url":"\/documentation\/factory\/factorymodifying\/ondebug(factory:)","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"title":"onDebug(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDebug(factory:)","abstract":[{"text":"Factory builder shortcut for context(.debug) { .. }","type":"text"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/ondebug(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"schemaVersion":{"major":0,"patch":0,"minor":3},"kind":"symbol","primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onDebug","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"]}],"kind":"declarations"}],"metadata":{"modules":[{"name":"Factory"}],"extendedModule":"Factory","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onDebug","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"roleHeading":"Instance Method","symbolKind":"method","title":"onDebug(factory:)","externalID":"s:7Factory0A9ModifyingPAAE7onDebug7factoryx1TQz1PQzc_tF","role":"symbol"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDebug(factory:)"},"abstract":[{"text":"Factory builder shortcut for context(.debug) { .. }","type":"text"}],"references":{"doc://Factory/documentation/Factory/FactoryModifying/onDebug(factory:)":{"type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"text":"Factory builder shortcut for context(.debug) { .. }","type":"text"}],"title":"onDebug(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDebug(factory:)","url":"\/documentation\/factory\/factorymodifying\/ondebug(factory:)"},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying/ondevice(factory:).json b/docs/data/documentation/factory/factorymodifying/ondevice(factory:).json index 27e21b02..6027a528 100644 --- a/docs/data/documentation/factory/factorymodifying/ondevice(factory:).json +++ b/docs/data/documentation/factory/factorymodifying/ondevice(factory:).json @@ -1 +1 @@ -{"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"extendedModule":"Factory","title":"onDevice(factory:)","modules":[{"name":"Factory"}],"role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE8onDevice7factoryx1TQz1PQzc_tF","symbolKind":"method"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/ondevice(factory:)"]}],"abstract":[{"text":"Factory builder shortcut for context(.device) { .. }","type":"text"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDevice(factory:)","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryModifying/onDevice(factory:)":{"type":"topic","url":"\/documentation\/factory\/factorymodifying\/ondevice(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onDevice","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"onDevice(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDevice(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDevice(factory:)","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/ondevice(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"extendedModule":"Factory","role":"symbol","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onDevice","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"roleHeading":"Instance Method","externalID":"s:7Factory0A9ModifyingPAAE8onDevice7factoryx1TQz1PQzc_tF","modules":[{"name":"Factory"}],"title":"onDevice(factory:)"},"abstract":[{"text":"Factory builder shortcut for context(.device) { .. }","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onDevice","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"]}]}],"sections":[],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"},"doc://Factory/documentation/Factory/FactoryModifying/onDevice(factory:)":{"type":"topic","title":"onDevice(factory:)","kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDevice(factory:)","url":"\/documentation\/factory\/factorymodifying\/ondevice(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}]}}} \ 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 94f5c9a7..629098cd 100644 --- a/docs/data/documentation/factory/factorymodifying/onpreview(factory:).json +++ b/docs/data/documentation/factory/factorymodifying/onpreview(factory:).json @@ -1 +1 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onPreview(factory:)","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onPreview","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]}],"kind":"declarations"}],"kind":"symbol","schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"extendedModule":"Factory","modules":[{"name":"Factory"}],"title":"onPreview(factory:)","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE9onPreview7factoryx1TQz1PQzc_tF","symbolKind":"method"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/onpreview(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"references":{"doc://Factory/documentation/Factory/FactoryModifying/onPreview(factory:)":{"type":"topic","url":"\/documentation\/factory\/factorymodifying\/onpreview(factory:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onPreview","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"title":"onPreview(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onPreview(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onPreview(factory:)"},"schemaVersion":{"major":0,"patch":0,"minor":3},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onPreview","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"platforms":["macOS"],"languages":["swift"]}]}],"sections":[],"abstract":[{"text":"Factory builder shortcut for context(.preview) { .. }","type":"text"}],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/onpreview(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"symbolKind":"method","extendedModule":"Factory","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onPreview","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE9onPreview7factoryx1TQz1PQzc_tF","title":"onPreview(factory:)","modules":[{"name":"Factory"}],"roleHeading":"Instance Method"},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/FactoryModifying/onPreview(factory:)":{"type":"topic","title":"onPreview(factory:)","kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onPreview(factory:)","url":"\/documentation\/factory\/factorymodifying\/onpreview(factory:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onPreview","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"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) { .. }"}]},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying/onsimulator(factory:).json b/docs/data/documentation/factory/factorymodifying/onsimulator(factory:).json index 2e03ae9a..e8e688f5 100644 --- a/docs/data/documentation/factory/factorymodifying/onsimulator(factory:).json +++ b/docs/data/documentation/factory/factorymodifying/onsimulator(factory:).json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"schemaVersion":{"minor":3,"major":0,"patch":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onSimulator(factory:)","interfaceLanguage":"swift"},"metadata":{"role":"symbol","roleHeading":"Instance Method","symbolKind":"method","title":"onSimulator(factory:)","externalID":"s:7Factory0A9ModifyingPAAE11onSimulator7factoryx1TQz1PQzc_tF","extendedModule":"Factory","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onSimulator","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]},"kind":"symbol","abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/onsimulator(factory:)"]}],"sections":[],"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onSimulator","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"platforms":["macOS"]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory/FactoryModifying/onSimulator(factory:)":{"type":"topic","url":"\/documentation\/factory\/factorymodifying\/onsimulator(factory:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"title":"onSimulator(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onSimulator(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"}}} \ No newline at end of file +{"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/factorymodifying\/onsimulator(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"]}]}],"metadata":{"role":"symbol","roleHeading":"Instance Method","extendedModule":"Factory","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onSimulator","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"onSimulator(factory:)","externalID":"s:7Factory0A9ModifyingPAAE11onSimulator7factoryx1TQz1PQzc_tF","modules":[{"name":"Factory"}],"symbolKind":"method"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onSimulator(factory:)","interfaceLanguage":"swift"},"sections":[],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryModifying/onSimulator(factory:)":{"kind":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorymodifying\/onsimulator(factory:)","title":"onSimulator(factory:)","abstract":[{"text":"Factory builder shortcut for context(.simulator) { .. }","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onSimulator(factory:)","role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"}}} \ 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 b6210673..a7504404 100644 --- a/docs/data/documentation/factory/factorymodifying/ontest(factory:).json +++ b/docs/data/documentation/factory/factorymodifying/ontest(factory:).json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onTest","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"]}],"kind":"declarations"}],"sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"metadata":{"roleHeading":"Instance Method","modules":[{"name":"Factory"}],"role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"onTest(factory:)","extendedModule":"Factory","symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE6onTest7factoryx1TQz1PQzc_tF"},"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/factorymodifying\/ontest(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onTest(factory:)"},"references":{"doc://Factory/documentation/Factory/FactoryModifying/onTest(factory:)":{"type":"topic","url":"\/documentation\/factory\/factorymodifying\/ontest(factory:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onTest","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"title":"onTest(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onTest(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"}}} \ No newline at end of file +{"sections":[],"metadata":{"role":"symbol","extendedModule":"Factory","roleHeading":"Instance Method","title":"onTest(factory:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onTest","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"symbolKind":"method","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE6onTest7factoryx1TQz1PQzc_tF"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onTest","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onTest(factory:)","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/ontest(factory:)"]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryModifying/onTest(factory:)":{"type":"topic","title":"onTest(factory:)","kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onTest(factory:)","url":"\/documentation\/factory\/factorymodifying\/ontest(factory:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}]},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"}}} \ 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 ff312f04..05997620 100644 --- a/docs/data/documentation/factory/factorymodifying/p.json +++ b/docs/data/documentation/factory/factorymodifying/p.json @@ -1 +1 @@ -{"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."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"languages":["swift"],"platforms":["macOS"]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/p"]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"schemaVersion":{"patch":0,"minor":3,"major":0},"metadata":{"externalID":"s:7Factory0A9ModifyingP1PQa","symbolKind":"associatedtype","role":"symbol","title":"P","roleHeading":"Associated Type","required":true,"modules":[{"name":"Factory"}],"fragments":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]},"sections":[],"references":{"doc://Factory/documentation/Factory/FactoryModifying/P":{"required":true,"type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"title":"P","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","abstract":[{"type":"text","text":"The parameter type of the Factory, if any. Will be "},{"code":"Void","type":"codeVoice"},{"text":" on the standard Factory.","type":"text"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"}}} \ No newline at end of file +{"sections":[],"metadata":{"title":"P","roleHeading":"Associated Type","modules":[{"name":"Factory"}],"symbolKind":"associatedtype","externalID":"s:7Factory0A9ModifyingP1PQa","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"required":true,"role":"symbol"},"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"},{"text":" on the standard Factory.","type":"text"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}],"languages":["swift"]}]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/p"]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","title":"P","role":"symbol","url":"\/documentation\/factory\/factorymodifying\/p","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"text":"P","kind":"identifier"}],"required":true,"abstract":[{"type":"text","text":"The parameter type of the Factory, if any. Will be "},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}]},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/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 ddb67a29..c24bdbf4 100644 --- a/docs/data/documentation/factory/factorymodifying/registration.json +++ b/docs/data/documentation/factory/factorymodifying/registration.json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"registration","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A12RegistrationV","text":"FactoryRegistration","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"> { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"text":"set","kind":"keyword"},{"text":" }","kind":"text"}]}],"kind":"declarations"}],"schemaVersion":{"minor":3,"major":0,"patch":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/registration"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"abstract":[{"type":"text","text":"Internal information that describes this Factory."}],"metadata":{"externalID":"s:7Factory0A9ModifyingP12registrationAA0A12RegistrationVy1PQz1TQzGvp","required":true,"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A12RegistrationV","text":"FactoryRegistration","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"modules":[{"name":"Factory"}],"symbolKind":"property","title":"registration","roleHeading":"Instance Property","role":"symbol"},"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/factorymodifying\/registration"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryRegistration":{"title":"FactoryRegistration","type":"topic","url":"\/documentation\/factory\/factoryregistration","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","role":"symbol","navigatorTitle":[{"text":"FactoryRegistration","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryRegistration","kind":"identifier"}],"kind":"symbol","abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}]},"doc://Factory/documentation/Factory/FactoryModifying/registration":{"kind":"symbol","required":true,"type":"topic","url":"\/documentation\/factory\/factorymodifying\/registration","title":"registration","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/registration","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"text":"FactoryRegistration","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"abstract":[{"text":"Internal information that describes this Factory.","type":"text"}],"role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"}}} \ No newline at end of file +{"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"sections":[],"abstract":[{"text":"Internal information that describes this Factory.","type":"text"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"required":true,"symbolKind":"property","role":"symbol","title":"registration","roleHeading":"Instance Property","externalID":"s:7Factory0A9ModifyingP12registrationAA0A12RegistrationVy1PQz1TQzGvp","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"registration","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A12RegistrationV","text":"FactoryRegistration","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"modules":[{"name":"Factory"}]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"registration","kind":"identifier"},{"kind":"text","text":": "},{"text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"> { "},{"text":"get","kind":"keyword"},{"kind":"text","text":" "},{"text":"set","kind":"keyword"},{"kind":"text","text":" }"}]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/registration"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/registration"},"references":{"doc://Factory/documentation/Factory/FactoryModifying/registration":{"type":"topic","title":"registration","kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/registration","url":"\/documentation\/factory\/factorymodifying\/registration","required":true,"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12RegistrationV","text":"FactoryRegistration"},{"text":"<","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":", ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Internal information that describes this Factory."}]},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"},"doc://Factory/documentation/Factory/FactoryRegistration":{"url":"\/documentation\/factory\/factoryregistration","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","title":"FactoryRegistration","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"}],"kind":"symbol","role":"symbol","type":"topic"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ 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 c6e79ad4..f2fde344 100644 --- a/docs/data/documentation/factory/factorymodifying/reset(_:).json +++ b/docs/data/documentation/factory/factorymodifying/reset(_:).json @@ -1 +1 @@ -{"kind":"symbol","schemaVersion":{"minor":3,"major":0,"patch":0},"sections":[],"abstract":[{"text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope.","type":"text"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/reset(_:)"]}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"options"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"text":" = .all) -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]}],"kind":"declarations"},{"kind":"parameters","parameters":[{"name":"options","content":[{"inlineContent":[{"type":"text","text":"options description"}],"type":"paragraph"}]}]}],"metadata":{"role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE5resetyxAA0A12ResetOptionsOF","roleHeading":"Instance Method","extendedModule":"Factory","symbolKind":"method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"title":"reset(_:)","modules":[{"name":"Factory"}]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/reset(_:)"},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryModifying/reset(_:)":{"kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/reset(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/reset(_:)","title":"reset(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"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."}],"role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"title":"FactoryResetOptions"}}} \ No newline at end of file +{"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/reset(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier","text":"FactoryResetOptions"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE5resetyxAA0A12ResetOptionsOF","symbolKind":"method","title":"reset(_:)","role":"symbol","roleHeading":"Instance Method","extendedModule":"Factory"},"schemaVersion":{"minor":3,"major":0,"patch":0},"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/reset(_:)"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"abstract":[{"text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope.","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"options","kind":"internalParam"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","kind":"typeIdentifier"},{"kind":"text","text":" = .all) -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"]}]},{"parameters":[{"name":"options","content":[{"type":"paragraph","inlineContent":[{"text":"options description","type":"text"}]}]}],"kind":"parameters"}],"references":{"doc://Factory/documentation/Factory/FactoryModifying/reset(_:)":{"url":"\/documentation\/factory\/factorymodifying\/reset(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"reset","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"type":"topic","title":"reset(_:)","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."}],"role":"symbol","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/reset(_:)"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","title":"FactoryResetOptions","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryResetOptions","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"}}} \ 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 08ed2d63..7fc4683e 100644 --- a/docs/data/documentation/factory/factorymodifying/scope(_:).json +++ b/docs/data/documentation/factory/factorymodifying/scope(_:).json @@ -1 +1 @@ -{"sections":[],"metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"text":"(","kind":"text"},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"externalID":"s:7Factory0A9ModifyingPAAE5scopeyxAA5ScopeCF","title":"scope(_:)","roleHeading":"Instance Method","extendedModule":"Factory","modules":[{"name":"Factory"}],"role":"symbol","symbolKind":"method"},"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"scope","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"scope"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"platforms":["macOS"]}],"kind":"declarations"},{"content":[{"level":2,"anchor":"discussion","text":"Discussion","type":"heading"},{"syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .scope(.session)","}"],"type":"codeListing"}],"kind":"content"}],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/scope(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","abstract":[{"text":"Defines a dependency scope for this Factory. See ","type":"text"},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"reference"},{"type":"text","text":"."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/scope(_:)","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/scope(_:)":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorymodifying\/scope(_:)","title":"scope(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/scope(_:)","role":"symbol","type":"topic","abstract":[{"text":"Defines a dependency scope for this Factory. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true,"type":"reference"},{"text":".","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"schemaVersion":{"major":0,"patch":0,"minor":3},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/scope(_:)"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"scope","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"scope"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"]}]},{"kind":"content","content":[{"type":"heading","text":"Discussion","level":2,"anchor":"discussion"},{"code":["var service: Factory {"," self { MyService() }"," .scope(.session)","}"],"type":"codeListing","syntax":"swift"}]}],"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"reference"},{"type":"text","text":"."}],"metadata":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"scope"},{"text":"(","kind":"text"},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"externalID":"s:7Factory0A9ModifyingPAAE5scopeyxAA5ScopeCF","role":"symbol","modules":[{"name":"Factory"}],"title":"scope(_:)","extendedModule":"Factory","symbolKind":"method","roleHeading":"Instance Method"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/scope(_:)"]}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/FactoryModifying/scope(_:)":{"url":"\/documentation\/factory\/factorymodifying\/scope(_:)","role":"symbol","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"preciseIdentifier":"s:7Factory5ScopeC","text":"Scope","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/scope(_:)","type":"topic","title":"scope(_:)"},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ 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 26b7867a..a64547de 100644 --- a/docs/data/documentation/factory/factorymodifying/shared.json +++ b/docs/data/documentation/factory/factorymodifying/shared.json @@ -1 +1 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/shared","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"sections":[],"abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See ","type":"text"},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","type":"reference"},{"type":"text","text":"."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"kind":"text","text":" }"}],"languages":["swift"]}]},{"kind":"content","content":[{"level":2,"type":"heading","anchor":"discussion","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .shared","}"]}]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/shared"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","metadata":{"roleHeading":"Instance Property","extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE6sharedxvp","symbolKind":"property","role":"symbol","modules":[{"name":"Factory"}],"title":"shared","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}]},"references":{"doc://Factory/documentation/Factory/FactoryModifying/shared":{"kind":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/shared","title":"shared","url":"\/documentation\/factory\/factorymodifying\/shared","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","isActive":true},{"type":"text","text":"."}],"role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"type":"topic","url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Shared"}],"abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","type":"reference"},{"type":"text","text":"."}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/shared"},"kind":"symbol","metadata":{"modules":[{"name":"Factory"}],"extendedModule":"Factory","roleHeading":"Instance Property","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"externalID":"s:7Factory0A9ModifyingPAAE6sharedxvp","symbolKind":"property","role":"symbol","title":"shared"},"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/shared"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"schemaVersion":{"major":0,"patch":0,"minor":3},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}]}],"kind":"declarations"},{"kind":"content","content":[{"level":2,"anchor":"discussion","type":"heading","text":"Discussion"},{"syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .shared","}"],"type":"codeListing"}]}],"sections":[],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Shared","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/shared":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/shared","title":"shared","role":"symbol","url":"\/documentation\/factory\/factorymodifying\/shared","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","isActive":true,"type":"reference"},{"type":"text","text":"."}]}}} \ 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 c093c05d..74027851 100644 --- a/docs/data/documentation/factory/factorymodifying/singleton.json +++ b/docs/data/documentation/factory/factorymodifying/singleton.json @@ -1 +1 @@ -{"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","type":"reference","isActive":true},{"text":".","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"kind":"text","text":" }"}],"languages":["swift"]}]},{"kind":"content","content":[{"level":2,"type":"heading","text":"Discussion","anchor":"discussion"},{"syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .singleton","}"],"type":"codeListing"}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/singleton"]}],"metadata":{"extendedModule":"Factory","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE9singletonxvp","modules":[{"name":"Factory"}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"roleHeading":"Instance Property","title":"singleton","symbolKind":"property"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/singleton"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"sections":[],"references":{"doc://Factory/documentation/Factory/FactoryModifying/singleton":{"type":"topic","url":"\/documentation\/factory\/factorymodifying\/singleton","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/singleton","abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See ","type":"text"},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","type":"reference"},{"type":"text","text":"."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","url":"\/documentation\/factory\/scope\/singleton-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"type":"topic","role":"symbol","title":"Scope.Singleton","kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"kind":"symbol","sections":[],"abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","isActive":true,"type":"reference"},{"type":"text","text":"."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"singleton"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":" { "},{"text":"get","kind":"keyword"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"codeListing","code":["var service: Factory {"," self { MyService() }"," .singleton","}"],"syntax":"swift"}],"kind":"content"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/singleton","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/singleton"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"role":"symbol","roleHeading":"Instance Property","title":"singleton","modules":[{"name":"Factory"}],"extendedModule":"Factory","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"externalID":"s:7Factory0A9ModifyingPAAE9singletonxvp","symbolKind":"property"},"references":{"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","title":"Scope.Singleton","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryModifying/singleton":{"kind":"symbol","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/factorymodifying\/singleton","title":"singleton","abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","isActive":true,"type":"reference"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/singleton","role":"symbol"}}} \ 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 d568180f..bf00cb25 100644 --- a/docs/data/documentation/factory/factorymodifying/t.json +++ b/docs/data/documentation/factory/factorymodifying/t.json @@ -1 +1 @@ -{"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/t"]}],"metadata":{"title":"T","externalID":"s:7Factory0A9ModifyingP1TQa","role":"symbol","modules":[{"name":"Factory"}],"symbolKind":"associatedtype","required":true,"roleHeading":"Associated Type","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"text":"T","kind":"identifier"}]},"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T"},"sections":[],"abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"references":{"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"type":"topic","url":"\/documentation\/factory\/factorymodifying\/t","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}],"title":"T","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"}}} \ No newline at end of file +{"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/t"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"schemaVersion":{"minor":3,"major":0,"patch":0},"sections":[],"abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"metadata":{"role":"symbol","symbolKind":"associatedtype","externalID":"s:7Factory0A9ModifyingP1TQa","title":"T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"T","kind":"identifier"}],"modules":[{"name":"Factory"}],"roleHeading":"Associated Type","required":true},"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"text":"T","kind":"identifier"}]}]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"kind":"symbol","type":"topic","fragments":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"text":"T","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"required":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying/timetolive(_:).json b/docs/data/documentation/factory/factorymodifying/timetolive(_:).json index 64398a43..551fd3dd 100644 --- a/docs/data/documentation/factory/factorymodifying/timetolive(_:).json +++ b/docs/data/documentation/factory/factorymodifying/timetolive(_:).json @@ -1 +1 @@ -{"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"abstract":[{"text":"Adds time to live option for scopes. If the dependency has been cached for longer than the timeToLive period the","type":"text"},{"type":"text","text":" "},{"type":"text","text":"cached item will be discarded and a new instance created."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/timeToLive(_:)","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"timeToLive"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"seconds"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"]}],"kind":"declarations"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"text":"(","kind":"text"},{"preciseIdentifier":"c:@T@NSTimeInterval","kind":"typeIdentifier","text":"TimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol","title":"timeToLive(_:)","symbolKind":"method","roleHeading":"Instance Method","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE10timeToLiveyxSdF","extendedModule":"Factory"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/timetolive(_:)"]}],"references":{"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/timeToLive(_:)":{"kind":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/timeToLive(_:)","title":"timeToLive(_:)","url":"\/documentation\/factory\/factorymodifying\/timetolive(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"text":"TimeInterval","kind":"typeIdentifier","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"text":"Adds time to live option for scopes. If the dependency has been cached for longer than the timeToLive period the","type":"text"},{"type":"text","text":" "},{"type":"text","text":"cached item will be discarded and a new instance created."}],"role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/timetolive(_:)"]}],"abstract":[{"type":"text","text":"Adds time to live option for scopes. If the dependency has been cached for longer than the timeToLive period the"},{"text":" ","type":"text"},{"text":"cached item will be discarded and a new instance created.","type":"text"}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"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":": "},{"text":"TimeInterval","kind":"typeIdentifier","preciseIdentifier":"c:@T@NSTimeInterval"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"]}],"kind":"declarations"}],"metadata":{"extendedModule":"Factory","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"timeToLive","kind":"identifier"},{"text":"(","kind":"text"},{"text":"TimeInterval","kind":"typeIdentifier","preciseIdentifier":"c:@T@NSTimeInterval"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"roleHeading":"Instance Method","modules":[{"name":"Factory"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE10timeToLiveyxSdF","title":"timeToLive(_:)","role":"symbol"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/timeToLive(_:)"},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"sections":[],"schemaVersion":{"minor":3,"major":0,"patch":0},"references":{"doc://Factory/documentation/Factory/FactoryModifying/timeToLive(_:)":{"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":" "},{"text":"cached item will be discarded and a new instance created.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"c:@T@NSTimeInterval","text":"TimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/factorymodifying\/timetolive(_:)","kind":"symbol","type":"topic","title":"timeToLive(_:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/timeToLive(_:)"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/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 b94a82c4..1228d61a 100644 --- a/docs/data/documentation/factory/factorymodifying/unique.json +++ b/docs/data/documentation/factory/factorymodifying/unique.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"unique","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"level":2,"type":"heading","text":"Discussion","anchor":"discussion"},{"code":["var service: Factory {"," self { MyService() }"," .unique","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"While you can add the modifier, Factory’s are unique by default."}]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/unique","interfaceLanguage":"swift"},"sections":[],"metadata":{"symbolKind":"property","modules":[{"name":"Factory"}],"extendedModule":"Factory","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE6uniquexvp","title":"unique","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"unique","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"roleHeading":"Instance Property"},"abstract":[{"text":"Syntactic sugar defines defines unique scope. See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true},{"text":".","type":"text"}],"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/factorymodifying\/unique"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/unique":{"kind":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/unique","title":"unique","url":"\/documentation\/factory\/factorymodifying\/unique","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"unique","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"text":"Syntactic sugar defines defines unique scope. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"reference","isActive":true},{"text":".","type":"text"}],"role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"reference"},{"type":"text","text":"."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/unique","interfaceLanguage":"swift"},"schemaVersion":{"minor":3,"patch":0,"major":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"unique","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"text":"get","kind":"keyword"},{"kind":"text","text":" }"}]}]},{"content":[{"type":"heading","level":2,"anchor":"discussion","text":"Discussion"},{"type":"codeListing","code":["var service: Factory {"," self { MyService() }"," .unique","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"While you can add the modifier, Factory’s are unique by default.","type":"text"}]}],"kind":"content"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/unique"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"symbolKind":"property","title":"unique","role":"symbol","modules":[{"name":"Factory"}],"roleHeading":"Instance Property","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"unique"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE6uniquexvp"},"kind":"symbol","references":{"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"},"doc://Factory/documentation/Factory/FactoryModifying/unique":{"url":"\/documentation\/factory\/factorymodifying\/unique","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"unique","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"type":"topic","title":"unique","abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"text":".","type":"text"}],"role":"symbol","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/unique"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factoryregistration.json b/docs/data/documentation/factory/factoryregistration.json index 34a5d1f3..5fdd73ed 100644 --- a/docs/data/documentation/factory/factoryregistration.json +++ b/docs/data/documentation/factory/factoryregistration.json @@ -1 +1 @@ -{"schemaVersion":{"minor":3,"patch":0,"major":0},"topicSections":[{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration\/key"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"abstract":[{"text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process.","type":"text"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryregistration"]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"},{"text":"<","kind":"text"},{"text":"P","kind":"genericParameter"},{"kind":"text","text":", "},{"text":"T","kind":"genericParameter"},{"text":">","kind":"text"}],"languages":["swift"]}]}],"metadata":{"title":"FactoryRegistration","modules":[{"name":"Factory"}],"role":"symbol","externalID":"s:7Factory0A12RegistrationV","roleHeading":"Structure","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"FactoryRegistration","kind":"identifier"}],"navigatorTitle":[{"text":"FactoryRegistration","kind":"identifier"}],"symbolKind":"struct"},"sections":[],"kind":"symbol","references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryRegistration":{"title":"FactoryRegistration","type":"topic","url":"\/documentation\/factory\/factoryregistration","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","role":"symbol","navigatorTitle":[{"text":"FactoryRegistration","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryRegistration","kind":"identifier"}],"kind":"symbol","abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}]},"doc://Factory/documentation/Factory/FactoryRegistration/key":{"title":"key","type":"topic","url":"\/documentation\/factory\/factoryregistration\/key","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration\/key","role":"symbol","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"key","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A3KeyV","text":"FactoryKey","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Key used to manage registrations and cached values."}],"kind":"symbol"}}} \ No newline at end of file +{"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"FactoryRegistration","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"sections":[],"kind":"symbol","schemaVersion":{"minor":3,"patch":0,"major":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","interfaceLanguage":"swift"},"abstract":[{"text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process.","type":"text"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration\/key"]}],"metadata":{"role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryRegistration","kind":"identifier"}],"navigatorTitle":[{"text":"FactoryRegistration","kind":"identifier"}],"roleHeading":"Structure","title":"FactoryRegistration","modules":[{"name":"Factory"}],"symbolKind":"struct","externalID":"s:7Factory0A12RegistrationV"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryregistration"]}],"references":{"doc://Factory/documentation/Factory/FactoryRegistration/key":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration\/key","role":"symbol","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"key","kind":"identifier"},{"kind":"text","text":": "},{"text":"FactoryKey","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A3KeyV"}],"abstract":[{"type":"text","text":"Key used to manage registrations and cached values."}],"kind":"symbol","type":"topic","title":"key","url":"\/documentation\/factory\/factoryregistration\/key"},"doc://Factory/documentation/Factory/FactoryRegistration":{"url":"\/documentation\/factory\/factoryregistration","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","title":"FactoryRegistration","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"}],"kind":"symbol","role":"symbol","type":"topic"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factoryregistration/key.json b/docs/data/documentation/factory/factoryregistration/key.json index 0d41dc4d..4fae568c 100644 --- a/docs/data/documentation/factory/factoryregistration/key.json +++ b/docs/data/documentation/factory/factoryregistration/key.json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"tokens":[{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"key","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"FactoryKey","preciseIdentifier":"s:7Factory0A3KeyV","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"title":"key","roleHeading":"Instance Property","role":"symbol","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A12RegistrationV3keyAA0A3KeyVvp","symbolKind":"property","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"text":"key","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A3KeyV","text":"FactoryKey","kind":"typeIdentifier"}]},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryregistration\/key"]}],"abstract":[{"type":"text","text":"Key used to manage registrations and cached values."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration\/key","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/FactoryKey":{"title":"FactoryKey","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey","url":"\/documentation\/factory\/factorykey","type":"topic","role":"symbol","navigatorTitle":[{"text":"FactoryKey","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryKey"}],"kind":"symbol","abstract":[]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryRegistration/key":{"title":"key","type":"topic","url":"\/documentation\/factory\/factoryregistration\/key","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration\/key","role":"symbol","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"key","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A3KeyV","text":"FactoryKey","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Key used to manage registrations and cached values."}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryRegistration":{"title":"FactoryRegistration","type":"topic","url":"\/documentation\/factory\/factoryregistration","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","role":"symbol","navigatorTitle":[{"text":"FactoryRegistration","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryRegistration","kind":"identifier"}],"kind":"symbol","abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}]}}} \ No newline at end of file +{"abstract":[{"text":"Key used to manage registrations and cached values.","type":"text"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration\/key"},"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"externalID":"s:7Factory0A12RegistrationV3keyAA0A3KeyVvp","roleHeading":"Instance Property","title":"key","fragments":[{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"key"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A3KeyV","text":"FactoryKey","kind":"typeIdentifier"}],"role":"symbol","symbolKind":"property","modules":[{"name":"Factory"}]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryregistration\/key"]}],"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"key"},{"kind":"text","text":": "},{"text":"FactoryKey","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A3KeyV","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey"}]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration"]]},"references":{"doc://Factory/documentation/Factory/FactoryRegistration/key":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration\/key","role":"symbol","fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"key","kind":"identifier"},{"kind":"text","text":": "},{"text":"FactoryKey","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A3KeyV"}],"abstract":[{"type":"text","text":"Key used to manage registrations and cached values."}],"kind":"symbol","type":"topic","title":"key","url":"\/documentation\/factory\/factoryregistration\/key"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryRegistration":{"url":"\/documentation\/factory\/factoryregistration","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","title":"FactoryRegistration","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"}],"kind":"symbol","role":"symbol","type":"topic"},"doc://Factory/documentation/Factory/FactoryKey":{"navigatorTitle":[{"text":"FactoryKey","kind":"identifier"}],"kind":"symbol","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryKey"}],"url":"\/documentation\/factory\/factorykey","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryKey","type":"topic","title":"FactoryKey"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factoryresetoptions.json b/docs/data/documentation/factory/factoryresetoptions.json index 6d1a1e4a..0967e073 100644 --- a/docs/data/documentation/factory/factoryresetoptions.json +++ b/docs/data/documentation/factory/factoryresetoptions.json @@ -1 +1 @@ -{"sections":[],"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"patch":0,"minor":3},"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"]},{"generated":true,"title":"Default Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","interfaceLanguage":"swift"},"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/SQ","doc:\/\/Factory\/SH"],"title":"Conforms To","type":"conformsTo","kind":"relationships"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryResetOptions","kind":"identifier"}],"languages":["swift"]}]}],"kind":"symbol","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"metadata":{"symbolKind":"enum","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryResetOptions","kind":"identifier"}],"externalID":"s:7Factory0A12ResetOptionsO","role":"symbol","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"modules":[{"name":"Factory"}],"roleHeading":"Enumeration","title":"FactoryResetOptions"},"references":{"doc://Factory/documentation/Factory/FactoryResetOptions/registration":{"kind":"symbol","type":"topic","title":"FactoryResetOptions.registration","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/registration","abstract":[{"type":"text","text":"Resets registrations on this container"}],"role":"symbol","url":"\/documentation\/factory\/factoryresetoptions\/registration","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryResetOptions/scope":{"abstract":[{"type":"text","text":"Resets all scope caches on this container"}],"title":"FactoryResetOptions.scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/scope","role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions\/scope","type":"topic","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"scope"}]},"doc://Factory/documentation/Factory/FactoryResetOptions/Equatable-Implementations":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations","title":"Equatable Implementations","url":"\/documentation\/factory\/factoryresetoptions\/equatable-implementations","abstract":[],"role":"collectionGroup"},"doc://Factory/documentation/Factory/FactoryResetOptions/context":{"url":"\/documentation\/factory\/factoryresetoptions\/context","abstract":[{"type":"text","text":"Resets context-based registrations on this container"}],"fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"text":"context","kind":"identifier"}],"kind":"symbol","type":"topic","title":"FactoryResetOptions.context","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/context","role":"symbol"},"doc://Factory/SH":{"identifier":"doc:\/\/Factory\/SH","title":"Swift.Hashable","type":"unresolvable"},"doc://Factory/documentation/Factory/FactoryResetOptions/none":{"abstract":[{"type":"text","text":"Performs no reset actions on this container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/none","kind":"symbol","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"none","kind":"identifier"}],"title":"FactoryResetOptions.none","url":"\/documentation\/factory\/factoryresetoptions\/none","type":"topic","role":"symbol"},"doc://Factory/SQ":{"identifier":"doc:\/\/Factory\/SQ","title":"Swift.Equatable","type":"unresolvable"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"title":"FactoryResetOptions"},"doc://Factory/documentation/Factory/FactoryResetOptions/all":{"kind":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/all","title":"FactoryResetOptions.all","url":"\/documentation\/factory\/factoryresetoptions\/all","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"all","kind":"identifier"}],"abstract":[{"text":"Resets registration and scope caches","type":"text"}],"role":"symbol"}}} \ No newline at end of file +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"},"topicSections":[{"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":"Enumeration Cases"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations"],"generated":true,"title":"Default Implementations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryresetoptions"]}],"sections":[],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"metadata":{"title":"FactoryResetOptions","symbolKind":"enum","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"role":"symbol","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryResetOptions","kind":"identifier"}],"externalID":"s:7Factory0A12ResetOptionsO","modules":[{"name":"Factory"}],"roleHeading":"Enumeration"},"schemaVersion":{"major":0,"patch":0,"minor":3},"abstract":[{"type":"text","text":"Reset options for Factory’s and Container’s"}],"relationshipsSections":[{"title":"Conforms To","kind":"relationships","identifiers":["doc:\/\/Factory\/SQ","doc:\/\/Factory\/SH"],"type":"conformsTo"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}]}]}],"references":{"doc://Factory/documentation/Factory/FactoryResetOptions/scope":{"title":"FactoryResetOptions.scope","type":"topic","abstract":[{"type":"text","text":"Resets all scope caches on this container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/scope","kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions\/scope","role":"symbol","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"text":"scope","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryResetOptions":{"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","title":"FactoryResetOptions","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryResetOptions","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/SQ":{"type":"unresolvable","identifier":"doc:\/\/Factory\/SQ","title":"Swift.Equatable"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/SH":{"type":"unresolvable","identifier":"doc:\/\/Factory\/SH","title":"Swift.Hashable"},"doc://Factory/documentation/Factory/FactoryResetOptions/Equatable-Implementations":{"url":"\/documentation\/factory\/factoryresetoptions\/equatable-implementations","title":"Equatable Implementations","type":"topic","abstract":[],"role":"collectionGroup","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations"},"doc://Factory/documentation/Factory/FactoryResetOptions/context":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/context","kind":"symbol","title":"FactoryResetOptions.context","url":"\/documentation\/factory\/factoryresetoptions\/context","abstract":[{"type":"text","text":"Resets context-based registrations on this container"}],"type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"}]},"doc://Factory/documentation/Factory/FactoryResetOptions/none":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/none","kind":"symbol","title":"FactoryResetOptions.none","url":"\/documentation\/factory\/factoryresetoptions\/none","abstract":[{"text":"Performs no reset actions on this container","type":"text"}],"type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"none","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryResetOptions/all":{"type":"topic","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"all","kind":"identifier"}],"title":"FactoryResetOptions.all","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/all","kind":"symbol","abstract":[{"type":"text","text":"Resets registration and scope caches"}],"url":"\/documentation\/factory\/factoryresetoptions\/all"},"doc://Factory/documentation/Factory/FactoryResetOptions/registration":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/registration","kind":"symbol","title":"FactoryResetOptions.registration","url":"\/documentation\/factory\/factoryresetoptions\/registration","abstract":[{"type":"text","text":"Resets registrations on this container"}],"type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factoryresetoptions/!=(_:_:).json b/docs/data/documentation/factory/factoryresetoptions/!=(_:_:).json index e8122eee..2f445d81 100644 --- a/docs/data/documentation/factory/factoryresetoptions/!=(_:_:).json +++ b/docs/data/documentation/factory/factoryresetoptions/!=(_:_:).json @@ -1 +1 @@ -{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryresetoptions\/!=(_:_:)"]}],"kind":"symbol","schemaVersion":{"patch":0,"minor":3,"major":0},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/!=(_:_:)","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"!=","kind":"identifier"},{"text":" ","kind":"text"},{"kind":"text","text":"("},{"text":"lhs","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":", ","kind":"text"},{"text":"rhs","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":") -> ","kind":"text"},{"text":"Bool","preciseIdentifier":"s:Sb","kind":"typeIdentifier"}],"languages":["swift"]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations"]]},"metadata":{"fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}],"roleHeading":"Operator","title":"!=(_:_:)","externalID":"s:SQsE2neoiySbx_xtFZ::SYNTHESIZED::s:7Factory0A12ResetOptionsO","extendedModule":"Swift","modules":[{"name":"Factory","relatedModules":["Swift"]}],"role":"symbol","symbolKind":"op"},"abstract":[{"text":"Inherited from ","type":"text"},{"type":"codeVoice","code":"Equatable.!=(_:_:)"},{"type":"text","text":"."}],"references":{"doc://Factory/documentation/Factory/FactoryResetOptions/Equatable-Implementations":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations","title":"Equatable Implementations","url":"\/documentation\/factory\/factoryresetoptions\/equatable-implementations","abstract":[],"role":"collectionGroup"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"title":"FactoryResetOptions"},"doc://Factory/documentation/Factory/FactoryResetOptions/!=(_:_:)":{"abstract":[],"url":"\/documentation\/factory\/factoryresetoptions\/!=(_:_:)","role":"symbol","kind":"symbol","type":"topic","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/!=(_:_:)","title":"!=(_:_:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"schemaVersion":{"patch":0,"minor":3,"major":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"!=","kind":"identifier"},{"kind":"text","text":" "},{"text":"(","kind":"text"},{"text":"lhs","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":", ","kind":"text"},{"kind":"internalParam","text":"rhs"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"text":") -> ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"languages":["swift"]}]}],"metadata":{"fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"symbolKind":"op","roleHeading":"Operator","modules":[{"name":"Factory","relatedModules":["Swift"]}],"extendedModule":"Swift","role":"symbol","title":"!=(_:_:)","externalID":"s:SQsE2neoiySbx_xtFZ::SYNTHESIZED::s:7Factory0A12ResetOptionsO"},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/!=(_:_:)","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations"]]},"abstract":[{"text":"Inherited from ","type":"text"},{"code":"Equatable.!=(_:_:)","type":"codeVoice"},{"type":"text","text":"."}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryresetoptions\/!=(_:_:)"]}],"sections":[],"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","title":"FactoryResetOptions","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryResetOptions","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions/Equatable-Implementations":{"url":"\/documentation\/factory\/factoryresetoptions\/equatable-implementations","title":"Equatable Implementations","type":"topic","abstract":[],"role":"collectionGroup","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations"},"doc://Factory/documentation/Factory/FactoryResetOptions/!=(_:_:)":{"abstract":[],"kind":"symbol","title":"!=(_:_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/!=(_:_:)","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":") -> ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"role":"symbol","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/!=(_:_:)"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factoryresetoptions/all.json b/docs/data/documentation/factory/factoryresetoptions/all.json index c00b01b8..8e839b17 100644 --- a/docs/data/documentation/factory/factoryresetoptions/all.json +++ b/docs/data/documentation/factory/factoryresetoptions/all.json @@ -1 +1 @@ -{"abstract":[{"text":"Resets registration and scope caches","type":"text"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/all","interfaceLanguage":"swift"},"kind":"symbol","primaryContentSections":[{"declarations":[{"tokens":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"all"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryresetoptions\/all"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"sections":[],"metadata":{"modules":[{"name":"Factory"}],"externalID":"s:7Factory0A12ResetOptionsO3allyA2CmF","symbolKind":"case","title":"FactoryResetOptions.all","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"all"}],"roleHeading":"Case","role":"symbol"},"schemaVersion":{"minor":3,"major":0,"patch":0},"references":{"doc://Factory/documentation/Factory/FactoryResetOptions/all":{"kind":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/all","title":"FactoryResetOptions.all","url":"\/documentation\/factory\/factoryresetoptions\/all","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"all","kind":"identifier"}],"abstract":[{"text":"Resets registration and scope caches","type":"text"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryResetOptions":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"title":"FactoryResetOptions"}}} \ No newline at end of file +{"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"all","kind":"identifier"}],"languages":["swift"],"platforms":["macOS"]}]}],"abstract":[{"text":"Resets registration and scope caches","type":"text"}],"schemaVersion":{"minor":3,"patch":0,"major":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/all"},"metadata":{"roleHeading":"Case","title":"FactoryResetOptions.all","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"all"}],"modules":[{"name":"Factory"}],"externalID":"s:7Factory0A12ResetOptionsO3allyA2CmF","symbolKind":"case","role":"symbol"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryresetoptions\/all"]}],"sections":[],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","title":"FactoryResetOptions","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryResetOptions","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions/all":{"type":"topic","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"all","kind":"identifier"}],"title":"FactoryResetOptions.all","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/all","kind":"symbol","abstract":[{"type":"text","text":"Resets registration and scope caches"}],"url":"\/documentation\/factory\/factoryresetoptions\/all"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factoryresetoptions/context.json b/docs/data/documentation/factory/factoryresetoptions/context.json index 4ef9e495..6b783dd7 100644 --- a/docs/data/documentation/factory/factoryresetoptions/context.json +++ b/docs/data/documentation/factory/factoryresetoptions/context.json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"context","kind":"identifier"}]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/context","interfaceLanguage":"swift"},"schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions\/context"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","sections":[],"metadata":{"fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"context"}],"roleHeading":"Case","title":"FactoryResetOptions.context","externalID":"s:7Factory0A12ResetOptionsO7contextyA2CmF","modules":[{"name":"Factory"}],"symbolKind":"case","role":"symbol"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"abstract":[{"type":"text","text":"Resets context-based registrations on this container"}],"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"title":"FactoryResetOptions"},"doc://Factory/documentation/Factory/FactoryResetOptions/context":{"url":"\/documentation\/factory\/factoryresetoptions\/context","abstract":[{"type":"text","text":"Resets context-based registrations on this container"}],"fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"text":"context","kind":"identifier"}],"kind":"symbol","type":"topic","title":"FactoryResetOptions.context","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/context","role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/context","interfaceLanguage":"swift"},"sections":[],"abstract":[{"type":"text","text":"Resets context-based registrations on this container"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryresetoptions\/context"]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"}],"languages":["swift"],"platforms":["macOS"]}]}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"context","kind":"identifier"}],"symbolKind":"case","title":"FactoryResetOptions.context","modules":[{"name":"Factory"}],"role":"symbol","externalID":"s:7Factory0A12ResetOptionsO7contextyA2CmF","roleHeading":"Case"},"schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","title":"FactoryResetOptions","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryResetOptions","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions/context":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/context","kind":"symbol","title":"FactoryResetOptions.context","url":"\/documentation\/factory\/factoryresetoptions\/context","abstract":[{"type":"text","text":"Resets context-based registrations on this container"}],"type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"}]},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ 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 522e8f6e..3f33ffc8 100644 --- a/docs/data/documentation/factory/factoryresetoptions/equatable-implementations.json +++ b/docs/data/documentation/factory/factoryresetoptions/equatable-implementations.json @@ -1 +1 @@ -{"topicSections":[{"generated":true,"title":"Operators","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/!=(_:_:)"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryresetoptions\/equatable-implementations"]}],"kind":"article","sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"metadata":{"modules":[{"name":"Factory"}],"role":"collectionGroup","title":"Equatable Implementations"},"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"title":"FactoryResetOptions"},"doc://Factory/documentation/Factory/FactoryResetOptions/!=(_:_:)":{"abstract":[],"url":"\/documentation\/factory\/factoryresetoptions\/!=(_:_:)","role":"symbol","kind":"symbol","type":"topic","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/!=(_:_:)","title":"!=(_:_:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"sections":[],"topicSections":[{"title":"Operators","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/!=(_:_:)"],"generated":true}],"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions\/equatable-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"article","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations","interfaceLanguage":"swift"},"schemaVersion":{"minor":3,"major":0,"patch":0},"metadata":{"title":"Equatable Implementations","modules":[{"name":"Factory"}],"role":"collectionGroup"},"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","title":"FactoryResetOptions","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryResetOptions","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryResetOptions/!=(_:_:)":{"abstract":[],"kind":"symbol","title":"!=(_:_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/!=(_:_:)","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":") -> ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"role":"symbol","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/!=(_:_:)"}}} \ 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 6ada7638..4fb035c8 100644 --- a/docs/data/documentation/factory/factoryresetoptions/none.json +++ b/docs/data/documentation/factory/factoryresetoptions/none.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"none","kind":"identifier"}],"platforms":["macOS"]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/none"},"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions\/none"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"none","kind":"identifier"}],"roleHeading":"Case","title":"FactoryResetOptions.none","externalID":"s:7Factory0A12ResetOptionsO4noneyA2CmF","symbolKind":"case","role":"symbol","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"abstract":[{"text":"Performs no reset actions on this container","type":"text"}],"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"title":"FactoryResetOptions"},"doc://Factory/documentation/Factory/FactoryResetOptions/none":{"abstract":[{"type":"text","text":"Performs no reset actions on this container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/none","kind":"symbol","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"none","kind":"identifier"}],"title":"FactoryResetOptions.none","url":"\/documentation\/factory\/factoryresetoptions\/none","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"primaryContentSections":[{"declarations":[{"tokens":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"none"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"sections":[],"metadata":{"externalID":"s:7Factory0A12ResetOptionsO4noneyA2CmF","role":"symbol","symbolKind":"case","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"none","kind":"identifier"}],"modules":[{"name":"Factory"}],"roleHeading":"Case","title":"FactoryResetOptions.none"},"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions\/none"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/none","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"abstract":[{"text":"Performs no reset actions on this container","type":"text"}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","title":"FactoryResetOptions","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryResetOptions","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions/none":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/none","kind":"symbol","title":"FactoryResetOptions.none","url":"\/documentation\/factory\/factoryresetoptions\/none","abstract":[{"text":"Performs no reset actions on this container","type":"text"}],"type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"none","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ 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 e97ab730..2e1df2e0 100644 --- a/docs/data/documentation/factory/factoryresetoptions/registration.json +++ b/docs/data/documentation/factory/factoryresetoptions/registration.json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"text":"registration","kind":"identifier"}]}],"kind":"declarations"}],"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/registration","interfaceLanguage":"swift"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"abstract":[{"text":"Resets registrations on this container","type":"text"}],"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions\/registration"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"}],"externalID":"s:7Factory0A12ResetOptionsO12registrationyA2CmF","roleHeading":"Case","role":"symbol","symbolKind":"case","title":"FactoryResetOptions.registration","modules":[{"name":"Factory"}]},"schemaVersion":{"minor":3,"major":0,"patch":0},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryResetOptions":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"title":"FactoryResetOptions"},"doc://Factory/documentation/Factory/FactoryResetOptions/registration":{"kind":"symbol","type":"topic","title":"FactoryResetOptions.registration","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/registration","abstract":[{"type":"text","text":"Resets registrations on this container"}],"role":"symbol","url":"\/documentation\/factory\/factoryresetoptions\/registration","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"}]}}} \ No newline at end of file +{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/registration","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions\/registration"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"role":"symbol","roleHeading":"Case","title":"FactoryResetOptions.registration","modules":[{"name":"Factory"}],"fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"text":"registration","kind":"identifier"}],"externalID":"s:7Factory0A12ResetOptionsO12registrationyA2CmF","symbolKind":"case"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"sections":[],"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"text":"Resets registrations on this container","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"registration","kind":"identifier"}],"platforms":["macOS"],"languages":["swift"]}]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryResetOptions/registration":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/registration","kind":"symbol","title":"FactoryResetOptions.registration","url":"\/documentation\/factory\/factoryresetoptions\/registration","abstract":[{"type":"text","text":"Resets registrations on this container"}],"type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"}]},"doc://Factory/documentation/Factory/FactoryResetOptions":{"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","title":"FactoryResetOptions","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryResetOptions","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol"}}} \ 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 8c475c10..af13321e 100644 --- a/docs/data/documentation/factory/factoryresetoptions/scope.json +++ b/docs/data/documentation/factory/factoryresetoptions/scope.json @@ -1 +1 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/scope","interfaceLanguage":"swift"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"abstract":[{"type":"text","text":"Resets all scope caches on this container"}],"kind":"symbol","schemaVersion":{"patch":0,"minor":3,"major":0},"metadata":{"role":"symbol","roleHeading":"Case","symbolKind":"case","title":"FactoryResetOptions.scope","externalID":"s:7Factory0A12ResetOptionsO5scopeyA2CmF","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"scope","kind":"identifier"}]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryresetoptions\/scope"]}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"}],"languages":["swift"]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory/FactoryResetOptions/scope":{"abstract":[{"type":"text","text":"Resets all scope caches on this container"}],"title":"FactoryResetOptions.scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/scope","role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions\/scope","type":"topic","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"scope"}]},"doc://Factory/documentation/Factory/FactoryResetOptions":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"title":"FactoryResetOptions"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/scope"},"kind":"symbol","abstract":[{"type":"text","text":"Resets all scope caches on this container"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryresetoptions\/scope"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"roleHeading":"Case","title":"FactoryResetOptions.scope","externalID":"s:7Factory0A12ResetOptionsO5scopeyA2CmF","modules":[{"name":"Factory"}],"role":"symbol","symbolKind":"case","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"scope"}]},"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","title":"FactoryResetOptions","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryResetOptions","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/FactoryResetOptions/scope":{"title":"FactoryResetOptions.scope","type":"topic","abstract":[{"type":"text","text":"Resets all scope caches on this container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/scope","kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions\/scope","role":"symbol","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"text":"scope","kind":"identifier"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factoryresolving.json b/docs/data/documentation/factory/factoryresolving.json new file mode 100644 index 00000000..10103fdd --- /dev/null +++ b/docs/data/documentation/factory/factoryresolving.json @@ -0,0 +1 @@ +{"sections":[],"metadata":{"navigatorTitle":[{"text":"FactoryResolving","kind":"identifier"}],"externalID":"s:7Factory0A9Resolvinga","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResolving"}],"title":"FactoryResolving","role":"symbol","symbolKind":"typealias","roleHeading":"Type Alias"},"variants":[{"paths":["\/documentation\/factory\/factoryresolving"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResolving","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"typealias","kind":"keyword"},{"text":" ","kind":"text"},{"text":"FactoryResolving","kind":"identifier"},{"text":" = ","kind":"text"},{"text":"Resolving","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ResolvingP"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/FactoryResolving":{"title":"FactoryResolving","abstract":[],"fragments":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResolving"}],"navigatorTitle":[{"text":"FactoryResolving","kind":"identifier"}],"url":"\/documentation\/factory\/factoryresolving","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResolving"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Resolving":{"title":"Resolving","abstract":[{"type":"text","text":"When protocol is applied to a container it enables a typed registration\/resolution mode."}],"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Resolving"}],"navigatorTitle":[{"text":"Resolving","kind":"identifier"}],"url":"\/documentation\/factory\/resolving","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factoryscope.json b/docs/data/documentation/factory/factoryscope.json new file mode 100644 index 00000000..39a2fe3f --- /dev/null +++ b/docs/data/documentation/factory/factoryscope.json @@ -0,0 +1 @@ +{"metadata":{"title":"FactoryScope","fragments":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryScope","kind":"identifier"}],"modules":[{"name":"Factory"}],"role":"symbol","externalID":"s:7Factory0A5Scopea","symbolKind":"typealias","roleHeading":"Type Alias","navigatorTitle":[{"text":"FactoryScope","kind":"identifier"}]},"schemaVersion":{"minor":3,"major":0,"patch":0},"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryScope"},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"typealias"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryScope"},{"kind":"text","text":" = "},{"preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier","text":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"}],"languages":["swift"],"platforms":["macOS"]}]}],"variants":[{"paths":["\/documentation\/factory\/factoryscope"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/FactoryScope":{"title":"FactoryScope","abstract":[],"fragments":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryScope","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryScope"}],"url":"\/documentation\/factory\/factoryscope","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryScope"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorysharedcontainer.json b/docs/data/documentation/factory/factorysharedcontainer.json new file mode 100644 index 00000000..a198fde3 --- /dev/null +++ b/docs/data/documentation/factory/factorysharedcontainer.json @@ -0,0 +1 @@ +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorysharedcontainer"]}],"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"typealias","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactorySharedContainer"},{"text":" = ","kind":"text"},{"text":"SharedContainer","preciseIdentifier":"s:7Factory15SharedContainerP","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer"}],"languages":["swift"]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactorySharedContainer","interfaceLanguage":"swift"},"metadata":{"externalID":"s:7Factory0A15SharedContainera","role":"symbol","symbolKind":"typealias","fragments":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactorySharedContainer"}],"modules":[{"name":"Factory"}],"navigatorTitle":[{"text":"FactorySharedContainer","kind":"identifier"}],"roleHeading":"Type Alias","title":"FactorySharedContainer"},"sections":[],"references":{"doc://Factory/documentation/Factory/FactorySharedContainer":{"title":"FactorySharedContainer","abstract":[],"fragments":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactorySharedContainer"}],"navigatorTitle":[{"text":"FactorySharedContainer","kind":"identifier"}],"url":"\/documentation\/factory\/factorysharedcontainer","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactorySharedContainer"},"doc://Factory/documentation/Factory/SharedContainer":{"title":"SharedContainer","type":"topic","url":"\/documentation\/factory\/sharedcontainer","role":"symbol","navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"SharedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/functional.json b/docs/data/documentation/factory/functional.json index 6ff26e64..d140fe41 100644 --- a/docs/data/documentation/factory/functional.json +++ b/docs/data/documentation/factory/functional.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"content":[{"text":"Overview","anchor":"Overview","level":2,"type":"heading"},{"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."}],"type":"paragraph"},{"level":2,"text":"Example","type":"heading","anchor":"Example"},{"type":"paragraph","inlineContent":[{"text":"Consider the following typealias and Factory.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["typealias AccountProviding = () async throws -> [Account]","","extension Container {"," var 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":[{"text":"Now, here’s the view model that uses it.","type":"text"}]},{"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)"," }"," }","}"],"type":"codeListing"},{"text":"Testing","anchor":"Testing","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"text":"Now consider how easy it is to write a test with mock accounts…","type":"text"}]},{"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":"codeListing","syntax":"swift"},{"inlineContent":[{"text":"Or test edge cases like no accounts found.","type":"text"}],"type":"paragraph"},{"type":"codeListing","code":["func testEmptyAccounts() async {"," Container.shared.accountProvider.register {{ [] }}"," ...","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or test specific error cases."}]},{"code":["func testErrorLoadingAccounts() async {"," Container.shared.accountProvider.register {{ throw APIError.network }}"," ...","}"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"type":"text","text":"Here’s an article that goes into the technique in more detail: "},{"identifier":"https:\/\/betterprogramming.pub\/factory-and-functional-dependency-injection-2d0a38042d05","type":"reference","isActive":true}],"type":"paragraph"}],"kind":"content"}],"schemaVersion":{"minor":3,"major":0,"patch":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Functional"},"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}],"sections":[],"abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/functional"]}],"kind":"article","metadata":{"roleHeading":"Article","title":"Functional Injection","role":"article","modules":[{"name":"Factory"}]},"references":{"doc://Factory/documentation/Factory/Modifiers":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","title":"Factory Modifiers","url":"\/documentation\/factory\/modifiers","abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"role":"article"},"doc://Factory/documentation/Factory/Design":{"url":"\/documentation\/factory\/design","title":"Designing Factory","role":"article","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Design"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Optionals":{"type":"topic","kind":"article","abstract":[{"text":"With Factory registrations can be performed at any time.","type":"text"}],"title":"Optionals and Dynamic Registration","identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","url":"\/documentation\/factory\/optionals","role":"article"},"doc://Factory/documentation/Factory/Modules":{"type":"topic","url":"\/documentation\/factory\/modules","role":"article","kind":"article","title":"Modular Development","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}]},"https://betterprogramming.pub/factory-and-functional-dependency-injection-2d0a38042d05":{"identifier":"https:\/\/betterprogramming.pub\/factory-and-functional-dependency-injection-2d0a38042d05","titleInlineContent":[{"type":"text","text":"Factory and Functional Dependency Injection"}],"type":"link","title":"Factory and Functional Dependency Injection","url":"https:\/\/betterprogramming.pub\/factory-and-functional-dependency-injection-2d0a38042d05"},"doc://Factory/documentation/Factory/Cycle":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","title":"Resolution Cycles","url":"\/documentation\/factory\/cycle","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"role":"article"},"doc://Factory/documentation/Factory/Tags":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","title":"Tags","url":"\/documentation\/factory\/tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"role":"article"}}} \ No newline at end of file +{"abstract":[{"text":"Factory can inject more than service classes and structs.","type":"text"}],"sections":[],"metadata":{"roleHeading":"Article","role":"article","modules":[{"name":"Factory"}],"title":"Functional Injection"},"primaryContentSections":[{"kind":"content","content":[{"text":"Overview","level":2,"type":"heading","anchor":"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."}]},{"type":"heading","level":2,"anchor":"Example","text":"Example"},{"inlineContent":[{"text":"Consider the following typealias and Factory.","type":"text"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["typealias AccountProviding = () async throws -> [Account]","","extension Container {"," var accountProvider: Factory {"," self {{ try await Network.get(path: \"\/accounts\") }}"," }","}"]},{"type":"paragraph","inlineContent":[{"text":"Note the double braces. In this example our factory closure is returning a closure, not a class or struct.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"Now, here’s the view model that uses it.","type":"text"}]},{"code":["class AccountViewModel: ObservableObject {"," @Injected(\\.accountProvider) var accountProvider"," @Published var accounts: [Account] = []"," @MainActor func load() async {"," do {"," accounts = try await accountProvider()"," } catch {"," print(error)"," }"," }","}"],"type":"codeListing","syntax":"swift"},{"anchor":"Testing","level":2,"type":"heading","text":"Testing"},{"inlineContent":[{"type":"text","text":"Now consider how easy it is to write a test with mock accounts…"}],"type":"paragraph"},{"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":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"Or test edge cases like no accounts found.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["func testEmptyAccounts() async {"," Container.shared.accountProvider.register {{ [] }}"," ...","}"]},{"type":"paragraph","inlineContent":[{"text":"Or test specific error cases.","type":"text"}]},{"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","identifier":"https:\/\/betterprogramming.pub\/factory-and-functional-dependency-injection-2d0a38042d05","isActive":true}]}]}],"seeAlsoSections":[{"title":"Advanced Topics","generated":true,"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"]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/functional"]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"article","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Functional"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"references":{"doc://Factory/documentation/Factory/Tags":{"url":"\/documentation\/factory\/tags","identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","role":"article","kind":"article","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"type":"topic","title":"Tags"},"https://betterprogramming.pub/factory-and-functional-dependency-injection-2d0a38042d05":{"title":"Factory and Functional Dependency Injection","type":"link","titleInlineContent":[{"text":"Factory and Functional Dependency Injection","type":"text"}],"identifier":"https:\/\/betterprogramming.pub\/factory-and-functional-dependency-injection-2d0a38042d05","url":"https:\/\/betterprogramming.pub\/factory-and-functional-dependency-injection-2d0a38042d05"},"doc://Factory/documentation/Factory/Design":{"url":"\/documentation\/factory\/design","identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","role":"article","kind":"article","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"type":"topic","title":"Designing Factory"},"doc://Factory/documentation/Factory/Modules":{"url":"\/documentation\/factory\/modules","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","role":"article","kind":"article","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"type":"topic","title":"Modular Development"},"doc://Factory/documentation/Factory/Optionals":{"url":"\/documentation\/factory\/optionals","identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","role":"article","kind":"article","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"type":"topic","title":"Optionals and Dynamic Registration"},"doc://Factory/documentation/Factory/Modifiers":{"kind":"article","abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"title":"Factory Modifiers","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","role":"article","type":"topic","url":"\/documentation\/factory\/modifiers"},"doc://Factory/documentation/Factory/Cycle":{"url":"\/documentation\/factory\/cycle","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","role":"article","kind":"article","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"type":"topic","title":"Resolution Cycles"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/gettingstarted.json b/docs/data/documentation/factory/gettingstarted.json index 02ef717f..294b621d 100644 --- a/docs/data/documentation/factory/gettingstarted.json +++ b/docs/data/documentation/factory/gettingstarted.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"kind":"article","metadata":{"modules":[{"name":"Factory"}],"role":"collectionGroup","title":"Getting Started"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","interfaceLanguage":"swift"},"abstract":[{"text":"Defining a Factory, resolving it, and changing the default behavior.","type":"text"}],"topicSections":[{"abstract":[{"text":"Some code samples demonstration various ways to register and resolve Factory’s.","type":"text"}],"title":"Examples","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Registrations","doc:\/\/Factory\/documentation\/Factory\/Resolutions"]}],"seeAlsoSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Containers","doc:\/\/Factory\/documentation\/Factory\/Scopes"],"title":"The Basics","generated":true}],"variants":[{"paths":["\/documentation\/factory\/gettingstarted"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"kind":"content","content":[{"level":2,"type":"heading","anchor":"Overview","text":"Overview"},{"inlineContent":[{"type":"text","text":"A "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"text":" manages the dependency injection process for a specific object or service and produces an object of the desired type when required.","type":"text"}],"type":"paragraph"},{"level":2,"type":"heading","text":"Defining a Factory","anchor":"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."}]},{"inlineContent":[{"type":"text","text":"Factory, as you may have guessed from the name, is no exception."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Here’s a simple registration that creates a ","type":"text"},{"code":"ServiceType","type":"codeVoice"},{"text":" dependency for us when needed.","type":"text"}]},{"syntax":"swift","type":"codeListing","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"]},{"inlineContent":[{"type":"text","text":"There’s a few things going on here, so let’s break it down."}],"type":"paragraph"},{"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":"."}]},{"code":["extension Container {"," var service: Factory {"," ..."," }","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"code":"ServiceType","type":"codeVoice"},{"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 "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"reference"},{"type":"text","text":" that controls how and when our "},{"code":"ServiceType","type":"codeVoice"},{"type":"text","text":" dependency is made. It manages our dependency."}]},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"paragraph","inlineContent":[{"text":"As such, a complete, formal Factory definition would look like this…","type":"text"}]},{"syntax":"swift","code":["var service: Factory {"," Factory(self, scope: .unique) { "," MyService()"," }","}"],"type":"codeListing"},{"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 "},{"code":"callAsFunction","type":"codeVoice"},{"type":"text","text":" function on "},{"type":"codeVoice","code":"self"},{"type":"text","text":"."}],"type":"paragraph"},{"code":["var service: Factory {"," self { MyService() }","}"],"type":"codeListing","syntax":"swift"},{"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."}]},{"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"},{"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: "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Registrations"},{"type":"text","text":"."}]},{"type":"heading","text":"Resolving a Factory","level":2,"anchor":"Resolving-a-Factory"},{"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":"paragraph"},{"syntax":"swift","code":["class ContentViewModel: ObservableObject {"," private let myService = Container.shared.service()"," ...","}"],"type":"codeListing"},{"inlineContent":[{"type":"text","text":"The resolved instance may be brand new or Factory may return a cached value from the specified "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true,"type":"reference"},{"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":"paragraph"},{"type":"codeListing","syntax":"swift","code":["private let service = container.service()"]},{"inlineContent":[{"text":"Finally, we could have also used an ","type":"text"},{"code":"@Injected","type":"codeVoice"},{"type":"text","text":" property wrapper and specified a keyPath to the desired dependency."}],"type":"paragraph"},{"syntax":"swift","code":["@Injected(\\.service) var service"],"type":"codeListing"},{"inlineContent":[{"type":"text","text":"Unless otherwise specified, the "},{"type":"codeVoice","code":"@Injected"},{"text":" property wrapper looks for dependencies in the standard shared container provided by Factory, so the above is functionally identical to the ","type":"text"},{"type":"codeVoice","code":"Container.shared.service()"},{"type":"text","text":" example shown earlier. Here’s one pointing to your own container."}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["@Injected(\\MyCustomContainer.service) var service: ServiceType"]},{"type":"paragraph","inlineContent":[{"text":"For more examples see: ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","type":"reference","isActive":true},{"type":"text","text":"."}]},{"anchor":"Registering-a-new-Factory-closure","text":"Registering a new Factory closure","level":2,"type":"heading"},{"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":[{"text":"It’s easy. Just register a new closure with the existing Factory.","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["container.service.register {"," MockService()","}"]},{"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"},{"type":"paragraph","inlineContent":[{"type":"emphasis","inlineContent":[{"type":"text","text":"This includes singletons, with a few caveats. See the Singleton section in "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","type":"reference","isActive":true}]}]},{"level":2,"type":"heading","text":"Mocking and Testing","anchor":"Mocking-and-Testing"},{"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()"},{"text":" and be done with it?","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or keep the container idea, but write something similar to this…"}]},{"code":["extension Container {"," static var myService: MyServiceType { MyService() }","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"codeListing","syntax":"swift","code":["struct ContentView: View {"," @StateObject var model = ContentViewModel()"," var body: some View {"," Text(model.text())"," .padding()"," }","}"]},{"type":"paragraph","inlineContent":[{"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":"text"},{"code":"ContentViewModel","type":"codeVoice"},{"type":"text","text":" so that its "},{"code":"MyService","type":"codeVoice"},{"text":" dependency isn’t making live API calls during development?","type":"text"}]},{"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"},{"text":".","type":"text"}]},{"code":["struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," let _ = Container.shared.myService.register { MockService2() }"," ContentView()"," }","}"],"type":"codeListing","syntax":"swift"},{"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"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now when our preview is displayed "},{"code":"ContentView","type":"codeVoice"},{"text":" creates a ","type":"text"},{"type":"codeVoice","code":"ContentViewModel"},{"type":"text","text":" which in turn has a dependency on "},{"code":"myService","type":"codeVoice"},{"text":" using shared container.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"And when the wrapper asks the factory for an instance of ","type":"text"},{"type":"codeVoice","code":"MyServiceType"},{"type":"text","text":" it now gets a "},{"type":"codeVoice","code":"MockService2"},{"text":" instead of the ","type":"text"},{"code":"MyService","type":"codeVoice"},{"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."}]},{"inlineContent":[{"type":"text","text":"We’re just scratching the surface here. Read more in the section on "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing"},{"text":".","type":"text"}],"type":"paragraph"},{"anchor":"Contexts","level":2,"text":"Contexts","type":"heading"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"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()","}"]},{"inlineContent":[{"type":"text","text":"There are many contexts for testing, previews, and even UITesting. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","isActive":true,"type":"reference"},{"type":"text","text":" for more."}],"type":"paragraph"}]}],"schemaVersion":{"patch":0,"minor":3,"major":0},"sections":[],"references":{"doc://Factory/documentation/Factory/Resolutions":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","kind":"article","abstract":[{"text":"There are many ways to use Factory to resolve dependencies. Here are a few examples.","type":"text"}],"title":"Sample Resolutions","url":"\/documentation\/factory\/resolutions","role":"article"},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Containers":{"role":"article","abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","title":"Containers","type":"topic","url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/Contexts":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","title":"Contexts","type":"topic","role":"article","abstract":[{"text":"Changing injection results under special circumstances.","type":"text"}],"kind":"article","url":"\/documentation\/factory\/contexts"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","title":"Scopes"},"doc://Factory/documentation/Factory/Registrations":{"url":"\/documentation\/factory\/registrations","kind":"article","abstract":[{"type":"text","text":"There are many ways to register dependencies with Factory. Here are a few examples."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Registrations","type":"topic","title":"Sample Registrations","role":"article"},"doc://Factory/documentation/Factory/Testing":{"title":"Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"url":"\/documentation\/factory\/testing","kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","role":"article"}}} \ No newline at end of file +{"abstract":[{"text":"Defining a Factory, resolving it, and changing the default behavior.","type":"text"}],"primaryContentSections":[{"content":[{"level":2,"text":"Overview","type":"heading","anchor":"Overview"},{"type":"paragraph","inlineContent":[{"text":"A ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","isActive":true,"type":"reference"},{"type":"text","text":" manages the dependency injection process for a specific object or service and produces an object of the desired type when required."}]},{"level":2,"text":"Defining a Factory","type":"heading","anchor":"Defining-a-Factory"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"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":"paragraph"},{"syntax":"swift","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"There’s a few things going on here, so let’s break it down."}]},{"type":"paragraph","inlineContent":[{"text":"First, we extended our container in order to define a new computed variable of type ","type":"text"},{"type":"codeVoice","code":"Factory"},{"text":".","type":"text"}]},{"syntax":"swift","type":"codeListing","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."}]},{"inlineContent":[{"code":"Factory","type":"codeVoice"},{"type":"text","text":" is the "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","isActive":true,"type":"reference"},{"text":" that controls how and when our ","type":"text"},{"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":[{"text":"As such, a complete, formal Factory definition would look like this…","type":"text"}],"type":"paragraph"},{"code":["var service: Factory {"," Factory(self, scope: .unique) { "," MyService()"," }","}"],"type":"codeListing","syntax":"swift"},{"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 "},{"code":"callAsFunction","type":"codeVoice"},{"type":"text","text":" function on "},{"type":"codeVoice","code":"self"},{"text":".","type":"text"}]},{"syntax":"swift","code":["var service: Factory {"," self { MyService() }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"inlineContent":[{"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":"text"}],"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"},{"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","identifier":"doc:\/\/Factory\/documentation\/Factory\/Registrations","isActive":true},{"text":".","type":"text"}]},{"text":"Resolving a Factory","level":2,"anchor":"Resolving-a-Factory","type":"heading"},{"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."}]},{"syntax":"swift","code":["class ContentViewModel: ObservableObject {"," private let myService = Container.shared.service()"," ...","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"The resolved instance may be brand new or Factory may return a cached value from the specified ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true,"type":"reference"},{"type":"text","text":"."}]},{"inlineContent":[{"text":"If you’re passing an instance of a container around to your views or view models, just call it directly.","type":"text"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["private let service = container.service()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Finally, we could have also used an "},{"type":"codeVoice","code":"@Injected"},{"text":" property wrapper and specified a keyPath to the desired dependency.","type":"text"}]},{"code":["@Injected(\\.service) var service"],"syntax":"swift","type":"codeListing"},{"inlineContent":[{"type":"text","text":"Unless otherwise specified, the "},{"code":"@Injected","type":"codeVoice"},{"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()"},{"text":" example shown earlier. Here’s one pointing to your own container.","type":"text"}],"type":"paragraph"},{"code":["@Injected(\\MyCustomContainer.service) var service: ServiceType"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"For more examples see: "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions"},{"text":".","type":"text"}]},{"text":"Registering a new Factory closure","type":"heading","level":2,"anchor":"Registering-a-new-Factory-closure"},{"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":"paragraph"},{"syntax":"swift","type":"codeListing","code":["container.service.register {"," MockService()","}"]},{"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 "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","type":"reference","isActive":true}]}],"type":"paragraph"},{"anchor":"Mocking-and-Testing","type":"heading","text":"Mocking and Testing","level":2},{"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 "},{"code":"let myService = MyService()","type":"codeVoice"},{"type":"text","text":" and be done with it?"}]},{"type":"paragraph","inlineContent":[{"text":"Or keep the container idea, but write something similar to this…","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," static var myService: MyServiceType { MyService() }","}"]},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["struct ContentView: View {"," @StateObject var model = ContentViewModel()"," var body: some View {"," Text(model.text())"," .padding()"," }","}"]},{"inlineContent":[{"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":"text"},{"type":"codeVoice","code":"ContentViewModel"},{"text":" so that its ","type":"text"},{"type":"codeVoice","code":"MyService"},{"text":" dependency isn’t making live API calls during development?","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"It’s easy. Just replace ","type":"text"},{"code":"MyService","type":"codeVoice"},{"type":"text","text":" with a mock that also conforms to "},{"type":"codeVoice","code":"MyServiceType"},{"type":"text","text":"."}]},{"syntax":"swift","code":["struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," let _ = Container.shared.myService.register { MockService2() }"," ContentView()"," }","}"],"type":"codeListing"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"Now when our preview is displayed "},{"code":"ContentView","type":"codeVoice"},{"text":" creates a ","type":"text"},{"code":"ContentViewModel","type":"codeVoice"},{"text":" which in turn has a dependency on ","type":"text"},{"type":"codeVoice","code":"myService"},{"type":"text","text":" using shared container."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"And when the wrapper asks the factory for an instance of ","type":"text"},{"code":"MyServiceType","type":"codeVoice"},{"type":"text","text":" it now gets a "},{"code":"MockService2","type":"codeVoice"},{"type":"text","text":" instead of the "},{"type":"codeVoice","code":"MyService"},{"text":" type originally defined.","type":"text"}]},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"We’re just scratching the surface here. Read more in the section on ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","type":"reference","isActive":true},{"text":".","type":"text"}],"type":"paragraph"},{"type":"heading","anchor":"Contexts","level":2,"text":"Contexts"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Factory makes it easy. Just register an override for that particular context.","type":"text"}]},{"type":"codeListing","code":["container.analytics.onDebug {"," StubAnalyticsEngine()","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"There are many contexts for testing, previews, and even UITesting. See "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","isActive":true},{"text":" for more.","type":"text"}]}],"kind":"content"}],"sections":[],"metadata":{"title":"Getting Started","modules":[{"name":"Factory"}],"role":"collectionGroup"},"kind":"article","seeAlsoSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Containers","doc:\/\/Factory\/documentation\/Factory\/Scopes"],"title":"The Basics","generated":true}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/gettingstarted"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Registrations","doc:\/\/Factory\/documentation\/Factory\/Resolutions"],"abstract":[{"text":"Some code samples demonstration various ways to register and resolve Factory’s.","type":"text"}],"title":"Examples"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/Registrations":{"abstract":[{"text":"There are many ways to register dependencies with Factory. Here are a few examples.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Registrations","url":"\/documentation\/factory\/registrations","type":"topic","role":"article","title":"Sample Registrations","kind":"article"},"doc://Factory/documentation/Factory/Resolutions":{"url":"\/documentation\/factory\/resolutions","title":"Sample Resolutions","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","role":"article","abstract":[{"text":"There are many ways to use Factory to resolve dependencies. Here are a few examples.","type":"text"}],"kind":"article","type":"topic"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"},"doc://Factory/documentation/Factory/Containers":{"type":"topic","role":"article","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","title":"Containers","abstract":[{"text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?","type":"text"}],"url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory/Contexts":{"abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"type":"topic","role":"article","title":"Contexts","kind":"article","url":"\/documentation\/factory\/contexts","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"kind":"article"},"doc://Factory/documentation/Factory/Testing":{"title":"Testing","url":"\/documentation\/factory\/testing","abstract":[{"text":"Using Factory for Unit and UI Testing.","type":"text"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","type":"topic","role":"article"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injected.json b/docs/data/documentation/factory/injected.json index cccc2f1d..c1a7f7b1 100644 --- a/docs/data/documentation/factory/injected.json +++ b/docs/data/documentation/factory/injected.json @@ -1 +1 @@ -{"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-7xpmb","doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-9sxzk"],"title":"Initializers"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Injected\/factory","doc:\/\/Factory\/documentation\/Factory\/Injected\/projectedValue","doc:\/\/Factory\/documentation\/Factory\/Injected\/wrappedValue"],"title":"Instance Properties"},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Injected\/resolve(reset:)"]}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"@propertyWrapper","kind":"attribute"},{"kind":"text","text":" "},{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">"}],"languages":["swift"]}],"kind":"declarations"},{"kind":"content","content":[{"level":2,"anchor":"overview","text":"Overview","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Property wrappers implement an annotation pattern to resolving dependencies, similar to using"},{"text":" ","type":"text"},{"text":"EnvironmentObject in SwiftUI.","type":"text"}]},{"syntax":"swift","type":"codeListing","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."},{"text":" ","type":"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."}]},{"content":[{"type":"paragraph","inlineContent":[{"text":"The @Injected property wrapper will be resolved on ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"initialization"}]},{"text":". In the above example","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"the referenced dependencies will be acquired when the parent class is created."}]}],"style":"note","name":"Note","type":"aside"}]}],"abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injected"]}],"metadata":{"title":"Injected","roleHeading":"Structure","role":"symbol","externalID":"s:7Factory8InjectedV","symbolKind":"struct","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"Injected"}]},"sections":[],"schemaVersion":{"major":0,"patch":0,"minor":3},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"references":{"doc://Factory/documentation/Factory/Injected/factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/factory","kind":"symbol","role":"symbol","type":"topic","title":"factory","abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"url":"\/documentation\/factory\/injected\/factory","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Injected/projectedValue":{"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"projectedValue","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory8InjectedV","kind":"typeIdentifier","text":"Injected"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"url":"\/documentation\/factory\/injected\/projectedvalue","title":"projectedValue","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/projectedValue","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Injected/init(_:)-9sxzk":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"text":"C","kind":"genericParameter"},{"kind":"text","text":">("},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}],"url":"\/documentation\/factory\/injected\/init(_:)-9sxzk","role":"symbol","type":"topic","kind":"symbol","title":"init(_:)","abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on initialization.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-9sxzk"},"doc://Factory/documentation/Factory/Injected/resolve(reset:)":{"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","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","kind":"typeIdentifier"},{"text":")","kind":"text"}],"url":"\/documentation\/factory\/injected\/resolve(reset:)","role":"symbol","title":"resolve(reset:)"},"doc://Factory/documentation/Factory/Injected/init(_:)-7xpmb":{"title":"init(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-7xpmb","type":"topic","url":"\/documentation\/factory\/injected\/init(_:)-7xpmb","role":"symbol","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC","text":"Container"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Injected/wrappedValue":{"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"wrappedValue"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/wrappedvalue","role":"symbol","abstract":[{"text":"Manages the wrapped dependency.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/wrappedValue","title":"wrappedValue"},"doc://Factory/documentation/Factory/Injected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","role":"symbol","type":"topic","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"title":"Injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]}}} \ No newline at end of file +{"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"@propertyWrapper","kind":"attribute"},{"text":" ","kind":"text"},{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Injected","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">"}]}]},{"content":[{"type":"heading","level":2,"anchor":"overview","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."}]},{"syntax":"swift","code":["class MyViewModel {"," @Injected(\\.myService) var service"," @Injected(\\MyCustomContainer.myService) var service","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"The provided keypath resolves to a Factory definition on the ","type":"text"},{"code":"shared","type":"codeVoice"},{"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"},{"text":" ","type":"text"},{"type":"text","text":"allows you to point an instance on your own customer container type."}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The @Injected property wrapper will be resolved on "},{"type":"strong","inlineContent":[{"text":"initialization","type":"text"}]},{"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."}]}],"name":"Note","type":"aside","style":"note"}],"kind":"content"}],"metadata":{"roleHeading":"Structure","externalID":"s:7Factory8InjectedV","title":"Injected","modules":[{"name":"Factory"}],"symbolKind":"struct","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Injected","kind":"identifier"}],"navigatorTitle":[{"text":"Injected","kind":"identifier"}]},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-7xpmb","doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-9sxzk"],"title":"Initializers"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Injected\/factory","doc:\/\/Factory\/documentation\/Factory\/Injected\/projectedValue","doc:\/\/Factory\/documentation\/Factory\/Injected\/wrappedValue"],"title":"Instance Properties"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Injected\/resolve(reset:)"],"title":"Instance Methods"}],"variants":[{"paths":["\/documentation\/factory\/injected"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"references":{"doc://Factory/documentation/Factory/Injected/resolve(reset:)":{"kind":"symbol","url":"\/documentation\/factory\/injected\/resolve(reset:)","title":"resolve(reset:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"("},{"text":"reset","kind":"externalParam"},{"kind":"text","text":": "},{"text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"text":")","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/resolve(reset:)","abstract":[{"text":"Allows the user to force a Factory resolution at their discretion.","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Injected/wrappedValue":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/wrappedValue","title":"wrappedValue","type":"topic","abstract":[{"text":"Manages the wrapped dependency.","type":"text"}],"url":"\/documentation\/factory\/injected\/wrappedvalue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"wrappedValue","kind":"identifier"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Injected/factory":{"abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/factory","type":"topic","title":"factory","url":"\/documentation\/factory\/injected\/factory","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"factory","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Injected/init(_:)-7xpmb":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-7xpmb","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"Container","kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC"},{"text":", ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"type":"topic","url":"\/documentation\/factory\/injected\/init(_:)-7xpmb","title":"init(_:)","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Injected":{"kind":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","navigatorTitle":[{"text":"Injected","kind":"identifier"}],"abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Injected/init(_:)-9sxzk":{"type":"topic","title":"init(_:)","kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-9sxzk","url":"\/documentation\/factory\/injected\/init(_:)-9sxzk","fragments":[{"text":"init","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"C"},{"text":">(","kind":"text"},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"C"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}]},"doc://Factory/documentation/Factory/Injected/projectedValue":{"role":"symbol","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory8InjectedV","text":"Injected","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"kind":"symbol","title":"projectedValue","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/projectedValue","abstract":[{"text":"Unwraps the property wrapper granting access to the resolve\/reset function.","type":"text"}],"url":"\/documentation\/factory\/injected\/projectedvalue"}}} \ 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 8dd95f93..ed3b0c6d 100644 --- a/docs/data/documentation/factory/injected/factory.json +++ b/docs/data/documentation/factory/injected/factory.json @@ -1 +1 @@ -{"kind":"symbol","metadata":{"role":"symbol","modules":[{"name":"Factory"}],"symbolKind":"property","roleHeading":"Instance Property","title":"factory","externalID":"s:7Factory8InjectedV7factoryA2AVyxGvp","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"text":": ","kind":"text"},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/factory","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":"> { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}],"languages":["swift"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injected\/factory"]}],"abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"references":{"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/Injected/factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/factory","kind":"symbol","role":"symbol","type":"topic","title":"factory","abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"url":"\/documentation\/factory\/injected\/factory","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Injected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","role":"symbol","type":"topic","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"title":"Injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]}}} \ No newline at end of file +{"kind":"symbol","primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"factory","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":"> { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/factory","interfaceLanguage":"swift"},"sections":[],"metadata":{"modules":[{"name":"Factory"}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"factory","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"role":"symbol","symbolKind":"property","roleHeading":"Instance Property","title":"factory","externalID":"s:7Factory8InjectedV7factoryA2AVyxGvp"},"abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injected\/factory"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/Injected/factory":{"abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/factory","type":"topic","title":"factory","url":"\/documentation\/factory\/injected\/factory","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"factory","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/Injected":{"kind":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","navigatorTitle":[{"text":"Injected","kind":"identifier"}],"abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"type":"topic","role":"symbol"}}} \ 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 58fcc94f..fa8b6c5a 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":[{"platforms":["macOS"],"tokens":[{"text":"init","kind":"keyword"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"keyPath","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","text":"Container"},{"kind":"text","text":", "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"languages":["swift"]}]},{"kind":"parameters","parameters":[{"content":[{"type":"paragraph","inlineContent":[{"text":"KeyPath to a Factory on the default Container.","type":"text"}]}],"name":"keyPath"}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injected\/init(_:)-7xpmb"]}],"metadata":{"symbolKind":"init","title":"init(_:)","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"text":"KeyPath","preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"preciseIdentifier":"s:7Factory9ContainerC","text":"Container","kind":"typeIdentifier"},{"kind":"text","text":", "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}],"role":"symbol","roleHeading":"Initializer","modules":[{"name":"Factory"}],"externalID":"s:7Factory8InjectedVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-7xpmb","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"sections":[],"kind":"symbol","references":{"doc://Factory/documentation/Factory/Container":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Container"}],"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/Injected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","role":"symbol","type":"topic","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"title":"Injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]},"doc://Factory/documentation/Factory/Injected/init(_:)-7xpmb":{"title":"init(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-7xpmb","type":"topic","url":"\/documentation\/factory\/injected\/init(_:)-7xpmb","role":"symbol","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC","text":"Container"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"kind":"symbol"}}} \ No newline at end of file +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-7xpmb"},"abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on initialization.","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"init","kind":"keyword"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"text":"KeyPath","preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}]}]},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"type":"paragraph","inlineContent":[{"text":"KeyPath to a Factory on the default Container.","type":"text"}]}]}]}],"sections":[],"metadata":{"role":"symbol","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"text":"Container","kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC"},{"text":", ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}],"externalID":"s:7Factory8InjectedVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc","roleHeading":"Initializer","modules":[{"name":"Factory"}],"title":"init(_:)","symbolKind":"init"},"variants":[{"paths":["\/documentation\/factory\/injected\/init(_:)-7xpmb"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory/Injected":{"kind":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","navigatorTitle":[{"text":"Injected","kind":"identifier"}],"abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Injected/init(_:)-7xpmb":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-7xpmb","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"Container","kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC"},{"text":", ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"type":"topic","url":"\/documentation\/factory\/injected\/init(_:)-7xpmb","title":"init(_:)","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Container","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","navigatorTitle":[{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"type":"topic","role":"symbol"}}} \ 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 30e7aeb4..dff3b693 100644 --- a/docs/data/documentation/factory/injected/init(_:)-9sxzk.json +++ b/docs/data/documentation/factory/injected/init(_:)-9sxzk.json @@ -1 +1 @@ -{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injected\/init(_:)-9sxzk"]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-9sxzk","interfaceLanguage":"swift"},"sections":[],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"metadata":{"symbolKind":"init","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"text":"C","kind":"genericParameter"},{"kind":"text","text":">("},{"preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier","text":"KeyPath"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"externalID":"s:7Factory8InjectedVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc","role":"symbol","modules":[{"name":"Factory"}],"roleHeading":"Initializer","title":"init(_:)"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"init","kind":"keyword"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"text":">(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier","text":"KeyPath"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"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"}]}]},{"parameters":[{"name":"keyPath","content":[{"inlineContent":[{"text":"KeyPath to a Factory on the specified Container.","type":"text"}],"type":"paragraph"}]}],"kind":"parameters"}],"references":{"doc://Factory/documentation/Factory/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","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"title":"SharedContainer","url":"\/documentation\/factory\/sharedcontainer","navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/Injected/init(_:)-9sxzk":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"text":"C","kind":"genericParameter"},{"kind":"text","text":">("},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}],"url":"\/documentation\/factory\/injected\/init(_:)-9sxzk","role":"symbol","type":"topic","kind":"symbol","title":"init(_:)","abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on initialization.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-9sxzk"},"doc://Factory/documentation/Factory/Injected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","role":"symbol","type":"topic","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"title":"Injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]}}} \ No newline at end of file +{"kind":"symbol","metadata":{"symbolKind":"init","title":"init(_:)","role":"symbol","roleHeading":"Initializer","modules":[{"name":"Factory"}],"fragments":[{"kind":"identifier","text":"init"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"KeyPath","preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"C","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"externalID":"s:7Factory8InjectedVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc"},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-9sxzk","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"schemaVersion":{"major":0,"patch":0,"minor":3},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injected\/init(_:)-9sxzk"]}],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"init","kind":"keyword"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"keyPath"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"text":"C","kind":"typeIdentifier"},{"kind":"text","text":", "},{"preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">>) ","kind":"text"},{"kind":"keyword","text":"where"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","text":"C"},{"text":" : ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","text":"SharedContainer","preciseIdentifier":"s:7Factory15SharedContainerP","kind":"typeIdentifier"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"},{"parameters":[{"name":"keyPath","content":[{"inlineContent":[{"type":"text","text":"KeyPath to a Factory on the specified Container."}],"type":"paragraph"}]}],"kind":"parameters"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"references":{"doc://Factory/documentation/Factory/SharedContainer":{"title":"SharedContainer","type":"topic","url":"\/documentation\/factory\/sharedcontainer","role":"symbol","navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"SharedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Injected/init(_:)-9sxzk":{"type":"topic","title":"init(_:)","kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-9sxzk","url":"\/documentation\/factory\/injected\/init(_:)-9sxzk","fragments":[{"text":"init","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"C"},{"text":">(","kind":"text"},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"C"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}]},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/Injected":{"kind":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","navigatorTitle":[{"text":"Injected","kind":"identifier"}],"abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"type":"topic","role":"symbol"}}} \ 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 7f49ce1e..bad40f7b 100644 --- a/docs/data/documentation/factory/injected/projectedvalue.json +++ b/docs/data/documentation/factory/injected/projectedvalue.json @@ -1 +1 @@ -{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injected\/projectedvalue"]}],"metadata":{"roleHeading":"Instance Property","role":"symbol","symbolKind":"property","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"projectedValue","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Injected","preciseIdentifier":"s:7Factory8InjectedV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"title":"projectedValue","externalID":"s:7Factory8InjectedV14projectedValueACyxGvp"},"sections":[],"schemaVersion":{"major":0,"patch":0,"minor":3},"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/projectedValue","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"projectedValue","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory8InjectedV","text":"Injected","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":"> { ","kind":"text"},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"text":"set","kind":"keyword"},{"kind":"text","text":" }"}],"languages":["swift"]}]}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/Injected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","role":"symbol","type":"topic","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"title":"Injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Injected/projectedValue":{"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"projectedValue","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory8InjectedV","kind":"typeIdentifier","text":"Injected"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"url":"\/documentation\/factory\/injected\/projectedvalue","title":"projectedValue","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/projectedValue","type":"topic","kind":"symbol"}}} \ No newline at end of file +{"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"paths":["\/documentation\/factory\/injected\/projectedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"role":"symbol","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory8InjectedV","text":"Injected"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"symbolKind":"property","title":"projectedValue","modules":[{"name":"Factory"}],"externalID":"s:7Factory8InjectedV14projectedValueACyxGvp"},"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/projectedValue"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory8InjectedV","kind":"typeIdentifier","text":"Injected","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":"> { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" ","kind":"text"},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"languages":["swift"]}]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Injected/projectedValue":{"role":"symbol","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory8InjectedV","text":"Injected","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"kind":"symbol","title":"projectedValue","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/projectedValue","abstract":[{"text":"Unwraps the property wrapper granting access to the resolve\/reset function.","type":"text"}],"url":"\/documentation\/factory\/injected\/projectedvalue"},"doc://Factory/documentation/Factory/Injected":{"kind":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","navigatorTitle":[{"text":"Injected","kind":"identifier"}],"abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"type":"topic","role":"symbol"}}} \ 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 f569e8d9..1a605e15 100644 --- a/docs/data/documentation/factory/injected/resolve(reset:).json +++ b/docs/data/documentation/factory/injected/resolve(reset:).json @@ -1 +1 @@ -{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/resolve(reset:)"},"metadata":{"roleHeading":"Instance Method","symbolKind":"method","externalID":"s:7Factory8InjectedV7resolve5resetyAA0A12ResetOptionsO_tF","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"text":": ","kind":"text"},{"text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier"},{"kind":"text","text":")"}],"role":"symbol","modules":[{"name":"Factory"}],"title":"resolve(reset:)"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","abstract":[{"text":"Allows the user to force a Factory resolution at their discretion.","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"mutating","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolve"},{"text":"(","kind":"text"},{"text":"reset","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"options"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","text":"FactoryResetOptions"},{"text":" = .none)","kind":"text"}],"languages":["swift"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injected\/resolve(reset:)"]}],"sections":[],"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"title":"FactoryResetOptions"},"doc://Factory/documentation/Factory/Injected/resolve(reset:)":{"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","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","kind":"typeIdentifier"},{"text":")","kind":"text"}],"url":"\/documentation\/factory\/injected\/resolve(reset:)","role":"symbol","title":"resolve(reset:)"},"doc://Factory/documentation/Factory/Injected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","role":"symbol","type":"topic","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"title":"Injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"sections":[],"variants":[{"paths":["\/documentation\/factory\/injected\/resolve(reset:)"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"modules":[{"name":"Factory"}],"title":"resolve(reset:)","externalID":"s:7Factory8InjectedV7resolve5resetyAA0A12ResetOptionsO_tF","roleHeading":"Instance Method","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"reset"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"text":")","kind":"text"}],"symbolKind":"method"},"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/resolve(reset:)"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"kind":"symbol","abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"mutating","kind":"keyword"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"(","kind":"text"},{"text":"reset","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"options"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","kind":"typeIdentifier"},{"text":" = .none)","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","title":"FactoryResetOptions","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryResetOptions","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Injected":{"kind":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","navigatorTitle":[{"text":"Injected","kind":"identifier"}],"abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Injected/resolve(reset:)":{"kind":"symbol","url":"\/documentation\/factory\/injected\/resolve(reset:)","title":"resolve(reset:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"("},{"text":"reset","kind":"externalParam"},{"kind":"text","text":": "},{"text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"text":")","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/resolve(reset:)","abstract":[{"text":"Allows the user to force a Factory resolution at their discretion.","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ 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 c3d4d5ff..a0c2f6a0 100644 --- a/docs/data/documentation/factory/injected/wrappedvalue.json +++ b/docs/data/documentation/factory/injected/wrappedvalue.json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" ","kind":"text"},{"text":"set","kind":"keyword"},{"text":" }","kind":"text"}]}],"kind":"declarations"}],"metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"wrappedValue","kind":"identifier"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"modules":[{"name":"Factory"}],"role":"symbol","roleHeading":"Instance Property","externalID":"s:7Factory8InjectedV12wrappedValuexvp","symbolKind":"property","title":"wrappedValue"},"kind":"symbol","abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"schemaVersion":{"minor":3,"major":0,"patch":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/wrappedValue","interfaceLanguage":"swift"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"variants":[{"paths":["\/documentation\/factory\/injected\/wrappedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/Injected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","role":"symbol","type":"topic","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"title":"Injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Injected/wrappedValue":{"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"wrappedValue"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"kind":"symbol","type":"topic","url":"\/documentation\/factory\/injected\/wrappedvalue","role":"symbol","abstract":[{"text":"Manages the wrapped dependency.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/wrappedValue","title":"wrappedValue"}}} \ No newline at end of file +{"abstract":[{"text":"Manages the wrapped dependency.","type":"text"}],"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injected\/wrappedvalue"]}],"metadata":{"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"wrappedValue","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"T"}],"externalID":"s:7Factory8InjectedV12wrappedValuexvp","modules":[{"name":"Factory"}],"role":"symbol","title":"wrappedValue","symbolKind":"property","roleHeading":"Instance Property"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/wrappedValue","interfaceLanguage":"swift"},"kind":"symbol","primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":" { "},{"text":"get","kind":"keyword"},{"text":" ","kind":"text"},{"text":"set","kind":"keyword"},{"kind":"text","text":" }"}]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory/Injected":{"kind":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","navigatorTitle":[{"text":"Injected","kind":"identifier"}],"abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Injected/wrappedValue":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/wrappedValue","title":"wrappedValue","type":"topic","abstract":[{"text":"Manages the wrapped dependency.","type":"text"}],"url":"\/documentation\/factory\/injected\/wrappedvalue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"wrappedValue","kind":"identifier"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injectedobject.json b/docs/data/documentation/factory/injectedobject.json index d899df44..37afe83e 100644 --- a/docs/data/documentation/factory/injectedobject.json +++ b/docs/data/documentation/factory/injectedobject.json @@ -1 +1 @@ -{"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"schemaVersion":{"major":0,"patch":0,"minor":3},"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-4awwf","doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-7dlth","doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-8lxkh"],"title":"Initializers"},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/projectedValue","doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/wrappedValue"]},{"generated":true,"identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations"],"title":"Default Implementations"}],"relationshipsSections":[{"title":"Conforms To","kind":"relationships","identifiers":["doc:\/\/Factory\/7SwiftUI15DynamicPropertyP"],"type":"conformsTo"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@frozen"},{"kind":"text","text":" "},{"kind":"attribute","text":"@propertyWrapper"},{"text":" ","kind":"text"},{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":"> ","kind":"text"},{"kind":"keyword","text":"where"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":" : "},{"preciseIdentifier":"s:7Combine16ObservableObjectP","kind":"typeIdentifier","text":"ObservableObject"}],"languages":["swift"]}]},{"kind":"content","content":[{"type":"heading","anchor":"overview","text":"Overview","level":2},{"inlineContent":[{"type":"text","text":"This wrapper is meant for use in SwiftUI Views and exposes bindable objects similar to that of SwiftUI @StateObject"},{"text":" ","type":"text"},{"type":"text","text":"and @EnvironmentObject."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Like the other Injected property wrappers, InjectedObject wraps obtains the dependency from the Factory keypath"},{"text":" ","type":"text"},{"type":"text","text":"and provides it to a wrapped instance of StateObject. Updating object state will trigger view update."}]},{"type":"codeListing","code":["struct ContentView: View {"," @InjectedObject(\\.contentViewModel) var model"," var body: some View {"," ..."," }","}"],"syntax":"swift"},{"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":"paragraph"},{"type":"codeListing","code":["extension Container {"," var contentViewModel: Factory {"," self { ContentViewModel() }"," }","}"],"syntax":"swift"}]}],"metadata":{"symbolKind":"struct","roleHeading":"Structure","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"title":"InjectedObject","externalID":"s:7Factory14InjectedObjectV","modules":[{"name":"Factory"}],"role":"symbol","platforms":[{"deprecated":false,"introducedAt":"14.0","name":"iOS","unavailable":false,"beta":false},{"unavailable":false,"introducedAt":"11.0","deprecated":false,"beta":false,"name":"macOS"},{"unavailable":false,"introducedAt":"14.0","name":"tvOS","beta":false,"deprecated":false},{"unavailable":false,"name":"watchOS","beta":false,"introducedAt":"7.0","deprecated":false}]},"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedobject"]}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/InjectedObject/init(_:)-4awwf":{"role":"symbol","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":")"}],"conformance":{"constraints":[{"code":"T","type":"codeVoice"},{"type":"text","text":" conforms to "},{"type":"codeVoice","code":"ObservableObject"},{"text":".","type":"text"}],"conformancePrefix":[{"type":"text","text":"Conforms when"}],"availabilityPrefix":[{"type":"text","text":"Available when"}]},"title":"init(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-4awwf","url":"\/documentation\/factory\/injectedobject\/init(_:)-4awwf","type":"topic","kind":"symbol","abstract":[{"type":"text","text":"Simple initializer with passed parameter bypassing injection."}]},"doc://Factory/7SwiftUI15DynamicPropertyP":{"identifier":"doc:\/\/Factory\/7SwiftUI15DynamicPropertyP","title":"SwiftUI.DynamicProperty","type":"unresolvable"},"doc://Factory/documentation/Factory/InjectedObject/DynamicProperty-Implementations":{"type":"topic","url":"\/documentation\/factory\/injectedobject\/dynamicproperty-implementations","title":"DynamicProperty Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations","abstract":[],"role":"collectionGroup","kind":"article"},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-7dlth":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-7dlth","role":"symbol","url":"\/documentation\/factory\/injectedobject\/init(_:)-7dlth","type":"topic","title":"init(_:)","kind":"symbol","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on initialization.","type":"text"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/InjectedObject":{"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","role":"symbol","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/InjectedObject/projectedValue":{"url":"\/documentation\/factory\/injectedobject\/projectedvalue","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"projectedValue","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7SwiftUI14ObservedObjectV","kind":"typeIdentifier","text":"ObservedObject"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">.","kind":"text"},{"preciseIdentifier":"s:7SwiftUI14ObservedObjectV7WrapperV","text":"Wrapper","kind":"typeIdentifier"}],"title":"projectedValue","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/projectedValue","abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-8lxkh":{"type":"topic","url":"\/documentation\/factory\/injectedobject\/init(_:)-8lxkh","fragments":[{"text":"init","kind":"identifier"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"kind":"text","text":">("},{"preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier","text":"KeyPath"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}],"title":"init(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-8lxkh","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/InjectedObject/wrappedValue":{"url":"\/documentation\/factory\/injectedobject\/wrappedvalue","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"title":"wrappedValue","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/wrappedValue","abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"role":"symbol","kind":"symbol"}}} \ No newline at end of file +{"kind":"symbol","abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"@frozen","kind":"attribute"},{"text":" ","kind":"text"},{"text":"@propertyWrapper","kind":"attribute"},{"text":" ","kind":"text"},{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"InjectedObject","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":"> ","kind":"text"},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":" : "},{"text":"ObservableObject","preciseIdentifier":"s:7Combine16ObservableObjectP","kind":"typeIdentifier"}]}],"kind":"declarations"},{"kind":"content","content":[{"anchor":"overview","type":"heading","text":"Overview","level":2},{"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"},{"text":" ","type":"text"},{"type":"text","text":"and @EnvironmentObject."}]},{"type":"paragraph","inlineContent":[{"text":"Like the other Injected property wrappers, InjectedObject wraps obtains the dependency from the Factory keypath","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"and provides it to a wrapped instance of StateObject. Updating object state will trigger view update."}]},{"syntax":"swift","type":"codeListing","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"},{"text":" ","type":"text"},{"text":"or dependency.","type":"text"}]},{"syntax":"swift","code":["extension Container {"," var contentViewModel: Factory {"," self { ContentViewModel() }"," }","}"],"type":"codeListing"}]}],"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-4awwf","doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-7dlth","doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-8lxkh"],"title":"Initializers"},{"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}],"schemaVersion":{"minor":3,"major":0,"patch":0},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","interfaceLanguage":"swift"},"metadata":{"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"InjectedObject","kind":"identifier"}],"symbolKind":"struct","roleHeading":"Structure","externalID":"s:7Factory14InjectedObjectV","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"platforms":[{"unavailable":false,"introducedAt":"14.0","name":"iOS","beta":false,"deprecated":false},{"deprecated":false,"name":"macOS","unavailable":false,"beta":false,"introducedAt":"11.0"},{"deprecated":false,"name":"tvOS","introducedAt":"14.0","unavailable":false,"beta":false},{"deprecated":false,"unavailable":false,"beta":false,"name":"watchOS","introducedAt":"7.0"}],"title":"InjectedObject","modules":[{"name":"Factory"}],"role":"symbol"},"variants":[{"paths":["\/documentation\/factory\/injectedobject"],"traits":[{"interfaceLanguage":"swift"}]}],"relationshipsSections":[{"type":"conformsTo","title":"Conforms To","kind":"relationships","identifiers":["doc:\/\/Factory\/7SwiftUI15DynamicPropertyP"]}],"references":{"doc://Factory/7SwiftUI15DynamicPropertyP":{"identifier":"doc:\/\/Factory\/7SwiftUI15DynamicPropertyP","type":"unresolvable","title":"SwiftUI.DynamicProperty"},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-4awwf":{"title":"init(_:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-4awwf","abstract":[{"type":"text","text":"Simple initializer with passed parameter bypassing injection."}],"kind":"symbol","fragments":[{"kind":"identifier","text":"init"},{"text":"(","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":")","kind":"text"}],"type":"topic","url":"\/documentation\/factory\/injectedobject\/init(_:)-4awwf","conformance":{"availabilityPrefix":[{"type":"text","text":"Available when"}],"conformancePrefix":[{"text":"Conforms when","type":"text"}],"constraints":[{"code":"T","type":"codeVoice"},{"type":"text","text":" conforms to "},{"code":"ObservableObject","type":"codeVoice"},{"type":"text","text":"."}]}},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-7dlth":{"role":"symbol","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"type":"topic","url":"\/documentation\/factory\/injectedobject\/init(_:)-7dlth","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-7dlth","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"kind":"text","text":"<"},{"text":"Container","preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}]},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-8lxkh":{"title":"init(_:)","role":"symbol","abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on initialization.","type":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-8lxkh","fragments":[{"text":"init","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}],"url":"\/documentation\/factory\/injectedobject\/init(_:)-8lxkh","type":"topic"},"doc://Factory/documentation/Factory/InjectedObject/wrappedValue":{"role":"symbol","url":"\/documentation\/factory\/injectedobject\/wrappedvalue","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/wrappedValue","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"wrappedValue"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"title":"wrappedValue","kind":"symbol"},"doc://Factory/documentation/Factory/InjectedObject/DynamicProperty-Implementations":{"title":"DynamicProperty Implementations","role":"collectionGroup","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations","abstract":[],"kind":"article","type":"topic","url":"\/documentation\/factory\/injectedobject\/dynamicproperty-implementations"},"doc://Factory/documentation/Factory/InjectedObject/projectedValue":{"abstract":[{"text":"Manages the wrapped dependency.","type":"text"}],"kind":"symbol","type":"topic","title":"projectedValue","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/projectedValue","url":"\/documentation\/factory\/injectedobject\/projectedvalue","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"text":"ObservedObject","preciseIdentifier":"s:7SwiftUI14ObservedObjectV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">."},{"preciseIdentifier":"s:7SwiftUI14ObservedObjectV7WrapperV","text":"Wrapper","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"InjectedObject","kind":"identifier"}],"abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","kind":"symbol","navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}]}}} \ 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 f76b7b93..404b0a2f 100644 --- a/docs/data/documentation/factory/injectedobject/dynamicproperty-implementations.json +++ b/docs/data/documentation/factory/injectedobject/dynamicproperty-implementations.json @@ -1 +1 @@ -{"topicSections":[{"generated":true,"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/update()"]}],"kind":"article","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedobject\/dynamicproperty-implementations"]}],"metadata":{"modules":[{"name":"Factory"}],"role":"collectionGroup","title":"DynamicProperty Implementations"},"schemaVersion":{"major":0,"patch":0,"minor":3},"sections":[],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/InjectedObject/update()":{"url":"\/documentation\/factory\/injectedobject\/update()","kind":"symbol","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/update()","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"update","kind":"identifier"},{"text":"()","kind":"text"}],"type":"topic","title":"update()","role":"symbol"},"doc://Factory/documentation/Factory/InjectedObject":{"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","role":"symbol","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","kind":"symbol"}}} \ No newline at end of file +{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations","interfaceLanguage":"swift"},"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/update()"],"generated":true,"title":"Instance Methods"}],"variants":[{"paths":["\/documentation\/factory\/injectedobject\/dynamicproperty-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"kind":"article","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"metadata":{"role":"collectionGroup","title":"DynamicProperty Implementations","modules":[{"name":"Factory"}]},"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/InjectedObject/update()":{"title":"update()","url":"\/documentation\/factory\/injectedobject\/update()","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/update()","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"update","kind":"identifier"},{"kind":"text","text":"()"}],"kind":"symbol","abstract":[],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"InjectedObject","kind":"identifier"}],"abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","kind":"symbol","navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}]}}} \ 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 1d8dedf3..d5fe275c 100644 --- a/docs/data/documentation/factory/injectedobject/init(_:)-4awwf.json +++ b/docs/data/documentation/factory/injectedobject/init(_:)-4awwf.json @@ -1 +1 @@ -{"sections":[],"schemaVersion":{"patch":0,"minor":3,"major":0},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-4awwf","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/factory\/injectedobject\/init(_:)-4awwf"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"init","kind":"keyword"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"wrappedValue","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":")"}]}]},{"kind":"content","content":[{"type":"heading","anchor":"discussion","level":2,"text":"Discussion"},{"inlineContent":[{"type":"text","text":"Still has issue with attempting to pass dependency into existing view when existing InjectedObject has keyPath."},{"text":" ","type":"text"},{"type":"text","text":"https:\/\/forums.swift.org\/t\/allow-property-wrappers-with-multiple-arguments-to-defer-initialization-when-wrappedvalue-is-not-specified"}],"type":"paragraph"}]}],"metadata":{"fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":")"}],"externalID":"s:7Factory14InjectedObjectVyACyxGxcfc","conformance":{"constraints":[{"type":"codeVoice","code":"T"},{"text":" conforms to ","type":"text"},{"type":"codeVoice","code":"ObservableObject"},{"text":".","type":"text"}],"availabilityPrefix":[{"text":"Available when","type":"text"}],"conformancePrefix":[{"text":"Conforms when","type":"text"}]},"symbolKind":"init","roleHeading":"Initializer","role":"symbol","platforms":[{"beta":false,"unavailable":false,"deprecated":false,"introducedAt":"14.0","name":"iOS"},{"deprecated":false,"introducedAt":"11.0","name":"macOS","unavailable":false,"beta":false},{"unavailable":false,"introducedAt":"14.0","deprecated":false,"beta":false,"name":"tvOS"},{"unavailable":false,"beta":false,"introducedAt":"7.0","name":"watchOS","deprecated":false}],"title":"init(_:)","extendedModule":"Factory","modules":[{"name":"Factory"}]},"abstract":[{"type":"text","text":"Simple initializer with passed parameter bypassing injection."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-4awwf":{"role":"symbol","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":")"}],"conformance":{"constraints":[{"code":"T","type":"codeVoice"},{"type":"text","text":" conforms to "},{"type":"codeVoice","code":"ObservableObject"},{"text":".","type":"text"}],"conformancePrefix":[{"type":"text","text":"Conforms when"}],"availabilityPrefix":[{"type":"text","text":"Available when"}]},"title":"init(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-4awwf","url":"\/documentation\/factory\/injectedobject\/init(_:)-4awwf","type":"topic","kind":"symbol","abstract":[{"type":"text","text":"Simple initializer with passed parameter bypassing injection."}]},"doc://Factory/documentation/Factory/InjectedObject":{"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","role":"symbol","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","kind":"symbol"}}} \ No newline at end of file +{"abstract":[{"text":"Simple initializer with passed parameter bypassing injection.","type":"text"}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"init","kind":"keyword"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"wrappedValue"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":")","kind":"text"}],"languages":["swift"]}]},{"kind":"content","content":[{"type":"heading","anchor":"discussion","level":2,"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":" "},{"text":"https:\/\/forums.swift.org\/t\/allow-property-wrappers-with-multiple-arguments-to-defer-initialization-when-wrappedvalue-is-not-specified","type":"text"}]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-4awwf"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"externalID":"s:7Factory14InjectedObjectVyACyxGxcfc","symbolKind":"init","extendedModule":"Factory","role":"symbol","conformance":{"availabilityPrefix":[{"text":"Available when","type":"text"}],"constraints":[{"type":"codeVoice","code":"T"},{"type":"text","text":" conforms to "},{"code":"ObservableObject","type":"codeVoice"},{"text":".","type":"text"}],"conformancePrefix":[{"type":"text","text":"Conforms when"}]},"roleHeading":"Initializer","modules":[{"name":"Factory"}],"fragments":[{"kind":"identifier","text":"init"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":")","kind":"text"}],"title":"init(_:)","platforms":[{"deprecated":false,"introducedAt":"14.0","unavailable":false,"name":"iOS","beta":false},{"beta":false,"name":"macOS","introducedAt":"11.0","unavailable":false,"deprecated":false},{"beta":false,"unavailable":false,"deprecated":false,"name":"tvOS","introducedAt":"14.0"},{"name":"watchOS","introducedAt":"7.0","unavailable":false,"deprecated":false,"beta":false}]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedobject\/init(_:)-4awwf"]}],"sections":[],"references":{"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"InjectedObject","kind":"identifier"}],"abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","kind":"symbol","navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-4awwf":{"title":"init(_:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-4awwf","abstract":[{"type":"text","text":"Simple initializer with passed parameter bypassing injection."}],"kind":"symbol","fragments":[{"kind":"identifier","text":"init"},{"text":"(","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":")","kind":"text"}],"type":"topic","url":"\/documentation\/factory\/injectedobject\/init(_:)-4awwf","conformance":{"availabilityPrefix":[{"type":"text","text":"Available when"}],"conformancePrefix":[{"text":"Conforms when","type":"text"}],"constraints":[{"code":"T","type":"codeVoice"},{"type":"text","text":" conforms to "},{"code":"ObservableObject","type":"codeVoice"},{"type":"text","text":"."}]}}}} \ 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 82c1b29c..3d8eabe3 100644 --- a/docs/data/documentation/factory/injectedobject/init(_:)-7dlth.json +++ b/docs/data/documentation/factory/injectedobject/init(_:)-7dlth.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedobject\/init(_:)-7dlth"]}],"metadata":{"role":"symbol","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"preciseIdentifier":"s:7Factory9ContainerC","text":"Container","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"platforms":[{"deprecated":false,"unavailable":false,"name":"iOS","introducedAt":"14.0","beta":false},{"unavailable":false,"beta":false,"deprecated":false,"introducedAt":"11.0","name":"macOS"},{"beta":false,"name":"tvOS","introducedAt":"14.0","unavailable":false,"deprecated":false},{"beta":false,"deprecated":false,"name":"watchOS","unavailable":false,"introducedAt":"7.0"}],"symbolKind":"init","externalID":"s:7Factory14InjectedObjectVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc","title":"init(_:)","roleHeading":"Initializer","modules":[{"name":"Factory"}]},"schemaVersion":{"minor":3,"major":0,"patch":0},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-7dlth","interfaceLanguage":"swift"},"abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on initialization.","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","text":"Container"},{"kind":"text","text":", "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}],"languages":["swift"],"platforms":["macOS"]}]},{"parameters":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"KeyPath to a Factory on the default Container."}]}],"name":"keyPath"}],"kind":"parameters"}],"kind":"symbol","references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Container":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Container"}],"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container"},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-7dlth":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-7dlth","role":"symbol","url":"\/documentation\/factory\/injectedobject\/init(_:)-7dlth","type":"topic","title":"init(_:)","kind":"symbol","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on initialization.","type":"text"}]},"doc://Factory/documentation/Factory/InjectedObject":{"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","role":"symbol","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"metadata":{"roleHeading":"Initializer","role":"symbol","externalID":"s:7Factory14InjectedObjectVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc","platforms":[{"deprecated":false,"unavailable":false,"introducedAt":"14.0","name":"iOS","beta":false},{"deprecated":false,"introducedAt":"11.0","unavailable":false,"name":"macOS","beta":false},{"name":"tvOS","unavailable":false,"deprecated":false,"beta":false,"introducedAt":"14.0"},{"introducedAt":"7.0","name":"watchOS","deprecated":false,"unavailable":false,"beta":false}],"symbolKind":"init","title":"init(_:)","modules":[{"name":"Factory"}],"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}]},"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-7dlth"},"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/injectedobject\/init(_:)-7dlth"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"init","kind":"keyword"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"keyPath","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"text":"<","kind":"text"},{"preciseIdentifier":"s:7Factory9ContainerC","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"typeIdentifier","text":"Container"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"languages":["swift"],"platforms":["macOS"]}]},{"parameters":[{"name":"keyPath","content":[{"inlineContent":[{"text":"KeyPath to a Factory on the default Container.","type":"text"}],"type":"paragraph"}]}],"kind":"parameters"}],"references":{"doc://Factory/documentation/Factory/InjectedObject/init(_:)-7dlth":{"role":"symbol","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"type":"topic","url":"\/documentation\/factory\/injectedobject\/init(_:)-7dlth","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-7dlth","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"kind":"text","text":"<"},{"text":"Container","preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}]},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Container","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","navigatorTitle":[{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"InjectedObject","kind":"identifier"}],"abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","kind":"symbol","navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ 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 a3fdb3e0..eb765183 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":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"init"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"C"},{"text":">(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"keyPath","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">>) ","kind":"text"},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"text":"C","kind":"typeIdentifier"},{"text":" : ","kind":"text"},{"preciseIdentifier":"s:7Factory15SharedContainerP","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","text":"SharedContainer","kind":"typeIdentifier"}]}]},{"parameters":[{"name":"keyPath","content":[{"inlineContent":[{"type":"text","text":"KeyPath to a Factory on the specified Container."}],"type":"paragraph"}]}],"kind":"parameters"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedobject\/init(_:)-8lxkh"]}],"schemaVersion":{"patch":0,"minor":3,"major":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-8lxkh","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"sections":[],"metadata":{"modules":[{"name":"Factory"}],"externalID":"s:7Factory14InjectedObjectVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc","platforms":[{"introducedAt":"14.0","beta":false,"name":"iOS","unavailable":false,"deprecated":false},{"name":"macOS","introducedAt":"11.0","beta":false,"unavailable":false,"deprecated":false},{"unavailable":false,"deprecated":false,"name":"tvOS","beta":false,"introducedAt":"14.0"},{"name":"watchOS","deprecated":false,"introducedAt":"7.0","unavailable":false,"beta":false}],"roleHeading":"Initializer","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"text":">(","kind":"text"},{"text":"KeyPath","preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"title":"init(_:)","symbolKind":"init","role":"symbol"},"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"kind":"symbol","references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/InjectedObject":{"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","role":"symbol","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-8lxkh":{"type":"topic","url":"\/documentation\/factory\/injectedobject\/init(_:)-8lxkh","fragments":[{"text":"init","kind":"identifier"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"kind":"text","text":">("},{"preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier","text":"KeyPath"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}],"title":"init(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-8lxkh","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/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","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"title":"SharedContainer","url":"\/documentation\/factory\/sharedcontainer","navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}],"type":"topic","role":"symbol"}}} \ No newline at end of file +{"sections":[],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"init","kind":"keyword"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"keyPath","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"C"},{"text":", ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>) "},{"text":"where","kind":"keyword"},{"kind":"text","text":" "},{"text":"C","kind":"typeIdentifier"},{"text":" : ","kind":"text"},{"text":"SharedContainer","preciseIdentifier":"s:7Factory15SharedContainerP","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"typeIdentifier"}]}],"kind":"declarations"},{"parameters":[{"name":"keyPath","content":[{"inlineContent":[{"type":"text","text":"KeyPath to a Factory on the specified Container."}],"type":"paragraph"}]}],"kind":"parameters"}],"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-8lxkh"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedobject\/init(_:)-8lxkh"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on initialization.","type":"text"}],"metadata":{"title":"init(_:)","externalID":"s:7Factory14InjectedObjectVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc","roleHeading":"Initializer","role":"symbol","symbolKind":"init","platforms":[{"deprecated":false,"unavailable":false,"beta":false,"name":"iOS","introducedAt":"14.0"},{"introducedAt":"11.0","deprecated":false,"beta":false,"name":"macOS","unavailable":false},{"introducedAt":"14.0","beta":false,"deprecated":false,"name":"tvOS","unavailable":false},{"name":"watchOS","unavailable":false,"introducedAt":"7.0","beta":false,"deprecated":false}],"fragments":[{"text":"init","kind":"identifier"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"modules":[{"name":"Factory"}]},"references":{"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"InjectedObject","kind":"identifier"}],"abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","kind":"symbol","navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}]},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-8lxkh":{"title":"init(_:)","role":"symbol","abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on initialization.","type":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-8lxkh","fragments":[{"text":"init","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}],"url":"\/documentation\/factory\/injectedobject\/init(_:)-8lxkh","type":"topic"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/SharedContainer":{"title":"SharedContainer","type":"topic","url":"\/documentation\/factory\/sharedcontainer","role":"symbol","navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"SharedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ 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 b6f6c109..a1a9abc2 100644 --- a/docs/data/documentation/factory/injectedobject/projectedvalue.json +++ b/docs/data/documentation/factory/injectedobject/projectedvalue.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"projectedValue","kind":"identifier"},{"text":": ","kind":"text"},{"text":"ObservedObject","preciseIdentifier":"s:7SwiftUI14ObservedObjectV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">."},{"preciseIdentifier":"s:7SwiftUI14ObservedObjectV7WrapperV","kind":"typeIdentifier","text":"Wrapper"},{"kind":"text","text":" { "},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}]}],"kind":"declarations"}],"schemaVersion":{"major":0,"patch":0,"minor":3},"sections":[],"abstract":[{"text":"Manages the wrapped dependency.","type":"text"}],"metadata":{"platforms":[{"beta":false,"introducedAt":"14.0","name":"iOS","deprecated":false,"unavailable":false},{"deprecated":false,"name":"macOS","introducedAt":"11.0","unavailable":false,"beta":false},{"unavailable":false,"introducedAt":"14.0","deprecated":false,"beta":false,"name":"tvOS"},{"unavailable":false,"beta":false,"name":"watchOS","introducedAt":"7.0","deprecated":false}],"role":"symbol","modules":[{"name":"Factory"}],"roleHeading":"Instance Property","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"projectedValue","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7SwiftUI14ObservedObjectV","text":"ObservedObject"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">."},{"kind":"typeIdentifier","preciseIdentifier":"s:7SwiftUI14ObservedObjectV7WrapperV","text":"Wrapper"}],"title":"projectedValue","symbolKind":"property","externalID":"s:7Factory14InjectedObjectV14projectedValue7SwiftUI08ObservedC0V7WrapperVyx_Gvp"},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedobject\/projectedvalue"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/projectedValue"},"references":{"doc://Factory/documentation/Factory/InjectedObject/projectedValue":{"url":"\/documentation\/factory\/injectedobject\/projectedvalue","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"projectedValue","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7SwiftUI14ObservedObjectV","kind":"typeIdentifier","text":"ObservedObject"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">.","kind":"text"},{"preciseIdentifier":"s:7SwiftUI14ObservedObjectV7WrapperV","text":"Wrapper","kind":"typeIdentifier"}],"title":"projectedValue","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/projectedValue","abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/InjectedObject":{"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","role":"symbol","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","kind":"symbol"}}} \ No newline at end of file +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/projectedValue"},"metadata":{"externalID":"s:7Factory14InjectedObjectV14projectedValue7SwiftUI08ObservedC0V7WrapperVyx_Gvp","symbolKind":"property","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7SwiftUI14ObservedObjectV","text":"ObservedObject","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">.","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7SwiftUI14ObservedObjectV7WrapperV","text":"Wrapper"}],"platforms":[{"name":"iOS","introducedAt":"14.0","unavailable":false,"beta":false,"deprecated":false},{"name":"macOS","introducedAt":"11.0","beta":false,"deprecated":false,"unavailable":false},{"unavailable":false,"name":"tvOS","deprecated":false,"beta":false,"introducedAt":"14.0"},{"introducedAt":"7.0","beta":false,"deprecated":false,"name":"watchOS","unavailable":false}],"title":"projectedValue","modules":[{"name":"Factory"}],"roleHeading":"Instance Property","role":"symbol"},"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"projectedValue","kind":"identifier"},{"kind":"text","text":": "},{"text":"ObservedObject","preciseIdentifier":"s:7SwiftUI14ObservedObjectV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">.","kind":"text"},{"text":"Wrapper","preciseIdentifier":"s:7SwiftUI14ObservedObjectV7WrapperV","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"sections":[],"variants":[{"paths":["\/documentation\/factory\/injectedobject\/projectedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"InjectedObject","kind":"identifier"}],"abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","kind":"symbol","navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/InjectedObject/projectedValue":{"abstract":[{"text":"Manages the wrapped dependency.","type":"text"}],"kind":"symbol","type":"topic","title":"projectedValue","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/projectedValue","url":"\/documentation\/factory\/injectedobject\/projectedvalue","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"text":"ObservedObject","preciseIdentifier":"s:7SwiftUI14ObservedObjectV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">."},{"preciseIdentifier":"s:7SwiftUI14ObservedObjectV7WrapperV","text":"Wrapper","kind":"typeIdentifier"}]}}} \ 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 66b40ec8..1609ea47 100644 --- a/docs/data/documentation/factory/injectedobject/update().json +++ b/docs/data/documentation/factory/injectedobject/update().json @@ -1 +1 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/update()","interfaceLanguage":"swift"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject","doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"abstract":[{"type":"text","text":"Inherited from "},{"code":"DynamicProperty.update()","type":"codeVoice"},{"text":".","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"mutating","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"update"},{"text":"()","kind":"text"}]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedobject\/update()"]}],"kind":"symbol","metadata":{"modules":[{"name":"Factory","relatedModules":["SwiftUI"]}],"extendedModule":"SwiftUI","title":"update()","externalID":"s:7SwiftUI15DynamicPropertyPAAE6updateyyF::SYNTHESIZED::s:7Factory14InjectedObjectV","role":"symbol","roleHeading":"Instance Method","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"update","kind":"identifier"},{"text":"()","kind":"text"}],"platforms":[{"deprecated":false,"unavailable":false,"name":"iOS","beta":false,"introducedAt":"13.0"},{"deprecated":false,"unavailable":false,"name":"macOS","introducedAt":"10.15","beta":false},{"beta":false,"introducedAt":"13.0","unavailable":false,"deprecated":false,"name":"tvOS"},{"introducedAt":"6.0","deprecated":false,"name":"watchOS","unavailable":false,"beta":false}]},"references":{"doc://Factory/documentation/Factory/InjectedObject/update()":{"url":"\/documentation\/factory\/injectedobject\/update()","kind":"symbol","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/update()","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"update","kind":"identifier"},{"text":"()","kind":"text"}],"type":"topic","title":"update()","role":"symbol"},"doc://Factory/documentation/Factory/InjectedObject":{"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","role":"symbol","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/InjectedObject/DynamicProperty-Implementations":{"type":"topic","url":"\/documentation\/factory\/injectedobject\/dynamicproperty-implementations","title":"DynamicProperty Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations","abstract":[],"role":"collectionGroup","kind":"article"}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedobject\/update()"]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/update()","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject","doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations"]]},"metadata":{"roleHeading":"Instance Method","modules":[{"name":"Factory","relatedModules":["SwiftUI"]}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"update","kind":"identifier"},{"kind":"text","text":"()"}],"title":"update()","role":"symbol","externalID":"s:7SwiftUI15DynamicPropertyPAAE6updateyyF::SYNTHESIZED::s:7Factory14InjectedObjectV","symbolKind":"method","platforms":[{"deprecated":false,"introducedAt":"13.0","unavailable":false,"name":"iOS","beta":false},{"deprecated":false,"introducedAt":"10.15","unavailable":false,"name":"macOS","beta":false},{"unavailable":false,"beta":false,"introducedAt":"13.0","name":"tvOS","deprecated":false},{"unavailable":false,"introducedAt":"6.0","deprecated":false,"beta":false,"name":"watchOS"}],"extendedModule":"SwiftUI"},"kind":"symbol","abstract":[{"type":"text","text":"Inherited from "},{"code":"DynamicProperty.update()","type":"codeVoice"},{"type":"text","text":"."}],"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"mutating"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"update"},{"text":"()","kind":"text"}],"languages":["swift"]}]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/InjectedObject/update()":{"title":"update()","url":"\/documentation\/factory\/injectedobject\/update()","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/update()","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"update","kind":"identifier"},{"kind":"text","text":"()"}],"kind":"symbol","abstract":[],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/InjectedObject/DynamicProperty-Implementations":{"title":"DynamicProperty Implementations","role":"collectionGroup","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations","abstract":[],"kind":"article","type":"topic","url":"\/documentation\/factory\/injectedobject\/dynamicproperty-implementations"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"InjectedObject","kind":"identifier"}],"abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","kind":"symbol","navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}]}}} \ 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 0fede450..3a51d704 100644 --- a/docs/data/documentation/factory/injectedobject/wrappedvalue.json +++ b/docs/data/documentation/factory/injectedobject/wrappedvalue.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"wrappedValue","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":" { "},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedobject\/wrappedvalue"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/wrappedValue","interfaceLanguage":"swift"},"sections":[],"metadata":{"externalID":"s:7Factory14InjectedObjectV12wrappedValuexvp","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"wrappedValue","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"T"}],"roleHeading":"Instance Property","modules":[{"name":"Factory"}],"symbolKind":"property","role":"symbol","title":"wrappedValue","platforms":[{"beta":false,"name":"iOS","deprecated":false,"introducedAt":"14.0","unavailable":false},{"unavailable":false,"introducedAt":"11.0","deprecated":false,"beta":false,"name":"macOS"},{"beta":false,"introducedAt":"14.0","unavailable":false,"name":"tvOS","deprecated":false},{"unavailable":false,"beta":false,"name":"watchOS","introducedAt":"7.0","deprecated":false}]},"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"symbol","abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"references":{"doc://Factory/documentation/Factory/InjectedObject/wrappedValue":{"url":"\/documentation\/factory\/injectedobject\/wrappedvalue","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"title":"wrappedValue","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/wrappedValue","abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/InjectedObject":{"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","role":"symbol","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","kind":"symbol"}}} \ No newline at end of file +{"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}],"languages":["swift"]}]}],"kind":"symbol","metadata":{"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"wrappedValue"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"modules":[{"name":"Factory"}],"roleHeading":"Instance Property","role":"symbol","title":"wrappedValue","platforms":[{"unavailable":false,"name":"iOS","deprecated":false,"beta":false,"introducedAt":"14.0"},{"name":"macOS","introducedAt":"11.0","unavailable":false,"beta":false,"deprecated":false},{"introducedAt":"14.0","name":"tvOS","beta":false,"deprecated":false,"unavailable":false},{"beta":false,"unavailable":false,"name":"watchOS","introducedAt":"7.0","deprecated":false}],"symbolKind":"property","externalID":"s:7Factory14InjectedObjectV12wrappedValuexvp"},"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/wrappedValue"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedobject\/wrappedvalue"]}],"schemaVersion":{"major":0,"patch":0,"minor":3},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"InjectedObject","kind":"identifier"}],"abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","kind":"symbol","navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}]},"doc://Factory/documentation/Factory/InjectedObject/wrappedValue":{"role":"symbol","url":"\/documentation\/factory\/injectedobject\/wrappedvalue","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/wrappedValue","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"wrappedValue"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"title":"wrappedValue","kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injectedtype.json b/docs/data/documentation/factory/injectedtype.json index 0f54144c..4a8ee9b5 100644 --- a/docs/data/documentation/factory/injectedtype.json +++ b/docs/data/documentation/factory/injectedtype.json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"@propertyWrapper","kind":"attribute"},{"kind":"text","text":" "},{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"InjectedType"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">"}],"languages":["swift"]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedType","interfaceLanguage":"swift"},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedtype"]}],"metadata":{"roleHeading":"Structure","title":"InjectedType","externalID":"s:7Factory12InjectedTypeV","modules":[{"name":"Factory"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"InjectedType","kind":"identifier"}],"role":"symbol","symbolKind":"struct","navigatorTitle":[{"kind":"identifier","text":"InjectedType"}]},"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init()","doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init(_:)"],"title":"Initializers"},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedType\/wrappedValue"]}],"abstract":[{"type":"text","text":"Basic property wrapper for optional injected types"}],"schemaVersion":{"major":0,"patch":0,"minor":3},"references":{"doc://Factory/documentation/Factory/InjectedType/init()":{"title":"init()","type":"topic","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"role":"symbol","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init()","url":"\/documentation\/factory\/injectedtype\/init()","abstract":[{"text":"Initializes the property wrapper from the default Container. The dependency is resolved on initialization.","type":"text"}]},"doc://Factory/documentation/Factory/InjectedType/wrappedValue":{"title":"wrappedValue","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?"}],"role":"symbol","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/wrappedValue","url":"\/documentation\/factory\/injectedtype\/wrappedvalue","abstract":[{"text":"Manages the wrapped dependency.","type":"text"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/InjectedType":{"title":"InjectedType","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"InjectedType"}],"role":"symbol","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType","url":"\/documentation\/factory\/injectedtype","abstract":[{"text":"Basic property wrapper for optional injected types","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"InjectedType"}]},"doc://Factory/documentation/Factory/InjectedType/init(_:)":{"title":"init(_:)","type":"topic","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"text":"ManagedContainer","kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ManagedContainerP"},{"kind":"text","text":")"}],"role":"symbol","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init(_:)","url":"\/documentation\/factory\/injectedtype\/init(_:)","abstract":[{"type":"text","text":"Initializes the property wrapper from the default Container. The dependency is resolved on initialization."}]}}} \ No newline at end of file +{"kind":"symbol","sections":[],"schemaVersion":{"patch":0,"minor":3,"major":0},"variants":[{"paths":["\/documentation\/factory\/injectedtype"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"type":"text","text":"Basic property wrapper for optional injected types"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedType","interfaceLanguage":"swift"},"metadata":{"role":"symbol","roleHeading":"Structure","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedType"}],"title":"InjectedType","symbolKind":"struct","modules":[{"name":"Factory"}],"externalID":"s:7Factory12InjectedTypeV","navigatorTitle":[{"text":"InjectedType","kind":"identifier"}]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"@propertyWrapper","kind":"attribute"},{"text":" ","kind":"text"},{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"InjectedType","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">","kind":"text"}]}]}],"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init()","doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init(_:)"],"title":"Initializers"},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedType\/wrappedValue"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/InjectedType/init()":{"type":"topic","fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"title":"init()","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init()","kind":"symbol","abstract":[{"type":"text","text":"Initializes the property wrapper from the default Container. The dependency is resolved on initialization."}],"url":"\/documentation\/factory\/injectedtype\/init()"},"doc://Factory/documentation/Factory/InjectedType/wrappedValue":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/wrappedValue","abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"kind":"symbol","title":"wrappedValue","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"url":"\/documentation\/factory\/injectedtype\/wrappedvalue","type":"topic"},"doc://Factory/documentation/Factory/InjectedType/init(_:)":{"role":"symbol","type":"topic","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ManagedContainerP","text":"ManagedContainer"},{"kind":"text","text":")"}],"kind":"symbol","title":"init(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init(_:)","abstract":[{"type":"text","text":"Initializes the property wrapper from the default Container. The dependency is resolved on initialization."}],"url":"\/documentation\/factory\/injectedtype\/init(_:)"},"doc://Factory/documentation/Factory/InjectedType":{"title":"InjectedType","abstract":[{"text":"Basic property wrapper for optional injected types","type":"text"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"InjectedType"}],"navigatorTitle":[{"text":"InjectedType","kind":"identifier"}],"url":"\/documentation\/factory\/injectedtype","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injectedtype/init().json b/docs/data/documentation/factory/injectedtype/init().json index bd06e3e7..fd9492e6 100644 --- a/docs/data/documentation/factory/injectedtype/init().json +++ b/docs/data/documentation/factory/injectedtype/init().json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"text":"()","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init()"},"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedtype\/init()"]}],"sections":[],"kind":"symbol","metadata":{"fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"roleHeading":"Initializer","title":"init()","externalID":"s:7Factory12InjectedTypeVACyxGycfc","role":"symbol","modules":[{"name":"Factory"}],"symbolKind":"init"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedType"]]},"abstract":[{"text":"Initializes the property wrapper from the default Container. The dependency is resolved on initialization.","type":"text"}],"references":{"doc://Factory/documentation/Factory/InjectedType":{"title":"InjectedType","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"InjectedType"}],"role":"symbol","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType","url":"\/documentation\/factory\/injectedtype","abstract":[{"text":"Basic property wrapper for optional injected types","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"InjectedType"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/InjectedType/init()":{"title":"init()","type":"topic","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"role":"symbol","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init()","url":"\/documentation\/factory\/injectedtype\/init()","abstract":[{"text":"Initializes the property wrapper from the default Container. The dependency is resolved on initialization.","type":"text"}]}}} \ No newline at end of file +{"sections":[],"schemaVersion":{"patch":0,"minor":3,"major":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init()","interfaceLanguage":"swift"},"metadata":{"externalID":"s:7Factory12InjectedTypeVACyxGycfc","modules":[{"name":"Factory"}],"fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"title":"init()","role":"symbol","symbolKind":"init","roleHeading":"Initializer"},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedType"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"abstract":[{"text":"Initializes the property wrapper from the default Container. The dependency is resolved on initialization.","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedtype\/init()"]}],"references":{"doc://Factory/documentation/Factory/InjectedType/init()":{"type":"topic","fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"title":"init()","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init()","kind":"symbol","abstract":[{"type":"text","text":"Initializes the property wrapper from the default Container. The dependency is resolved on initialization."}],"url":"\/documentation\/factory\/injectedtype\/init()"},"doc://Factory/documentation/Factory/InjectedType":{"title":"InjectedType","abstract":[{"text":"Basic property wrapper for optional injected types","type":"text"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"InjectedType"}],"navigatorTitle":[{"text":"InjectedType","kind":"identifier"}],"url":"\/documentation\/factory\/injectedtype","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injectedtype/init(_:).json b/docs/data/documentation/factory/injectedtype/init(_:).json index f436e749..05f57b32 100644 --- a/docs/data/documentation/factory/injectedtype/init(_:).json +++ b/docs/data/documentation/factory/injectedtype/init(_:).json @@ -1 +1 @@ -{"schemaVersion":{"minor":3,"patch":0,"major":0},"kind":"symbol","metadata":{"title":"init(_:)","roleHeading":"Initializer","externalID":"s:7Factory12InjectedTypeVyACyxGAA16ManagedContainer_pcfc","modules":[{"name":"Factory"}],"role":"symbol","symbolKind":"init","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ManagedContainerP","text":"ManagedContainer"},{"text":")","kind":"text"}]},"abstract":[{"type":"text","text":"Initializes the property wrapper from the default Container. The dependency is resolved on initialization."}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"init"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"container","kind":"internalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory16ManagedContainerP","text":"ManagedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"typeIdentifier"},{"kind":"text","text":")"}]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedtype\/init(_:)"]}],"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedType"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init(_:)","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/InjectedType/init(_:)":{"title":"init(_:)","type":"topic","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"text":"ManagedContainer","kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ManagedContainerP"},{"kind":"text","text":")"}],"role":"symbol","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init(_:)","url":"\/documentation\/factory\/injectedtype\/init(_:)","abstract":[{"type":"text","text":"Initializes the property wrapper from the default Container. The dependency is resolved on initialization."}]},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"kind":"symbol","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer","role":"symbol","url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory/InjectedType":{"title":"InjectedType","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"InjectedType"}],"role":"symbol","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType","url":"\/documentation\/factory\/injectedtype","abstract":[{"text":"Basic property wrapper for optional injected types","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"InjectedType"}]}}} \ No newline at end of file +{"abstract":[{"type":"text","text":"Initializes the property wrapper from the default Container. The dependency is resolved on initialization."}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"init"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"container","kind":"internalParam"},{"kind":"text","text":": "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP","text":"ManagedContainer","kind":"typeIdentifier"},{"kind":"text","text":")"}],"languages":["swift"]}]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedType"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedtype\/init(_:)"]}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init(_:)","interfaceLanguage":"swift"},"metadata":{"role":"symbol","symbolKind":"init","modules":[{"name":"Factory"}],"externalID":"s:7Factory12InjectedTypeVyACyxGAA16ManagedContainer_pcfc","title":"init(_:)","roleHeading":"Initializer","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"text":"ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP","kind":"typeIdentifier"},{"text":")","kind":"text"}]},"references":{"doc://Factory/documentation/Factory/InjectedType":{"title":"InjectedType","abstract":[{"text":"Basic property wrapper for optional injected types","type":"text"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"InjectedType"}],"navigatorTitle":[{"text":"InjectedType","kind":"identifier"}],"url":"\/documentation\/factory\/injectedtype","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType"},"doc://Factory/documentation/Factory/InjectedType/init(_:)":{"role":"symbol","type":"topic","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ManagedContainerP","text":"ManagedContainer"},{"kind":"text","text":")"}],"kind":"symbol","title":"init(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init(_:)","abstract":[{"type":"text","text":"Initializes the property wrapper from the default Container. The dependency is resolved on initialization."}],"url":"\/documentation\/factory\/injectedtype\/init(_:)"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ManagedContainer":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"text":"ManagedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"type":"topic","url":"\/documentation\/factory\/managedcontainer","title":"ManagedContainer"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injectedtype/wrappedvalue.json b/docs/data/documentation/factory/injectedtype/wrappedvalue.json index 4e1f3129..1ff904ec 100644 --- a/docs/data/documentation/factory/injectedtype/wrappedvalue.json +++ b/docs/data/documentation/factory/injectedtype/wrappedvalue.json @@ -1 +1 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/wrappedValue","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"wrappedValue","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"text":"? { ","kind":"text"},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"text":"set","kind":"keyword"},{"kind":"text","text":" }"}]}]}],"schemaVersion":{"patch":0,"minor":3,"major":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedtype\/wrappedvalue"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedType"]]},"sections":[],"kind":"symbol","metadata":{"title":"wrappedValue","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"wrappedValue","kind":"identifier"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?"}],"roleHeading":"Instance Property","externalID":"s:7Factory12InjectedTypeV12wrappedValuexSgvp","modules":[{"name":"Factory"}],"role":"symbol","symbolKind":"property"},"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/InjectedType/wrappedValue":{"title":"wrappedValue","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?"}],"role":"symbol","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/wrappedValue","url":"\/documentation\/factory\/injectedtype\/wrappedvalue","abstract":[{"text":"Manages the wrapped dependency.","type":"text"}]},"doc://Factory/documentation/Factory/InjectedType":{"title":"InjectedType","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"InjectedType"}],"role":"symbol","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType","url":"\/documentation\/factory\/injectedtype","abstract":[{"text":"Basic property wrapper for optional injected types","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"InjectedType"}]}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedType"]]},"sections":[],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"wrappedValue","kind":"identifier"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"? { "},{"kind":"keyword","text":"get"},{"text":" ","kind":"text"},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"languages":["swift"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedtype\/wrappedvalue"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/wrappedValue","interfaceLanguage":"swift"},"schemaVersion":{"minor":3,"major":0,"patch":0},"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"metadata":{"modules":[{"name":"Factory"}],"symbolKind":"property","roleHeading":"Instance Property","role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?"}],"title":"wrappedValue","externalID":"s:7Factory12InjectedTypeV12wrappedValuexSgvp"},"references":{"doc://Factory/documentation/Factory/InjectedType/wrappedValue":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/wrappedValue","abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"kind":"symbol","title":"wrappedValue","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"url":"\/documentation\/factory\/injectedtype\/wrappedvalue","type":"topic"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/InjectedType":{"title":"InjectedType","abstract":[{"text":"Basic property wrapper for optional injected types","type":"text"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"InjectedType"}],"navigatorTitle":[{"text":"InjectedType","kind":"identifier"}],"url":"\/documentation\/factory\/injectedtype","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/lazyinjected.json b/docs/data/documentation/factory/lazyinjected.json index a9da014d..7bca8be0 100644 --- a/docs/data/documentation/factory/lazyinjected.json +++ b/docs/data/documentation/factory/lazyinjected.json @@ -1 +1 @@ -{"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."}],"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-1mer0","doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-8np9u"],"title":"Initializers"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/projectedValue","doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/wrappedValue"],"title":"Instance Properties"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolve(reset:)","doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolvedOrNil()"],"title":"Instance Methods"}],"metadata":{"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"LazyInjected","kind":"identifier"}],"navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"roleHeading":"Structure","title":"LazyInjected","externalID":"s:7Factory12LazyInjectedV","symbolKind":"struct","modules":[{"name":"Factory"}],"role":"symbol"},"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@propertyWrapper"},{"kind":"text","text":" "},{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"LazyInjected","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"type":"heading","level":2,"anchor":"overview","text":"Overview"},{"inlineContent":[{"type":"text","text":"Property wrappers implement an annotation pattern to resolving dependencies, similar to using"},{"type":"text","text":" "},{"text":"EnvironmentObject in SwiftUI.","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["class MyViewModel {"," @LazyInjected(\\.myService) var service"," @LazyInjected(\\MyCustomContainer.myService) var service","}"]},{"inlineContent":[{"text":"The provided keypath resolves to a Factory definition on the ","type":"text"},{"code":"shared","type":"codeVoice"},{"text":" container required for each Container type.","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"The short version of the keyPath resolves to the default container, while the expanded version"},{"type":"text","text":" "},{"text":"allows you to point an instance on your own customer container type.","type":"text"}],"type":"paragraph"},{"name":"Note","style":"note","type":"aside","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":[{"text":"not","type":"text"}]},{"type":"text","text":" on initialization."}]}]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/lazyinjected"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"references":{"doc://Factory/documentation/Factory/LazyInjected/init(_:)-1mer0":{"role":"symbol","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"text":"Container","preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-1mer0","title":"init(_:)","url":"\/documentation\/factory\/lazyinjected\/init(_:)-1mer0","type":"topic","kind":"symbol","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}]},"doc://Factory/documentation/Factory/LazyInjected/projectedValue":{"abstract":[{"text":"Unwraps the property wrapper granting access to the resolve\/reset function.","type":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/projectedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"projectedValue","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"LazyInjected","preciseIdentifier":"s:7Factory12LazyInjectedV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"title":"projectedValue","url":"\/documentation\/factory\/lazyinjected\/projectedvalue","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/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."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"title":"LazyInjected","url":"\/documentation\/factory\/lazyinjected","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/LazyInjected/wrappedValue":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/wrappedValue","title":"wrappedValue","abstract":[{"type":"text","text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time."}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/lazyinjected\/wrappedvalue","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"wrappedValue","kind":"identifier"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory/LazyInjected/resolve(reset:)":{"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolve(reset:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"(","kind":"text"},{"text":"reset","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"text":")","kind":"text"}],"title":"resolve(reset:)","url":"\/documentation\/factory\/lazyinjected\/resolve(reset:)","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/LazyInjected/factory":{"abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/factory","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"factory","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"title":"factory","url":"\/documentation\/factory\/lazyinjected\/factory","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/LazyInjected/resolvedOrNil()":{"title":"resolvedOrNil()","type":"topic","url":"\/documentation\/factory\/lazyinjected\/resolvedornil()","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolvedOrNil()","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"resolvedOrNil","kind":"identifier"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}],"kind":"symbol","abstract":[{"type":"text","text":"Projected function returns resolved instance if it exists."}]},"doc://Factory/documentation/Factory/LazyInjected/init(_:)-8np9u":{"abstract":[{"text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-8np9u","kind":"symbol","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"text":"C","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"title":"init(_:)","url":"\/documentation\/factory\/lazyinjected\/init(_:)-8np9u","type":"topic","role":"symbol"}}} \ No newline at end of file +{"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-1mer0","doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-8np9u"],"title":"Initializers"},{"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:)","doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolvedOrNil()"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected"},"sections":[],"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."}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/lazyinjected"]}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"kind":"attribute","text":"@propertyWrapper"},{"kind":"text","text":" "},{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LazyInjected","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">","kind":"text"}],"platforms":["macOS"]}],"kind":"declarations"},{"content":[{"text":"Overview","level":2,"anchor":"overview","type":"heading"},{"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."}]},{"code":["class MyViewModel {"," @LazyInjected(\\.myService) var service"," @LazyInjected(\\MyCustomContainer.myService) var service","}"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"text":"The provided keypath resolves to a Factory definition on the ","type":"text"},{"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":" "},{"text":"allows you to point an instance on your own customer container type.","type":"text"}],"type":"paragraph"},{"style":"note","type":"aside","content":[{"inlineContent":[{"text":"Lazy injection is resolved the first time the dependency is referenced by the code, and ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"not"}]},{"type":"text","text":" on initialization."}],"type":"paragraph"}],"name":"Note"}],"kind":"content"}],"kind":"symbol","metadata":{"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LazyInjected"}],"navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"symbolKind":"struct","title":"LazyInjected","modules":[{"name":"Factory"}],"role":"symbol","externalID":"s:7Factory12LazyInjectedV","roleHeading":"Structure"},"schemaVersion":{"major":0,"patch":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/LazyInjected/init(_:)-8np9u":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-8np9u","title":"init(_:)","type":"topic","url":"\/documentation\/factory\/lazyinjected\/init(_:)-8np9u","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"text":"C","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"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","role":"symbol"},"doc://Factory/documentation/Factory/LazyInjected/init(_:)-1mer0":{"url":"\/documentation\/factory\/lazyinjected\/init(_:)-1mer0","role":"symbol","kind":"symbol","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"text":"KeyPath","preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}],"abstract":[{"text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-1mer0","type":"topic","title":"init(_:)"},"doc://Factory/documentation/Factory/LazyInjected/resolvedOrNil()":{"title":"resolvedOrNil()","url":"\/documentation\/factory\/lazyinjected\/resolvedornil()","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolvedOrNil()","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolvedOrNil"},{"text":"() -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"abstract":[{"text":"Projected function returns resolved instance if it exists.","type":"text"}],"kind":"symbol","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/LazyInjected/projectedValue":{"type":"topic","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"projectedValue","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory12LazyInjectedV","text":"LazyInjected","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"title":"projectedValue","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/projectedValue","kind":"symbol","url":"\/documentation\/factory\/lazyinjected\/projectedvalue","abstract":[{"text":"Unwraps the property wrapper granting access to the resolve\/reset function.","type":"text"}]},"doc://Factory/documentation/Factory/LazyInjected/resolve(reset:)":{"role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"(","kind":"text"},{"text":"reset","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"text":")","kind":"text"}],"kind":"symbol","title":"resolve(reset:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolve(reset:)","abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"url":"\/documentation\/factory\/lazyinjected\/resolve(reset:)"},"doc://Factory/documentation/Factory/LazyInjected/wrappedValue":{"kind":"symbol","url":"\/documentation\/factory\/lazyinjected\/wrappedvalue","title":"wrappedValue","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/wrappedValue","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"type":"topic","abstract":[{"text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time.","type":"text"}]},"doc://Factory/documentation/Factory/LazyInjected":{"title":"LazyInjected","type":"topic","url":"\/documentation\/factory\/lazyinjected","role":"symbol","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"kind":"symbol"},"doc://Factory/documentation/Factory/LazyInjected/factory":{"type":"topic","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"factory","kind":"identifier"},{"kind":"text","text":": "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/factory","url":"\/documentation\/factory\/lazyinjected\/factory","abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"kind":"symbol","role":"symbol","title":"factory"}}} \ 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 21af96dc..4f0d612a 100644 --- a/docs/data/documentation/factory/lazyinjected/factory.json +++ b/docs/data/documentation/factory/lazyinjected/factory.json @@ -1 +1 @@ -{"sections":[],"abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/factory","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/lazyinjected\/factory"]}],"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"symbolKind":"property","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"externalID":"s:7Factory12LazyInjectedV7factoryA2AVyxGvp","role":"symbol","modules":[{"name":"Factory"}],"roleHeading":"Instance Property","title":"factory"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"factory","kind":"identifier"},{"kind":"text","text":": "},{"text":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":"> { ","kind":"text"},{"text":"get","kind":"keyword"},{"kind":"text","text":" }"}],"languages":["swift"]}]}],"references":{"doc://Factory/documentation/Factory/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."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"title":"LazyInjected","url":"\/documentation\/factory\/lazyinjected","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/LazyInjected/factory":{"abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/factory","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"factory","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"title":"factory","url":"\/documentation\/factory\/lazyinjected\/factory","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Instance Property","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"factory","kind":"identifier"},{"kind":"text","text":": "},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"externalID":"s:7Factory12LazyInjectedV7factoryA2AVyxGvp","symbolKind":"property","role":"symbol","title":"factory"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/factory"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/lazyinjected\/factory"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"sections":[],"kind":"symbol","abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"factory","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":"> { ","kind":"text"},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/LazyInjected":{"title":"LazyInjected","type":"topic","url":"\/documentation\/factory\/lazyinjected","role":"symbol","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"kind":"symbol"},"doc://Factory/documentation/Factory/LazyInjected/factory":{"type":"topic","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"factory","kind":"identifier"},{"kind":"text","text":": "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/factory","url":"\/documentation\/factory\/lazyinjected\/factory","abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"kind":"symbol","role":"symbol","title":"factory"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"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 daaf8a95..ca1d23f9 100644 --- a/docs/data/documentation/factory/lazyinjected/init(_:)-1mer0.json +++ b/docs/data/documentation/factory/lazyinjected/init(_:)-1mer0.json @@ -1 +1 @@ -{"variants":[{"paths":["\/documentation\/factory\/lazyinjected\/init(_:)-1mer0"],"traits":[{"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."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"schemaVersion":{"major":0,"patch":0,"minor":3},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-1mer0","interfaceLanguage":"swift"},"metadata":{"symbolKind":"init","title":"init(_:)","role":"symbol","fragments":[{"kind":"identifier","text":"init"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC","text":"Container"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"modules":[{"name":"Factory"}],"roleHeading":"Initializer","externalID":"s:7Factory12LazyInjectedVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc"},"kind":"symbol","primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"init","kind":"keyword"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier","text":"KeyPath"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","text":"Container"},{"kind":"text","text":", "},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}]}],"kind":"declarations"},{"kind":"parameters","parameters":[{"content":[{"inlineContent":[{"text":"KeyPath to a Factory on the default Container.","type":"text"}],"type":"paragraph"}],"name":"keyPath"}]}],"references":{"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/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."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"title":"LazyInjected","url":"\/documentation\/factory\/lazyinjected","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/LazyInjected/init(_:)-1mer0":{"role":"symbol","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"text":"Container","preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-1mer0","title":"init(_:)","url":"\/documentation\/factory\/lazyinjected\/init(_:)-1mer0","type":"topic","kind":"symbol","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}]},"doc://Factory/documentation/Factory/Container":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Container"}],"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container"}}} \ No newline at end of file +{"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/lazyinjected\/init(_:)-1mer0"]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"init","kind":"keyword"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"keyPath","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"text":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC"},{"text":", ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"KeyPath to a Factory on the default Container."}]}]}]}],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-1mer0"},"metadata":{"symbolKind":"init","roleHeading":"Initializer","role":"symbol","title":"init(_:)","externalID":"s:7Factory12LazyInjectedVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc","modules":[{"name":"Factory"}],"fragments":[{"kind":"identifier","text":"init"},{"text":"(","kind":"text"},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"text":"Container","kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}]},"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/LazyInjected":{"title":"LazyInjected","type":"topic","url":"\/documentation\/factory\/lazyinjected","role":"symbol","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Container","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","navigatorTitle":[{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/LazyInjected/init(_:)-1mer0":{"url":"\/documentation\/factory\/lazyinjected\/init(_:)-1mer0","role":"symbol","kind":"symbol","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"text":"KeyPath","preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}],"abstract":[{"text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-1mer0","type":"topic","title":"init(_:)"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"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 04551324..0d9b215f 100644 --- a/docs/data/documentation/factory/lazyinjected/init(_:)-8np9u.json +++ b/docs/data/documentation/factory/lazyinjected/init(_:)-8np9u.json @@ -1 +1 @@ -{"abstract":[{"text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time.","type":"text"}],"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-8np9u","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"init","kind":"keyword"},{"kind":"text","text":"<"},{"text":"C","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"keyPath","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"text":"Factory","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">>) ","kind":"text"},{"kind":"keyword","text":"where"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","text":"SharedContainer","preciseIdentifier":"s:7Factory15SharedContainerP"}],"platforms":["macOS"],"languages":["swift"]}]},{"parameters":[{"name":"keyPath","content":[{"inlineContent":[{"text":"KeyPath to a Factory on the specified Container.","type":"text"}],"type":"paragraph"}]}],"kind":"parameters"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/lazyinjected\/init(_:)-8np9u"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"sections":[],"metadata":{"externalID":"s:7Factory12LazyInjectedVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc","modules":[{"name":"Factory"}],"role":"symbol","roleHeading":"Initializer","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}],"symbolKind":"init"},"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory/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."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"title":"LazyInjected","url":"\/documentation\/factory\/lazyinjected","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/LazyInjected/init(_:)-8np9u":{"abstract":[{"text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-8np9u","kind":"symbol","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"text":"C","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"title":"init(_:)","url":"\/documentation\/factory\/lazyinjected\/init(_:)-8np9u","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/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","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"title":"SharedContainer","url":"\/documentation\/factory\/sharedcontainer","navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-8np9u"},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"init","kind":"keyword"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"keyPath","kind":"internalParam"},{"kind":"text","text":": "},{"text":"KeyPath","preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">>) ","kind":"text"},{"kind":"keyword","text":"where"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":" : "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"typeIdentifier","text":"SharedContainer","preciseIdentifier":"s:7Factory15SharedContainerP"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"type":"paragraph","inlineContent":[{"text":"KeyPath to a Factory on the specified Container.","type":"text"}]}]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"abstract":[{"text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time.","type":"text"}],"sections":[],"metadata":{"roleHeading":"Initializer","role":"symbol","externalID":"s:7Factory12LazyInjectedVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc","modules":[{"name":"Factory"}],"title":"init(_:)","symbolKind":"init","fragments":[{"kind":"identifier","text":"init"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"text":"C","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}]},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/lazyinjected\/init(_:)-8np9u"]}],"schemaVersion":{"patch":0,"minor":3,"major":0},"references":{"doc://Factory/documentation/Factory/LazyInjected/init(_:)-8np9u":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-8np9u","title":"init(_:)","type":"topic","url":"\/documentation\/factory\/lazyinjected\/init(_:)-8np9u","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"text":"C","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"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","role":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/SharedContainer":{"title":"SharedContainer","type":"topic","url":"\/documentation\/factory\/sharedcontainer","role":"symbol","navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"SharedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"kind":"symbol"},"doc://Factory/documentation/Factory/LazyInjected":{"title":"LazyInjected","type":"topic","url":"\/documentation\/factory\/lazyinjected","role":"symbol","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/lazyinjected/projectedvalue.json b/docs/data/documentation/factory/lazyinjected/projectedvalue.json index 1a6b5a80..cee898f8 100644 --- a/docs/data/documentation/factory/lazyinjected/projectedvalue.json +++ b/docs/data/documentation/factory/lazyinjected/projectedvalue.json @@ -1 +1 @@ -{"sections":[],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"projectedValue","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"LazyInjected","preciseIdentifier":"s:7Factory12LazyInjectedV","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"> { "},{"kind":"keyword","text":"get"},{"text":" ","kind":"text"},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}]}],"kind":"declarations"}],"kind":"symbol","metadata":{"title":"projectedValue","roleHeading":"Instance Property","role":"symbol","externalID":"s:7Factory12LazyInjectedV14projectedValueACyxGvp","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory12LazyInjectedV","kind":"typeIdentifier","text":"LazyInjected"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"symbolKind":"property","modules":[{"name":"Factory"}]},"variants":[{"paths":["\/documentation\/factory\/lazyinjected\/projectedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"abstract":[{"text":"Unwraps the property wrapper granting access to the resolve\/reset function.","type":"text"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/projectedValue","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/LazyInjected/projectedValue":{"abstract":[{"text":"Unwraps the property wrapper granting access to the resolve\/reset function.","type":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/projectedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"projectedValue","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"LazyInjected","preciseIdentifier":"s:7Factory12LazyInjectedV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"title":"projectedValue","url":"\/documentation\/factory\/lazyinjected\/projectedvalue","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/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."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"title":"LazyInjected","url":"\/documentation\/factory\/lazyinjected","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"type":"topic","role":"symbol"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/lazyinjected\/projectedvalue"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/projectedValue"},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"projectedValue","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory12LazyInjectedV","text":"LazyInjected","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":"> { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" ","kind":"text"},{"text":"set","kind":"keyword"},{"text":" }","kind":"text"}],"platforms":["macOS"]}]}],"kind":"symbol","abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"sections":[],"metadata":{"externalID":"s:7Factory12LazyInjectedV14projectedValueACyxGvp","role":"symbol","symbolKind":"property","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"projectedValue","kind":"identifier"},{"text":": ","kind":"text"},{"text":"LazyInjected","kind":"typeIdentifier","preciseIdentifier":"s:7Factory12LazyInjectedV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"modules":[{"name":"Factory"}],"roleHeading":"Instance Property","title":"projectedValue"},"references":{"doc://Factory/documentation/Factory/LazyInjected/projectedValue":{"type":"topic","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"projectedValue","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory12LazyInjectedV","text":"LazyInjected","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"title":"projectedValue","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/projectedValue","kind":"symbol","url":"\/documentation\/factory\/lazyinjected\/projectedvalue","abstract":[{"text":"Unwraps the property wrapper granting access to the resolve\/reset function.","type":"text"}]},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/LazyInjected":{"title":"LazyInjected","type":"topic","url":"\/documentation\/factory\/lazyinjected","role":"symbol","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"kind":"symbol"}}} \ 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 cb2829fa..ef3b7237 100644 --- a/docs/data/documentation/factory/lazyinjected/resolve(reset:).json +++ b/docs/data/documentation/factory/lazyinjected/resolve(reset:).json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"kind":"symbol","abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"mutating","kind":"keyword"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"text":"reset","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"options"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"},{"text":" = .none)","kind":"text"}],"languages":["swift"]}],"kind":"declarations"}],"metadata":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"text":"reset","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier"},{"kind":"text","text":")"}],"title":"resolve(reset:)","roleHeading":"Instance Method","symbolKind":"method","role":"symbol","modules":[{"name":"Factory"}],"externalID":"s:7Factory12LazyInjectedV7resolve5resetyAA0A12ResetOptionsO_tF"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/lazyinjected\/resolve(reset:)"]}],"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolve(reset:)"},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/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."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"title":"LazyInjected","url":"\/documentation\/factory\/lazyinjected","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/LazyInjected/resolve(reset:)":{"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolve(reset:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"(","kind":"text"},{"text":"reset","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"text":")","kind":"text"}],"title":"resolve(reset:)","url":"\/documentation\/factory\/lazyinjected\/resolve(reset:)","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"title":"FactoryResetOptions"}}} \ No newline at end of file +{"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolve(reset:)","interfaceLanguage":"swift"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"kind":"symbol","metadata":{"role":"symbol","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"text":"(","kind":"text"},{"text":"reset","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"title":"resolve(reset:)","symbolKind":"method","modules":[{"name":"Factory"}],"externalID":"s:7Factory12LazyInjectedV7resolve5resetyAA0A12ResetOptionsO_tF"},"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"mutating"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"text":"(","kind":"text"},{"text":"reset","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"options"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","kind":"typeIdentifier"},{"text":" = .none)","kind":"text"}]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/lazyinjected\/resolve(reset:)"]}],"references":{"doc://Factory/documentation/Factory/LazyInjected":{"title":"LazyInjected","type":"topic","url":"\/documentation\/factory\/lazyinjected","role":"symbol","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/LazyInjected/resolve(reset:)":{"role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"(","kind":"text"},{"text":"reset","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"text":")","kind":"text"}],"kind":"symbol","title":"resolve(reset:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolve(reset:)","abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"url":"\/documentation\/factory\/lazyinjected\/resolve(reset:)"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","title":"FactoryResetOptions","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryResetOptions","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/lazyinjected/resolvedornil().json b/docs/data/documentation/factory/lazyinjected/resolvedornil().json index dee1cfd2..6ae9ad3e 100644 --- a/docs/data/documentation/factory/lazyinjected/resolvedornil().json +++ b/docs/data/documentation/factory/lazyinjected/resolvedornil().json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolvedOrNil","kind":"identifier"},{"text":"() -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?"}],"platforms":["macOS"]}],"kind":"declarations"},{"kind":"content","content":[{"text":"Discussion","level":2,"anchor":"discussion","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This can come in handy when you need to perform some sort of cleanup, but you don’t want to resolve"},{"type":"text","text":" "},{"type":"text","text":"the property wrapper instance if it hasn’t already been resolved."}]},{"syntax":"swift","code":["deinit {"," $myService.resolvedOrNil()?.cleanup()","}"],"type":"codeListing"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolvedOrNil()","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/lazyinjected\/resolvedornil()"]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"kind":"symbol","metadata":{"title":"resolvedOrNil()","roleHeading":"Instance Method","externalID":"s:7Factory12LazyInjectedV13resolvedOrNilxSgyF","modules":[{"name":"Factory"}],"role":"symbol","symbolKind":"method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolvedOrNil"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}]},"abstract":[{"type":"text","text":"Projected function returns resolved instance if it exists."}],"references":{"doc://Factory/documentation/Factory/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."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"title":"LazyInjected","url":"\/documentation\/factory\/lazyinjected","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/LazyInjected/resolvedOrNil()":{"title":"resolvedOrNil()","type":"topic","url":"\/documentation\/factory\/lazyinjected\/resolvedornil()","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolvedOrNil()","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"resolvedOrNil","kind":"identifier"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}],"kind":"symbol","abstract":[{"type":"text","text":"Projected function returns resolved instance if it exists."}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolvedOrNil()"},"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolvedOrNil"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}]},{"content":[{"anchor":"discussion","type":"heading","level":2,"text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This can come in handy when you need to perform some sort of cleanup, but you don’t want to resolve"},{"type":"text","text":" "},{"type":"text","text":"the property wrapper instance if it hasn’t already been resolved."}]},{"syntax":"swift","type":"codeListing","code":["deinit {"," $myService.resolvedOrNil()?.cleanup()","}"]}],"kind":"content"}],"variants":[{"paths":["\/documentation\/factory\/lazyinjected\/resolvedornil()"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Instance Method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"resolvedOrNil","kind":"identifier"},{"kind":"text","text":"() -> "},{"text":"T","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"symbolKind":"method","title":"resolvedOrNil()","externalID":"s:7Factory12LazyInjectedV13resolvedOrNilxSgyF","role":"symbol"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"abstract":[{"text":"Projected function returns resolved instance if it exists.","type":"text"}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/LazyInjected/resolvedOrNil()":{"title":"resolvedOrNil()","url":"\/documentation\/factory\/lazyinjected\/resolvedornil()","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolvedOrNil()","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolvedOrNil"},{"text":"() -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"abstract":[{"text":"Projected function returns resolved instance if it exists.","type":"text"}],"kind":"symbol","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/LazyInjected":{"title":"LazyInjected","type":"topic","url":"\/documentation\/factory\/lazyinjected","role":"symbol","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"kind":"symbol"}}} \ 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 ee2ec59d..a90d1698 100644 --- a/docs/data/documentation/factory/lazyinjected/wrappedvalue.json +++ b/docs/data/documentation/factory/lazyinjected/wrappedvalue.json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"text":" { ","kind":"text"},{"text":"mutating","kind":"keyword"},{"kind":"text","text":" "},{"text":"get","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"set"},{"text":" }","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/wrappedValue","interfaceLanguage":"swift"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"abstract":[{"type":"text","text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time."}],"variants":[{"paths":["\/documentation\/factory\/lazyinjected\/wrappedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"roleHeading":"Instance Property","symbolKind":"property","modules":[{"name":"Factory"}],"externalID":"s:7Factory12LazyInjectedV12wrappedValuexvp","title":"wrappedValue","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"T"}],"role":"symbol"},"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/LazyInjected/wrappedValue":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/wrappedValue","title":"wrappedValue","abstract":[{"type":"text","text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time."}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/lazyinjected\/wrappedvalue","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"wrappedValue","kind":"identifier"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory/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."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"title":"LazyInjected","url":"\/documentation\/factory\/lazyinjected","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"type":"topic","role":"symbol"}}} \ No newline at end of file +{"abstract":[{"type":"text","text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time."}],"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"roleHeading":"Instance Property","externalID":"s:7Factory12LazyInjectedV12wrappedValuexvp","title":"wrappedValue","modules":[{"name":"Factory"}],"role":"symbol","symbolKind":"property","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"wrappedValue","kind":"identifier"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/wrappedValue","interfaceLanguage":"swift"},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/lazyinjected\/wrappedvalue"]}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":" { "},{"kind":"keyword","text":"mutating"},{"text":" ","kind":"text"},{"text":"get","kind":"keyword"},{"kind":"text","text":" "},{"text":"set","kind":"keyword"},{"kind":"text","text":" }"}]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/LazyInjected/wrappedValue":{"kind":"symbol","url":"\/documentation\/factory\/lazyinjected\/wrappedvalue","title":"wrappedValue","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/wrappedValue","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"type":"topic","abstract":[{"text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time.","type":"text"}]},"doc://Factory/documentation/Factory/LazyInjected":{"title":"LazyInjected","type":"topic","url":"\/documentation\/factory\/lazyinjected","role":"symbol","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/managedcontainer.json b/docs/data/documentation/factory/managedcontainer.json index 5f33e3d1..f3e3dea0 100644 --- a/docs/data/documentation/factory/managedcontainer.json +++ b/docs/data/documentation/factory/managedcontainer.json @@ -1 +1 @@ -{"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","interfaceLanguage":"swift"},"sections":[],"metadata":{"title":"ManagedContainer","symbolKind":"protocol","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"ManagedContainer","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"externalID":"s:7Factory16ManagedContainerP","role":"symbol","roleHeading":"Protocol"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/manager"]},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-65zle","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-78te9","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/decorator(_:)","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-1ucr5","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-33ecn","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/reset(options:)","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/with(_:)"],"title":"Instance Methods"}],"variants":[{"paths":["\/documentation\/factory\/managedcontainer"],"traits":[{"interfaceLanguage":"swift"}]}],"relationshipsSections":[{"kind":"relationships","title":"Inherited By","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolving","doc:\/\/Factory\/documentation\/Factory\/SharedContainer"],"type":"inheritedBy"},{"type":"conformingTypes","title":"Conforming Types","kind":"relationships","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container"]}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"},{"kind":"text","text":" : AnyObject"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"content":[{"anchor":"overview","type":"heading","text":"Overview","level":2},{"type":"paragraph","inlineContent":[{"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"},{"type":"text","text":"an example of passing such a container to a view model for dependency resolution."}]},{"syntax":"swift","type":"codeListing","code":["class ContentViewModel {"," let service: MyServiceType"," init(container: Container) {"," service = container.service()"," }","}"]},{"inlineContent":[{"type":"text","text":"See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","isActive":true,"type":"reference"},{"text":" for more information.","type":"text"}],"type":"paragraph"}],"kind":"content"}],"schemaVersion":{"minor":3,"major":0,"patch":0},"references":{"doc://Factory/documentation/Factory/Container":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Container"}],"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container"},"doc://Factory/documentation/Factory/ManagedContainer/with(_:)":{"title":"with(_:)","type":"topic","abstract":[{"type":"text","text":"Defines a with function to allow container transformation on assignment."}],"url":"\/documentation\/factory\/managedcontainer\/with(_:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"with","kind":"identifier"},{"kind":"text","text":"(("},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:s4Voida","kind":"typeIdentifier","text":"Void"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/with(_:)","role":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer/callAsFunction(key:_:)-65zle":{"title":"callAsFunction(key:_:)","type":"topic","abstract":[{"text":"Syntactic sugar allows container to create a properly bound Factory.","type":"text"}],"url":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-65zle","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"text":", () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-65zle","role":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer/promised(key:)-1ucr5":{"title":"promised(key:)","type":"topic","abstract":[{"text":"Syntactic sugar allows container to create a factory where registration is promised before resolution.","type":"text"}],"url":"\/documentation\/factory\/managedcontainer\/promised(key:)-1ucr5","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier","text":"StaticString"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?>"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-1ucr5","role":"symbol"},"doc://Factory/documentation/Factory/Resolving":{"type":"topic","title":"Resolving","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","abstract":[{"text":"When protocol is applied to a container it enables a typed registration\/resolution mode.","type":"text"}],"role":"symbol","kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Resolving"}],"url":"\/documentation\/factory\/resolving","navigatorTitle":[{"kind":"identifier","text":"Resolving"}]},"doc://Factory/documentation/Factory/ManagedContainer/reset(options:)":{"title":"reset(options:)","type":"topic","abstract":[{"type":"text","text":"Defines a thread safe access mechanism to reset the container."}],"url":"\/documentation\/factory\/managedcontainer\/reset(options:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"options"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"text":")","kind":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/reset(options:)","role":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer/callAsFunction(key:_:)-78te9":{"title":"callAsFunction(key:_:)","type":"topic","abstract":[{"text":"Syntactic sugar allows container to create a properly bound ParameterFactory.","type":"text"}],"url":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-78te9","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier","text":"StaticString"},{"kind":"text","text":", ("},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-78te9","role":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"kind":"symbol","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer","role":"symbol","url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ManagedContainer/manager":{"required":true,"title":"manager","type":"topic","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":" "},{"text":"this fashion makes creating and using your own custom containers much simpler.","type":"text"}],"url":"\/documentation\/factory\/managedcontainer\/manager","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"manager","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ContainerManagerC","text":"ContainerManager"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/manager","role":"symbol"},"doc://Factory/documentation/Factory/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","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"title":"SharedContainer","url":"\/documentation\/factory\/sharedcontainer","navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer/decorator(_:)":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"text":"(((","kind":"text"},{"kind":"keyword","text":"Any"},{"text":") -> ())?)","kind":"text"}],"url":"\/documentation\/factory\/managedcontainer\/decorator(_:)","role":"symbol","type":"topic","kind":"symbol","title":"decorator(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/decorator(_:)","abstract":[{"type":"text","text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container."}]},"doc://Factory/documentation/Factory/Containers":{"role":"article","abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","title":"Containers","type":"topic","url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory/ManagedContainer/promised(key:)-33ecn":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"promised","kind":"identifier"},{"kind":"text","text":"<"},{"text":"P","kind":"genericParameter"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier","text":"StaticString"},{"kind":"text","text":") -> "},{"text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?>","kind":"text"}],"url":"\/documentation\/factory\/managedcontainer\/promised(key:)-33ecn","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-33ecn","title":"promised(key:)","abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory where registration is promised before resolution."}]}}} \ No newline at end of file +{"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"ManagedContainer","kind":"identifier"},{"text":" : AnyObject","kind":"text"}]}],"kind":"declarations"},{"kind":"content","content":[{"type":"heading","level":2,"anchor":"overview","text":"Overview"},{"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":"paragraph"},{"syntax":"swift","code":["class ContentViewModel {"," let service: MyServiceType"," init(container: Container) {"," service = container.service()"," }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","isActive":true},{"text":" for more information.","type":"text"}]}]}],"relationshipsSections":[{"kind":"relationships","title":"Inherited By","type":"inheritedBy","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolving","doc:\/\/Factory\/documentation\/Factory\/SharedContainer"]},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container"],"title":"Conforming Types","type":"conformingTypes","kind":"relationships"}],"variants":[{"paths":["\/documentation\/factory\/managedcontainer"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"title":"ManagedContainer","modules":[{"name":"Factory"}],"roleHeading":"Protocol","symbolKind":"protocol","externalID":"s:7Factory16ManagedContainerP","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"role":"symbol"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","interfaceLanguage":"swift"},"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/manager"],"title":"Instance Properties"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-65zle","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-78te9","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/decorator(_:)","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-1ucr5","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-33ecn","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/reset(options:)","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/with(_:)"],"title":"Instance Methods"}],"abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"sections":[],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"schemaVersion":{"minor":3,"major":0,"patch":0},"references":{"doc://Factory/documentation/Factory/Containers":{"type":"topic","role":"article","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","title":"Containers","abstract":[{"text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?","type":"text"}],"url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory/ManagedContainer/decorator(_:)":{"type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"decorator","kind":"identifier"},{"text":"(((","kind":"text"},{"text":"Any","kind":"keyword"},{"kind":"text","text":") -> ())?)"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/decorator(_:)","url":"\/documentation\/factory\/managedcontainer\/decorator(_:)","abstract":[{"text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container.","type":"text"}],"kind":"symbol","role":"symbol","title":"decorator(_:)"},"doc://Factory/documentation/Factory/SharedContainer":{"title":"SharedContainer","type":"topic","url":"\/documentation\/factory\/sharedcontainer","role":"symbol","navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"SharedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"kind":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer/promised(key:)-33ecn":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-33ecn","role":"symbol","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"promised","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":") -> "},{"text":"ParameterFactory","kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?>"}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory where registration is promised before resolution."}],"type":"topic","url":"\/documentation\/factory\/managedcontainer\/promised(key:)-33ecn","title":"promised(key:)"},"doc://Factory/documentation/Factory/ManagedContainer/callAsFunction(key:_:)-65zle":{"type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"text":", () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-65zle","url":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-65zle","abstract":[{"text":"Syntactic sugar allows container to create a properly bound Factory.","type":"text"}],"kind":"symbol","role":"symbol","title":"callAsFunction(key:_:)"},"doc://Factory/documentation/Factory/ManagedContainer/with(_:)":{"type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"with"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"text":"Void","preciseIdentifier":"s:s4Voida","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/with(_:)","url":"\/documentation\/factory\/managedcontainer\/with(_:)","abstract":[{"text":"Defines a with function to allow container transformation on assignment.","type":"text"}],"kind":"symbol","role":"symbol","title":"with(_:)"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Container","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","navigatorTitle":[{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer/reset(options:)":{"type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"options"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier","text":"FactoryResetOptions"},{"text":")","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/reset(options:)","url":"\/documentation\/factory\/managedcontainer\/reset(options:)","abstract":[{"text":"Defines a thread safe access mechanism to reset the container.","type":"text"}],"kind":"symbol","role":"symbol","title":"reset(options:)"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ManagedContainer/manager":{"type":"topic","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory16ContainerManagerC","text":"ContainerManager","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/manager","url":"\/documentation\/factory\/managedcontainer\/manager","abstract":[{"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.","type":"text"}],"kind":"symbol","required":true,"role":"symbol","title":"manager"},"doc://Factory/documentation/Factory/Resolving":{"title":"Resolving","abstract":[{"type":"text","text":"When protocol is applied to a container it enables a typed registration\/resolution mode."}],"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Resolving"}],"navigatorTitle":[{"text":"Resolving","kind":"identifier"}],"url":"\/documentation\/factory\/resolving","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving"},"doc://Factory/documentation/Factory/ManagedContainer":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"text":"ManagedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"type":"topic","url":"\/documentation\/factory\/managedcontainer","title":"ManagedContainer"},"doc://Factory/documentation/Factory/ManagedContainer/callAsFunction(key:_:)-78te9":{"type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"StaticString","preciseIdentifier":"s:s12StaticStringV"},{"text":", (","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-78te9","url":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-78te9","abstract":[{"text":"Syntactic sugar allows container to create a properly bound ParameterFactory.","type":"text"}],"kind":"symbol","role":"symbol","title":"callAsFunction(key:_:)"},"doc://Factory/documentation/Factory/ManagedContainer/promised(key:)-1ucr5":{"role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"promised","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s12StaticStringV","text":"StaticString","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?>"}],"kind":"symbol","title":"promised(key:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-1ucr5","abstract":[{"text":"Syntactic sugar allows container to create a factory where registration is promised before resolution.","type":"text"}],"url":"\/documentation\/factory\/managedcontainer\/promised(key:)-1ucr5"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/managedcontainer/callasfunction(key:_:)-65zle.json b/docs/data/documentation/factory/managedcontainer/callasfunction(key:_:)-65zle.json index 4bda98f6..7338f05f 100644 --- a/docs/data/documentation/factory/managedcontainer/callasfunction(key:_:)-65zle.json +++ b/docs/data/documentation/factory/managedcontainer/callasfunction(key:_:)-65zle.json @@ -1 +1 @@ -{"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"sections":[],"schemaVersion":{"patch":0,"minor":3,"major":0},"metadata":{"roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s12StaticStringV","text":"StaticString","kind":"typeIdentifier"},{"kind":"text","text":", () -> "},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"extendedModule":"Factory","title":"callAsFunction(key:_:)","modules":[{"name":"Factory"}],"role":"symbol","externalID":"s:7Factory16ManagedContainerPAAE14callAsFunction3key_A2AVyqd__Gs12StaticStringV_qd__yctlF","symbolKind":"method"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-65zle"]}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound Factory."}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-65zle"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"StaticString","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":" = "},{"text":"#function","kind":"keyword"},{"text":", ","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"factory","kind":"internalParam"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"text":" () -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"languages":["swift"]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory/ManagedContainer/callAsFunction(key:_:)-65zle":{"title":"callAsFunction(key:_:)","type":"topic","abstract":[{"text":"Syntactic sugar allows container to create a properly bound Factory.","type":"text"}],"url":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-65zle","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"text":", () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-65zle","role":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"kind":"symbol","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer","role":"symbol","url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]}}} \ No newline at end of file +{"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s12StaticStringV","text":"StaticString","kind":"typeIdentifier"},{"text":" = ","kind":"text"},{"text":"#function","kind":"keyword"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"text":" () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"platforms":["macOS"]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-65zle"]}],"metadata":{"title":"callAsFunction(key:_:)","extendedModule":"Factory","modules":[{"name":"Factory"}],"roleHeading":"Instance Method","externalID":"s:7Factory16ManagedContainerPAAE14callAsFunction3key_A2AVyqd__Gs12StaticStringV_qd__yctlF","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":", () -> "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"role":"symbol"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-65zle","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound Factory."}],"sections":[],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"schemaVersion":{"major":0,"patch":0,"minor":3},"references":{"doc://Factory/documentation/Factory/ManagedContainer/callAsFunction(key:_:)-65zle":{"type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"text":", () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-65zle","url":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-65zle","abstract":[{"text":"Syntactic sugar allows container to create a properly bound Factory.","type":"text"}],"kind":"symbol","role":"symbol","title":"callAsFunction(key:_:)"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"text":"ManagedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"type":"topic","url":"\/documentation\/factory\/managedcontainer","title":"ManagedContainer"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/managedcontainer/callasfunction(key:_:)-78te9.json b/docs/data/documentation/factory/managedcontainer/callasfunction(key:_:)-78te9.json index 9cd00817..6a57ce1d 100644 --- a/docs/data/documentation/factory/managedcontainer/callasfunction(key:_:)-78te9.json +++ b/docs/data/documentation/factory/managedcontainer/callasfunction(key:_:)-78te9.json @@ -1 +1 @@ -{"variants":[{"paths":["\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-78te9"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"metadata":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"text":"P","kind":"genericParameter"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s12StaticStringV","text":"StaticString","kind":"typeIdentifier"},{"text":", (","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:7Factory09ParameterA0V","kind":"typeIdentifier","text":"ParameterFactory"},{"text":"<","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"roleHeading":"Instance Method","title":"callAsFunction(key:_:)","externalID":"s:7Factory16ManagedContainerPAAE14callAsFunction3key_AA09ParameterA0Vyqd__qd_0_Gs12StaticStringV_qd_0_qd__ctr0_lF","role":"symbol","extendedModule":"Factory","symbolKind":"method","modules":[{"name":"Factory"}]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"text":" = ","kind":"text"},{"text":"#function","kind":"keyword"},{"kind":"text","text":", "},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}]}]}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound ParameterFactory."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-78te9","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ManagedContainer/callAsFunction(key:_:)-78te9":{"title":"callAsFunction(key:_:)","type":"topic","abstract":[{"text":"Syntactic sugar allows container to create a properly bound ParameterFactory.","type":"text"}],"url":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-78te9","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier","text":"StaticString"},{"kind":"text","text":", ("},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-78te9","role":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"kind":"symbol","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer","role":"symbol","url":"\/documentation\/factory\/managedcontainer"}}} \ No newline at end of file +{"sections":[],"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-78te9"]}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound ParameterFactory."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"text":"P","kind":"genericParameter"},{"text":", ","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"StaticString","preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier"},{"text":" = ","kind":"text"},{"kind":"keyword","text":"#function"},{"kind":"text","text":", "},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"factory","kind":"internalParam"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-78te9"},"schemaVersion":{"minor":3,"patch":0,"major":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"metadata":{"title":"callAsFunction(key:_:)","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"text":"P","kind":"genericParameter"},{"text":", ","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s12StaticStringV","text":"StaticString","kind":"typeIdentifier"},{"kind":"text","text":", ("},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"roleHeading":"Instance Method","symbolKind":"method","role":"symbol","externalID":"s:7Factory16ManagedContainerPAAE14callAsFunction3key_AA09ParameterA0Vyqd__qd_0_Gs12StaticStringV_qd_0_qd__ctr0_lF","extendedModule":"Factory"},"references":{"doc://Factory/documentation/Factory/ManagedContainer":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"text":"ManagedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"type":"topic","url":"\/documentation\/factory\/managedcontainer","title":"ManagedContainer"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ManagedContainer/callAsFunction(key:_:)-78te9":{"type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"StaticString","preciseIdentifier":"s:s12StaticStringV"},{"text":", (","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-78te9","url":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-78te9","abstract":[{"text":"Syntactic sugar allows container to create a properly bound ParameterFactory.","type":"text"}],"kind":"symbol","role":"symbol","title":"callAsFunction(key:_:)"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"}}} \ 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 bced0ff1..86b3fa42 100644 --- a/docs/data/documentation/factory/managedcontainer/decorator(_:).json +++ b/docs/data/documentation/factory/managedcontainer/decorator(_:).json @@ -1 +1 @@ -{"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"decorator","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"decorator","kind":"internalParam"},{"kind":"text","text":": (("},{"text":"Any","kind":"keyword"},{"text":") -> ())?)","kind":"text"}],"languages":["swift"]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/decorator(_:)","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/managedcontainer\/decorator(_:)"]}],"abstract":[{"text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container.","type":"text"}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"text":"(((","kind":"text"},{"kind":"keyword","text":"Any"},{"text":") -> ())?)","kind":"text"}],"symbolKind":"method","modules":[{"name":"Factory"}],"roleHeading":"Instance Method","title":"decorator(_:)","extendedModule":"Factory","role":"symbol","externalID":"s:7Factory16ManagedContainerPAAE9decoratoryyyypcSgF"},"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"kind":"symbol","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer","role":"symbol","url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory/ManagedContainer/decorator(_:)":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"text":"(((","kind":"text"},{"kind":"keyword","text":"Any"},{"text":") -> ())?)","kind":"text"}],"url":"\/documentation\/factory\/managedcontainer\/decorator(_:)","role":"symbol","type":"topic","kind":"symbol","title":"decorator(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/decorator(_:)","abstract":[{"type":"text","text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container."}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"abstract":[{"text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container.","type":"text"}],"metadata":{"extendedModule":"Factory","role":"symbol","symbolKind":"method","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"decorator","kind":"identifier"},{"kind":"text","text":"((("},{"text":"Any","kind":"keyword"},{"text":") -> ())?)","kind":"text"}],"modules":[{"name":"Factory"}],"roleHeading":"Instance Method","externalID":"s:7Factory16ManagedContainerPAAE9decoratoryyyypcSgF","title":"decorator(_:)"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"schemaVersion":{"major":0,"patch":0,"minor":3},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/managedcontainer\/decorator(_:)"]}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"decorator"},{"kind":"text","text":": (("},{"text":"Any","kind":"keyword"},{"text":") -> ())?)","kind":"text"}],"platforms":["macOS"]}],"kind":"declarations"}],"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/decorator(_:)","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/ManagedContainer":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"text":"ManagedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"type":"topic","url":"\/documentation\/factory\/managedcontainer","title":"ManagedContainer"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ManagedContainer/decorator(_:)":{"type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"decorator","kind":"identifier"},{"text":"(((","kind":"text"},{"text":"Any","kind":"keyword"},{"kind":"text","text":") -> ())?)"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/decorator(_:)","url":"\/documentation\/factory\/managedcontainer\/decorator(_:)","abstract":[{"text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container.","type":"text"}],"kind":"symbol","role":"symbol","title":"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 155cef6d..f6c14884 100644 --- a/docs/data/documentation/factory/managedcontainer/manager.json +++ b/docs/data/documentation/factory/managedcontainer/manager.json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"manager","kind":"identifier"},{"text":": ","kind":"text"},{"text":"ContainerManager","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}]}],"kind":"declarations"}],"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","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/managedcontainer\/manager"]}],"metadata":{"symbolKind":"property","roleHeading":"Instance Property","required":true,"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"manager","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory16ContainerManagerC","kind":"typeIdentifier","text":"ContainerManager"}],"title":"manager","externalID":"s:7Factory16ManagedContainerP7managerAA0C7ManagerCvp","modules":[{"name":"Factory"}],"role":"symbol"},"sections":[],"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/manager"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"references":{"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"kind":"symbol","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer","role":"symbol","url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory/ManagedContainer/manager":{"required":true,"title":"manager","type":"topic","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":" "},{"text":"this fashion makes creating and using your own custom containers much simpler.","type":"text"}],"url":"\/documentation\/factory\/managedcontainer\/manager","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"manager","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ContainerManagerC","text":"ContainerManager"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/manager","role":"symbol"},"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"ContainerManager","kind":"identifier"}],"role":"symbol","url":"\/documentation\/factory\/containermanager","title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","abstract":[{"text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container.","type":"text"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"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":" "},{"text":"this fashion makes creating and using your own custom containers much simpler.","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"variants":[{"paths":["\/documentation\/factory\/managedcontainer\/manager"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/manager"},"metadata":{"modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"manager","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory16ContainerManagerC","text":"ContainerManager","kind":"typeIdentifier"}],"role":"symbol","required":true,"title":"manager","symbolKind":"property","externalID":"s:7Factory16ManagedContainerP7managerAA0C7ManagerCvp","roleHeading":"Instance Property"},"sections":[],"schemaVersion":{"patch":0,"minor":3,"major":0},"kind":"symbol","references":{"doc://Factory/documentation/Factory/ManagedContainer/manager":{"type":"topic","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory16ContainerManagerC","text":"ContainerManager","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/manager","url":"\/documentation\/factory\/managedcontainer\/manager","abstract":[{"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.","type":"text"}],"kind":"symbol","required":true,"role":"symbol","title":"manager"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ManagedContainer":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"text":"ManagedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"type":"topic","url":"\/documentation\/factory\/managedcontainer","title":"ManagedContainer"},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","url":"\/documentation\/factory\/containermanager","type":"topic","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"symbol","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/managedcontainer/promised(key:)-1ucr5.json b/docs/data/documentation/factory/managedcontainer/promised(key:)-1ucr5.json index ef681df3..ef4709bb 100644 --- a/docs/data/documentation/factory/managedcontainer/promised(key:)-1ucr5.json +++ b/docs/data/documentation/factory/managedcontainer/promised(key:)-1ucr5.json @@ -1 +1 @@ -{"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"variants":[{"paths":["\/documentation\/factory\/managedcontainer\/promised(key:)-1ucr5"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"promised","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"kind":"text","text":" = "},{"kind":"keyword","text":"#function"},{"kind":"text","text":") -> "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"platforms":["macOS"],"languages":["swift"]}]}],"metadata":{"roleHeading":"Instance Method","extendedModule":"Factory","modules":[{"name":"Factory"}],"role":"symbol","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"promised","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"externalID":"s:7Factory16ManagedContainerPAAE8promised3keyA2AVyqd__SgGs12StaticStringV_tlF","title":"promised(key:)"},"sections":[],"abstract":[{"text":"Syntactic sugar allows container to create a factory where registration is promised before resolution.","type":"text"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-1ucr5","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/ManagedContainer/promised(key:)-1ucr5":{"title":"promised(key:)","type":"topic","abstract":[{"text":"Syntactic sugar allows container to create a factory where registration is promised before resolution.","type":"text"}],"url":"\/documentation\/factory\/managedcontainer\/promised(key:)-1ucr5","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier","text":"StaticString"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?>"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-1ucr5","role":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"kind":"symbol","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer","role":"symbol","url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]}}} \ No newline at end of file +{"metadata":{"roleHeading":"Instance Method","extendedModule":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":"?>","kind":"text"}],"title":"promised(key:)","externalID":"s:7Factory16ManagedContainerPAAE8promised3keyA2AVyqd__SgGs12StaticStringV_tlF","modules":[{"name":"Factory"}],"symbolKind":"method"},"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory where registration is promised before resolution."}],"kind":"symbol","primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier","text":"StaticString"},{"text":" = ","kind":"text"},{"text":"#function","kind":"keyword"},{"text":") -> ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":"?>","kind":"text"}]}],"kind":"declarations"}],"schemaVersion":{"minor":3,"major":0,"patch":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-1ucr5","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"sections":[],"variants":[{"paths":["\/documentation\/factory\/managedcontainer\/promised(key:)-1ucr5"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"text":"ManagedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"type":"topic","url":"\/documentation\/factory\/managedcontainer","title":"ManagedContainer"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ManagedContainer/promised(key:)-1ucr5":{"role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"promised","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s12StaticStringV","text":"StaticString","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?>"}],"kind":"symbol","title":"promised(key:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-1ucr5","abstract":[{"text":"Syntactic sugar allows container to create a factory where registration is promised before resolution.","type":"text"}],"url":"\/documentation\/factory\/managedcontainer\/promised(key:)-1ucr5"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/managedcontainer/promised(key:)-33ecn.json b/docs/data/documentation/factory/managedcontainer/promised(key:)-33ecn.json index 0475d469..509adc29 100644 --- a/docs/data/documentation/factory/managedcontainer/promised(key:)-33ecn.json +++ b/docs/data/documentation/factory/managedcontainer/promised(key:)-33ecn.json @@ -1 +1 @@ -{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/managedcontainer\/promised(key:)-33ecn"]}],"metadata":{"title":"promised(key:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"promised","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"P"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"roleHeading":"Instance Method","externalID":"s:7Factory16ManagedContainerPAAE8promised3keyAA09ParameterA0Vyqd__qd_0_SgGs12StaticStringV_tr0_lF","extendedModule":"Factory","symbolKind":"method","role":"symbol","modules":[{"name":"Factory"}]},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-33ecn","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier","text":"StaticString"},{"text":" = ","kind":"text"},{"text":"#function","kind":"keyword"},{"text":") -> ","kind":"text"},{"text":"ParameterFactory","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?>"}]}]}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory where registration is promised before resolution."}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ManagedContainer/promised(key:)-33ecn":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"promised","kind":"identifier"},{"kind":"text","text":"<"},{"text":"P","kind":"genericParameter"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier","text":"StaticString"},{"kind":"text","text":") -> "},{"text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?>","kind":"text"}],"url":"\/documentation\/factory\/managedcontainer\/promised(key:)-33ecn","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-33ecn","title":"promised(key:)","abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory where registration is promised before resolution."}]},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"kind":"symbol","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer","role":"symbol","url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/managedcontainer\/promised(key:)-33ecn"]}],"metadata":{"role":"symbol","title":"promised(key:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"text":"P","kind":"genericParameter"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"text":"?>","kind":"text"}],"modules":[{"name":"Factory"}],"externalID":"s:7Factory16ManagedContainerPAAE8promised3keyAA09ParameterA0Vyqd__qd_0_SgGs12StaticStringV_tr0_lF","extendedModule":"Factory","symbolKind":"method","roleHeading":"Instance Method"},"schemaVersion":{"major":0,"patch":0,"minor":3},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory where registration is promised before resolution."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"text":"P","kind":"genericParameter"},{"kind":"text","text":", "},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":" = "},{"kind":"keyword","text":"#function"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:7Factory09ParameterA0V","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"typeIdentifier","text":"ParameterFactory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"text":"?>","kind":"text"}]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-33ecn","interfaceLanguage":"swift"},"sections":[],"references":{"doc://Factory/documentation/Factory/ManagedContainer":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"text":"ManagedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"type":"topic","url":"\/documentation\/factory\/managedcontainer","title":"ManagedContainer"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer/promised(key:)-33ecn":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-33ecn","role":"symbol","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"promised","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":") -> "},{"text":"ParameterFactory","kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?>"}],"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory where registration is promised before resolution."}],"type":"topic","url":"\/documentation\/factory\/managedcontainer\/promised(key:)-33ecn","title":"promised(key:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/managedcontainer/reset(options:).json b/docs/data/documentation/factory/managedcontainer/reset(options:).json index 7a2a937b..85c80614 100644 --- a/docs/data/documentation/factory/managedcontainer/reset(options:).json +++ b/docs/data/documentation/factory/managedcontainer/reset(options:).json @@ -1 +1 @@ -{"schemaVersion":{"minor":3,"patch":0,"major":0},"kind":"symbol","metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Instance Method","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"text":"(","kind":"text"},{"text":"options","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":")"}],"title":"reset(options:)","extendedModule":"Factory","symbolKind":"method","externalID":"s:7Factory16ManagedContainerPAAE5reset7optionsyAA0A12ResetOptionsO_tF"},"abstract":[{"text":"Defines a thread safe access mechanism to reset the container.","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"text":"options","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"typeIdentifier"},{"text":" = .all)","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/managedcontainer\/reset(options:)"]}],"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/reset(options:)","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"kind":"symbol","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer","role":"symbol","url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryResetOptions":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"title":"FactoryResetOptions"},"doc://Factory/documentation/Factory/ManagedContainer/reset(options:)":{"title":"reset(options:)","type":"topic","abstract":[{"type":"text","text":"Defines a thread safe access mechanism to reset the container."}],"url":"\/documentation\/factory\/managedcontainer\/reset(options:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"options"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"text":")","kind":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/reset(options:)","role":"symbol"}}} \ No newline at end of file +{"abstract":[{"type":"text","text":"Defines a thread safe access mechanism to reset the container."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"options"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"text":" = .all)","kind":"text"}],"languages":["swift"]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/managedcontainer\/reset(options:)"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/reset(options:)","interfaceLanguage":"swift"},"metadata":{"role":"symbol","roleHeading":"Instance Method","title":"reset(options:)","modules":[{"name":"Factory"}],"extendedModule":"Factory","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"text":"options","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","kind":"typeIdentifier"},{"kind":"text","text":")"}],"externalID":"s:7Factory16ManagedContainerPAAE5reset7optionsyAA0A12ResetOptionsO_tF","symbolKind":"method"},"sections":[],"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","title":"FactoryResetOptions","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryResetOptions","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ManagedContainer":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"text":"ManagedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"type":"topic","url":"\/documentation\/factory\/managedcontainer","title":"ManagedContainer"},"doc://Factory/documentation/Factory/ManagedContainer/reset(options:)":{"type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"options"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier","text":"FactoryResetOptions"},{"text":")","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/reset(options:)","url":"\/documentation\/factory\/managedcontainer\/reset(options:)","abstract":[{"text":"Defines a thread safe access mechanism to reset the container.","type":"text"}],"kind":"symbol","role":"symbol","title":"reset(options:)"}}} \ 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 ae2305a5..31e7abe8 100644 --- a/docs/data/documentation/factory/managedcontainer/with(_:).json +++ b/docs/data/documentation/factory/managedcontainer/with(_:).json @@ -1 +1 @@ -{"variants":[{"paths":["\/documentation\/factory\/managedcontainer\/with(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"title":"with(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"with"},{"text":"((","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"extendedModule":"Factory","externalID":"s:7Factory16ManagedContainerPAAE4withyxyxXEF","roleHeading":"Instance Method","symbolKind":"method","role":"symbol","modules":[{"name":"Factory"}]},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/with(_:)","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"schemaVersion":{"patch":0,"minor":3,"major":0},"kind":"symbol","primaryContentSections":[{"declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"with"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"transform","kind":"internalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":") -> ","kind":"text"},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"abstract":[{"type":"text","text":"Defines a with function to allow container transformation on assignment."}],"references":{"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"kind":"symbol","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer","role":"symbol","url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ManagedContainer/with(_:)":{"title":"with(_:)","type":"topic","abstract":[{"type":"text","text":"Defines a with function to allow container transformation on assignment."}],"url":"\/documentation\/factory\/managedcontainer\/with(_:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"with","kind":"identifier"},{"kind":"text","text":"(("},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:s4Voida","kind":"typeIdentifier","text":"Void"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/with(_:)","role":"symbol"}}} \ No newline at end of file +{"sections":[],"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Instance Method","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"with"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:s4Voida","text":"Void","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"externalID":"s:7Factory16ManagedContainerPAAE4withyxyxXEF","symbolKind":"method","role":"symbol","title":"with(_:)","extendedModule":"Factory"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/with(_:)","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"with"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"transform","kind":"internalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"platforms":["macOS"]}],"kind":"declarations"}],"kind":"symbol","abstract":[{"text":"Defines a with function to allow container transformation on assignment.","type":"text"}],"variants":[{"paths":["\/documentation\/factory\/managedcontainer\/with(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/ManagedContainer/with(_:)":{"type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"with"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"text":"Void","preciseIdentifier":"s:s4Voida","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/with(_:)","url":"\/documentation\/factory\/managedcontainer\/with(_:)","abstract":[{"text":"Defines a with function to allow container transformation on assignment.","type":"text"}],"kind":"symbol","role":"symbol","title":"with(_:)"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ManagedContainer":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"text":"ManagedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"type":"topic","url":"\/documentation\/factory\/managedcontainer","title":"ManagedContainer"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/migration.json b/docs/data/documentation/factory/migration.json index 22686b2b..c3c2d1b5 100644 --- a/docs/data/documentation/factory/migration.json +++ b/docs/data/documentation/factory/migration.json @@ -1 +1 @@ -{"schemaVersion":{"major":0,"patch":0,"minor":3},"abstract":[{"type":"text","text":"Moving from 1.x to 2.0"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Migration","interfaceLanguage":"swift"},"kind":"article","primaryContentSections":[{"content":[{"anchor":"Overview","type":"heading","level":2,"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."}]},{"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"},{"type":"paragraph","inlineContent":[{"text":"That wasn’t good.","type":"text"}]},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s take a look."}]},{"level":2,"anchor":"Defining-a-Factory","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 "},{"code":"ServiceType","type":"codeVoice"},{"type":"text","text":" dependency."}]},{"code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"],"syntax":"swift","type":"codeListing"},{"inlineContent":[{"text":"We extended a Factory ","type":"text"},{"type":"codeVoice","code":"Container"},{"text":" and within that container we defined a new computed variable of type ","type":"text"},{"code":"Factory","type":"codeVoice"},{"type":"text","text":". The type must be explicitly defined, and is usually a"},{"type":"text","text":" "},{"text":"protocol to which the returned dependency conforms.","type":"text"}],"type":"paragraph"},{"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."}]},{"inlineContent":[{"type":"text","text":"As such, a complete, formal Factory definition would look like this…"}],"type":"paragraph"},{"syntax":"swift","code":["var service: Factory {"," Factory(self, scope: .unique) { "," MyService()"," }","}"],"type":"codeListing"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"code":["var service: Factory {"," self { MyService() }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"That Factory is then returned to the caller, usually to be evaluated (see "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","isActive":true,"type":"reference"},{"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":[{"text":"The new version is one character longer. Hey. I tried… ;)","type":"text"}]},{"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."}],"type":"paragraph"},{"level":2,"type":"heading","text":"Resolving a Factory","anchor":"Resolving-a-Factory"},{"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":"paragraph"},{"syntax":"swift","code":["let service = container.service()"],"type":"codeListing"},{"inlineContent":[{"type":"text","text":"The resolved instance may be brand new or Factory may return a cached value from the specified "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true},{"text":".","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"We can also use the ","type":"text"},{"type":"codeVoice","code":"shared"},{"text":" container that’s provided for each and every container type.","type":"text"}]},{"syntax":"swift","type":"codeListing","code":["let service = Container.shared.service()"]},{"inlineContent":[{"text":"Note that this is fundamentally the same as the Service Locator pattern used in Factory 1.0.","type":"text"}],"type":"paragraph"},{"type":"codeListing","code":["\/\/ Factory 1.0 resolution","let service = Container.service()"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"Finally, you can also use the @Injected property wrapper. That’s changed too, and now uses keyPaths to indicate the desired dependency.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["@Injected(\\.service) var service: ServiceType"]},{"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"},{"type":"paragraph","inlineContent":[{"text":"See ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected"},{"type":"text","text":", "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","type":"reference"},{"text":", ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","isActive":true},{"text":", and ","type":"text"},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"reference"},{"text":" for more.","type":"text"}]},{"syntax":"swift","type":"codeListing","code":["\/\/ Factory 1.0 version for reference","@Injected(Container.service) var service: ServiceType"]},{"level":2,"anchor":"Registering-a-new-Factory-closure","type":"heading","text":"Registering a new Factory closure"},{"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":"paragraph"},{"type":"codeListing","code":["container.service.register {"," MockService()","}"],"syntax":"swift"},{"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."}]},{"type":"aside","name":"Note","style":"note","content":[{"inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Warning"}]},{"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":"text"}],"type":"paragraph"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Again, see the "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers"},{"text":" page for a lot more on the subject.","type":"text"}]},{"level":2,"anchor":"Scopes","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 scopes, as well as a few more like the per-factory decorator shown above."}]},{"anchor":"Resetting","text":"Resetting","type":"heading","level":2},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"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."}]},{"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":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"You can also reset a specific scope cache while leaving the others intact.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.manager.reset(scope: .cached)"]},{"inlineContent":[{"text":"Resetting a container only affects that container.","type":"text"}],"type":"paragraph"},{"anchor":"Creating-Custom-Containers-and-Scopes","text":"Creating Custom Containers and Scopes","level":2,"type":"heading"},{"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 "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers"},{"text":" or ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","isActive":true},{"text":" documentation.","type":"text"}]}],"kind":"content"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/migration"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"sections":[],"metadata":{"roleHeading":"Article","modules":[{"name":"Factory"}],"role":"article","title":"Migration"},"references":{"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/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."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"title":"LazyInjected","url":"\/documentation\/factory\/lazyinjected","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","title":"Scopes"},"doc://Factory/documentation/Factory/Containers":{"role":"article","abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","title":"Containers","type":"topic","url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"kind":"symbol","type":"topic","title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}]},"doc://Factory/documentation/Factory/Injected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","role":"symbol","type":"topic","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"title":"Injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Factory/callAsFunction()":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"role":"symbol","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"},{"text":" ","type":"text"},{"text":"return a cached value from the specified scope.","type":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","url":"\/documentation\/factory\/factory\/callasfunction()","title":"callAsFunction()","type":"topic"},"doc://Factory/documentation/Factory/InjectedObject":{"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","role":"symbol","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","kind":"symbol"}}} \ No newline at end of file +{"kind":"article","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Migration","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"title":"Migration","roleHeading":"Article","role":"article","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"abstract":[{"text":"Moving from 1.x to 2.0","type":"text"}],"primaryContentSections":[{"content":[{"type":"heading","level":2,"anchor":"Overview","text":"Overview"},{"inlineContent":[{"text":"Factory 2.0 is planning for the future, and as such it needs to break from the past.","type":"text"}],"type":"paragraph"},{"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":[{"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":"text"}]},{"inlineContent":[{"type":"text","text":"Let’s take a look."}],"type":"paragraph"},{"type":"heading","text":"Defining a Factory","anchor":"Defining-a-Factory","level":2},{"inlineContent":[{"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":"text"}],"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 "},{"code":"ServiceType","type":"codeVoice"},{"type":"text","text":" dependency."}],"type":"paragraph"},{"type":"codeListing","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"We extended a Factory ","type":"text"},{"type":"codeVoice","code":"Container"},{"type":"text","text":" and within that container we defined a new computed variable of type "},{"type":"codeVoice","code":"Factory"},{"text":". The type must be explicitly defined, and is usually a","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"protocol to which the returned dependency conforms."}]},{"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":[{"text":"As such, a complete, formal Factory definition would look like this…","type":"text"}],"type":"paragraph"},{"code":["var service: Factory {"," Factory(self, scope: .unique) { "," MyService()"," }","}"],"type":"codeListing","syntax":"swift"},{"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":"paragraph"},{"type":"codeListing","code":["var service: Factory {"," self { MyService() }","}"],"syntax":"swift"},{"inlineContent":[{"type":"text","text":"That Factory is then returned to the caller, usually to be evaluated (see "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","isActive":true},{"type":"text","text":"). Every time we resolve this factory we’ll get a new, unique instance of our object."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Just for reference, here’s are the Factory 1.x and 2.0 registration definitions side by side."}]},{"syntax":"swift","type":"codeListing","code":["extension Container {"," \/\/ Factory 1.x"," static var service = Factory { MyService() }"," "," \/\/ Factory 2.0"," var service: Factory { self { MyService() } }","}"]},{"inlineContent":[{"text":"The new version is one character longer. Hey. I tried… ;)","type":"text"}],"type":"paragraph"},{"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":[{"text":"See the ","type":"text"},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","type":"reference"},{"type":"text","text":" page for a lot more on the subject."}]},{"level":2,"text":"Resolving a Factory","type":"heading","anchor":"Resolving-a-Factory"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"codeListing","code":["let service = container.service()"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"The resolved instance may be brand new or Factory may return a cached value from the specified ","type":"text"},{"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."}]},{"code":["let service = Container.shared.service()"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that this is fundamentally the same as the Service Locator pattern used in Factory 1.0."}]},{"syntax":"swift","code":["\/\/ Factory 1.0 resolution","let service = Container.service()"],"type":"codeListing"},{"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"]},{"inlineContent":[{"text":"The @Injected property wrapper looks for dependencies in the shared container, so this example is functionally identical to the ","type":"text"},{"type":"codeVoice","code":"Container.shared.service()"},{"type":"text","text":" version shown above."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","isActive":true},{"type":"text","text":", "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","type":"reference"},{"text":", ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","isActive":true},{"type":"text","text":", and "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject"},{"text":" for more.","type":"text"}]},{"type":"codeListing","code":["\/\/ Factory 1.0 version for reference","@Injected(Container.service) var service: ServiceType"],"syntax":"swift"},{"type":"heading","anchor":"Registering-a-new-Factory-closure","level":2,"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?"}]},{"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":"paragraph"},{"type":"codeListing","syntax":"swift","code":["container.service.register {"," MockService()","}"]},{"type":"paragraph","inlineContent":[{"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.","type":"text"}]},{"type":"aside","style":"note","content":[{"inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Warning"}]},{"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":"text"}],"type":"paragraph"}],"name":"Note"},{"inlineContent":[{"type":"text","text":"Again, see the "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","isActive":true,"type":"reference"},{"text":" page for a lot more on the subject.","type":"text"}],"type":"paragraph"},{"level":2,"anchor":"Scopes","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."}]},{"code":["extension Container {"," var singletonService: Factory {"," self { MyService() }.singleton"," }"," var decoratedSharedService: Factory {"," self { MyService() }"," .shared"," .decorator { print(\"DECORATING \\($0.id)\") }"," }","}"],"syntax":"swift","type":"codeListing"},{"inlineContent":[{"text":"Factory 2.0 also provides additional modifiers for all of the known scopes, as well as a few more like the per-factory decorator shown above.","type":"text"}],"type":"paragraph"},{"level":2,"text":"Resetting","type":"heading","anchor":"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":[{"text":"You can also reset a specific scope cache while leaving the others intact.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.manager.reset(scope: .cached)"]},{"type":"paragraph","inlineContent":[{"text":"Resetting a container only affects that container.","type":"text"}]},{"text":"Creating Custom Containers and Scopes","anchor":"Creating-Custom-Containers-and-Scopes","type":"heading","level":2},{"type":"paragraph","inlineContent":[{"text":"Again, a bit different. Rather than duplicate the documentation for doing so, please checkout the appropriate section in the ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers"},{"type":"text","text":" or "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","isActive":true,"type":"reference"},{"text":" documentation.","type":"text"}]}],"kind":"content"}],"sections":[],"variants":[{"paths":["\/documentation\/factory\/migration"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/Injected":{"kind":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","navigatorTitle":[{"text":"Injected","kind":"identifier"}],"abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/LazyInjected":{"title":"LazyInjected","type":"topic","url":"\/documentation\/factory\/lazyinjected","role":"symbol","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"kind":"article"},"doc://Factory/documentation/Factory/Factory/callAsFunction()":{"type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"() -> "},{"text":"T","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","url":"\/documentation\/factory\/factory\/callasfunction()","abstract":[{"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"},{"type":"text","text":" "},{"type":"text","text":"return a cached value from the specified scope."}],"kind":"symbol","role":"symbol","title":"callAsFunction()"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"InjectedObject","kind":"identifier"}],"abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","kind":"symbol","navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}]},"doc://Factory/documentation/Factory/Containers":{"type":"topic","role":"article","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","title":"Containers","abstract":[{"text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?","type":"text"}],"url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"kind":"symbol","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"type":"topic","url":"\/documentation\/factory\/weaklazyinjected"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/modifiers.json b/docs/data/documentation/factory/modifiers.json index ad1f9393..636dc701 100644 --- a/docs/data/documentation/factory/modifiers.json +++ b/docs/data/documentation/factory/modifiers.json @@ -1 +1 @@ -{"variants":[{"paths":["\/documentation\/factory\/modifiers"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"modules":[{"name":"Factory"}],"role":"article","roleHeading":"Article","title":"Factory Modifiers"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Modifiers"},"schemaVersion":{"major":0,"patch":0,"minor":3},"sections":[],"abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"primaryContentSections":[{"kind":"content","content":[{"level":2,"type":"heading","anchor":"Overview","text":"Overview"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"inlineContent":[{"type":"text","text":"Modifiers make it easy to define a Factory’s options in the Factory registration…"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public func myService: Factory() {"," self { MyService() }"," .singleton"," .onTest { MockAnalyticsEngine() }"," }","}"]},{"inlineContent":[{"text":"After the fact, when the application runs…","type":"text"}],"type":"paragraph"},{"code":["extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," myService"," .onArg(\"mock0\") { EmptyService() }"," .onArg(\"mock1\") { MockServiceN(1) }"," .onArg(\"error\") { MockError(404) }"," #endif"," }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or even under direct program control…"}]},{"type":"codeListing","syntax":"swift","code":["func logout() {"," ..."," Container.shared.userProviding.register { nil }"," ...","}"]},{"type":"heading","text":"Modifiers","level":2,"anchor":"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":[{"inlineContent":[{"type":"text","text":"Contexts: Defines Factory overrides that should occur when the app is running is a specific context."}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"text":"Decorators: Defines code to be run whenever a dependency is resolved.","type":"text"}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Resets: Reseting a Factory’s registrations or scope cache."}]}]}]},{"inlineContent":[{"text":"Plus a few more, but that covers most of them.","type":"text"}],"type":"paragraph"},{"anchor":"Resolving-a-Factory","text":"Resolving a Factory","type":"heading","level":2},{"type":"paragraph","inlineContent":[{"text":"As mentioned in ","type":"text"},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","type":"reference"},{"text":", there are many ways to resolve a Factory. Here’s a simple example that resolves the ","type":"text"},{"type":"codeVoice","code":"myService"},{"text":" Factory we defined above.","type":"text"}]},{"syntax":"swift","code":["let myService = Container.shared.myService()"],"type":"codeListing"},{"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"},{"text":" resolution shortcut.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But consider the original definition."}]},{"syntax":"swift","type":"codeListing","code":["extension Container {"," public func myService: Factory() {"," self { MyService() }"," .singleton"," .onTest { MockAnalyticsEngine() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"code":"myService","type":"codeVoice"},{"text":" variable is a computed function.","type":"text"}]},{"inlineContent":[{"text":"When it’s ’called, the ","type":"text"},{"type":"codeVoice","code":"self { MyService() }"},{"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":"text"},{"type":"codeVoice","code":"onTest"},{"type":"text","text":" context modifier."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"There are, however, several things we need to consider.","type":"text"}]},{"anchor":"The-Factory-Wins","level":2,"type":"heading","text":"The Factory Wins"},{"type":"paragraph","inlineContent":[{"text":"Let’s say, for example, that we run the following code to change the factory context during a unit test.","type":"text"}]},{"code":["Container.shared.myService.onTest { NullAnalyticsEngine() }"],"syntax":"swift","type":"codeListing"},{"inlineContent":[{"text":"And then a bit further down we resolve our service.","type":"text"}],"type":"paragraph"},{"syntax":"swift","code":["let myService = Container.shared.myService()"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"Now the question is: Do we now have an instance of ","type":"text"},{"code":"NullAnalyticsEngine","type":"codeVoice"},{"text":", or ","type":"text"},{"code":"MockAnalyticsEngine","type":"codeVoice"},{"type":"text","text":"?"}]},{"inlineContent":[{"type":"text","text":"As may be apparent from the section title, we actually have an instance of "},{"type":"codeVoice","code":"MockAnalyticsEngine"},{"text":". But why? Didn’t we just change it?","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"We did. But there are a couple of things going on here.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"First is that we told Factory to cache the instance in the singleton scope. So it’s entirely possible that we could be seeing the cached value."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"Second is that when we resolved "},{"code":"myService","type":"codeVoice"},{"type":"text","text":" we called "},{"type":"codeVoice","code":"Container.shared.myService"},{"text":" again, which built a new Factory, which defined a scope, ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"and which once more defined "},{"type":"codeVoice","code":"onTest"}]},{"text":".","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"And so Factory went with its most recent definition."}]},{"type":"heading","text":"SwiftUI","anchor":"SwiftUI","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"Similar behavior can be seen in SwiftUI itself."}]},{"type":"codeListing","code":["struct innerView: View {"," var body: some View {"," Text(\"Hello\")"," .foregroundColor(.red)"," }","}","struct outerView: View {"," var body: some View {"," innerView()"," .foregroundColor(.green)"," }","}"],"syntax":"swift"},{"inlineContent":[{"text":"Here the color of the “Hello” text is red, despite our attempt to override it. The innermost bound property wins.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"So what can we do?","type":"text"}]},{"text":"External Setup","level":2,"anchor":"External-Setup","type":"heading"},{"inlineContent":[{"text":"One solution is to be careful what we put inside our factory definition.","type":"text"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["extension Container {"," public func myService: Factory() {"," self { MyService() }"," .singleton"," }","}"]},{"inlineContent":[{"text":"And then we add anything we might want to change later as an externally defined option.","type":"text"}],"type":"paragraph"},{"syntax":"swift","code":["extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," myService"," .onTest { MockAnalyticsEngine() }"," #endif"," }","}"],"type":"codeListing"},{"type":"heading","level":2,"text":"Reset","anchor":"Reset"},{"inlineContent":[{"type":"text","text":"Keep in mind that if we want to change a Factory’s context but that Factory defines a scope, then we’re also going to need to manually clear the scope cache for that object. So given."}],"type":"paragraph"},{"type":"codeListing","code":["public func myService: Factory() {"," self { MyService() }"," .singleton"," .onTest { MockAnalyticsEngine() }","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"We’d probably want to add a reset modifier to our test code."}]},{"code":["Container.shared.myService"," .onTest { NullAnalyticsEngine() }"," .reset(.scope)"],"type":"codeListing","syntax":"swift"},{"content":[{"inlineContent":[{"type":"text","text":"With "},{"type":"codeVoice","code":"reset"},{"type":"text","text":" make sure you specify that you only want to clear the scope. Calling "},{"type":"codeVoice","code":"reset"},{"type":"text","text":" without a parameter clears everything, including contexts like the one you just set!"}],"type":"paragraph"}],"type":"aside","name":"Warning","style":"warning"},{"type":"heading","level":2,"anchor":"Chaining","text":"Chaining"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Another solution that might work in some circumstances is chaining."}]},{"code":["let myService = Container.shared.myService"," .onTest { NullAnalyticsEngine() }"," .()"],"type":"codeListing","syntax":"swift"},{"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":[{"text":"Or we can use a new modifier added to Factory 2.1.","type":"text"}],"type":"paragraph"},{"text":"Once","type":"heading","anchor":"Once","level":2},{"inlineContent":[{"type":"text","text":"The "},{"code":"once","type":"codeVoice"},{"text":" modifier basically tells the system that anything that occurs before it should only be done ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"once"}]}],"type":"paragraph"},{"syntax":"swift","code":["extension Container {"," public func myService: Factory() {"," self { MyService() }"," .singleton"," .onTest { MockAnalyticsEngine() }"," .once()"," }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"So when we do:"}]},{"code":["Container.shared.myService.onTest { NullAnalyticsEngine() }"],"type":"codeListing","syntax":"swift"},{"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."}]},{"inlineContent":[{"text":"And then later, when we resolve our service.","type":"text"}],"type":"paragraph"},{"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."}]},{"inlineContent":[{"text":"Which means that we get our ","type":"text"},{"type":"codeVoice","code":"NullAnalyticsEngine"},{"text":", just like we wanted.","type":"text"}],"type":"paragraph"},{"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."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Contexts, in particular, should probably be defined in the Container’s autoRegister function."}]}]}],"kind":"article","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/Optionals":{"type":"topic","kind":"article","abstract":[{"text":"With Factory registrations can be performed at any time.","type":"text"}],"title":"Optionals and Dynamic Registration","identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","url":"\/documentation\/factory\/optionals","role":"article"},"doc://Factory/documentation/Factory/Design":{"url":"\/documentation\/factory\/design","title":"Designing Factory","role":"article","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Design"},"doc://Factory/documentation/Factory/Functional":{"title":"Functional Injection","identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","url":"\/documentation\/factory\/functional","type":"topic","role":"article","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"kind":"article"},"doc://Factory/documentation/Factory/Cycle":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","title":"Resolution Cycles","url":"\/documentation\/factory\/cycle","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"role":"article"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Modules":{"type":"topic","url":"\/documentation\/factory\/modules","role":"article","kind":"article","title":"Modular Development","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}]},"doc://Factory/documentation/Factory/Tags":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","title":"Tags","url":"\/documentation\/factory\/tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"role":"article"},"doc://Factory/documentation/Factory/GettingStarted":{"url":"\/documentation\/factory\/gettingstarted","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"type":"topic","title":"Getting Started","role":"collectionGroup"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"content","content":[{"level":2,"anchor":"Overview","text":"Overview","type":"heading"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Modifiers make it easy to define a Factory’s options in the Factory registration…","type":"text"}]},{"code":["extension Container {"," public func myService: Factory() {"," self { MyService() }"," .singleton"," .onTest { MockAnalyticsEngine() }"," }","}"],"syntax":"swift","type":"codeListing"},{"inlineContent":[{"text":"After the fact, when the application runs…","type":"text"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","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":[{"text":"Or even under direct program control…","type":"text"}]},{"type":"codeListing","code":["func logout() {"," ..."," Container.shared.userProviding.register { nil }"," ...","}"],"syntax":"swift"},{"anchor":"Modifiers","text":"Modifiers","type":"heading","level":2},{"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":[{"text":"Scopes: Defines just how long a particular dependency persists.","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"text":"Registrations: Updating or changing the dependency to be provided.","type":"text"}]}]},{"content":[{"inlineContent":[{"type":"text","text":"Contexts: Defines Factory overrides that should occur when the app is running is a specific context."}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Decorators: Defines code to be run whenever a dependency is resolved."}]}]},{"content":[{"inlineContent":[{"type":"text","text":"Resets: Reseting a Factory’s registrations or scope cache."}],"type":"paragraph"}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Plus a few more, but that covers most of them."}]},{"level":2,"type":"heading","text":"Resolving a Factory","anchor":"Resolving-a-Factory"},{"type":"paragraph","inlineContent":[{"text":"As mentioned in ","type":"text"},{"isActive":true,"type":"reference","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 "},{"code":"myService","type":"codeVoice"},{"type":"text","text":" Factory we defined above."}]},{"syntax":"swift","code":["let myService = Container.shared.myService()"],"type":"codeListing"},{"inlineContent":[{"text":"This code asks ","type":"text"},{"type":"codeVoice","code":"Container.shared.myService"},{"text":" for a Factory, and then asks the Factory to resolve itself using its ","type":"text"},{"type":"codeVoice","code":"callAsFunction"},{"type":"text","text":" resolution shortcut."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"But consider the original definition.","type":"text"}]},{"syntax":"swift","code":["extension Container {"," public func myService: Factory() {"," self { MyService() }"," .singleton"," .onTest { MockAnalyticsEngine() }"," }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"code":"myService","type":"codeVoice"},{"type":"text","text":" variable is a computed function."}]},{"type":"paragraph","inlineContent":[{"text":"When it’s ’called, the ","type":"text"},{"type":"codeVoice","code":"self { MyService() }"},{"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":"text"},{"code":"onTest","type":"codeVoice"},{"text":" context modifier.","type":"text"}]},{"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":[{"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":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"There are, however, several things we need to consider."}],"type":"paragraph"},{"type":"heading","text":"The Factory Wins","anchor":"The-Factory-Wins","level":2},{"inlineContent":[{"text":"Let’s say, for example, that we run the following code to change the factory context during a unit test.","type":"text"}],"type":"paragraph"},{"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()"]},{"inlineContent":[{"text":"Now the question is: Do we now have an instance of ","type":"text"},{"code":"NullAnalyticsEngine","type":"codeVoice"},{"type":"text","text":", or "},{"code":"MockAnalyticsEngine","type":"codeVoice"},{"text":"?","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"As may be apparent from the section title, we actually have an instance of ","type":"text"},{"code":"MockAnalyticsEngine","type":"codeVoice"},{"text":". But why? Didn’t we just change it?","type":"text"}]},{"inlineContent":[{"type":"text","text":"We did. But there are a couple of things going on here."}],"type":"paragraph"},{"inlineContent":[{"text":"First is that we told Factory to cache the instance in the singleton scope. So it’s entirely possible that we could be seeing the cached value.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"Second is that when we resolved "},{"type":"codeVoice","code":"myService"},{"type":"text","text":" we called "},{"code":"Container.shared.myService","type":"codeVoice"},{"type":"text","text":" again, which built a new Factory, which defined a scope, "},{"inlineContent":[{"text":"and which once more defined ","type":"text"},{"type":"codeVoice","code":"onTest"}],"type":"strong"},{"text":".","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"And so Factory went with its most recent definition.","type":"text"}],"type":"paragraph"},{"type":"heading","level":2,"text":"SwiftUI","anchor":"SwiftUI"},{"inlineContent":[{"text":"Similar behavior can be seen in SwiftUI itself.","type":"text"}],"type":"paragraph"},{"code":["struct innerView: View {"," var body: some View {"," Text(\"Hello\")"," .foregroundColor(.red)"," }","}","struct outerView: View {"," var body: some View {"," innerView()"," .foregroundColor(.green)"," }","}"],"type":"codeListing","syntax":"swift"},{"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":[{"text":"So what can we do?","type":"text"}]},{"text":"External Setup","anchor":"External-Setup","type":"heading","level":2},{"type":"paragraph","inlineContent":[{"text":"One solution is to be careful what we put inside our factory definition.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public func myService: Factory() {"," self { MyService() }"," .singleton"," }","}"]},{"type":"paragraph","inlineContent":[{"text":"And then we add anything we might want to change later as an externally defined option.","type":"text"}]},{"code":["extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," myService"," .onTest { MockAnalyticsEngine() }"," #endif"," }","}"],"syntax":"swift","type":"codeListing"},{"type":"heading","level":2,"text":"Reset","anchor":"Reset"},{"inlineContent":[{"type":"text","text":"Keep in mind that if we want to change a Factory’s context but that Factory defines a scope, then we’re also going to need to manually clear the scope cache for that object. So given."}],"type":"paragraph"},{"syntax":"swift","code":["public func myService: Factory() {"," self { MyService() }"," .singleton"," .onTest { MockAnalyticsEngine() }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"We’d probably want to add a reset modifier to our test code."}]},{"type":"codeListing","code":["Container.shared.myService"," .onTest { NullAnalyticsEngine() }"," .reset(.scope)"],"syntax":"swift"},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"With "},{"code":"reset","type":"codeVoice"},{"text":" make sure you specify that you only want to clear the scope. Calling ","type":"text"},{"type":"codeVoice","code":"reset"},{"type":"text","text":" without a parameter clears everything, including contexts like the one you just set!"}]}],"type":"aside","style":"warning","name":"Warning"},{"level":2,"type":"heading","anchor":"Chaining","text":"Chaining"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Another solution that might work in some circumstances is chaining."}]},{"code":["let myService = Container.shared.myService"," .onTest { NullAnalyticsEngine() }"," .()"],"type":"codeListing","syntax":"swift"},{"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."}]},{"inlineContent":[{"type":"text","text":"Or we can use a new modifier added to Factory 2.1."}],"type":"paragraph"},{"text":"Once","type":"heading","anchor":"Once","level":2},{"inlineContent":[{"text":"The ","type":"text"},{"type":"codeVoice","code":"once"},{"text":" modifier basically tells the system that anything that occurs before it should only be done ","type":"text"},{"type":"strong","inlineContent":[{"text":"once","type":"text"}]}],"type":"paragraph"},{"syntax":"swift","code":["extension Container {"," public func myService: Factory() {"," self { MyService() }"," .singleton"," .onTest { MockAnalyticsEngine() }"," .once()"," }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"So when we do:"}]},{"syntax":"swift","code":["Container.shared.myService.onTest { NullAnalyticsEngine() }"],"type":"codeListing"},{"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","code":["let myService = Container.shared.myService()"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"paragraph","inlineContent":[{"text":"Which means that we get our ","type":"text"},{"code":"NullAnalyticsEngine","type":"codeVoice"},{"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."}]},{"type":"paragraph","inlineContent":[{"text":"Contexts, in particular, should probably be defined in the Container’s autoRegister function.","type":"text"}]}]}],"kind":"article","sections":[],"seeAlsoSections":[{"title":"Advanced Topics","generated":true,"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"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","interfaceLanguage":"swift"},"metadata":{"modules":[{"name":"Factory"}],"role":"article","roleHeading":"Article","title":"Factory Modifiers"},"abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"variants":[{"paths":["\/documentation\/factory\/modifiers"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/Cycle":{"url":"\/documentation\/factory\/cycle","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","role":"article","kind":"article","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"type":"topic","title":"Resolution Cycles"},"doc://Factory/documentation/Factory/GettingStarted":{"url":"\/documentation\/factory\/gettingstarted","identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","role":"collectionGroup","kind":"article","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"type":"topic","title":"Getting Started"},"doc://Factory/documentation/Factory/Functional":{"url":"\/documentation\/factory\/functional","identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","role":"article","kind":"article","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"type":"topic","title":"Functional Injection"},"doc://Factory/documentation/Factory/Optionals":{"url":"\/documentation\/factory\/optionals","identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","role":"article","kind":"article","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"type":"topic","title":"Optionals and Dynamic Registration"},"doc://Factory/documentation/Factory/Design":{"url":"\/documentation\/factory\/design","identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","role":"article","kind":"article","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"type":"topic","title":"Designing Factory"},"doc://Factory/documentation/Factory/Tags":{"url":"\/documentation\/factory\/tags","identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","role":"article","kind":"article","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"type":"topic","title":"Tags"},"doc://Factory/documentation/Factory/Modules":{"url":"\/documentation\/factory\/modules","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","role":"article","kind":"article","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"type":"topic","title":"Modular Development"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/modules.json b/docs/data/documentation/factory/modules.json index cee0344f..21da1ee4 100644 --- a/docs/data/documentation/factory/modules.json +++ b/docs/data/documentation/factory/modules.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"generated":true,"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"],"title":"Advanced Topics"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/modules"]}],"sections":[],"abstract":[{"text":"Using Factory in a project with multiple modules.","type":"text"}],"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Article","title":"Modular Development","role":"article"},"kind":"article","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Modules","interfaceLanguage":"swift"},"primaryContentSections":[{"content":[{"type":"heading","text":"Overview","level":2,"anchor":"Overview"},{"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":"paragraph"},{"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":[{"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":"text"}]},{"inlineContent":[{"text":"And, finally, we have our application itself.","type":"text"}],"type":"paragraph"},{"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."}]},{"inlineContent":[{"type":"text","text":"This is a classic modular contractural pattern."}],"type":"paragraph"},{"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?"}]},{"inlineContent":[{"type":"text","text":"Let’s take a look."}],"type":"paragraph"},{"type":"heading","anchor":"Implementation-in-same-module-as-protocol","level":2,"text":"Implementation in same module as protocol"},{"inlineContent":[{"type":"text","text":"Before we answer the above question, let’s look at a related, but simpler problem."}],"type":"paragraph"},{"inlineContent":[{"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":"text"},{"inlineContent":[{"type":"text","text":"also"}],"type":"emphasis"},{"text":" provides the implementation of that service.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"image","identifier":"Networking"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"In which case our implementation is quite simple. Inside Networking we define the public protocol ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"and"}]},{"text":" we publicly define the Factory that provides it.","type":"text"}]},{"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":"codeListing","syntax":"swift"},{"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 "},{"inlineContent":[{"type":"text","text":"also"}],"type":"emphasis"},{"type":"text","text":" see a source that provides an instance of it."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"So with that, let’s return to our originally scheduled program.","type":"text"}]},{"type":"heading","text":"Implementation in different module from protocol","level":2,"anchor":"Implementation-in-different-module-from-protocol"},{"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"},{"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":[{"text":"Who’s on first?","type":"text"}]},{"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."}]},{"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"}]},{"text":".","type":"text"}],"type":"paragraph"},{"syntax":"swift","code":["\/\/ Public Factory","extension Container {"," public var accountLoader: Factory { self { nil } }","}"],"type":"codeListing"},{"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":[{"text":"Now we’re cooking. But where does our missing ingredient come from?","type":"text"}]},{"type":"heading","anchor":"Wiring-Things-Together","level":2,"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":[{"text":"and","type":"text"}]},{"text":" ModuleB, it’s up to the application to wire everything together.","type":"text"}]},{"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."}]},{"inlineContent":[{"type":"text","text":"The key to the puzzle is "},{"type":"codeVoice","code":"AutoRegistering"},{"text":", a container-based protocol which defines a function that’s guaranteed to be called before any Factory is resolved.","type":"text"}],"type":"paragraph"},{"code":["import ModuleP","import ModuleA","import ModuleB","","extension Container: AutoRegistering {"," func autoRegister {"," accountLoader.register { AccountLoader() }"," ..."," }","}"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"text":"Since this file can see all of the modules, it’s tasked with registering a new factory closure for ","type":"text"},{"code":"accountLoader","type":"codeVoice"},{"text":" that provides the actual instance of ","type":"text"},{"code":"AccountLoader","type":"codeVoice"},{"type":"text","text":" from ModuleB."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"And… that’s it. Prior to the first resolution Factory will call ","type":"text"},{"type":"codeVoice","code":"autoRegister"},{"text":" in order to setup everything needed for the application to run.","type":"text"}]},{"anchor":"Optionals","type":"heading","level":2,"text":"Optionals"},{"inlineContent":[{"type":"text","text":"Note that our code will need to account for the optional service in actual use."}],"type":"paragraph"},{"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":[{"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":"text"}]},{"inlineContent":[{"text":"The ","type":"text"},{"code":"AutomaticRegistration.swift","type":"codeVoice"},{"text":" file in the demo application illustrates a few examples of the cross-module registration technique. Check it out.","type":"text"}],"type":"paragraph"},{"level":2,"type":"heading","text":"Explicitly Unwrapped Optionals","anchor":"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."}]},{"inlineContent":[{"type":"text","text":"Which sort of defeats Factory’s primary goal in life - Safety."}],"type":"paragraph"},{"type":"heading","text":"Promises","level":2,"anchor":"Promises"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"inlineContent":[{"text":"One ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"could"}]},{"type":"text","text":" also do something like the following …"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["extension Container {"," public var accountLoader: Factory { self { fatalError() } }","}"]},{"inlineContent":[{"text":"Which provides the factory closure with ","type":"text"},{"type":"codeVoice","code":"fatalError"},{"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":"text"}],"type":"paragraph"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"Not a good look. Fortunately, Factory 2.1 provides a solution.","type":"text"}],"type":"paragraph"},{"syntax":"swift","code":["extension Container {"," public var accountLoader: Factory { promised() }","}"],"type":"codeListing"},{"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, "},{"code":"promised()","type":"codeVoice"},{"text":" simply returns nil and your application can continue on.","type":"text"}]},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"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."}]},{"level":2,"text":"Separating Dependencies","anchor":"Separating-Dependencies","type":"heading"},{"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"},{"type":"paragraph","inlineContent":[{"identifier":"Services","type":"image"}]},{"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. "},{"code":"Services","type":"codeVoice"},{"text":" in turn, can only see ModuleP in order to get the model and protocol definitions it needs to create its Factory’s.","type":"text"}]},{"inlineContent":[{"type":"text","text":"Our original "},{"type":"codeVoice","code":"accountLoader"},{"type":"text","text":" Factory, which lived in ModuleP in the original example, now lives in Services."}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["\/\/ Public Factory","extension Container {"," public var accountLoader: Factory { self { nil } }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And the application, which can see everything, cross wires the various service registrations provided by "},{"code":"Services","type":"codeVoice"},{"type":"text","text":" together, just as it did before."}]},{"inlineContent":[{"type":"text","text":"ModuleP is now completely independent."}],"type":"paragraph"},{"text":"Adaptors","anchor":"Adaptors","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"There’s one last case, that of using some third party library."}]},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"image","identifier":"Adaptor"}]},{"inlineContent":[{"text":"This is a good approach to take when faced with third-party analytics libraries or feature managers like LaunchDarkly.","type":"text"}],"type":"paragraph"},{"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"," }","}"],"type":"codeListing","syntax":"swift"},{"level":2,"text":"Mix and Match","type":"heading","anchor":"Mix-and-Match"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"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."}]}],"kind":"content"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/Functional":{"title":"Functional Injection","identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","url":"\/documentation\/factory\/functional","type":"topic","role":"article","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"kind":"article"},"doc://Factory/documentation/Factory/Optionals":{"type":"topic","kind":"article","abstract":[{"text":"With Factory registrations can be performed at any time.","type":"text"}],"title":"Optionals and Dynamic Registration","identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","url":"\/documentation\/factory\/optionals","role":"article"},"doc://Factory/documentation/Factory/Design":{"url":"\/documentation\/factory\/design","title":"Designing Factory","role":"article","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Design"},"Services":{"type":"image","variants":[{"url":"\/images\/Services.png","traits":["1x","light"]}],"identifier":"Services","alt":"Diagram of Application Architecture"},"Networking":{"alt":"Diagram of Application Architecture","variants":[{"url":"\/images\/Networking.png","traits":["1x","light"]}],"type":"image","identifier":"Networking"},"doc://Factory/documentation/Factory/Tags":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","title":"Tags","url":"\/documentation\/factory\/tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"role":"article"},"doc://Factory/documentation/Factory/Cycle":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","title":"Resolution Cycles","url":"\/documentation\/factory\/cycle","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"role":"article"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"Adaptor":{"type":"image","variants":[{"url":"\/images\/Adaptor.png","traits":["1x","light"]}],"identifier":"Adaptor","alt":"Diagram of Application Architecture"},"MultiModule":{"alt":"Diagram of Application Architecture","variants":[{"url":"\/images\/MultiModule.png","traits":["1x","light"]}],"type":"image","identifier":"MultiModule"},"doc://Factory/documentation/Factory/Modifiers":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","title":"Factory Modifiers","url":"\/documentation\/factory\/modifiers","abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"role":"article"}}} \ No newline at end of file +{"seeAlsoSections":[{"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"],"title":"Advanced Topics","generated":true}],"schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"modules":[{"name":"Factory"}],"role":"article","roleHeading":"Article","title":"Modular Development"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Modules","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"kind":"article","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/modules"]}],"sections":[],"abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"primaryContentSections":[{"kind":"content","content":[{"type":"heading","level":2,"anchor":"Overview","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."}]},{"syntax":"swift","type":"codeListing","code":["public protocol AccountLoading {"," func load() -> [Account]","}"]},{"type":"paragraph","inlineContent":[{"text":"Next, we have an accounting module, ModuleA, that displays our accounts, but needs one of those loaders to load them.","type":"text"}]},{"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."}]},{"inlineContent":[{"type":"image","identifier":"MultiModule"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"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."}]},{"text":"Implementation in same module as protocol","type":"heading","level":2,"anchor":"Implementation-in-same-module-as-protocol"},{"type":"paragraph","inlineContent":[{"text":"Before we answer the above question, let’s look at a related, but simpler problem.","type":"text"}]},{"type":"paragraph","inlineContent":[{"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":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"also"}]},{"text":" provides the implementation of that service.","type":"text"}]},{"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 "},{"inlineContent":[{"type":"text","text":"and"}],"type":"emphasis"},{"text":" we publicly define the Factory that provides it.","type":"text"}],"type":"paragraph"},{"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":[{"text":"Got it? Anything that can see our protocol can ","type":"text"},{"type":"emphasis","inlineContent":[{"text":"also","type":"text"}]},{"text":" see a source that provides an instance of it.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So with that, let’s return to our originally scheduled program."}]},{"text":"Implementation in different module from protocol","anchor":"Implementation-in-different-module-from-protocol","level":2,"type":"heading"},{"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."}]},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Who’s on first?","type":"text"}]},{"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."}]},{"inlineContent":[{"text":"Next, we implement part of the “same module” solution shown above, but with a twist, adding the following Factory definition to ","type":"text"},{"inlineContent":[{"text":"ModuleP","type":"text"}],"type":"strong"},{"text":".","type":"text"}],"type":"paragraph"},{"syntax":"swift","code":["\/\/ Public Factory","extension Container {"," public var accountLoader: Factory { self { nil } }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"inlineContent":[{"text":"That Factory, however, doesn’t know how to construct one, so its definition is optional, and its factory closure just returns nil.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"Now we’re cooking. But where does our missing ingredient come from?"}],"type":"paragraph"},{"anchor":"Wiring-Things-Together","type":"heading","level":2,"text":"Wiring Things Together"},{"inlineContent":[{"type":"text","text":"Since our application is the only piece of the puzzle that can see ModuleP, ModuleA, "},{"inlineContent":[{"type":"text","text":"and"}],"type":"emphasis"},{"type":"text","text":" ModuleB, it’s up to the application to wire everything together."}],"type":"paragraph"},{"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."}]},{"inlineContent":[{"text":"The key to the puzzle is ","type":"text"},{"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":"paragraph"},{"syntax":"swift","type":"codeListing","code":["import ModuleP","import ModuleA","import ModuleB","","extension Container: AutoRegistering {"," func autoRegister {"," accountLoader.register { AccountLoader() }"," ..."," }","}"]},{"inlineContent":[{"type":"text","text":"Since this file can see all of the modules, it’s tasked with registering a new factory closure for "},{"code":"accountLoader","type":"codeVoice"},{"text":" that provides the actual instance of ","type":"text"},{"code":"AccountLoader","type":"codeVoice"},{"text":" from ModuleB.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"And… that’s it. Prior to the first resolution Factory will call "},{"code":"autoRegister","type":"codeVoice"},{"type":"text","text":" in order to setup everything needed for the application to run."}]},{"level":2,"text":"Optionals","type":"heading","anchor":"Optionals"},{"inlineContent":[{"type":"text","text":"Note that our code will need to account for the optional service in actual use."}],"type":"paragraph"},{"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":[{"text":"The ","type":"text"},{"code":"AutomaticRegistration.swift","type":"codeVoice"},{"type":"text","text":" file in the demo application illustrates a few examples of the cross-module registration technique. Check it out."}]},{"text":"Explicitly Unwrapped Optionals","type":"heading","anchor":"Explicitly-Unwrapped-Optionals","level":2},{"type":"paragraph","inlineContent":[{"text":"We could, of course, do the following.","type":"text"}]},{"syntax":"swift","code":["class ViewModel: ObservableObject {"," @Injected(\\.accountLoader) var loader: AccountLoading!"," @Published var accounts: [Account] = []"," func load() {"," accounts = loader.load()"," }","}"],"type":"codeListing"},{"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."}]},{"level":2,"anchor":"Promises","text":"Promises","type":"heading"},{"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."}]},{"inlineContent":[{"type":"text","text":"One "},{"inlineContent":[{"type":"text","text":"could"}],"type":"emphasis"},{"type":"text","text":" also do something like the following …"}],"type":"paragraph"},{"code":["extension Container {"," public var accountLoader: Factory { self { fatalError() } }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Which provides the factory closure with "},{"code":"fatalError","type":"codeVoice"},{"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":"text"}]},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Not a good look. Fortunately, Factory 2.1 provides a solution.","type":"text"}]},{"syntax":"swift","code":["extension Container {"," public var accountLoader: Factory { promised() }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"When run in debug mode and the application attempts to resolve an unregistered accountLoader, "},{"code":"promised()","type":"codeVoice"},{"text":" will trigger a fatalError to inform you of the mistake. But in a released application, ","type":"text"},{"code":"promised()","type":"codeVoice"},{"type":"text","text":" simply returns nil and your application can continue on."}]},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Promised also cleans up Factory registrations, a nice win that eliminates the rather odd looking "},{"code":"self { nil }","type":"codeVoice"},{"type":"text","text":" requirement."}]},{"text":"Separating Dependencies","anchor":"Separating-Dependencies","level":2,"type":"heading"},{"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"}]},{"text":" depend on Factory.","type":"text"}]},{"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 "},{"code":"Services","type":"codeVoice"},{"type":"text","text":" which is a new cross-module framework where our empty registrations are defined. "},{"code":"Services","type":"codeVoice"},{"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":[{"text":"Our original ","type":"text"},{"code":"accountLoader","type":"codeVoice"},{"type":"text","text":" Factory, which lived in ModuleP in the original example, now lives in Services."}],"type":"paragraph"},{"syntax":"swift","code":["\/\/ Public Factory","extension Container {"," public var accountLoader: Factory { self { nil } }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"And the application, which can see everything, cross wires the various service registrations provided by ","type":"text"},{"type":"codeVoice","code":"Services"},{"type":"text","text":" together, just as it did before."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"ModuleP is now completely independent."}]},{"text":"Adaptors","type":"heading","level":2,"anchor":"Adaptors"},{"type":"paragraph","inlineContent":[{"type":"text","text":"There’s one last case, that of using some third party library."}]},{"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"},{"type":"paragraph","inlineContent":[{"identifier":"Adaptor","type":"image"}]},{"type":"paragraph","inlineContent":[{"text":"This is a good approach to take when faced with third-party analytics libraries or feature managers like LaunchDarkly.","type":"text"}]},{"type":"codeListing","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"," }","}"],"syntax":"swift"},{"anchor":"Mix-and-Match","type":"heading","level":2,"text":"Mix and Match"},{"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."}],"type":"paragraph"}]}],"references":{"doc://Factory/documentation/Factory/Optionals":{"url":"\/documentation\/factory\/optionals","identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","role":"article","kind":"article","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"type":"topic","title":"Optionals and Dynamic Registration"},"MultiModule":{"type":"image","variants":[{"traits":["1x","light"],"url":"\/images\/MultiModule.png"}],"identifier":"MultiModule","alt":"Diagram of Application Architecture"},"doc://Factory/documentation/Factory/Design":{"url":"\/documentation\/factory\/design","identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","role":"article","kind":"article","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"type":"topic","title":"Designing Factory"},"doc://Factory/documentation/Factory/Tags":{"url":"\/documentation\/factory\/tags","identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","role":"article","kind":"article","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"type":"topic","title":"Tags"},"doc://Factory/documentation/Factory/Cycle":{"url":"\/documentation\/factory\/cycle","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","role":"article","kind":"article","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"type":"topic","title":"Resolution Cycles"},"doc://Factory/documentation/Factory/Modifiers":{"kind":"article","abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"title":"Factory Modifiers","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","role":"article","type":"topic","url":"\/documentation\/factory\/modifiers"},"doc://Factory/documentation/Factory/Functional":{"url":"\/documentation\/factory\/functional","identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","role":"article","kind":"article","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"type":"topic","title":"Functional Injection"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"Adaptor":{"variants":[{"traits":["1x","light"],"url":"\/images\/Adaptor.png"}],"identifier":"Adaptor","type":"image","alt":"Diagram of Application Architecture"},"Services":{"type":"image","variants":[{"traits":["1x","light"],"url":"\/images\/Services.png"}],"identifier":"Services","alt":"Diagram of Application Architecture"},"Networking":{"variants":[{"traits":["1x","light"],"url":"\/images\/Networking.png"}],"identifier":"Networking","type":"image","alt":"Diagram of Application Architecture"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/optionals.json b/docs/data/documentation/factory/optionals.json index a2a1ac96..08430d9a 100644 --- a/docs/data/documentation/factory/optionals.json +++ b/docs/data/documentation/factory/optionals.json @@ -1 +1 @@ -{"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}],"metadata":{"roleHeading":"Article","modules":[{"name":"Factory"}],"role":"article","title":"Optionals and Dynamic Registration"},"schemaVersion":{"patch":0,"minor":3,"major":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"kind":"content","content":[{"level":2,"type":"heading","text":"Overview","anchor":"Overview"},{"inlineContent":[{"type":"text","text":"Optional Factory definitions have several uses, including:"}],"type":"paragraph"},{"items":[{"content":[{"inlineContent":[{"type":"text","text":"Dynamic Registration - Providing Factory’s based on application state."}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"text":"Multiple-Module Registration - Registering Factory’s across modules to avoid cross-cutting concerns.","type":"text"}]}]}],"type":"orderedList"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s take a look."}]},{"text":"Dynamic Registration","anchor":"Dynamic-Registration","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Consider the following optional factory."}]},{"syntax":"swift","type":"codeListing","code":["extension Container {"," let userProviding = Factory { self { nil } }","}"]},{"inlineContent":[{"text":"Looks strange, right? I mean, of what use is a Factory that returns nothing?","type":"text"}],"type":"paragraph"},{"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."}]},{"type":"heading","level":2,"text":"Explicitly Unwrapped Optionals","anchor":"Explicitly-Unwrapped-Optionals"},{"inlineContent":[{"type":"text","text":"Note that you "},{"type":"emphasis","inlineContent":[{"type":"text","text":"could"}]},{"text":" explicitly unwrap the optional…","type":"text"}],"type":"paragraph"},{"syntax":"swift","code":["@Injected(\\.userProviding) private let provider: UserProviding!"],"type":"codeListing"},{"inlineContent":[{"text":"But doing so violates the core premise on which Factory was built in the first place: ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"Your code is guaranteed to be safe."}]}],"type":"paragraph"},{"inlineContent":[{"text":"I’d advise against it.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"A few other things here. First, note that we used "},{"code":"@Injected","type":"codeVoice"},{"type":"text","text":" to supply an optional type. We don’t need a "},{"type":"codeVoice","code":"@OptionalInjected"},{"text":" property wrapper to do this as we did in Resolver. Same for ","type":"text"},{"code":"@LazyInjected","type":"codeVoice"},{"text":".","type":"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","type":"heading","level":2,"text":"Optionals and Multiple Modules"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"inlineContent":[{"text":"See ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules"},{"type":"text","text":" for more."}],"type":"paragraph"}]}],"variants":[{"paths":["\/documentation\/factory\/optionals"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Optionals"},"kind":"article","sections":[],"abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"references":{"doc://Factory/documentation/Factory/Functional":{"title":"Functional Injection","identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","url":"\/documentation\/factory\/functional","type":"topic","role":"article","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"kind":"article"},"doc://Factory/documentation/Factory/Modules":{"type":"topic","url":"\/documentation\/factory\/modules","role":"article","kind":"article","title":"Modular Development","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}]},"doc://Factory/documentation/Factory/Design":{"url":"\/documentation\/factory\/design","title":"Designing Factory","role":"article","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Design"},"doc://Factory/documentation/Factory/Cycle":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","title":"Resolution Cycles","url":"\/documentation\/factory\/cycle","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"role":"article"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Modifiers":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","title":"Factory Modifiers","url":"\/documentation\/factory\/modifiers","abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"role":"article"},"doc://Factory/documentation/Factory/Tags":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","title":"Tags","url":"\/documentation\/factory\/tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"role":"article"}}} \ No newline at end of file +{"primaryContentSections":[{"content":[{"anchor":"Overview","type":"heading","level":2,"text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Optional Factory definitions have several uses, including:"}]},{"type":"orderedList","items":[{"content":[{"inlineContent":[{"type":"text","text":"Dynamic Registration - Providing Factory’s based on application state."}],"type":"paragraph"}]},{"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","type":"heading","level":2,"text":"Dynamic Registration"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Consider the following optional factory."}]},{"code":["extension Container {"," let userProviding = Factory { self { nil } }","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Looks strange, right? I mean, of what use is a Factory that returns nothing?"}]},{"inlineContent":[{"text":"Now let’s take a look at a dynamic registration in action.","type":"text"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["func authenticated(with user: User) {"," ..."," Container.shared.userProviding.register { UserProvider(user: user) }"," ...","}","","func logout() {"," ..."," Container.shared.userProviding.reset()"," ...","}"]},{"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"},{"type":"paragraph","inlineContent":[{"text":"Here’s an example:","type":"text"}]},{"code":["class SomeViewModel: ObservableObject {"," @Injected(\\.userProviding) private let provider"," func update(email: String) {"," provider?.updateEmailAddress(email)"," }","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"The injected provider is optional by default since the Factory was defined that way.","type":"text"}]},{"text":"Explicitly Unwrapped Optionals","level":2,"type":"heading","anchor":"Explicitly-Unwrapped-Optionals"},{"inlineContent":[{"text":"Note that you ","type":"text"},{"inlineContent":[{"type":"text","text":"could"}],"type":"emphasis"},{"type":"text","text":" explicitly unwrap the optional…"}],"type":"paragraph"},{"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 "},{"code":"@Injected","type":"codeVoice"},{"text":" to supply an optional type. We don’t need a ","type":"text"},{"code":"@OptionalInjected","type":"codeVoice"},{"type":"text","text":" property wrapper to do this as we did in Resolver. Same for "},{"type":"codeVoice","code":"@LazyInjected"},{"type":"text","text":"."}]},{"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."}],"type":"paragraph"},{"level":2,"type":"heading","text":"Optionals and Multiple Modules","anchor":"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."}]},{"inlineContent":[{"text":"See ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules"},{"type":"text","text":" for more."}],"type":"paragraph"}],"kind":"content"}],"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}],"variants":[{"paths":["\/documentation\/factory\/optionals"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Optionals"},"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Article","role":"article","title":"Optionals and Dynamic Registration"},"abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"sections":[],"kind":"article","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Modules":{"url":"\/documentation\/factory\/modules","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","role":"article","kind":"article","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"type":"topic","title":"Modular Development"},"doc://Factory/documentation/Factory/Cycle":{"url":"\/documentation\/factory\/cycle","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","role":"article","kind":"article","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"type":"topic","title":"Resolution Cycles"},"doc://Factory/documentation/Factory/Tags":{"url":"\/documentation\/factory\/tags","identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","role":"article","kind":"article","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"type":"topic","title":"Tags"},"doc://Factory/documentation/Factory/Functional":{"url":"\/documentation\/factory\/functional","identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","role":"article","kind":"article","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"type":"topic","title":"Functional Injection"},"doc://Factory/documentation/Factory/Design":{"url":"\/documentation\/factory\/design","identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","role":"article","kind":"article","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"type":"topic","title":"Designing Factory"},"doc://Factory/documentation/Factory/Modifiers":{"kind":"article","abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"title":"Factory Modifiers","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","role":"article","type":"topic","url":"\/documentation\/factory\/modifiers"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory.json b/docs/data/documentation/factory/parameterfactory.json index 05d04167..6fddf0cc 100644 --- a/docs/data/documentation/factory/parameterfactory.json +++ b/docs/data/documentation/factory/parameterfactory.json @@ -1 +1 @@ -{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory"]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"],"kind":"relationships","title":"Conforms To","type":"conformsTo"}],"sections":[],"metadata":{"role":"symbol","symbolKind":"struct","title":"ParameterFactory","roleHeading":"Structure","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"modules":[{"name":"Factory"}],"externalID":"s:7Factory09ParameterA0V"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"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(_:)"]},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"],"title":"Default Implementations","generated":true}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">"}]}]},{"kind":"content","content":[{"text":"Overview","type":"heading","anchor":"overview","level":2},{"type":"paragraph","inlineContent":[{"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":"text"},{"code":"ParameterFactory","type":"codeVoice"},{"text":".","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"We define a ParameterFactory exactly as we do a normal factory with two exceptions: we need to specify the","type":"text"},{"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) }"," }","}"]},{"inlineContent":[{"type":"text","text":"Resolving it is straightforward. Just pass the parameter to the Factory."}],"type":"paragraph"},{"type":"codeListing","syntax":"Swift","code":["let myService = Container.shared.parameterService(n)"]},{"inlineContent":[{"text":"One caveat is that you can’t use the ","type":"text"},{"type":"codeVoice","code":"@Injected"},{"type":"text","text":" property wrapper with "},{"code":"ParameterFactory","type":"codeVoice"},{"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"},{"type":"text","text":"probably need to reference the container directly and do something similar to the following."}],"type":"paragraph"},{"syntax":"swift","code":["class MyClass {"," var myService: MyServiceType"," init(_ n: Int) {"," myService = Container.shared.parameterService(n)"," }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you need to pass more than one parameter just use a tuple, dictionary, or struct."}]},{"type":"codeListing","code":["var tupleService: ParameterFactory<(Int, Int), MultipleParameterService> {"," self { (a, b) in"," MultipleParameterService(a: a, b: b)"," }","}"],"syntax":"swift"},{"inlineContent":[{"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"},{"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"},{"text":" ","type":"text"},{"type":"text","text":"later requests will be ignored until the factory or scope is reset."}],"type":"paragraph"}]}],"references":{"doc://Factory/documentation/Factory/ParameterFactory/init(_:key:_:)":{"role":"symbol","abstract":[{"type":"text","text":"Public initializer creates a factory capable of taking parameters at runtime."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/init(_:key:_:)","title":"init(_:key:_:)","kind":"symbol","fragments":[{"kind":"identifier","text":"init"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP"},{"kind":"text","text":", "},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"text":", (","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"},{"text":")","kind":"text"}],"url":"\/documentation\/factory\/parameterfactory\/init(_:key:_:)"},"doc://Factory/documentation/Factory/ParameterFactory/register(factory:)":{"title":"register(factory:)","type":"topic","role":"symbol","url":"\/documentation\/factory\/parameterfactory\/register(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(factory:)","kind":"symbol","abstract":[{"text":"Registers a new factory capable of taking parameters at runtime.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"register"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}]},"doc://Factory/documentation/Factory/FactoryModifying":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","role":"symbol","type":"topic","abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/resolve(_:)":{"url":"\/documentation\/factory\/parameterfactory\/resolve(_:)","title":"resolve(_:)","role":"symbol","kind":"symbol","abstract":[{"text":"Unsugared resolution function.","type":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/resolve(_:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ParameterFactory/registration":{"url":"\/documentation\/factory\/parameterfactory\/registration","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A12RegistrationV","text":"FactoryRegistration","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/registration","title":"registration","abstract":[{"type":"text","text":"Required registration"}],"kind":"symbol","type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory/callAsFunction(_:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/callAsFunction(_:)","type":"topic","role":"symbol","abstract":[{"type":"text","text":"Resolves a factory capable of taking parameters at runtime."}],"kind":"symbol","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(_:)","url":"\/documentation\/factory\/parameterfactory\/callasfunction(_:)"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","abstract":[],"type":"topic","title":"FactoryModifying Implementations","role":"collectionGroup"},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"}}} \ No newline at end of file +{"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/init(_:key:_:)"],"title":"Initializers"},{"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","generated":true,"identifiers":["doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]}],"variants":[{"paths":["\/documentation\/factory\/parameterfactory"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"schemaVersion":{"patch":0,"minor":3,"major":0},"kind":"symbol","primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"},{"kind":"text","text":"<"},{"text":"P","kind":"genericParameter"},{"text":", ","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">","kind":"text"}]}],"kind":"declarations"},{"content":[{"text":"Overview","type":"heading","anchor":"overview","level":2},{"type":"paragraph","inlineContent":[{"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":"text"},{"type":"codeVoice","code":"ParameterFactory"},{"type":"text","text":"."}]},{"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":"paragraph"},{"code":["extension Container {"," var parameterService: ParameterFactory {"," self { ParameterService(value: $0) }"," }","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"Resolving it is straightforward. Just pass the parameter to the Factory.","type":"text"}]},{"syntax":"Swift","code":["let myService = Container.shared.parameterService(n)"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"One caveat is that you can’t use the "},{"code":"@Injected","type":"codeVoice"},{"text":" property wrapper with ","type":"text"},{"code":"ParameterFactory","type":"codeVoice"},{"text":" as there’s no way to get","type":"text"},{"text":" ","type":"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":" "},{"text":"probably need to reference the container directly and do something similar to the following.","type":"text"}]},{"code":["class MyClass {"," var myService: MyServiceType"," init(_ n: Int) {"," myService = Container.shared.parameterService(n)"," }","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you need to pass more than one parameter just use a tuple, dictionary, or struct."}]},{"code":["var tupleService: ParameterFactory<(Int, Int), MultipleParameterService> {"," self { (a, b) in"," MultipleParameterService(a: a, b: b)"," }","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"Finally, if you define a scope keep in mind that the first argument passed will be used to create the dependency","type":"text"},{"type":"text","text":" "},{"type":"text","text":"and "},{"type":"emphasis","inlineContent":[{"type":"text","text":"that"}]},{"text":" dependency will be cached. Since the cached object will be returned from now on any arguments passed in","type":"text"},{"type":"text","text":" "},{"text":"later requests will be ignored until the factory or scope is reset.","type":"text"}]}],"kind":"content"}],"metadata":{"symbolKind":"struct","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","roleHeading":"Structure","modules":[{"name":"Factory"}],"role":"symbol","externalID":"s:7Factory09ParameterA0V"},"relationshipsSections":[{"kind":"relationships","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"],"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"}],"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ParameterFactory/callAsFunction(_:)":{"title":"callAsFunction(_:)","url":"\/documentation\/factory\/parameterfactory\/callasfunction(_:)","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"text":"(","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Resolves a factory capable of taking parameters at runtime."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/callAsFunction(_:)","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/register(factory:)":{"url":"\/documentation\/factory\/parameterfactory\/register(factory:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"register","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"type":"topic","title":"register(factory:)","abstract":[{"text":"Registers a new factory capable of taking parameters at runtime.","type":"text"}],"role":"symbol","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory/FactoryModifying":{"navigatorTitle":[{"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."}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","kind":"symbol","type":"topic","title":"FactoryModifying","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"},"doc://Factory/documentation/Factory/ParameterFactory/init(_:key:_:)":{"fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"ManagedContainer","kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ManagedContainerP"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":", ("},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":")"}],"type":"topic","url":"\/documentation\/factory\/parameterfactory\/init(_:key:_:)","role":"symbol","title":"init(_:key:_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/init(_:key:_:)","abstract":[{"type":"text","text":"Public initializer creates a factory capable of taking parameters at runtime."}],"kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/registration":{"title":"registration","url":"\/documentation\/factory\/parameterfactory\/registration","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/registration","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"registration","kind":"identifier"},{"text":": ","kind":"text"},{"text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Required registration"}],"kind":"symbol","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/resolve(_:)":{"kind":"symbol","url":"\/documentation\/factory\/parameterfactory\/resolve(_:)","title":"resolve(_:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/resolve(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"(","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"}],"type":"topic","abstract":[{"type":"text","text":"Unsugared resolution function."}]}}} \ 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 71b8dfb8..81e37a55 100644 --- a/docs/data/documentation/factory/parameterfactory/cached.json +++ b/docs/data/documentation/factory/parameterfactory/cached.json @@ -1 +1 @@ -{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/cached"},"kind":"symbol","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","type":"reference"},{"text":".","type":"text"}],"schemaVersion":{"major":0,"patch":0,"minor":3},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/cached"]}],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"cached"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":" { "},{"text":"get","kind":"keyword"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"content":[{"type":"heading","text":"Discussion","level":2,"anchor":"discussion"},{"syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .cached","}"],"type":"codeListing"}],"kind":"content"}],"sections":[],"metadata":{"externalID":"s:7Factory0A9ModifyingPAAE6cachedxvp::SYNTHESIZED::s:7Factory09ParameterA0V","roleHeading":"Instance Property","title":"cached","role":"symbol","extendedModule":"Factory","modules":[{"name":"Factory"}],"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"cached","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"symbolKind":"property"},"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":{"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/parameterfactory\/cached","kind":"symbol","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","type":"reference"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/cached","title":"cached","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/cached-swift.class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","navigatorTitle":[{"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."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","abstract":[],"type":"topic","title":"FactoryModifying Implementations","role":"collectionGroup"}}} \ No newline at end of file +{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/cached","interfaceLanguage":"swift"},"schemaVersion":{"minor":3,"major":0,"patch":0},"metadata":{"extendedModule":"Factory","role":"symbol","roleHeading":"Instance Property","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"cached","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"cached","externalID":"s:7Factory0A9ModifyingPAAE6cachedxvp::SYNTHESIZED::s:7Factory09ParameterA0V","modules":[{"name":"Factory"}],"symbolKind":"property"},"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"text":"get","kind":"keyword"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]},{"content":[{"anchor":"discussion","type":"heading","text":"Discussion","level":2},{"type":"codeListing","code":["var service: Factory {"," factory { MyService() }"," .cached","}"],"syntax":"swift"}],"kind":"content"}],"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/cached"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","isActive":true,"type":"reference"},{"type":"text","text":"."}],"references":{"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Cached","kind":"identifier"}],"type":"topic","navigatorTitle":[{"text":"Cached","kind":"identifier"}],"role":"symbol","kind":"symbol","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","title":"Scope.Cached","url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ParameterFactory/cached":{"role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"cached","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"kind":"symbol","title":"cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/cached","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","isActive":true,"type":"reference"},{"text":".","type":"text"}],"url":"\/documentation\/factory\/parameterfactory\/cached"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"}}} \ 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 3a49225a..d82fccfd 100644 --- a/docs/data/documentation/factory/parameterfactory/callasfunction(_:).json +++ b/docs/data/documentation/factory/parameterfactory/callasfunction(_:).json @@ -1 +1 @@ -{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/callasfunction(_:)"]}],"abstract":[{"type":"text","text":"Resolves a factory capable of taking parameters at runtime."}],"metadata":{"roleHeading":"Instance Method","role":"symbol","modules":[{"name":"Factory"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"symbolKind":"method","title":"callAsFunction(_:)","externalID":"s:7Factory09ParameterA0V14callAsFunctionyq_xF"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/callAsFunction(_:)","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"patch":0,"minor":3},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"parameters"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"}]}]},{"kind":"content","content":[{"level":2,"anchor":"discussion","text":"Discussion","type":"heading"},{"syntax":"swift","code":["let service = container.parameterService(16)"],"type":"codeListing"}]}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/callAsFunction(_:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/callAsFunction(_:)","type":"topic","role":"symbol","abstract":[{"type":"text","text":"Resolves a factory capable of taking parameters at runtime."}],"kind":"symbol","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(_:)","url":"\/documentation\/factory\/parameterfactory\/callasfunction(_:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"metadata":{"modules":[{"name":"Factory"}],"role":"symbol","roleHeading":"Instance Method","externalID":"s:7Factory09ParameterA0V14callAsFunctionyq_xF","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"text":"(","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"}],"title":"callAsFunction(_:)","symbolKind":"method"},"abstract":[{"text":"Resolves a factory capable of taking parameters at runtime.","type":"text"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/callAsFunction(_:)","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"parameters"},{"text":": ","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"}],"languages":["swift"]}]},{"content":[{"text":"Discussion","level":2,"type":"heading","anchor":"discussion"},{"code":["let service = container.parameterService(16)"],"type":"codeListing","syntax":"swift"}],"kind":"content"}],"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/callasfunction(_:)"]}],"sections":[],"references":{"doc://Factory/documentation/Factory/ParameterFactory/callAsFunction(_:)":{"title":"callAsFunction(_:)","url":"\/documentation\/factory\/parameterfactory\/callasfunction(_:)","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"text":"(","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Resolves a factory capable of taking parameters at runtime."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/callAsFunction(_:)","kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"}}} \ 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 f225210c..75e6f053 100644 --- a/docs/data/documentation/factory/parameterfactory/context(_:factory:).json +++ b/docs/data/documentation/factory/parameterfactory/context(_:factory:).json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/context(_:factory:)"},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"context","kind":"identifier"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"contexts","kind":"internalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A11ContextTypeO","text":"FactoryContextType","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","kind":"typeIdentifier"},{"text":"..., ","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"kind":"content","content":[{"anchor":"discussion","type":"heading","text":"Discussion","level":2},{"type":"paragraph","inlineContent":[{"text":"A context might be be when running in SwiftUI preview mode, or when running unit tests.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"See ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"}]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/context(_:factory:)"]}],"schemaVersion":{"major":0,"patch":0,"minor":3},"sections":[],"metadata":{"role":"symbol","roleHeading":"Instance Method","modules":[{"name":"Factory"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"FactoryContextType","preciseIdentifier":"s:7Factory0A11ContextTypeO"},{"text":"..., ","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"title":"context(_:factory:)","extendedModule":"Factory","symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE7context_7factoryxAA0A11ContextTypeOd_1TQz1PQzctF::SYNTHESIZED::s:7Factory09ParameterA0V"},"kind":"symbol","abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Contexts":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","title":"Contexts","type":"topic","role":"article","abstract":[{"text":"Changing injection results under special circumstances.","type":"text"}],"kind":"article","url":"\/documentation\/factory\/contexts"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","abstract":[],"type":"topic","title":"FactoryModifying Implementations","role":"collectionGroup"},"doc://Factory/documentation/Factory/ParameterFactory/context(_:factory:)":{"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"preciseIdentifier":"s:7Factory0A11ContextTypeO","text":"FactoryContextType","kind":"typeIdentifier"},{"kind":"text","text":"..., "},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/context(_:factory:)","title":"context(_:factory:)","url":"\/documentation\/factory\/parameterfactory\/context(_:factory:)","type":"topic","kind":"symbol","abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}]},"doc://Factory/documentation/Factory/FactoryContextType":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","url":"\/documentation\/factory\/factorycontexttype"},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/context(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/context(_:factory:)","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"context","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"contexts","kind":"internalParam"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","preciseIdentifier":"s:7Factory0A11ContextTypeO","kind":"typeIdentifier","text":"FactoryContextType"},{"text":"..., ","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"platforms":["macOS"],"languages":["swift"]}]},{"kind":"content","content":[{"text":"Discussion","level":2,"type":"heading","anchor":"discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"A context might be be when running in SwiftUI preview mode, or when running unit tests."}]},{"inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"}],"type":"paragraph"}]}],"kind":"symbol","abstract":[{"text":"Registers a factory closure to be used only when running in a specific context.","type":"text"}],"sections":[],"metadata":{"symbolKind":"method","roleHeading":"Instance Method","role":"symbol","title":"context(_:factory:)","extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE7context_7factoryxAA0A11ContextTypeOd_1TQz1PQzctF::SYNTHESIZED::s:7Factory09ParameterA0V","modules":[{"name":"Factory"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"context","kind":"identifier"},{"text":"(","kind":"text"},{"text":"FactoryContextType","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A11ContextTypeO"},{"text":"..., ","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}]},"references":{"doc://Factory/documentation/Factory/Contexts":{"abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"type":"topic","role":"article","title":"Contexts","kind":"article","url":"\/documentation\/factory\/contexts","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"},"doc://Factory/documentation/Factory/ParameterFactory/context(_:factory:)":{"type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"context","kind":"identifier"},{"kind":"text","text":"("},{"preciseIdentifier":"s:7Factory0A11ContextTypeO","text":"FactoryContextType","kind":"typeIdentifier"},{"kind":"text","text":"..., "},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"title":"context(_:factory:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/context(_:factory:)","kind":"symbol","url":"\/documentation\/factory\/parameterfactory\/context(_:factory:)","abstract":[{"text":"Registers a factory closure to be used only when running in a specific context.","type":"text"}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/FactoryContextType":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"text":"Context types available for special purpose factory registrations.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"title":"FactoryContextType","type":"topic","url":"\/documentation\/factory\/factorycontexttype"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"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 98529f3e..4b7241d1 100644 --- a/docs/data/documentation/factory/parameterfactory/decorator(_:).json +++ b/docs/data/documentation/factory/parameterfactory/decorator(_:).json @@ -1 +1 @@ -{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/decorator(_:)"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"metadata":{"symbolKind":"method","extendedModule":"Factory","role":"symbol","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE9decoratoryxy1TQzcF::SYNTHESIZED::s:7Factory09ParameterA0V","title":"decorator(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"decorator","kind":"identifier"},{"text":"((","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"roleHeading":"Instance Method"},"sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"text":"Adds a factory specific decorator. The decorator will be ","type":"text"},{"inlineContent":[{"type":"text","text":"always"}],"type":"emphasis"},{"text":" be called with the resolved dependency","type":"text"},{"text":" ","type":"text"},{"text":"for further examination or manipulation.","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/decorator(_:)"]}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"decorator","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:s4Voida","text":"Void","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"]}],"kind":"declarations"},{"content":[{"text":"Discussion","type":"heading","anchor":"discussion","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"This includes previously created items that may have been cached by a scope."}]},{"code":["var decoratedService: Factory {"," self { ParentChildService() }"," .decorated {"," $0.child.parent = $0"," }","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"As shown, decorator can come in handy when you need to perform some operation or manipulation after the fact.","type":"text"}]}],"kind":"content"}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","abstract":[],"type":"topic","title":"FactoryModifying Implementations","role":"collectionGroup"},"doc://Factory/documentation/Factory/ParameterFactory/decorator(_:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/decorator(_:)","kind":"symbol","role":"symbol","abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"inlineContent":[{"type":"text","text":"always"}],"type":"emphasis"},{"text":" be called with the resolved dependency","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"for further examination or manipulation."}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"decorator","kind":"identifier"},{"kind":"text","text":"(("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"type":"topic","url":"\/documentation\/factory\/parameterfactory\/decorator(_:)","title":"decorator(_:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"}}} \ No newline at end of file +{"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/decorator(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"kind":"symbol","primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"decorator","kind":"identifier"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"decorator","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:s4Voida","kind":"typeIdentifier","text":"Void"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"platforms":["macOS"]}],"kind":"declarations"},{"kind":"content","content":[{"text":"Discussion","type":"heading","anchor":"discussion","level":2},{"inlineContent":[{"text":"This includes previously created items that may have been cached by a scope.","type":"text"}],"type":"paragraph"},{"syntax":"swift","code":["var decoratedService: Factory {"," self { ParentChildService() }"," .decorated {"," $0.child.parent = $0"," }","}"],"type":"codeListing"},{"inlineContent":[{"text":"As shown, decorator can come in handy when you need to perform some operation or manipulation after the fact.","type":"text"}],"type":"paragraph"}]}],"abstract":[{"text":"Adds a factory specific decorator. The decorator will be ","type":"text"},{"inlineContent":[{"type":"text","text":"always"}],"type":"emphasis"},{"text":" be called with the resolved dependency","type":"text"},{"text":" ","type":"text"},{"text":"for further examination or manipulation.","type":"text"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/decorator(_:)"},"metadata":{"externalID":"s:7Factory0A9ModifyingPAAE9decoratoryxy1TQzcF::SYNTHESIZED::s:7Factory09ParameterA0V","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"decorator","kind":"identifier"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:s4Voida","text":"Void","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"title":"decorator(_:)","role":"symbol","extendedModule":"Factory","symbolKind":"method","roleHeading":"Instance Method"},"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory/ParameterFactory/decorator(_:)":{"url":"\/documentation\/factory\/parameterfactory\/decorator(_:)","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"text":"((","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"type":"emphasis","inlineContent":[{"text":"always","type":"text"}]},{"text":" be called with the resolved dependency","type":"text"},{"text":" ","type":"text"},{"text":"for further examination or manipulation.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/decorator(_:)","type":"topic","title":"decorator(_:)"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ 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 c48d5a09..6a4fae5a 100644 --- a/docs/data/documentation/factory/parameterfactory/factorymodifying-implementations.json +++ b/docs/data/documentation/factory/parameterfactory/factorymodifying-implementations.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"]}],"kind":"article","sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"},"metadata":{"title":"FactoryModifying Implementations","role":"collectionGroup","modules":[{"name":"Factory"}]},"topicSections":[{"generated":true,"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"],"title":"Instance Properties"},{"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\/reset(_:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/scope(_:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/timeToLive(_:)"],"title":"Instance Methods","generated":true}],"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ParameterFactory/onPreview(factory:)":{"title":"onPreview(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onPreview(factory:)","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"type":"topic","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":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/parameterfactory\/onpreview(factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/shared":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/shared","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"},{"text":".","type":"text"}],"role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/parameterfactory\/shared","title":"shared","kind":"symbol","type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory/decorator(_:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/decorator(_:)","kind":"symbol","role":"symbol","abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"inlineContent":[{"type":"text","text":"always"}],"type":"emphasis"},{"text":" be called with the resolved dependency","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"for further examination or manipulation."}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"decorator","kind":"identifier"},{"kind":"text","text":"(("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"type":"topic","url":"\/documentation\/factory\/parameterfactory\/decorator(_:)","title":"decorator(_:)"},"doc://Factory/documentation/Factory/ParameterFactory/onArg(_:factory:)":{"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onArg","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","url":"\/documentation\/factory\/parameterfactory\/onarg(_:factory:)","title":"onArg(_:factory:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArg(_:factory:)"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"type":"topic","url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Shared"}],"abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/timeToLive(_:)":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"timeToLive","kind":"identifier"},{"kind":"text","text":"("},{"text":"TimeInterval","kind":"typeIdentifier","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"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"},{"type":"text","text":"cached item will be discarded and a new instance created."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/timeToLive(_:)","type":"topic","title":"timeToLive(_:)","url":"\/documentation\/factory\/parameterfactory\/timetolive(_:)","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/unique":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/unique","kind":"symbol","title":"unique","role":"symbol","url":"\/documentation\/factory\/parameterfactory\/unique","abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true,"type":"reference"},{"text":".","type":"text"}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory/graph":{"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","url":"\/documentation\/factory\/parameterfactory\/graph","abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","isActive":true,"type":"reference"},{"type":"text","text":"."}],"title":"graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/graph"},"doc://Factory/documentation/Factory/ParameterFactory/scope(_:)":{"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"url":"\/documentation\/factory\/parameterfactory\/scope(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"scope","kind":"identifier"},{"kind":"text","text":"("},{"preciseIdentifier":"s:7Factory5ScopeC","text":"Scope","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"kind":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/scope(_:)","title":"scope(_:)","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/context(_:factory:)":{"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"preciseIdentifier":"s:7Factory0A11ContextTypeO","text":"FactoryContextType","kind":"typeIdentifier"},{"kind":"text","text":"..., "},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/context(_:factory:)","title":"context(_:factory:)","url":"\/documentation\/factory\/parameterfactory\/context(_:factory:)","type":"topic","kind":"symbol","abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}]},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"title":"Scope.Graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/onSimulator(factory:)":{"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"title":"onSimulator(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onSimulator(factory:)","url":"\/documentation\/factory\/parameterfactory\/onsimulator(factory:)","type":"topic","kind":"symbol","abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}]},"doc://Factory/documentation/Factory/ParameterFactory/onDevice(factory:)":{"abstract":[{"text":"Factory builder shortcut for context(.device) { .. }","type":"text"}],"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onDevice","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","url":"\/documentation\/factory\/parameterfactory\/ondevice(factory:)","title":"onDevice(factory:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDevice(factory:)"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/cached-swift.class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","navigatorTitle":[{"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."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/reset(_:)":{"url":"\/documentation\/factory\/parameterfactory\/reset(_:)","type":"topic","abstract":[{"text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope.","type":"text"}],"kind":"symbol","title":"reset(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/reset(_:)","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/once()":{"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"once","kind":"identifier"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol","url":"\/documentation\/factory\/parameterfactory\/once()","title":"once()","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/once()"},"doc://Factory/documentation/Factory/ParameterFactory/singleton":{"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"},{"text":".","type":"text"}],"kind":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","url":"\/documentation\/factory\/parameterfactory\/singleton","title":"singleton","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/singleton"},"doc://Factory/documentation/Factory/ParameterFactory/cached":{"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/parameterfactory\/cached","kind":"symbol","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","type":"reference"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/cached","title":"cached","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/onArgs(_:factory:)":{"kind":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onArgs","kind":"identifier"},{"text":"([","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","url":"\/documentation\/factory\/parameterfactory\/onargs(_:factory:)","title":"onArgs(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArgs(_:factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}]},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","url":"\/documentation\/factory\/scope\/singleton-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"type":"topic","role":"symbol","title":"Scope.Singleton","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/onTest(factory:)":{"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onTest(factory:)","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onTest","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"onTest(factory:)","url":"\/documentation\/factory\/parameterfactory\/ontest(factory:)","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/onDebug(factory:)":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDebug(factory:)","title":"onDebug(factory:)","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/parameterfactory\/ondebug(factory:)","role":"symbol","abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}]}}} \ No newline at end of file +{"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"role":"collectionGroup","title":"FactoryModifying Implementations","modules":[{"name":"Factory"}]},"kind":"article","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"topicSections":[{"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"],"title":"Instance Properties","generated":true},{"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\/reset(_:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/scope(_:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/timeToLive(_:)"],"generated":true,"title":"Instance Methods"}],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"references":{"doc://Factory/documentation/Factory/ParameterFactory/context(_:factory:)":{"type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"context","kind":"identifier"},{"kind":"text","text":"("},{"preciseIdentifier":"s:7Factory0A11ContextTypeO","text":"FactoryContextType","kind":"typeIdentifier"},{"kind":"text","text":"..., "},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"title":"context(_:factory:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/context(_:factory:)","kind":"symbol","url":"\/documentation\/factory\/parameterfactory\/context(_:factory:)","abstract":[{"text":"Registers a factory closure to be used only when running in a specific context.","type":"text"}]},"doc://Factory/documentation/Factory/ParameterFactory/onDebug(factory:)":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDebug(factory:)","abstract":[{"text":"Factory builder shortcut for context(.debug) { .. }","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/parameterfactory\/ondebug(factory:)","role":"symbol","type":"topic","title":"onDebug(factory:)"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","title":"Scope.Singleton","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/onDevice(factory:)":{"type":"topic","title":"onDevice(factory:)","url":"\/documentation\/factory\/parameterfactory\/ondevice(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDevice(factory:)","role":"symbol","abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/decorator(_:)":{"url":"\/documentation\/factory\/parameterfactory\/decorator(_:)","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"text":"((","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"type":"emphasis","inlineContent":[{"text":"always","type":"text"}]},{"text":" be called with the resolved dependency","type":"text"},{"text":" ","type":"text"},{"text":"for further examination or manipulation.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/decorator(_:)","type":"topic","title":"decorator(_:)"},"doc://Factory/documentation/Factory/ParameterFactory/onSimulator(factory:)":{"title":"onSimulator(factory:)","type":"topic","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onSimulator"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onSimulator(factory:)","abstract":[{"text":"Factory builder shortcut for context(.simulator) { .. }","type":"text"}],"url":"\/documentation\/factory\/parameterfactory\/onsimulator(factory:)"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Cached","kind":"identifier"}],"type":"topic","navigatorTitle":[{"text":"Cached","kind":"identifier"}],"role":"symbol","kind":"symbol","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","title":"Scope.Cached","url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Shared","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/cached":{"role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"cached","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"kind":"symbol","title":"cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/cached","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","isActive":true,"type":"reference"},{"text":".","type":"text"}],"url":"\/documentation\/factory\/parameterfactory\/cached"},"doc://Factory/documentation/Factory/ParameterFactory/once()":{"kind":"symbol","role":"symbol","type":"topic","abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/once()","url":"\/documentation\/factory\/parameterfactory\/once()","title":"once()","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"once","kind":"identifier"},{"kind":"text","text":"() -> "},{"text":"Self","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory/ParameterFactory/graph":{"title":"graph","url":"\/documentation\/factory\/parameterfactory\/graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/graph","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"graph","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"text":".","type":"text"}],"kind":"symbol","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/onArg(_:factory:)":{"kind":"symbol","url":"\/documentation\/factory\/parameterfactory\/onarg(_:factory:)","title":"onArg(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onArg","kind":"identifier"},{"kind":"text","text":"("},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArg(_:factory:)","abstract":[{"text":"Factory builder shortcut for context(.arg(“test”) { .. }","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/singleton":{"title":"singleton","url":"\/documentation\/factory\/parameterfactory\/singleton","kind":"symbol","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","isActive":true},{"text":".","type":"text"}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/singleton","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory/onPreview(factory:)":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onPreview","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onPreview(factory:)","url":"\/documentation\/factory\/parameterfactory\/onpreview(factory:)","role":"symbol","title":"onPreview(factory:)","kind":"symbol","abstract":[{"text":"Factory builder shortcut for context(.preview) { .. }","type":"text"}],"type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory/scope(_:)":{"abstract":[{"text":"Defines a dependency scope for this Factory. See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true},{"type":"text","text":"."}],"title":"scope(_:)","type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/parameterfactory\/scope(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/scope(_:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory/ParameterFactory/timeToLive(_:)":{"role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"timeToLive","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"c:@T@NSTimeInterval","text":"TimeInterval"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"kind":"symbol","title":"timeToLive(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/timeToLive(_:)","abstract":[{"type":"text","text":"Adds time to live option for scopes. If the dependency has been cached for longer than the timeToLive period the"},{"text":" ","type":"text"},{"type":"text","text":"cached item will be discarded and a new instance created."}],"url":"\/documentation\/factory\/parameterfactory\/timetolive(_:)"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/reset(_:)":{"title":"reset(_:)","url":"\/documentation\/factory\/parameterfactory\/reset(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/reset(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"kind":"symbol","abstract":[{"text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope.","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/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 "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class"},{"text":".","type":"text"}],"url":"\/documentation\/factory\/parameterfactory\/shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/shared","kind":"symbol","title":"shared","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","title":"Scope.Graph","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"navigatorTitle":[{"text":"Graph","kind":"identifier"}],"role":"symbol","abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory/ParameterFactory/onArgs(_:factory:)":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArgs"},{"text":"([","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":"], "},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArgs(_:factory:)","url":"\/documentation\/factory\/parameterfactory\/onargs(_:factory:)","role":"symbol","title":"onArgs(_:factory:)","kind":"symbol","abstract":[{"text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }","type":"text"}],"type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory/unique":{"url":"\/documentation\/factory\/parameterfactory\/unique","abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"reference"},{"type":"text","text":"."}],"type":"topic","title":"unique","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/unique","role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"unique","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ParameterFactory/onTest(factory:)":{"kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","type":"topic","title":"onTest(factory:)","url":"\/documentation\/factory\/parameterfactory\/ontest(factory:)","abstract":[{"text":"Factory builder shortcut for context(.test) { .. }","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onTest(factory:)"}}} \ 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 63882ed9..ee0446f5 100644 --- a/docs/data/documentation/factory/parameterfactory/graph.json +++ b/docs/data/documentation/factory/parameterfactory/graph.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"graph","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"platforms":["macOS"]}]},{"kind":"content","content":[{"text":"Discussion","type":"heading","level":2,"anchor":"discussion"},{"type":"codeListing","code":["var service: Factory {"," factory { MyService() }"," .graph","}"],"syntax":"swift"}]}],"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/parameterfactory\/graph"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"symbolKind":"property","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"graph","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"extendedModule":"Factory","roleHeading":"Instance Property","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE5graphxvp::SYNTHESIZED::s:7Factory09ParameterA0V","title":"graph","modules":[{"name":"Factory"}]},"sections":[],"abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/graph","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"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":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","abstract":[],"type":"topic","title":"FactoryModifying Implementations","role":"collectionGroup"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"title":"Scope.Graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/graph":{"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","url":"\/documentation\/factory\/parameterfactory\/graph","abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","isActive":true,"type":"reference"},{"type":"text","text":"."}],"title":"graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/graph"},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"schemaVersion":{"minor":3,"major":0,"patch":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/graph"},"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","isActive":true},{"type":"text","text":"."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"metadata":{"title":"graph","modules":[{"name":"Factory"}],"roleHeading":"Instance Property","extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE5graphxvp::SYNTHESIZED::s:7Factory09ParameterA0V","symbolKind":"property","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"graph","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol"},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/graph"]}],"sections":[],"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"graph","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}],"platforms":["macOS"]}],"kind":"declarations"},{"kind":"content","content":[{"text":"Discussion","anchor":"discussion","type":"heading","level":2},{"code":["var service: Factory {"," factory { MyService() }"," .graph","}"],"syntax":"swift","type":"codeListing"}]}],"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/graph":{"title":"graph","url":"\/documentation\/factory\/parameterfactory\/graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/graph","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"graph","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"text":".","type":"text"}],"kind":"symbol","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","title":"Scope.Graph","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"navigatorTitle":[{"text":"Graph","kind":"identifier"}],"role":"symbol","abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/init(_:key:_:).json b/docs/data/documentation/factory/parameterfactory/init(_:key:_:).json index 136debf4..76419a9b 100644 --- a/docs/data/documentation/factory/parameterfactory/init(_:key:_:).json +++ b/docs/data/documentation/factory/parameterfactory/init(_:key:_:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"init"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"container"},{"kind":"text","text":": "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP","kind":"typeIdentifier","text":"ManagedContainer"},{"kind":"text","text":", "},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s12StaticStringV","text":"StaticString","kind":"typeIdentifier"},{"text":" = ","kind":"text"},{"text":"#function","kind":"keyword"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"factory","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":")","kind":"text"}]}]},{"kind":"parameters","parameters":[{"name":"container","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The bound container that manages registrations and scope caching for this Factory. The scope helper functions bind the"},{"type":"text","text":" "},{"text":"current container as well defining the scope.","type":"text"}]}]},{"content":[{"inlineContent":[{"type":"text","text":"Hidden value used to differentiate different instances of the same type in the same container."}],"type":"paragraph"}],"name":"key"},{"name":"factory","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"A factory closure that produces an object of the desired type when required."}]}]}]},{"content":[{"level":2,"anchor":"discussion","type":"heading","text":"Discussion"},{"code":["var parameterService: ParameterFactory {"," self { ParameterService(value: $0) }","}"],"syntax":"swift","type":"codeListing"}],"kind":"content"}],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/init(_:key:_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"abstract":[{"type":"text","text":"Public initializer creates a factory capable of taking parameters at runtime."}],"metadata":{"modules":[{"name":"Factory"}],"role":"symbol","roleHeading":"Initializer","externalID":"s:7Factory09ParameterA0V_3key_ACyxq_GAA16ManagedContainer_p_s12StaticStringVq_xctcfc","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"ManagedContainer","kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ManagedContainerP"},{"kind":"text","text":", "},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"text":", (","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":")"}],"title":"init(_:key:_:)","symbolKind":"init"},"schemaVersion":{"minor":3,"major":0,"patch":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/init(_:key:_:)"},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"kind":"symbol","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer","role":"symbol","url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory/ParameterFactory/init(_:key:_:)":{"role":"symbol","abstract":[{"type":"text","text":"Public initializer creates a factory capable of taking parameters at runtime."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/init(_:key:_:)","title":"init(_:key:_:)","kind":"symbol","fragments":[{"kind":"identifier","text":"init"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP"},{"kind":"text","text":", "},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"text":", (","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"},{"text":")","kind":"text"}],"url":"\/documentation\/factory\/parameterfactory\/init(_:key:_:)"}}} \ No newline at end of file +{"sections":[],"metadata":{"symbolKind":"init","roleHeading":"Initializer","role":"symbol","title":"init(_:key:_:)","externalID":"s:7Factory09ParameterA0V_3key_ACyxq_GAA16ManagedContainer_p_s12StaticStringVq_xctcfc","modules":[{"name":"Factory"}],"fragments":[{"kind":"identifier","text":"init"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP"},{"text":", ","kind":"text"},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"text":", (","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":")","kind":"text"}]},"schemaVersion":{"minor":3,"major":0,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"init","kind":"keyword"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"container","kind":"internalParam"},{"kind":"text","text":": "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP","kind":"typeIdentifier","text":"ManagedContainer"},{"text":", ","kind":"text"},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"text":" = ","kind":"text"},{"text":"#function","kind":"keyword"},{"text":", ","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"factory","kind":"internalParam"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":")","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}]},{"kind":"parameters","parameters":[{"name":"container","content":[{"type":"paragraph","inlineContent":[{"text":"The bound container that manages registrations and scope caching for this Factory. The scope helper functions bind the","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"current container as well defining the scope."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"text":"Hidden value used to differentiate different instances of the same type in the same container.","type":"text"}]}],"name":"key"},{"name":"factory","content":[{"type":"paragraph","inlineContent":[{"text":"A factory closure that produces an object of the desired type when required.","type":"text"}]}]}]},{"kind":"content","content":[{"text":"Discussion","level":2,"anchor":"discussion","type":"heading"},{"type":"codeListing","syntax":"swift","code":["var parameterService: ParameterFactory {"," self { ParameterService(value: $0) }","}"]}]}],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/init(_:key:_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"type":"text","text":"Public initializer creates a factory capable of taking parameters at runtime."}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/init(_:key:_:)"},"references":{"doc://Factory/documentation/Factory/ManagedContainer":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"text":"ManagedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"type":"topic","url":"\/documentation\/factory\/managedcontainer","title":"ManagedContainer"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/init(_:key:_:)":{"fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"ManagedContainer","kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ManagedContainerP"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":", ("},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":")"}],"type":"topic","url":"\/documentation\/factory\/parameterfactory\/init(_:key:_:)","role":"symbol","title":"init(_:key:_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/init(_:key:_:)","abstract":[{"type":"text","text":"Public initializer creates a factory capable of taking parameters at runtime."}],"kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/onarg(_:factory:).json b/docs/data/documentation/factory/parameterfactory/onarg(_:factory:).json index 158e2da0..ca1738b8 100644 --- a/docs/data/documentation/factory/parameterfactory/onarg(_:factory:).json +++ b/docs/data/documentation/factory/parameterfactory/onarg(_:factory:).json @@ -1 +1 @@ -{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/onarg(_:factory:)"]}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"argument","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}]}],"kind":"declarations"}],"schemaVersion":{"minor":3,"major":0,"patch":0},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArg(_:factory:)","interfaceLanguage":"swift"},"metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"externalID":"s:7Factory0A9ModifyingPAAE5onArg_7factoryxSS_1TQz1PQzctF::SYNTHESIZED::s:7Factory09ParameterA0V","title":"onArg(_:factory:)","roleHeading":"Instance Method","extendedModule":"Factory","modules":[{"name":"Factory"}],"role":"symbol","symbolKind":"method"},"references":{"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","abstract":[],"type":"topic","title":"FactoryModifying Implementations","role":"collectionGroup"},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ParameterFactory/onArg(_:factory:)":{"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onArg","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","url":"\/documentation\/factory\/parameterfactory\/onarg(_:factory:)","title":"onArg(_:factory:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArg(_:factory:)"}}} \ No newline at end of file +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArg(_:factory:)"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/onarg(_:factory:)"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"kind":"symbol","sections":[],"metadata":{"extendedModule":"Factory","roleHeading":"Instance Method","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onArg","kind":"identifier"},{"text":"(","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"title":"onArg(_:factory:)","role":"symbol","symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE5onArg_7factoryxSS_1TQz1PQzctF::SYNTHESIZED::s:7Factory09ParameterA0V"},"schemaVersion":{"major":0,"patch":0,"minor":3},"abstract":[{"text":"Factory builder shortcut for context(.arg(“test”) { .. }","type":"text"}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArg"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"argument"},{"kind":"text","text":": "},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory/ParameterFactory/onArg(_:factory:)":{"kind":"symbol","url":"\/documentation\/factory\/parameterfactory\/onarg(_:factory:)","title":"onArg(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onArg","kind":"identifier"},{"kind":"text","text":"("},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArg(_:factory:)","abstract":[{"text":"Factory builder shortcut for context(.arg(“test”) { .. }","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","abstract":[],"kind":"article"}}} \ 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 7deb31fc..8859f4d8 100644 --- a/docs/data/documentation/factory/parameterfactory/onargs(_:factory:).json +++ b/docs/data/documentation/factory/parameterfactory/onargs(_:factory:).json @@ -1 +1 @@ -{"sections":[],"schemaVersion":{"major":0,"patch":0,"minor":3},"kind":"symbol","primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArgs"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"args","kind":"internalParam"},{"kind":"text","text":": ["},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":"], "},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/onargs(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"role":"symbol","title":"onArgs(_:factory:)","roleHeading":"Instance Method","symbolKind":"method","extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE6onArgs_7factoryxSaySSG_1TQz1PQzctF::SYNTHESIZED::s:7Factory09ParameterA0V","modules":[{"name":"Factory"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArgs"},{"text":"([","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"text":"factory","kind":"externalParam"},{"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":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArgs(_:factory:)","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/onArgs(_:factory:)":{"kind":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onArgs","kind":"identifier"},{"text":"([","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","url":"\/documentation\/factory\/parameterfactory\/onargs(_:factory:)","title":"onArgs(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArgs(_:factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","abstract":[],"type":"topic","title":"FactoryModifying Implementations","role":"collectionGroup"}}} \ No newline at end of file +{"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onArgs","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"args","kind":"internalParam"},{"kind":"text","text":": ["},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"text":"], ","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/onargs(_:factory:)"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArgs(_:factory:)"},"sections":[],"metadata":{"roleHeading":"Instance Method","title":"onArgs(_:factory:)","extendedModule":"Factory","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"text":"([","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":"], ","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE6onArgs_7factoryxSaySSG_1TQz1PQzctF::SYNTHESIZED::s:7Factory09ParameterA0V"},"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"abstract":[{"text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }","type":"text"}],"references":{"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/onArgs(_:factory:)":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArgs"},{"text":"([","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":"], "},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArgs(_:factory:)","url":"\/documentation\/factory\/parameterfactory\/onargs(_:factory:)","role":"symbol","title":"onArgs(_:factory:)","kind":"symbol","abstract":[{"text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }","type":"text"}],"type":"topic"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ 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 6591f24f..33015fa1 100644 --- a/docs/data/documentation/factory/parameterfactory/once().json +++ b/docs/data/documentation/factory/parameterfactory/once().json @@ -1 +1 @@ -{"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"once","kind":"identifier"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/once()"]}],"metadata":{"extendedModule":"Factory","roleHeading":"Instance Method","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE4oncexyF::SYNTHESIZED::s:7Factory09ParameterA0V","symbolKind":"method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"text":"() -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"title":"once()","role":"symbol"},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/once()","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","abstract":[],"type":"topic","title":"FactoryModifying Implementations","role":"collectionGroup"},"doc://Factory/documentation/Factory/ParameterFactory/once()":{"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"once","kind":"identifier"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol","url":"\/documentation\/factory\/parameterfactory\/once()","title":"once()","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/once()"},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"sections":[],"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"title":"once()","roleHeading":"Instance Method","role":"symbol","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE4oncexyF::SYNTHESIZED::s:7Factory09ParameterA0V","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"once"},{"text":"() -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"extendedModule":"Factory"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"once","kind":"identifier"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}]}]}],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/once()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/once()"},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory/ParameterFactory/once()":{"kind":"symbol","role":"symbol","type":"topic","abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/once()","url":"\/documentation\/factory\/parameterfactory\/once()","title":"once()","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"once","kind":"identifier"},{"kind":"text","text":"() -> "},{"text":"Self","kind":"typeIdentifier"}]}}} \ 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 e01cf63b..663c638f 100644 --- a/docs/data/documentation/factory/parameterfactory/ondebug(factory:).json +++ b/docs/data/documentation/factory/parameterfactory/ondebug(factory:).json @@ -1 +1 @@ -{"schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/ondebug(factory:)"]}],"sections":[],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onDebug","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"]}],"kind":"declarations"}],"metadata":{"externalID":"s:7Factory0A9ModifyingPAAE7onDebug7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","roleHeading":"Instance Method","title":"onDebug(factory:)","modules":[{"name":"Factory"}],"role":"symbol","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}]},"abstract":[{"text":"Factory builder shortcut for context(.debug) { .. }","type":"text"}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDebug(factory:)","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/ParameterFactory/onDebug(factory:)":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDebug(factory:)","title":"onDebug(factory:)","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/parameterfactory\/ondebug(factory:)","role":"symbol","abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","abstract":[],"type":"topic","title":"FactoryModifying Implementations","role":"collectionGroup"},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"}}} \ No newline at end of file +{"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/ondebug(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onDebug","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}]}]}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDebug(factory:)"},"metadata":{"role":"symbol","title":"onDebug(factory:)","extendedModule":"Factory","roleHeading":"Instance Method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onDebug"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE7onDebug7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","symbolKind":"method"},"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ParameterFactory/onDebug(factory:)":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDebug(factory:)","abstract":[{"text":"Factory builder shortcut for context(.debug) { .. }","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/parameterfactory\/ondebug(factory:)","role":"symbol","type":"topic","title":"onDebug(factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","abstract":[],"kind":"article"}}} \ 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 979d7ce0..375847e1 100644 --- a/docs/data/documentation/factory/parameterfactory/ondevice(factory:).json +++ b/docs/data/documentation/factory/parameterfactory/ondevice(factory:).json @@ -1 +1 @@ -{"schemaVersion":{"major":0,"minor":3,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDevice(factory:)","interfaceLanguage":"swift"},"sections":[],"metadata":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"externalID":"s:7Factory0A9ModifyingPAAE8onDevice7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","title":"onDevice(factory:)","extendedModule":"Factory","role":"symbol","symbolKind":"method","modules":[{"name":"Factory"}],"roleHeading":"Instance Method"},"kind":"symbol","abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onDevice","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/ondevice(factory:)"]}],"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","abstract":[],"type":"topic","title":"FactoryModifying Implementations","role":"collectionGroup"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ParameterFactory/onDevice(factory:)":{"abstract":[{"text":"Factory builder shortcut for context(.device) { .. }","type":"text"}],"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onDevice","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","url":"\/documentation\/factory\/parameterfactory\/ondevice(factory:)","title":"onDevice(factory:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDevice(factory:)"}}} \ No newline at end of file +{"abstract":[{"text":"Factory builder shortcut for context(.device) { .. }","type":"text"}],"metadata":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"roleHeading":"Instance Method","role":"symbol","title":"onDevice(factory:)","externalID":"s:7Factory0A9ModifyingPAAE8onDevice7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}],"symbolKind":"method"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"kind":"symbol","primaryContentSections":[{"declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onDevice","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/ondevice(factory:)"]}],"sections":[],"schemaVersion":{"patch":0,"minor":3,"major":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDevice(factory:)","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/ParameterFactory/onDevice(factory:)":{"type":"topic","title":"onDevice(factory:)","url":"\/documentation\/factory\/parameterfactory\/ondevice(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDevice(factory:)","role":"symbol","abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"type":"topic","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","title":"ParameterFactory","kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","abstract":[],"kind":"article"}}} \ 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 8f8af478..5259d1b2 100644 --- a/docs/data/documentation/factory/parameterfactory/onpreview(factory:).json +++ b/docs/data/documentation/factory/parameterfactory/onpreview(factory:).json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/onpreview(factory:)"]}],"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onPreview(factory:)"},"metadata":{"extendedModule":"Factory","modules":[{"name":"Factory"}],"role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE9onPreview7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","roleHeading":"Instance Method","symbolKind":"method","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onPreview","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"onPreview(factory:)"},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onPreview","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"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":"declarations"}],"schemaVersion":{"minor":3,"major":0,"patch":0},"sections":[],"abstract":[{"text":"Factory builder shortcut for context(.preview) { .. }","type":"text"}],"references":{"doc://Factory/documentation/Factory/ParameterFactory/onPreview(factory:)":{"title":"onPreview(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onPreview(factory:)","role":"symbol","kind":"symbol","abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"type":"topic","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":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/parameterfactory\/onpreview(factory:)"},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","abstract":[],"type":"topic","title":"FactoryModifying Implementations","role":"collectionGroup"}}} \ No newline at end of file +{"sections":[],"schemaVersion":{"patch":0,"minor":3,"major":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onPreview(factory:)"},"kind":"symbol","primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/onpreview(factory:)"]}],"metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onPreview","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"externalID":"s:7Factory0A9ModifyingPAAE9onPreview7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","modules":[{"name":"Factory"}],"role":"symbol","extendedModule":"Factory","title":"onPreview(factory:)","symbolKind":"method","roleHeading":"Instance Method"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"references":{"doc://Factory/documentation/Factory/ParameterFactory/onPreview(factory:)":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onPreview","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onPreview(factory:)","url":"\/documentation\/factory\/parameterfactory\/onpreview(factory:)","role":"symbol","title":"onPreview(factory:)","kind":"symbol","abstract":[{"text":"Factory builder shortcut for context(.preview) { .. }","type":"text"}],"type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","abstract":[],"kind":"article"}}} \ 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 c43ff04c..0406d71f 100644 --- a/docs/data/documentation/factory/parameterfactory/onsimulator(factory:).json +++ b/docs/data/documentation/factory/parameterfactory/onsimulator(factory:).json @@ -1 +1 @@ -{"abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onSimulator","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]}]}],"metadata":{"roleHeading":"Instance Method","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE11onSimulator7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","symbolKind":"method","extendedModule":"Factory","title":"onSimulator(factory:)","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onSimulator"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onSimulator(factory:)","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/onsimulator(factory:)"]}],"kind":"symbol","sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"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","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"title":"onSimulator(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onSimulator(factory:)","url":"\/documentation\/factory\/parameterfactory\/onsimulator(factory:)","type":"topic","kind":"symbol","abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","abstract":[],"type":"topic","title":"FactoryModifying Implementations","role":"collectionGroup"}}} \ No newline at end of file +{"sections":[],"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"externalID":"s:7Factory0A9ModifyingPAAE11onSimulator7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","symbolKind":"method","role":"symbol","title":"onSimulator(factory:)","extendedModule":"Factory"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onSimulator(factory:)","interfaceLanguage":"swift"},"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onSimulator","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}]}],"kind":"declarations"}],"kind":"symbol","abstract":[{"text":"Factory builder shortcut for context(.simulator) { .. }","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/onsimulator(factory:)"]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/onSimulator(factory:)":{"title":"onSimulator(factory:)","type":"topic","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onSimulator"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onSimulator(factory:)","abstract":[{"text":"Factory builder shortcut for context(.simulator) { .. }","type":"text"}],"url":"\/documentation\/factory\/parameterfactory\/onsimulator(factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","abstract":[],"kind":"article"}}} \ 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 487f1cd9..6b71010f 100644 --- a/docs/data/documentation/factory/parameterfactory/ontest(factory:).json +++ b/docs/data/documentation/factory/parameterfactory/ontest(factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onTest","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onTest(factory:)","interfaceLanguage":"swift"},"schemaVersion":{"patch":0,"minor":3,"major":0},"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/ontest(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"kind":"symbol","metadata":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"roleHeading":"Instance Method","title":"onTest(factory:)","externalID":"s:7Factory0A9ModifyingPAAE6onTest7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}],"role":"symbol","symbolKind":"method"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"abstract":[{"text":"Factory builder shortcut for context(.test) { .. }","type":"text"}],"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/onTest(factory:)":{"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onTest(factory:)","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onTest","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"onTest(factory:)","url":"\/documentation\/factory\/parameterfactory\/ontest(factory:)","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","abstract":[],"type":"topic","title":"FactoryModifying Implementations","role":"collectionGroup"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"schemaVersion":{"minor":3,"major":0,"patch":0},"kind":"symbol","primaryContentSections":[{"declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onTest","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onTest(factory:)","interfaceLanguage":"swift"},"metadata":{"roleHeading":"Instance Method","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE6onTest7factoryx1TQz1PQzc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onTest","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"extendedModule":"Factory","role":"symbol","title":"onTest(factory:)"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/ontest(factory:)"]}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"sections":[],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/onTest(factory:)":{"kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","type":"topic","title":"onTest(factory:)","url":"\/documentation\/factory\/parameterfactory\/ontest(factory:)","abstract":[{"text":"Factory builder shortcut for context(.test) { .. }","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onTest(factory:)"}}} \ 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 792f0e7f..fae1ae66 100644 --- a/docs/data/documentation/factory/parameterfactory/register(factory:).json +++ b/docs/data/documentation/factory/parameterfactory/register(factory:).json @@ -1 +1 @@ -{"sections":[],"metadata":{"title":"register(factory:)","role":"symbol","modules":[{"name":"Factory"}],"externalID":"s:7Factory09ParameterA0V8register7factoryACyxq_Gq_xc_tF","roleHeading":"Instance Method","symbolKind":"method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"register","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"register","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory"},{"text":"<","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"text":"Discussion","level":2,"anchor":"discussion","type":"heading"},{"syntax":"swift","code":["container.parameterService.register { n in"," ParameterService(value: n)","}"],"type":"codeListing"},{"items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"factory: A new factory closure that produces an object of the desired type when needed."}]}]}],"type":"unorderedList"}]}],"abstract":[{"text":"Registers a new factory capable of taking parameters at runtime.","type":"text"}],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/register(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(factory:)"},"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory/register(factory:)":{"title":"register(factory:)","type":"topic","role":"symbol","url":"\/documentation\/factory\/parameterfactory\/register(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(factory:)","kind":"symbol","abstract":[{"text":"Registers a new factory capable of taking parameters at runtime.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"register"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}]},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"metadata":{"modules":[{"name":"Factory"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"register","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"ParameterFactory","kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V"},{"text":"<","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"roleHeading":"Instance Method","title":"register(factory:)","role":"symbol","externalID":"s:7Factory09ParameterA0V8register7factoryACyxq_Gq_xc_tF","symbolKind":"method"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"kind":"symbol","schemaVersion":{"minor":3,"major":0,"patch":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(factory:)","interfaceLanguage":"swift"},"sections":[],"abstract":[{"text":"Registers a new factory capable of taking parameters at runtime.","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/register(factory:)"]}],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:7Factory09ParameterA0V","kind":"typeIdentifier","text":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"code":["container.parameterService.register { n in"," ParameterService(value: n)","}"],"type":"codeListing","syntax":"swift"},{"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."}]}]}]}]}],"references":{"doc://Factory/documentation/Factory/ParameterFactory/register(factory:)":{"url":"\/documentation\/factory\/parameterfactory\/register(factory:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"register","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"type":"topic","title":"register(factory:)","abstract":[{"text":"Registers a new factory capable of taking parameters at runtime.","type":"text"}],"role":"symbol","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(factory:)"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"}}} \ 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 13a68562..816d8d90 100644 --- a/docs/data/documentation/factory/parameterfactory/registration.json +++ b/docs/data/documentation/factory/parameterfactory/registration.json @@ -1 +1 @@ -{"metadata":{"modules":[{"name":"Factory"}],"role":"symbol","roleHeading":"Instance Property","externalID":"s:7Factory09ParameterA0V12registrationAA0A12RegistrationVyxq_Gvp","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"registration"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12RegistrationV","text":"FactoryRegistration"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"title":"registration","symbolKind":"property"},"abstract":[{"type":"text","text":"Required registration"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"registration","kind":"identifier"},{"text":": ","kind":"text"},{"text":"FactoryRegistration","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/registration"]}],"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/registration"},"references":{"doc://Factory/documentation/Factory/FactoryRegistration":{"title":"FactoryRegistration","type":"topic","url":"\/documentation\/factory\/factoryregistration","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","role":"symbol","navigatorTitle":[{"text":"FactoryRegistration","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryRegistration","kind":"identifier"}],"kind":"symbol","abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}]},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/registration":{"url":"\/documentation\/factory\/parameterfactory\/registration","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A12RegistrationV","text":"FactoryRegistration","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/registration","title":"registration","abstract":[{"type":"text","text":"Required registration"}],"kind":"symbol","type":"topic"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"schemaVersion":{"minor":3,"patch":0,"major":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/registration"},"abstract":[{"type":"text","text":"Required registration"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"metadata":{"title":"registration","modules":[{"name":"Factory"}],"roleHeading":"Instance Property","symbolKind":"property","externalID":"s:7Factory09ParameterA0V12registrationAA0A12RegistrationVyxq_Gvp","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"registration"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A12RegistrationV","text":"FactoryRegistration","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"role":"symbol"},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/registration"]}],"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"FactoryRegistration","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"platforms":["macOS"]}]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ParameterFactory/registration":{"title":"registration","url":"\/documentation\/factory\/parameterfactory\/registration","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/registration","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"registration","kind":"identifier"},{"text":": ","kind":"text"},{"text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Required registration"}],"kind":"symbol","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/FactoryRegistration":{"url":"\/documentation\/factory\/factoryregistration","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","title":"FactoryRegistration","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"}],"kind":"symbol","role":"symbol","type":"topic"}}} \ 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 1df6fad9..30ced299 100644 --- a/docs/data/documentation/factory/parameterfactory/reset(_:).json +++ b/docs/data/documentation/factory/parameterfactory/reset(_:).json @@ -1 +1 @@ -{"schemaVersion":{"major":0,"minor":3,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"metadata":{"symbolKind":"method","modules":[{"name":"Factory"}],"extendedModule":"Factory","role":"symbol","title":"reset(_:)","externalID":"s:7Factory0A9ModifyingPAAE5resetyxAA0A12ResetOptionsOF::SYNTHESIZED::s:7Factory09ParameterA0V","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier","text":"FactoryResetOptions"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"roleHeading":"Instance Method"},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"options"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":" = .all) -> "},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"parameters":[{"name":"options","content":[{"type":"paragraph","inlineContent":[{"text":"options description","type":"text"}]}]}],"kind":"parameters"}],"sections":[],"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","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/reset(_:)"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/reset(_:)"]}],"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","abstract":[],"type":"topic","title":"FactoryModifying Implementations","role":"collectionGroup"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"title":"FactoryResetOptions"},"doc://Factory/documentation/Factory/ParameterFactory/reset(_:)":{"url":"\/documentation\/factory\/parameterfactory\/reset(_:)","type":"topic","abstract":[{"text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope.","type":"text"}],"kind":"symbol","title":"reset(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/reset(_:)","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]}}} \ No newline at end of file +{"sections":[],"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Instance Method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"externalID":"s:7Factory0A9ModifyingPAAE5resetyxAA0A12ResetOptionsOF::SYNTHESIZED::s:7Factory09ParameterA0V","symbolKind":"method","role":"symbol","title":"reset(_:)","extendedModule":"Factory"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/reset(_:)"},"schemaVersion":{"minor":3,"patch":0,"major":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"options"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","text":"FactoryResetOptions"},{"text":" = .all) -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]}]},{"kind":"parameters","parameters":[{"name":"options","content":[{"inlineContent":[{"type":"text","text":"options description"}],"type":"paragraph"}]}]}],"kind":"symbol","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."}],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/reset(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/ParameterFactory/reset(_:)":{"title":"reset(_:)","url":"\/documentation\/factory\/parameterfactory\/reset(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/reset(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"kind":"symbol","abstract":[{"text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope.","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","title":"FactoryResetOptions","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryResetOptions","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol"}}} \ 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 fcfaa610..b242c50d 100644 --- a/docs/data/documentation/factory/parameterfactory/resolve(_:).json +++ b/docs/data/documentation/factory/parameterfactory/resolve(_:).json @@ -1 +1 @@ -{"kind":"symbol","sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/resolve(_:)","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/resolve(_:)"]}],"metadata":{"externalID":"s:7Factory09ParameterA0V7resolveyq_xF","modules":[{"name":"Factory"}],"roleHeading":"Instance Method","title":"resolve(_:)","role":"symbol","symbolKind":"method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"}]},"abstract":[{"text":"Unsugared resolution function.","type":"text"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"parameters"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"}],"platforms":["macOS"]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory/ParameterFactory/resolve(_:)":{"url":"\/documentation\/factory\/parameterfactory\/resolve(_:)","title":"resolve(_:)","role":"symbol","kind":"symbol","abstract":[{"text":"Unsugared resolution function.","type":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/resolve(_:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"}}} \ No newline at end of file +{"sections":[],"schemaVersion":{"minor":3,"major":0,"patch":0},"abstract":[{"type":"text","text":"Unsugared resolution function."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/resolve(_:)","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"parameters","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/resolve(_:)"]}],"metadata":{"roleHeading":"Instance Method","externalID":"s:7Factory09ParameterA0V7resolveyq_xF","title":"resolve(_:)","role":"symbol","modules":[{"name":"Factory"}],"symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"}]},"references":{"doc://Factory/documentation/Factory/ParameterFactory/resolve(_:)":{"kind":"symbol","url":"\/documentation\/factory\/parameterfactory\/resolve(_:)","title":"resolve(_:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/resolve(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"(","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"}],"type":"topic","abstract":[{"type":"text","text":"Unsugared resolution function."}]},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ 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 067283a1..06277e2e 100644 --- a/docs/data/documentation/factory/parameterfactory/scope(_:).json +++ b/docs/data/documentation/factory/parameterfactory/scope(_:).json @@ -1 +1 @@ -{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/scope(_:)"},"sections":[],"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"metadata":{"title":"scope(_:)","roleHeading":"Instance Method","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"modules":[{"name":"Factory"}],"role":"symbol","extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE5scopeyxAA5ScopeCF::SYNTHESIZED::s:7Factory09ParameterA0V"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"],"platforms":["macOS"]}]},{"content":[{"type":"heading","text":"Discussion","anchor":"discussion","level":2},{"syntax":"swift","type":"codeListing","code":["var service: Factory {"," self { MyService() }"," .scope(.session)","}"]}],"kind":"content"}],"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true,"type":"reference"},{"type":"text","text":"."}],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/scope(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","abstract":[],"type":"topic","title":"FactoryModifying Implementations","role":"collectionGroup"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ParameterFactory/scope(_:)":{"abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"url":"\/documentation\/factory\/parameterfactory\/scope(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"scope","kind":"identifier"},{"kind":"text","text":"("},{"preciseIdentifier":"s:7Factory5ScopeC","text":"Scope","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"kind":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/scope(_:)","title":"scope(_:)","role":"symbol"}}} \ No newline at end of file +{"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"metadata":{"roleHeading":"Instance Method","title":"scope(_:)","role":"symbol","extendedModule":"Factory","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE5scopeyxAA5ScopeCF::SYNTHESIZED::s:7Factory09ParameterA0V","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"scope","kind":"identifier"},{"text":"(","kind":"text"},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method"},"schemaVersion":{"minor":3,"patch":0,"major":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/scope(_:)","interfaceLanguage":"swift"},"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"scope"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier","text":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"]}]},{"kind":"content","content":[{"text":"Discussion","level":2,"anchor":"discussion","type":"heading"},{"code":["var service: Factory {"," self { MyService() }"," .scope(.session)","}"],"type":"codeListing","syntax":"swift"}]}],"abstract":[{"text":"Defines a dependency scope for this Factory. See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true},{"type":"text","text":"."}],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/scope(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/scope(_:)":{"abstract":[{"text":"Defines a dependency scope for this Factory. See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true},{"type":"text","text":"."}],"title":"scope(_:)","type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/parameterfactory\/scope(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/scope(_:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","abstract":[],"kind":"article"}}} \ 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 cb24e926..44b9c5b8 100644 --- a/docs/data/documentation/factory/parameterfactory/shared.json +++ b/docs/data/documentation/factory/parameterfactory/shared.json @@ -1 +1 @@ -{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/shared"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","type":"reference","isActive":true},{"type":"text","text":"."}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"]}],"kind":"declarations"},{"content":[{"type":"heading","level":2,"anchor":"discussion","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .shared","}"]}],"kind":"content"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/shared"]}],"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"sections":[],"metadata":{"roleHeading":"Instance Property","symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE6sharedxvp::SYNTHESIZED::s:7Factory09ParameterA0V","role":"symbol","extendedModule":"Factory","modules":[{"name":"Factory"}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"shared"},"references":{"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"type":"topic","url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Shared"}],"abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/shared":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/shared","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"},{"text":".","type":"text"}],"role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/parameterfactory\/shared","title":"shared","kind":"symbol","type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","abstract":[],"type":"topic","title":"FactoryModifying Implementations","role":"collectionGroup"}}} \ No newline at end of file +{"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/shared","interfaceLanguage":"swift"},"abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","isActive":true,"type":"reference"},{"type":"text","text":"."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"metadata":{"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"extendedModule":"Factory","symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE6sharedxvp::SYNTHESIZED::s:7Factory09ParameterA0V","roleHeading":"Instance Property","title":"shared","modules":[{"name":"Factory"}],"role":"symbol"},"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/parameterfactory\/shared"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"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":"declarations"},{"kind":"content","content":[{"text":"Discussion","type":"heading","anchor":"discussion","level":2},{"code":["var service: Factory {"," self { MyService() }"," .shared","}"],"type":"codeListing","syntax":"swift"}]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/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 "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class"},{"text":".","type":"text"}],"url":"\/documentation\/factory\/parameterfactory\/shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/shared","kind":"symbol","title":"shared","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Shared","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","abstract":[],"kind":"article"}}} \ 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 909ff19c..e5fc3c0f 100644 --- a/docs/data/documentation/factory/parameterfactory/singleton.json +++ b/docs/data/documentation/factory/parameterfactory/singleton.json @@ -1 +1 @@ -{"sections":[],"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/parameterfactory\/singleton"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"metadata":{"roleHeading":"Instance Property","modules":[{"name":"Factory"}],"role":"symbol","title":"singleton","extendedModule":"Factory","symbolKind":"property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"singleton","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"externalID":"s:7Factory0A9ModifyingPAAE9singletonxvp::SYNTHESIZED::s:7Factory09ParameterA0V"},"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":"."}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"singleton"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"]}],"kind":"declarations"},{"content":[{"level":2,"anchor":"discussion","text":"Discussion","type":"heading"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .singleton","}"]}],"kind":"content"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/singleton","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","abstract":[],"type":"topic","title":"FactoryModifying Implementations","role":"collectionGroup"},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","url":"\/documentation\/factory\/scope\/singleton-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"type":"topic","role":"symbol","title":"Scope.Singleton","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/singleton":{"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"},{"text":".","type":"text"}],"kind":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","url":"\/documentation\/factory\/parameterfactory\/singleton","title":"singleton","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/singleton"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"sections":[],"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/singleton","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"]}]},{"content":[{"text":"Discussion","type":"heading","level":2,"anchor":"discussion"},{"code":["var service: Factory {"," self { MyService() }"," .singleton","}"],"type":"codeListing","syntax":"swift"}],"kind":"content"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/singleton"]}],"metadata":{"role":"symbol","roleHeading":"Instance Property","title":"singleton","modules":[{"name":"Factory"}],"extendedModule":"Factory","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"externalID":"s:7Factory0A9ModifyingPAAE9singletonxvp::SYNTHESIZED::s:7Factory09ParameterA0V","symbolKind":"property"},"kind":"symbol","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","type":"reference","isActive":true},{"text":".","type":"text"}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","title":"Scope.Singleton","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/singleton":{"title":"singleton","url":"\/documentation\/factory\/parameterfactory\/singleton","kind":"symbol","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","isActive":true},{"text":".","type":"text"}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/singleton","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"}}} \ 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 f45e3102..971e1c6d 100644 --- a/docs/data/documentation/factory/parameterfactory/timetolive(_:).json +++ b/docs/data/documentation/factory/parameterfactory/timetolive(_:).json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"kind":"symbol","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"},{"text":" ","type":"text"},{"type":"text","text":"cached item will be discarded and a new instance created."}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"timeToLive","kind":"identifier"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"seconds","kind":"internalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"c:@T@NSTimeInterval","text":"TimeInterval","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/timetolive(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"timeToLive","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"externalID":"s:7Factory0A9ModifyingPAAE10timeToLiveyxSdF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","roleHeading":"Instance Method","role":"symbol","title":"timeToLive(_:)","modules":[{"name":"Factory"}],"symbolKind":"method"},"schemaVersion":{"minor":3,"major":0,"patch":0},"sections":[],"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ParameterFactory/timeToLive(_:)":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"timeToLive","kind":"identifier"},{"kind":"text","text":"("},{"text":"TimeInterval","kind":"typeIdentifier","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"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"},{"type":"text","text":"cached item will be discarded and a new instance created."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/timeToLive(_:)","type":"topic","title":"timeToLive(_:)","url":"\/documentation\/factory\/parameterfactory\/timetolive(_:)","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","kind":"article","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","title":"FactoryModifying Implementations","role":"collectionGroup","type":"topic"}}} \ 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":" "},{"text":"timeToLive","kind":"identifier"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"seconds"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"c:@T@NSTimeInterval","text":"TimeInterval"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"platforms":["macOS"],"languages":["swift"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/timetolive(_:)"]}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/timeToLive(_:)","interfaceLanguage":"swift"},"metadata":{"extendedModule":"Factory","roleHeading":"Instance Method","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"timeToLive","kind":"identifier"},{"kind":"text","text":"("},{"preciseIdentifier":"c:@T@NSTimeInterval","text":"TimeInterval","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"timeToLive(_:)","externalID":"s:7Factory0A9ModifyingPAAE10timeToLiveyxSdF::SYNTHESIZED::s:7Factory09ParameterA0V","modules":[{"name":"Factory"}],"symbolKind":"method"},"schemaVersion":{"patch":0,"minor":3,"major":0},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"abstract":[{"type":"text","text":"Adds time to live option for scopes. If the dependency has been cached for longer than the timeToLive period the"},{"text":" ","type":"text"},{"type":"text","text":"cached item will be discarded and a new instance created."}],"references":{"doc://Factory/documentation/Factory/ParameterFactory/timeToLive(_:)":{"role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"timeToLive","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"c:@T@NSTimeInterval","text":"TimeInterval"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"kind":"symbol","title":"timeToLive(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/timeToLive(_:)","abstract":[{"type":"text","text":"Adds time to live option for scopes. If the dependency has been cached for longer than the timeToLive period the"},{"text":" ","type":"text"},{"type":"text","text":"cached item will be discarded and a new instance created."}],"url":"\/documentation\/factory\/parameterfactory\/timetolive(_:)"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ 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 bba502d8..3da76a28 100644 --- a/docs/data/documentation/factory/parameterfactory/unique.json +++ b/docs/data/documentation/factory/parameterfactory/unique.json @@ -1 +1 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/unique","interfaceLanguage":"swift"},"schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/unique"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"unique","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"kind":"text","text":" }"}],"languages":["swift"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"text":"Discussion","type":"heading"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .unique","}"]},{"inlineContent":[{"type":"text","text":"While you can add the modifier, Factory’s are unique by default."}],"type":"paragraph"}]}],"metadata":{"title":"unique","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"roleHeading":"Instance Property","externalID":"s:7Factory0A9ModifyingPAAE6uniquexvp::SYNTHESIZED::s:7Factory09ParameterA0V","symbolKind":"property","modules":[{"name":"Factory"}],"extendedModule":"Factory"},"abstract":[{"text":"Syntactic sugar defines defines unique scope. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true,"type":"reference"},{"type":"text","text":"."}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"sections":[],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ParameterFactory/unique":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/unique","kind":"symbol","title":"unique","role":"symbol","url":"\/documentation\/factory\/parameterfactory\/unique","abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true,"type":"reference"},{"text":".","type":"text"}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","abstract":[],"type":"topic","title":"FactoryModifying Implementations","role":"collectionGroup"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"}}} \ No newline at end of file +{"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/unique"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"unique","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"title":"unique","symbolKind":"property","extendedModule":"Factory","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE6uniquexvp::SYNTHESIZED::s:7Factory09ParameterA0V","modules":[{"name":"Factory"}],"roleHeading":"Instance Property"},"abstract":[{"text":"Syntactic sugar defines defines unique scope. See ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/unique","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"unique","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":" { "},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"type":"heading","level":2,"text":"Discussion","anchor":"discussion"},{"syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .unique","}"],"type":"codeListing"},{"inlineContent":[{"type":"text","text":"While you can add the modifier, Factory’s are unique by default."}],"type":"paragraph"}]}],"references":{"doc://Factory/documentation/Factory/ParameterFactory/unique":{"url":"\/documentation\/factory\/parameterfactory\/unique","abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"reference"},{"type":"text","text":"."}],"type":"topic","title":"unique","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/unique","role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"unique","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","abstract":[],"kind":"article"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/previews.json b/docs/data/documentation/factory/previews.json index b3c54bbd..5ac167d4 100644 --- a/docs/data/documentation/factory/previews.json +++ b/docs/data/documentation/factory/previews.json @@ -1 +1 @@ -{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Previews"},"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}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"variants":[{"paths":["\/documentation\/factory\/previews"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"primaryContentSections":[{"kind":"content","content":[{"type":"heading","text":"Overview","level":2,"anchor":"Overview"},{"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."}],"type":"paragraph"},{"text":"SwiftUI Integrations","level":2,"type":"heading","anchor":"SwiftUI-Integrations"},{"inlineContent":[{"text":"Factory can be used in SwiftUI to assign a dependency to a ","type":"text"},{"type":"codeVoice","code":"StateObject"},{"type":"text","text":" or "},{"code":"ObservedObject","type":"codeVoice"},{"type":"text","text":"."}],"type":"paragraph"},{"type":"codeListing","code":["struct ContentView: View {"," @StateObject private var viewModel = Container.shared.contentViewModel()"," var body: some View {"," ..."," }","}"],"syntax":"swift"},{"inlineContent":[{"text":"Keep in mind that if you assign to an ","type":"text"},{"type":"codeVoice","code":"ObservedObject"},{"type":"text","text":" your Factory is responsible for managing the object’s lifecycle (see the section on Scopes)."}],"type":"paragraph"},{"anchor":"SwiftUI-Previews","text":"SwiftUI Previews","type":"heading","level":2},{"inlineContent":[{"text":"Here’s an example of updating a view model’s service dependency in order to setup a particular state for preview.","type":"text"}],"type":"paragraph"},{"code":["struct ContentView: View {"," @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":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"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.","type":"text"}]},{"text":"Multiple Previews","anchor":"Multiple-Previews","level":2,"type":"heading"},{"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…"}]},{"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)"," }"," }","}"],"type":"codeListing","syntax":"swift"},{"type":"heading","anchor":"InjectedObject","level":2,"text":"InjectedObject"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Should you prefer, you can also use "},{"type":"codeVoice","code":"InjectedObject"},{"type":"text","text":", an immediate injection property wrapper for SwiftUI ObservableObjects."}]},{"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":[{"text":"Like the other Injected property wrappers, InjectedObject wraps obtains the dependency from the Factory keypath","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"and provides it to a wrapped instance of StateObject."}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["struct ContentView: View {"," @InjectedObject(\\.contentViewModel) var model"," var body: some View {"," ..."," }","}"]},{"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":"paragraph"},{"syntax":"swift","code":["extension Container {"," var contentViewModel: Factory {"," self { ContentViewModel() }"," }","}"],"type":"codeListing"},{"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":"paragraph"},{"items":[{"content":[{"inlineContent":[{"type":"text","text":"You have a service that could be consumed from a view or a view model."}],"type":"paragraph"}]},{"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 "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","isActive":true,"type":"reference"},{"text":" for more details on graph.","type":"text"}]}]}],"type":"orderedList"},{"type":"heading","level":2,"text":"InjectedObject Previews","anchor":"InjectedObject-Previews"},{"type":"paragraph","inlineContent":[{"text":"Single previews work exactly the same.","type":"text"}]},{"syntax":"swift","type":"codeListing","code":["struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," let _ = Container.shared.myService.register { MockServiceN(4) }"," ContentView()"," }","}"]},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"syntax":"swift","type":"codeListing","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."}]},{"text":"Common Setup","anchor":"Common-Setup","type":"heading","level":2},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"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()"," }","}"],"type":"codeListing"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"article","metadata":{"role":"article","title":"SwiftUI Previews","modules":[{"name":"Factory"}],"roleHeading":"Article"},"references":{"doc://Factory/documentation/Factory/Debugging":{"abstract":[{"type":"text","text":"Additional support for debugging resolution cycles, dependency chains and other issue."}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","title":"Debugging","url":"\/documentation\/factory\/debugging","type":"topic","role":"article"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","title":"Scopes"},"doc://Factory/documentation/Factory/Contexts":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","title":"Contexts","type":"topic","role":"article","abstract":[{"text":"Changing injection results under special circumstances.","type":"text"}],"kind":"article","url":"\/documentation\/factory\/contexts"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Testing":{"title":"Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"url":"\/documentation\/factory\/testing","kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","role":"article"},"doc://Factory/documentation/Factory/Chains":{"abstract":[{"type":"text","text":"Detecting and solving Circular Dependency Chains."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","kind":"article","title":"Circular Dependency Chains","url":"\/documentation\/factory\/chains","type":"topic","role":"article"}}} \ No newline at end of file +{"primaryContentSections":[{"content":[{"level":2,"type":"heading","text":"Overview","anchor":"Overview"},{"type":"paragraph","inlineContent":[{"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.","type":"text"}]},{"anchor":"SwiftUI-Integrations","type":"heading","level":2,"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 "},{"code":"ObservedObject","type":"codeVoice"},{"text":".","type":"text"}]},{"syntax":"swift","code":["struct ContentView: View {"," @StateObject private var viewModel = Container.shared.contentViewModel()"," var body: some View {"," ..."," }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Keep in mind that if you assign to an "},{"code":"ObservedObject","type":"codeVoice"},{"text":" your Factory is responsible for managing the object’s lifecycle (see the section on Scopes).","type":"text"}]},{"level":2,"text":"SwiftUI Previews","type":"heading","anchor":"SwiftUI-Previews"},{"type":"paragraph","inlineContent":[{"text":"Here’s an example of updating a view model’s service dependency in order to setup a particular state for preview.","type":"text"}]},{"code":["struct ContentView: View {"," @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":"codeListing","syntax":"swift"},{"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."},{"type":"text","text":" "},{"text":"\u0004","type":"text"}]},{"anchor":"SwiftUI-Previews","type":"heading","text":"SwiftUI #Previews","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"The same can be done for the new #Preview option, with one minor change."}]},{"code":["#Preview {"," let _ = Container.myService.register { MockServiceN(4) }"," return ContentView()","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"The #Preview closure is not a ViewBuilder, so if we add our let statement we just need to explicitly return our view.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"Or we could simply turn it into a ViewBuilder using our old friend, Group.","type":"text"}]},{"type":"codeListing","code":["#Preview {"," Group {"," let _ = Container.myService.register { MockServiceN(4) }"," ContentView()"," }","}"],"syntax":"swift"},{"inlineContent":[{"text":"Group actually has a few additional uses…","type":"text"}],"type":"paragraph"},{"anchor":"Multiple-Previews","level":2,"type":"heading","text":"Multiple Previews"},{"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"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Given the ContentView we used above…"}]},{"syntax":"swift","type":"codeListing","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)"," }"," }","}"]},{"text":"InjectedObject","anchor":"InjectedObject","type":"heading","level":2},{"inlineContent":[{"text":"Should you prefer, you can also use ","type":"text"},{"code":"InjectedObject","type":"codeVoice"},{"type":"text","text":", an immediate injection property wrapper for SwiftUI ObservableObjects."}],"type":"paragraph"},{"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":[{"text":"Like the other Injected property wrappers, InjectedObject wraps obtains the dependency from the Factory keypath","type":"text"},{"type":"text","text":" "},{"type":"text","text":"and provides it to a wrapped instance of StateObject."}]},{"code":["struct ContentView: View {"," @InjectedObject(\\.contentViewModel) var model"," var body: some View {"," ..."," }","}"],"syntax":"swift","type":"codeListing"},{"inlineContent":[{"text":"ContentViewModel must, of course, be of type ObservableObject and is registered like any other service","type":"text"},{"type":"text","text":" "},{"type":"text","text":"or dependency."}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var contentViewModel: Factory {"," self { ContentViewModel() }"," }","}"]},{"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":"paragraph"},{"type":"orderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"text":"You have a service that could be consumed from a view or a view model.","type":"text"}]}]},{"content":[{"inlineContent":[{"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":"text"},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"reference"},{"type":"text","text":" for more details on graph."}],"type":"paragraph"}]}]},{"level":2,"type":"heading","text":"InjectedObject Previews","anchor":"InjectedObject-Previews"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Single previews work exactly the same."}]},{"type":"codeListing","code":["struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," let _ = Container.shared.myService.register { MockServiceN(4) }"," ContentView()"," }","}"],"syntax":"swift"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","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":[{"text":"Instead of passing the model to the view directly, we need to create the entire ","type":"text"},{"code":"InjectedObject(model1)","type":"codeVoice"},{"type":"text","text":" pair and pass that."}]},{"anchor":"Common-Setup","type":"heading","level":2,"text":"Common Setup"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"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()"," }","}"]}],"kind":"content"}],"sections":[],"metadata":{"roleHeading":"Article","role":"article","modules":[{"name":"Factory"}],"title":"SwiftUI Previews"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/previews"]}],"seeAlsoSections":[{"generated":true,"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"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Previews","interfaceLanguage":"swift"},"schemaVersion":{"patch":0,"major":0,"minor":3},"abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"kind":"article","references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Contexts":{"abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"type":"topic","role":"article","title":"Contexts","kind":"article","url":"\/documentation\/factory\/contexts","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"},"doc://Factory/documentation/Factory/Debugging":{"title":"Debugging","url":"\/documentation\/factory\/debugging","abstract":[{"text":"Additional support for debugging resolution cycles, dependency chains and other issue.","type":"text"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","type":"topic","role":"article"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"kind":"article"},"doc://Factory/documentation/Factory/Testing":{"title":"Testing","url":"\/documentation\/factory\/testing","abstract":[{"text":"Using Factory for Unit and UI Testing.","type":"text"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","type":"topic","role":"article"},"doc://Factory/documentation/Factory/Chains":{"title":"Circular Dependency Chains","url":"\/documentation\/factory\/chains","abstract":[{"text":"Detecting and solving Circular Dependency Chains.","type":"text"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","type":"topic","role":"article"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/registrations.json b/docs/data/documentation/factory/registrations.json index 21714556..3bf2ef0c 100644 --- a/docs/data/documentation/factory/registrations.json +++ b/docs/data/documentation/factory/registrations.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/GettingStarted"]]},"primaryContentSections":[{"kind":"content","content":[{"type":"heading","text":"Basic","level":3,"anchor":"Basic"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Example of a basic dependency registration in a Factory 2.0 container."}]},{"code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"This registered dependency returns a new, unique version of ","type":"text"},{"type":"codeVoice","code":"MyServiceType"},{"type":"text","text":" whenever it’s asked to do so."}]},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"syntax":"swift","type":"codeListing","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."}]},{"content":[{"inlineContent":[{"text":"The container helper functions are ","type":"text"},{"type":"codeVoice","code":"@inlinable"},{"text":" and as such there’s no performance penalty incurred when calling them.","type":"text"}],"type":"paragraph"}],"name":"Note","type":"aside","style":"note"},{"anchor":"Scopes","type":"heading","level":3,"text":"Scopes"},{"inlineContent":[{"type":"text","text":"Examples of defining scoped services in a Factory 2.0 container."}],"type":"paragraph"},{"type":"codeListing","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)"," }","}"],"syntax":"swift"},{"type":"heading","text":"Constructor Injection","anchor":"Constructor-Injection","level":3},{"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"," }","}"]},{"level":3,"anchor":"Parameters","text":"Parameters","type":"heading"},{"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 "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"reference"},{"type":"text","text":"."}]},{"type":"codeListing","code":["extension Container {"," var parameterService: ParameterFactory {"," self { ParameterService(value: $0) }"," }","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"Note that we also needed to specify the type of our parameter.","type":"text"}]},{"type":"heading","level":3,"text":"Same Types","anchor":"Same-Types"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Example of correctly handling multiple instances of the same type."}]},{"type":"codeListing","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\" }"," }","}"],"syntax":"swift"},{"text":"Inside Custom Containers","type":"heading","level":3,"anchor":"Inside-Custom-Containers"},{"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":"paragraph"},{"type":"codeListing","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()"," }","}"],"syntax":"swift"},{"inlineContent":[{"text":"Note the last “lazy” definition of ","type":"text"},{"code":"service2","type":"codeVoice"},{"text":". This may seem like a reasonable equivalent, but it hides a fatal flaw. Factories are designed to be transient. They’re lightweight structs created to do a job and then they’re discarded.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"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.","type":"text"}],"type":"paragraph"},{"content":[{"inlineContent":[{"type":"text","text":"Creating a “lazy” Factory and assigning it to it’s enclosing class will create a reference cycle."}],"type":"paragraph"}],"type":"aside","name":"Warning","style":"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."}]},{"level":3,"type":"heading","text":"Static Factory’s","anchor":"Static-Factorys"},{"inlineContent":[{"text":"Example of a static Factory 2.0 registration container.","type":"text"}],"type":"paragraph"},{"type":"codeListing","code":["extension Container {"," static var oldSchool: Factory {"," Factory(shared) { School() }"," }","}","","let school = Container.oldSchool"],"syntax":"swift"},{"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":[{"text":"While you ","type":"text"},{"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","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","isActive":true},{"text":" property wrappers due to the lack of keyPaths.","type":"text"}]},{"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":"paragraph"},{"code":["extension Container {"," var newSchool: Factory {"," self { School() }"," }","}","","let school = Container.shared.newSchool"],"syntax":"swift","type":"codeListing"}]}],"variants":[{"paths":["\/documentation\/factory\/registrations"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Registrations","interfaceLanguage":"swift"},"sections":[],"seeAlsoSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolutions"],"title":"Examples","generated":true}],"metadata":{"roleHeading":"Article","modules":[{"name":"Factory"}],"role":"article","title":"Sample Registrations"},"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"article","abstract":[{"text":"There are many ways to register dependencies with Factory. Here are a few examples.","type":"text"}],"references":{"doc://Factory/documentation/Factory/Resolutions":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","kind":"article","abstract":[{"text":"There are many ways to use Factory to resolve dependencies. Here are a few examples.","type":"text"}],"title":"Sample Resolutions","url":"\/documentation\/factory\/resolutions","role":"article"},"doc://Factory/documentation/Factory/GettingStarted":{"url":"\/documentation\/factory\/gettingstarted","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"type":"topic","title":"Getting Started","role":"collectionGroup"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Injected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","role":"symbol","type":"topic","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"title":"Injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]}}} \ No newline at end of file +{"kind":"article","seeAlsoSections":[{"generated":true,"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolutions"],"title":"Examples"}],"metadata":{"roleHeading":"Article","title":"Sample Registrations","role":"article","modules":[{"name":"Factory"}]},"schemaVersion":{"minor":3,"patch":0,"major":0},"primaryContentSections":[{"content":[{"level":3,"type":"heading","text":"Basic","anchor":"Basic"},{"inlineContent":[{"text":"Example of a basic dependency registration in a Factory 2.0 container.","type":"text"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","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"},{"text":" whenever it’s asked to do so.","type":"text"}]},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"codeListing","code":["extension Container {"," var service: Factory {"," Factory(self) { MyService() }"," }","}"],"syntax":"swift"},{"inlineContent":[{"text":"We prefer the more concise version, and that’s what we’ll use going forward.","type":"text"}],"type":"paragraph"},{"name":"Note","style":"note","content":[{"inlineContent":[{"text":"The container helper functions are ","type":"text"},{"type":"codeVoice","code":"@inlinable"},{"type":"text","text":" and as such there’s no performance penalty incurred when calling them."}],"type":"paragraph"}],"type":"aside"},{"text":"Scopes","level":3,"type":"heading","anchor":"Scopes"},{"inlineContent":[{"text":"Examples of defining scoped services in a Factory 2.0 container.","type":"text"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","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)"," }","}"]},{"type":"heading","level":3,"anchor":"Constructor-Injection","text":"Constructor Injection"},{"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":"paragraph"},{"type":"codeListing","code":["extension Container {"," var constructedService: Factory {"," self { MyConstructedService(service: self.cachedService()) }"," }"," var cachedService: Factory {"," self { MyService() }.cached"," }","}"],"syntax":"swift"},{"type":"heading","anchor":"Parameters","level":3,"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 "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"reference","isActive":true},{"type":"text","text":"."}]},{"syntax":"swift","code":["extension Container {"," var parameterService: ParameterFactory {"," self { ParameterService(value: $0) }"," }","}"],"type":"codeListing"},{"inlineContent":[{"text":"Note that we also needed to specify the type of our parameter.","type":"text"}],"type":"paragraph"},{"level":3,"text":"Same Types","anchor":"Same-Types","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Example of correctly handling multiple instances of the same type."}]},{"syntax":"swift","type":"codeListing","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\" }"," }","}"]},{"level":3,"text":"Inside Custom Containers","type":"heading","anchor":"Inside-Custom-Containers"},{"inlineContent":[{"type":"text","text":"You’ve seen factory registrations done within container "},{"inlineContent":[{"text":"extensions","type":"text"}],"type":"emphasis"},{"type":"text","text":", but it should also be noted that we can also create them within our own custom containers."}],"type":"paragraph"},{"type":"codeListing","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()"," }","}"],"syntax":"swift"},{"inlineContent":[{"text":"Note the last “lazy” definition of ","type":"text"},{"code":"service2","type":"codeVoice"},{"type":"text","text":". This may seem like a reasonable equivalent, but it hides a fatal flaw. Factories 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."}],"type":"paragraph"},{"type":"aside","style":"warning","name":"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":"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."}]},{"text":"Static Factory’s","type":"heading","anchor":"Static-Factorys","level":3},{"inlineContent":[{"type":"text","text":"Example of a static Factory 2.0 registration container."}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["extension Container {"," static var oldSchool: Factory {"," Factory(shared) { School() }"," }","}","","let school = Container.oldSchool"]},{"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 "},{"inlineContent":[{"type":"text","text":"can"}],"type":"emphasis"},{"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","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","isActive":true},{"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":"paragraph"},{"syntax":"swift","type":"codeListing","code":["extension Container {"," var newSchool: Factory {"," self { School() }"," }","}","","let school = Container.shared.newSchool"]}],"kind":"content"}],"abstract":[{"type":"text","text":"There are many ways to register dependencies with Factory. Here are a few examples."}],"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/GettingStarted"]]},"variants":[{"paths":["\/documentation\/factory\/registrations"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Registrations"},"references":{"doc://Factory/documentation/Factory/Resolutions":{"url":"\/documentation\/factory\/resolutions","title":"Sample Resolutions","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","role":"article","abstract":[{"text":"There are many ways to use Factory to resolve dependencies. Here are a few examples.","type":"text"}],"kind":"article","type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/GettingStarted":{"url":"\/documentation\/factory\/gettingstarted","identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","role":"collectionGroup","kind":"article","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"type":"topic","title":"Getting Started"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Injected":{"kind":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","navigatorTitle":[{"text":"Injected","kind":"identifier"}],"abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"type":"topic","role":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/resolutions.json b/docs/data/documentation/factory/resolutions.json index fe3551b4..bfc42c62 100644 --- a/docs/data/documentation/factory/resolutions.json +++ b/docs/data/documentation/factory/resolutions.json @@ -1 +1 @@ -{"kind":"article","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/GettingStarted"]]},"primaryContentSections":[{"content":[{"type":"heading","level":3,"text":"Shared Class Container","anchor":"Shared-Class-Container"},{"inlineContent":[{"type":"text","text":"Here we instantiate our dependency from a shared class container."}],"type":"paragraph"},{"code":["class ContentViewModel: ObservableObject {"," let service = Container.shared.constructedService()","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"This is the classic Service Locator pattern updated for Factory 2.0.","type":"text"}]},{"level":3,"text":"Initialization from Passed Container","type":"heading","anchor":"Initialization-from-Passed-Container"},{"type":"paragraph","inlineContent":[{"text":"Passing an instance of a container to our view model and initializing service from that container.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {",""," let service2: MyServiceType",""," init(container: Container) {"," service2 = container.service()"," }"," ","}"]},{"level":3,"text":"Lazy Initialization from Passed Container","type":"heading","anchor":"Lazy-Initialization-from-Passed-Container"},{"type":"paragraph","inlineContent":[{"text":"Passing an instance of a container to our view model and saving it for later lazy initializers.","type":"text"}]},{"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"," }","","}"]},{"type":"heading","anchor":"Injected-Property-Wrappers","level":3,"text":"Injected Property Wrappers"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Using the "},{"code":"@Injected","type":"codeVoice"},{"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"},{"text":" in SwiftUI.","type":"text"}]},{"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","","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"One can also inject the view model itself."}]},{"syntax":"swift","code":["struct ContentView: View {"," @InjectedObject(\\.contentViewModel) var model: ContentViewModel"," var body: some View {"," ..."," }","}"],"type":"codeListing"},{"inlineContent":[{"text":"See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","type":"reference","isActive":true},{"text":", ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected"},{"type":"text","text":", "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","isActive":true},{"text":", and ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"reference","isActive":true},{"text":" for more.","type":"text"}],"type":"paragraph"},{"type":"heading","anchor":"Global-Keypath-Resolution-from-Shared-Container","level":3,"text":"Global Keypath Resolution from Shared Container"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory provides two global functions that utilize keypaths for resolution."}]},{"type":"codeListing","code":["class ContentViewModel: ObservableObject {"," let service1 = resolve(\\.constructedService)"," let service2 = resolve(\\MyContainer.anotherService)","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The end result is identical to using a keypath with the @Injected property wrapper."}]},{"text":"Parameterized Initialization from Passed Container","type":"heading","anchor":"Parameterized-Initialization-from-Passed-Container","level":3},{"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)"," }","","}"]},{"inlineContent":[{"type":"text","text":"See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"reference","isActive":true},{"text":" for more details.","type":"text"}],"type":"paragraph"},{"anchor":"Classic-Factory-from-Static-Class-Member","level":3,"text":"Classic Factory from Static Class Member","type":"heading"},{"inlineContent":[{"type":"text","text":"Initializing dependency from class. This is classic Service Locator pattern but this pattern should be consider deprecated."}],"type":"paragraph"},{"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 "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Registrations","type":"reference"}]},{"text":"Composition Root","anchor":"Composition-Root","level":3,"type":"heading"},{"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."}]},{"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)"," }"," }"," }","}ß"],"type":"codeListing"}],"kind":"content"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Resolutions"},"abstract":[{"type":"text","text":"There are many ways to use Factory to resolve dependencies. Here are a few examples."}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/resolutions"]}],"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Article","title":"Sample Resolutions","role":"article"},"seeAlsoSections":[{"title":"Examples","generated":true,"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Registrations"]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"references":{"doc://Factory/documentation/Factory/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."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}],"title":"LazyInjected","url":"\/documentation\/factory\/lazyinjected","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Injected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","role":"symbol","type":"topic","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"title":"Injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]},"doc://Factory/documentation/Factory/Registrations":{"url":"\/documentation\/factory\/registrations","kind":"article","abstract":[{"type":"text","text":"There are many ways to register dependencies with Factory. Here are a few examples."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Registrations","type":"topic","title":"Sample Registrations","role":"article"},"doc://Factory/documentation/Factory/ParameterFactory":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","url":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"kind":"symbol"},"doc://Factory/documentation/Factory/InjectedObject":{"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","role":"symbol","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/GettingStarted":{"url":"\/documentation\/factory\/gettingstarted","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"type":"topic","title":"Getting Started","role":"collectionGroup"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"kind":"symbol","type":"topic","title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}]}}} \ No newline at end of file +{"primaryContentSections":[{"content":[{"level":3,"anchor":"Shared-Class-Container","text":"Shared Class Container","type":"heading"},{"inlineContent":[{"text":"Here we instantiate our dependency from a shared class container.","type":"text"}],"type":"paragraph"},{"type":"codeListing","code":["class ContentViewModel: ObservableObject {"," let service = Container.shared.constructedService()","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This is the classic Service Locator pattern updated for Factory 2.0."}]},{"anchor":"Initialization-from-Passed-Container","type":"heading","text":"Initialization from Passed Container","level":3},{"inlineContent":[{"type":"text","text":"Passing an instance of a container to our view model and initializing service from that container."}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["class ContentViewModel: ObservableObject {",""," let service2: MyServiceType",""," init(container: Container) {"," service2 = container.service()"," }"," ","}"]},{"level":3,"type":"heading","text":"Lazy Initialization from Passed Container","anchor":"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."}]},{"syntax":"swift","type":"codeListing","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"," }","","}"]},{"type":"heading","text":"Injected Property Wrappers","level":3,"anchor":"Injected-Property-Wrappers"},{"inlineContent":[{"text":"Using the ","type":"text"},{"type":"codeVoice","code":"@Injected"},{"type":"text","text":" and "},{"code":"@LazyInjected","type":"codeVoice"},{"text":" property wrappers to obtain dependencies using an Annotation pattern similar to that used by ","type":"text"},{"type":"codeVoice","code":"EnvironmentObject"},{"text":" in SwiftUI.","type":"text"}],"type":"paragraph"},{"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":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"One can also inject the view model itself."}]},{"type":"codeListing","code":["struct ContentView: View {"," @InjectedObject(\\.contentViewModel) var model: ContentViewModel"," var body: some View {"," ..."," }","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","isActive":true,"type":"reference"},{"text":", ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","isActive":true,"type":"reference"},{"text":", ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","isActive":true,"type":"reference"},{"type":"text","text":", and "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","isActive":true},{"text":" for more.","type":"text"}]},{"text":"Global Keypath Resolution from Shared Container","level":3,"type":"heading","anchor":"Global-Keypath-Resolution-from-Shared-Container"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory provides two global functions that utilize keypaths for resolution."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {"," let service1 = resolve(\\.constructedService)"," let service2 = resolve(\\MyContainer.anotherService)","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The end result is identical to using a keypath with the @Injected property wrapper."}]},{"anchor":"Parameterized-Initialization-from-Passed-Container","text":"Parameterized Initialization from Passed Container","level":3,"type":"heading"},{"inlineContent":[{"text":"Passing a required parameter to a factory for resolution.","type":"text"}],"type":"paragraph"},{"code":["class ContentViewModel: ObservableObject {",""," let parameterService: ParameterService",""," init(container: Container, value: Int) {"," service2 = container.parameterService(value)"," }","","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","isActive":true},{"text":" for more details.","type":"text"}]},{"level":3,"type":"heading","text":"Classic Factory from Static Class Member","anchor":"Classic-Factory-from-Static-Class-Member"},{"type":"paragraph","inlineContent":[{"text":"Initializing dependency from class. This is classic Service Locator pattern but this pattern should be consider deprecated.","type":"text"}]},{"syntax":"swift","type":"codeListing","code":["class ContentViewModel: ObservableObject {"," let newSchool = Container.newSchool()","}"]},{"type":"paragraph","inlineContent":[{"text":"This was discussed in greater detail in ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Registrations","isActive":true,"type":"reference"}]},{"anchor":"Composition-Root","text":"Composition Root","type":"heading","level":3},{"type":"paragraph","inlineContent":[{"text":"If you want to use a Composition Root pattern, just use the container to provide the required dependencies to a constructor.","type":"text"}]},{"syntax":"swift","type":"codeListing","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)"," }"," }"," }","}ß"]}],"kind":"content"}],"abstract":[{"type":"text","text":"There are many ways to use Factory to resolve dependencies. Here are a few examples."}],"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"title":"Sample Resolutions","roleHeading":"Article","role":"article","modules":[{"name":"Factory"}]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","interfaceLanguage":"swift"},"seeAlsoSections":[{"title":"Examples","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Registrations"],"generated":true}],"variants":[{"paths":["\/documentation\/factory\/resolutions"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"kind":"article","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/GettingStarted"]]},"references":{"doc://Factory/documentation/Factory/GettingStarted":{"url":"\/documentation\/factory\/gettingstarted","identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","role":"collectionGroup","kind":"article","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"type":"topic","title":"Getting Started"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","title":"ParameterFactory","url":"\/documentation\/factory\/parameterfactory","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ParameterFactory","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/LazyInjected":{"title":"LazyInjected","type":"topic","url":"\/documentation\/factory\/lazyinjected","role":"symbol","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Injected":{"kind":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","navigatorTitle":[{"text":"Injected","kind":"identifier"}],"abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"InjectedObject","kind":"identifier"}],"abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"title":"InjectedObject","kind":"symbol","navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}]},"doc://Factory/documentation/Factory/Registrations":{"abstract":[{"text":"There are many ways to register dependencies with Factory. Here are a few examples.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Registrations","url":"\/documentation\/factory\/registrations","type":"topic","role":"article","title":"Sample Registrations","kind":"article"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"kind":"symbol","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"type":"topic","url":"\/documentation\/factory\/weaklazyinjected"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/resolve(_:)-52olu.json b/docs/data/documentation/factory/resolve(_:)-52olu.json index b7fbab21..2a02dc44 100644 --- a/docs/data/documentation/factory/resolve(_:)-52olu.json +++ b/docs/data/documentation/factory/resolve(_:)-52olu.json @@ -1 +1 @@ -{"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-52olu","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Global function to resolve a keypath on Container.shared into the requested type"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/resolve(_:)-52olu"]}],"metadata":{"title":"resolve(_:)","symbolKind":"func","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"text":"<","kind":"text"},{"preciseIdentifier":"s:7Factory9ContainerC","text":"Container","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>) -> "},{"text":"T","kind":"typeIdentifier"}],"externalID":"s:7Factory7resolveyxs7KeyPathCyAA9ContainerCA2AVyxGGlF","role":"symbol","roleHeading":"Function"},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","preciseIdentifier":"s:7Factory9ContainerC"},{"text":", ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>) -> "},{"kind":"typeIdentifier","text":"T"}]}],"kind":"declarations"},{"kind":"content","content":[{"type":"heading","anchor":"discussion","level":2,"text":"Discussion"},{"code":["@State var model: ContentViewModel = resolve(\\.contentViewModel)"],"type":"codeListing","syntax":"swift"}]}],"kind":"symbol","sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"references":{"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/resolve(_:)-52olu":{"title":"resolve(_:)","type":"topic","abstract":[{"text":"Global function to resolve a keypath on Container.shared into the requested type","type":"text"}],"url":"\/documentation\/factory\/resolve(_:)-52olu","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier","text":"Container"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>) -> "},{"text":"T","kind":"typeIdentifier"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-52olu","role":"symbol"},"doc://Factory/documentation/Factory/Container":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Container"}],"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container"}}} \ No newline at end of file +{"sections":[],"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Function","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC","text":"Container"},{"kind":"text","text":", "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">>) -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"}],"externalID":"s:7Factory7resolveyxs7KeyPathCyAA9ContainerCA2AVyxGGlF","symbolKind":"func","role":"symbol","title":"resolve(_:)"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-52olu","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"Container","kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">>) -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"},{"kind":"content","content":[{"text":"Discussion","type":"heading","level":2,"anchor":"discussion"},{"syntax":"swift","code":["@State var model: ContentViewModel = resolve(\\.contentViewModel)"],"type":"codeListing"}]}],"kind":"symbol","abstract":[{"text":"Global function to resolve a keypath on Container.shared into the requested type","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/resolve(_:)-52olu"]}],"references":{"doc://Factory/documentation/Factory/resolve(_:)-52olu":{"title":"resolve(_:)","abstract":[{"type":"text","text":"Global function to resolve a keypath on Container.shared into the requested type"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC","text":"Container"},{"kind":"text","text":", "},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>) -> "},{"text":"T","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/resolve(_:)-52olu","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-52olu"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Container","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","navigatorTitle":[{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/resolve(_:)-632zk.json b/docs/data/documentation/factory/resolve(_:)-632zk.json index b9ff65aa..67b17c8d 100644 --- a/docs/data/documentation/factory/resolve(_:)-632zk.json +++ b/docs/data/documentation/factory/resolve(_:)-632zk.json @@ -1 +1 @@ -{"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-632zk","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/resolve(_:)-632zk"]}],"kind":"symbol","metadata":{"role":"symbol","title":"resolve(_:)","roleHeading":"Function","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"text":", ","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>) -> "},{"text":"T","kind":"typeIdentifier"}],"externalID":"s:7Factory7resolveyq_s7KeyPathCyxA2AVyq_GGAA15SharedContainerRzr0_lF","symbolKind":"func"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"C"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"text":"C","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">>) -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":" "},{"text":"where","kind":"keyword"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"SharedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","preciseIdentifier":"s:7Factory15SharedContainerP"}],"languages":["swift"]}]},{"kind":"content","content":[{"type":"heading","anchor":"discussion","level":2,"text":"Discussion"},{"code":["@State var model: ContentViewModel = resolve(\\MyContainer.contentViewModel)"],"syntax":"swift","type":"codeListing"}]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"abstract":[{"type":"text","text":"Global function to resolve a keypath on the specified shared container into the requested type"}],"references":{"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/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","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"title":"SharedContainer","url":"\/documentation\/factory\/sharedcontainer","navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/resolve(_:)-632zk":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":", "},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"C"},{"text":", ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">>) -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"}],"url":"\/documentation\/factory\/resolve(_:)-632zk","identifier":"doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-632zk","title":"resolve(_:)","role":"symbol","type":"topic","abstract":[{"type":"text","text":"Global function to resolve a keypath on the specified shared container into the requested type"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"abstract":[{"type":"text","text":"Global function to resolve a keypath on the specified shared container into the requested type"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">>) -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":" ","kind":"text"},{"text":"where","kind":"keyword"},{"kind":"text","text":" "},{"text":"C","kind":"typeIdentifier"},{"text":" : ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"typeIdentifier","text":"SharedContainer","preciseIdentifier":"s:7Factory15SharedContainerP"}],"platforms":["macOS"],"languages":["swift"]}]},{"content":[{"type":"heading","text":"Discussion","anchor":"discussion","level":2},{"syntax":"swift","type":"codeListing","code":["@State var model: ContentViewModel = resolve(\\MyContainer.contentViewModel)"]}],"kind":"content"}],"metadata":{"roleHeading":"Function","role":"symbol","externalID":"s:7Factory7resolveyq_s7KeyPathCyxA2AVyq_GGAA15SharedContainerRzr0_lF","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"kind":"text","text":", "},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">>) -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"}],"modules":[{"name":"Factory"}],"symbolKind":"func","title":"resolve(_:)"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-632zk","interfaceLanguage":"swift"},"sections":[],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"variants":[{"paths":["\/documentation\/factory\/resolve(_:)-632zk"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/SharedContainer":{"title":"SharedContainer","type":"topic","url":"\/documentation\/factory\/sharedcontainer","role":"symbol","navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"SharedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/resolve(_:)-632zk":{"title":"resolve(_:)","abstract":[{"type":"text","text":"Global function to resolve a keypath on the specified shared container into the requested type"}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolve"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"C"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">>) -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"}],"url":"\/documentation\/factory\/resolve(_:)-632zk","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-632zk"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/resolving.json b/docs/data/documentation/factory/resolving.json index 3d10cae1..06e49387 100644 --- a/docs/data/documentation/factory/resolving.json +++ b/docs/data/documentation/factory/resolving.json @@ -1 +1 @@ -{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/resolving"]}],"sections":[],"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-4znbq","doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-81zql","doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-6wtxp"],"title":"Instance Methods"}],"metadata":{"symbolKind":"protocol","roleHeading":"Protocol","externalID":"s:7Factory9ResolvingP","modules":[{"name":"Factory"}],"role":"symbol","title":"Resolving","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"Resolving","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"Resolving"}]},"schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"abstract":[{"type":"text","text":"When protocol is applied to a container it enables a typed registration\/resolution mode."}],"relationshipsSections":[{"kind":"relationships","title":"Inherits From","type":"inheritsFrom","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Resolving"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","text":"ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP"}],"platforms":["macOS"]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Resolving","interfaceLanguage":"swift"},"kind":"symbol","references":{"doc://Factory/documentation/Factory/Resolving/resolve(_:)-6wtxp":{"role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type) -> "},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"kind":"symbol","defaultImplementations":1,"abstract":[{"text":"Resolves a type from this container.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-6wtxp","type":"topic","title":"resolve(_:)","required":true,"url":"\/documentation\/factory\/resolving\/resolve(_:)-6wtxp"},"doc://Factory/documentation/Factory/Resolving/factory(_:)-4znbq":{"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":".Type) -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">?"}],"kind":"symbol","defaultImplementations":1,"abstract":[{"text":"Returns a registered factory for this type from this container.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-4znbq","type":"topic","title":"factory(_:)","required":true,"url":"\/documentation\/factory\/resolving\/factory(_:)-4znbq"},"doc://Factory/documentation/Factory/Resolving/register(_:factory:)-81zql":{"type":"topic","required":true,"title":"register(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-81zql","abstract":[{"text":"Registers a new type and associated factory closure with this container.","type":"text"}],"defaultImplementations":1,"role":"symbol","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":".Type, "},{"kind":"externalParam","text":"factory"},{"text":": () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"url":"\/documentation\/factory\/resolving\/register(_:factory:)-81zql"},"doc://Factory/documentation/Factory/Resolving":{"type":"topic","title":"Resolving","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","abstract":[{"text":"When protocol is applied to a container it enables a typed registration\/resolution mode.","type":"text"}],"role":"symbol","kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Resolving"}],"url":"\/documentation\/factory\/resolving","navigatorTitle":[{"kind":"identifier","text":"Resolving"}]},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"kind":"symbol","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer","role":"symbol","url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"sections":[],"topicSections":[{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-4znbq","doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-81zql","doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-6wtxp"]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Resolving"},{"text":" : ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"typeIdentifier","text":"ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP"}],"platforms":["macOS"],"languages":["swift"]}]}],"variants":[{"paths":["\/documentation\/factory\/resolving"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"type":"text","text":"When protocol is applied to a container it enables a typed registration\/resolution mode."}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Resolving"},"relationshipsSections":[{"title":"Inherits From","kind":"relationships","type":"inheritsFrom","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]}],"metadata":{"navigatorTitle":[{"kind":"identifier","text":"Resolving"}],"externalID":"s:7Factory9ResolvingP","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"Resolving"}],"title":"Resolving","role":"symbol","symbolKind":"protocol","roleHeading":"Protocol"},"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/Resolving/register(_:factory:)-81zql":{"title":"register(_:factory:)","defaultImplementations":1,"url":"\/documentation\/factory\/resolving\/register(_:factory:)-81zql","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-81zql","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"register"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":".Type, ","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": () -> "},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"abstract":[{"type":"text","text":"Registers a new type and associated factory closure with this container."}],"kind":"symbol","required":true,"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Resolving":{"title":"Resolving","abstract":[{"type":"text","text":"When protocol is applied to a container it enables a typed registration\/resolution mode."}],"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Resolving"}],"navigatorTitle":[{"text":"Resolving","kind":"identifier"}],"url":"\/documentation\/factory\/resolving","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving"},"doc://Factory/documentation/Factory/ManagedContainer":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"text":"ManagedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"type":"topic","url":"\/documentation\/factory\/managedcontainer","title":"ManagedContainer"},"doc://Factory/documentation/Factory/Resolving/resolve(_:)-6wtxp":{"title":"resolve(_:)","defaultImplementations":1,"abstract":[{"text":"Resolves a type from this container.","type":"text"}],"kind":"symbol","required":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-6wtxp","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":".Type) -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"url":"\/documentation\/factory\/resolving\/resolve(_:)-6wtxp"},"doc://Factory/documentation/Factory/Resolving/factory(_:)-4znbq":{"kind":"symbol","title":"factory(_:)","required":true,"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-4znbq","url":"\/documentation\/factory\/resolving\/factory(_:)-4znbq","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type) -> "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">?","kind":"text"}],"role":"symbol","defaultImplementations":1,"abstract":[{"text":"Returns a registered factory for this type from this container.","type":"text"}]},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/resolving/factory(_:)-4znbq.json b/docs/data/documentation/factory/resolving/factory(_:)-4znbq.json index d8e2db05..f0d213a6 100644 --- a/docs/data/documentation/factory/resolving/factory(_:)-4znbq.json +++ b/docs/data/documentation/factory/resolving/factory(_:)-4znbq.json @@ -1 +1 @@ -{"abstract":[{"text":"Returns a registered factory for this type from this container.","type":"text"}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Resolving"]]},"schemaVersion":{"minor":3,"major":0,"patch":0},"defaultImplementationsSections":[{"title":"Resolving Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-6s19m"]}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"type","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":".Type) -> ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">?","kind":"text"}]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/resolving\/factory(_:)-4znbq"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"metadata":{"role":"symbol","required":true,"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"factory"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":".Type) -> "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">?"}],"symbolKind":"method","externalID":"s:7Factory9ResolvingP7factoryyA2AVyqd__GSgqd__mlF","modules":[{"name":"Factory"}],"roleHeading":"Instance Method","title":"factory(_:)"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-4znbq","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/Resolving/factory(_:)-6s19m":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":".Type) -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">?"}],"type":"topic","title":"factory(_:)","kind":"symbol","url":"\/documentation\/factory\/resolving\/factory(_:)-6s19m","abstract":[{"type":"text","text":"Returns a registered factory for this type from this container. Use this function to set options and previews after the initial"},{"type":"text","text":" "},{"type":"text","text":"registration."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-6s19m"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Resolving":{"type":"topic","title":"Resolving","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","abstract":[{"text":"When protocol is applied to a container it enables a typed registration\/resolution mode.","type":"text"}],"role":"symbol","kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Resolving"}],"url":"\/documentation\/factory\/resolving","navigatorTitle":[{"kind":"identifier","text":"Resolving"}]},"doc://Factory/documentation/Factory/Resolving/factory(_:)-4znbq":{"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":".Type) -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">?"}],"kind":"symbol","defaultImplementations":1,"abstract":[{"text":"Returns a registered factory for this type from this container.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-4znbq","type":"topic","title":"factory(_:)","required":true,"url":"\/documentation\/factory\/resolving\/factory(_:)-4znbq"},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]}}} \ No newline at end of file +{"sections":[],"kind":"symbol","primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"type","kind":"internalParam"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"},{"text":".Type) -> ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">?"}],"languages":["swift"]}],"kind":"declarations"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-4znbq"},"variants":[{"paths":["\/documentation\/factory\/resolving\/factory(_:)-4znbq"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"type":"text","text":"Returns a registered factory for this type from this container."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Resolving"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"defaultImplementationsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-6s19m"],"title":"Resolving Implementations"}],"metadata":{"title":"factory(_:)","modules":[{"name":"Factory"}],"roleHeading":"Instance Method","required":true,"externalID":"s:7Factory9ResolvingP7factoryyA2AVyqd__GSgqd__mlF","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"factory"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type) -> "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">?"}],"role":"symbol","symbolKind":"method"},"references":{"doc://Factory/documentation/Factory/Resolving":{"title":"Resolving","abstract":[{"type":"text","text":"When protocol is applied to a container it enables a typed registration\/resolution mode."}],"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Resolving"}],"navigatorTitle":[{"text":"Resolving","kind":"identifier"}],"url":"\/documentation\/factory\/resolving","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/Resolving/factory(_:)-6s19m":{"kind":"symbol","title":"factory(_:)","type":"topic","url":"\/documentation\/factory\/resolving\/factory(_:)-6s19m","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-6s19m","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"factory","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":".Type) -> ","kind":"text"},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">?"}],"role":"symbol","abstract":[{"text":"Returns a registered factory for this type from this container. Use this function to set options and previews after the initial","type":"text"},{"text":" ","type":"text"},{"text":"registration.","type":"text"}]},"doc://Factory/documentation/Factory/Resolving/factory(_:)-4znbq":{"kind":"symbol","title":"factory(_:)","required":true,"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-4znbq","url":"\/documentation\/factory\/resolving\/factory(_:)-4znbq","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type) -> "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">?","kind":"text"}],"role":"symbol","defaultImplementations":1,"abstract":[{"text":"Returns a registered factory for this type from this container.","type":"text"}]},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/resolving/factory(_:)-6s19m.json b/docs/data/documentation/factory/resolving/factory(_:)-6s19m.json index 80cbaa4b..cd598b86 100644 --- a/docs/data/documentation/factory/resolving/factory(_:)-6s19m.json +++ b/docs/data/documentation/factory/resolving/factory(_:)-6s19m.json @@ -1 +1 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-6s19m","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Resolving","doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-4znbq"]]},"kind":"symbol","metadata":{"extendedModule":"Factory","title":"factory(_:)","roleHeading":"Instance Method","role":"symbol","externalID":"s:7Factory9ResolvingPAAE7factoryyA2AVyqd__GSgqd__mlF","modules":[{"name":"Factory"}],"symbolKind":"method","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"factory","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"T","kind":"typeIdentifier"},{"text":".Type) -> ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">?","kind":"text"}]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/resolving\/factory(_:)-6s19m"]}],"sections":[],"abstract":[{"text":"Returns a registered factory for this type from this container. Use this function to set options and previews after the initial","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"registration."}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"factory"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"type"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"text":".Type = T.self) -> ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">?"}],"languages":["swift"]}],"kind":"declarations"},{"content":[{"level":2,"text":"Discussion","anchor":"discussion","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that nothing will be applied if initial registration is not found."}]}],"kind":"content"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/Resolving/factory(_:)-6s19m":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":".Type) -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">?"}],"type":"topic","title":"factory(_:)","kind":"symbol","url":"\/documentation\/factory\/resolving\/factory(_:)-6s19m","abstract":[{"type":"text","text":"Returns a registered factory for this type from this container. Use this function to set options and previews after the initial"},{"type":"text","text":" "},{"type":"text","text":"registration."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-6s19m"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Resolving":{"type":"topic","title":"Resolving","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","abstract":[{"text":"When protocol is applied to a container it enables a typed registration\/resolution mode.","type":"text"}],"role":"symbol","kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Resolving"}],"url":"\/documentation\/factory\/resolving","navigatorTitle":[{"kind":"identifier","text":"Resolving"}]},"doc://Factory/documentation/Factory/Resolving/factory(_:)-4znbq":{"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":".Type) -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">?"}],"kind":"symbol","defaultImplementations":1,"abstract":[{"text":"Returns a registered factory for this type from this container.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-4znbq","type":"topic","title":"factory(_:)","required":true,"url":"\/documentation\/factory\/resolving\/factory(_:)-4znbq"},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Resolving","doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-4znbq"]]},"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/resolving\/factory(_:)-6s19m"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"factory","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"type"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":".Type = T.self) -> "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">?"}]}]},{"kind":"content","content":[{"type":"heading","level":2,"text":"Discussion","anchor":"discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that nothing will be applied if initial registration is not found."}]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-6s19m"},"sections":[],"metadata":{"role":"symbol","roleHeading":"Instance Method","extendedModule":"Factory","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":".Type) -> ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">?","kind":"text"}],"title":"factory(_:)","externalID":"s:7Factory9ResolvingPAAE7factoryyA2AVyqd__GSgqd__mlF","modules":[{"name":"Factory"}],"symbolKind":"method"},"abstract":[{"text":"Returns a registered factory for this type from this container. Use this function to set options and previews after the initial","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"registration."}],"schemaVersion":{"major":0,"patch":0,"minor":3},"references":{"doc://Factory/documentation/Factory/Resolving":{"title":"Resolving","abstract":[{"type":"text","text":"When protocol is applied to a container it enables a typed registration\/resolution mode."}],"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Resolving"}],"navigatorTitle":[{"text":"Resolving","kind":"identifier"}],"url":"\/documentation\/factory\/resolving","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Resolving/factory(_:)-6s19m":{"kind":"symbol","title":"factory(_:)","type":"topic","url":"\/documentation\/factory\/resolving\/factory(_:)-6s19m","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-6s19m","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"factory","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":".Type) -> ","kind":"text"},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">?"}],"role":"symbol","abstract":[{"text":"Returns a registered factory for this type from this container. Use this function to set options and previews after the initial","type":"text"},{"text":" ","type":"text"},{"text":"registration.","type":"text"}]},"doc://Factory/documentation/Factory/Resolving/factory(_:)-4znbq":{"kind":"symbol","title":"factory(_:)","required":true,"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-4znbq","url":"\/documentation\/factory\/resolving\/factory(_:)-4znbq","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type) -> "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">?","kind":"text"}],"role":"symbol","defaultImplementations":1,"abstract":[{"text":"Returns a registered factory for this type from this container.","type":"text"}]},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/resolving/register(_:factory:)-7yaqv.json b/docs/data/documentation/factory/resolving/register(_:factory:)-7yaqv.json index cbac56dc..dc634441 100644 --- a/docs/data/documentation/factory/resolving/register(_:factory:)-7yaqv.json +++ b/docs/data/documentation/factory/resolving/register(_:factory:)-7yaqv.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"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"type"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"text":".Type = T.self, ","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" () -> "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}]},{"content":[{"level":2,"anchor":"discussion","text":"Discussion","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Also returns Factory for further specialization for scopes, decorators, etc."}]}],"kind":"content"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/resolving\/register(_:factory:)-7yaqv"]}],"metadata":{"symbolKind":"method","title":"register(_:factory:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"register","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type, "},{"kind":"externalParam","text":"factory"},{"text":": () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"role":"symbol","roleHeading":"Instance Method","extendedModule":"Factory","modules":[{"name":"Factory"}],"externalID":"s:7Factory9ResolvingPAAE8register_7factoryA2AVyqd__Gqd__m_qd__yctlF"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-7yaqv","interfaceLanguage":"swift"},"schemaVersion":{"patch":0,"major":0,"minor":3},"abstract":[{"type":"text","text":"Registers a new type and associated factory closure with this container."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Resolving","doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-81zql"]]},"sections":[],"kind":"symbol","references":{"doc://Factory/documentation/Factory/Resolving/register(_:factory:)-7yaqv":{"type":"topic","title":"register(_:factory:)","abstract":[{"type":"text","text":"Registers a new type and associated factory closure with this container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-7yaqv","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"register","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":".Type, "},{"kind":"externalParam","text":"factory"},{"text":": () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"url":"\/documentation\/factory\/resolving\/register(_:factory:)-7yaqv"},"doc://Factory/documentation/Factory/Resolving/register(_:factory:)-81zql":{"type":"topic","required":true,"title":"register(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-81zql","abstract":[{"text":"Registers a new type and associated factory closure with this container.","type":"text"}],"defaultImplementations":1,"role":"symbol","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":".Type, "},{"kind":"externalParam","text":"factory"},{"text":": () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"url":"\/documentation\/factory\/resolving\/register(_:factory:)-81zql"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Resolving":{"type":"topic","title":"Resolving","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","abstract":[{"text":"When protocol is applied to a container it enables a typed registration\/resolution mode.","type":"text"}],"role":"symbol","kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Resolving"}],"url":"\/documentation\/factory\/resolving","navigatorTitle":[{"kind":"identifier","text":"Resolving"}]},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]}}} \ No newline at end of file +{"abstract":[{"text":"Registers a new type and associated factory closure with this container.","type":"text"}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"type"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"text":".Type = T.self, ","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Factory","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"platforms":["macOS"]}],"kind":"declarations"},{"kind":"content","content":[{"type":"heading","level":2,"text":"Discussion","anchor":"discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Also returns Factory for further specialization for scopes, decorators, etc."}]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Resolving","doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-81zql"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/resolving\/register(_:factory:)-7yaqv"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-7yaqv"},"metadata":{"role":"symbol","roleHeading":"Instance Method","title":"register(_:factory:)","modules":[{"name":"Factory"}],"extendedModule":"Factory","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"register"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"externalID":"s:7Factory9ResolvingPAAE8register_7factoryA2AVyqd__Gqd__m_qd__yctlF","symbolKind":"method"},"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"kind":"symbol","references":{"doc://Factory/documentation/Factory/Resolving":{"title":"Resolving","abstract":[{"type":"text","text":"When protocol is applied to a container it enables a typed registration\/resolution mode."}],"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Resolving"}],"navigatorTitle":[{"text":"Resolving","kind":"identifier"}],"url":"\/documentation\/factory\/resolving","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/Resolving/register(_:factory:)-81zql":{"title":"register(_:factory:)","defaultImplementations":1,"url":"\/documentation\/factory\/resolving\/register(_:factory:)-81zql","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-81zql","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"register"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":".Type, ","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": () -> "},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"abstract":[{"type":"text","text":"Registers a new type and associated factory closure with this container."}],"kind":"symbol","required":true,"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Resolving/register(_:factory:)-7yaqv":{"title":"register(_:factory:)","url":"\/documentation\/factory\/resolving\/register(_:factory:)-7yaqv","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-7yaqv","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"register","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"T"},{"text":".Type, ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": () -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Registers a new type and associated factory closure with this container."}],"kind":"symbol","type":"topic","role":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/resolving/register(_:factory:)-81zql.json b/docs/data/documentation/factory/resolving/register(_:factory:)-81zql.json index b21a7031..382dfb78 100644 --- a/docs/data/documentation/factory/resolving/register(_:factory:)-81zql.json +++ b/docs/data/documentation/factory/resolving/register(_:factory:)-81zql.json @@ -1 +1 @@ -{"defaultImplementationsSections":[{"title":"Resolving Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-7yaqv"]}],"metadata":{"required":true,"title":"register(_:factory:)","externalID":"s:7Factory9ResolvingP8register_7factoryA2AVyqd__Gqd__m_qd__yctlF","modules":[{"name":"Factory"}],"role":"symbol","symbolKind":"method","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"register"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"T"},{"text":".Type, ","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": () -> "},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}]},"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/resolving\/register(_:factory:)-81zql"]}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"register","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"type","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":".Type, "},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Factory","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-81zql","interfaceLanguage":"swift"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Resolving"]]},"abstract":[{"text":"Registers a new type and associated factory closure with this container.","type":"text"}],"references":{"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Resolving":{"type":"topic","title":"Resolving","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","abstract":[{"text":"When protocol is applied to a container it enables a typed registration\/resolution mode.","type":"text"}],"role":"symbol","kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Resolving"}],"url":"\/documentation\/factory\/resolving","navigatorTitle":[{"kind":"identifier","text":"Resolving"}]},"doc://Factory/documentation/Factory/Resolving/register(_:factory:)-7yaqv":{"type":"topic","title":"register(_:factory:)","abstract":[{"type":"text","text":"Registers a new type and associated factory closure with this container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-7yaqv","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"register","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":".Type, "},{"kind":"externalParam","text":"factory"},{"text":": () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"url":"\/documentation\/factory\/resolving\/register(_:factory:)-7yaqv"},"doc://Factory/documentation/Factory/Resolving/register(_:factory:)-81zql":{"type":"topic","required":true,"title":"register(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-81zql","abstract":[{"text":"Registers a new type and associated factory closure with this container.","type":"text"}],"defaultImplementations":1,"role":"symbol","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":".Type, "},{"kind":"externalParam","text":"factory"},{"text":": () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"url":"\/documentation\/factory\/resolving\/register(_:factory:)-81zql"}}} \ No newline at end of file +{"sections":[],"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Instance Method","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"register","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type, "},{"text":"factory","kind":"externalParam"},{"text":": () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"externalID":"s:7Factory9ResolvingP8register_7factoryA2AVyqd__Gqd__m_qd__yctlF","symbolKind":"method","required":true,"role":"symbol","title":"register(_:factory:)"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Resolving"]]},"defaultImplementationsSections":[{"title":"Resolving Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-7yaqv"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-81zql"},"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"register","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"type"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type, "},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"languages":["swift"]}]}],"kind":"symbol","abstract":[{"type":"text","text":"Registers a new type and associated factory closure with this container."}],"variants":[{"paths":["\/documentation\/factory\/resolving\/register(_:factory:)-81zql"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/Resolving/register(_:factory:)-7yaqv":{"title":"register(_:factory:)","url":"\/documentation\/factory\/resolving\/register(_:factory:)-7yaqv","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-7yaqv","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"register","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"T"},{"text":".Type, ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": () -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Registers a new type and associated factory closure with this container."}],"kind":"symbol","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Resolving/register(_:factory:)-81zql":{"title":"register(_:factory:)","defaultImplementations":1,"url":"\/documentation\/factory\/resolving\/register(_:factory:)-81zql","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-81zql","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"register"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":".Type, ","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": () -> "},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"abstract":[{"type":"text","text":"Registers a new type and associated factory closure with this container."}],"kind":"symbol","required":true,"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Resolving":{"title":"Resolving","abstract":[{"type":"text","text":"When protocol is applied to a container it enables a typed registration\/resolution mode."}],"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Resolving"}],"navigatorTitle":[{"text":"Resolving","kind":"identifier"}],"url":"\/documentation\/factory\/resolving","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/resolving/resolve(_:)-6wtxp.json b/docs/data/documentation/factory/resolving/resolve(_:)-6wtxp.json index 678385e2..87e1d4a7 100644 --- a/docs/data/documentation/factory/resolving/resolve(_:)-6wtxp.json +++ b/docs/data/documentation/factory/resolving/resolve(_:)-6wtxp.json @@ -1 +1 @@ -{"variants":[{"paths":["\/documentation\/factory\/resolving\/resolve(_:)-6wtxp"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"metadata":{"title":"resolve(_:)","externalID":"s:7Factory9ResolvingP7resolveyqd__Sgqd__mlF","required":true,"roleHeading":"Instance Method","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":".Type) -> "},{"text":"T","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"modules":[{"name":"Factory"}],"role":"symbol","symbolKind":"method"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-6wtxp","interfaceLanguage":"swift"},"abstract":[{"text":"Resolves a type from this container.","type":"text"}],"defaultImplementationsSections":[{"title":"Resolving Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-82xu1"]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Resolving"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"type","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":".Type) -> "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?"}],"languages":["swift"],"platforms":["macOS"]}]}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/Resolving/resolve(_:)-6wtxp":{"role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type) -> "},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"kind":"symbol","defaultImplementations":1,"abstract":[{"text":"Resolves a type from this container.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-6wtxp","type":"topic","title":"resolve(_:)","required":true,"url":"\/documentation\/factory\/resolving\/resolve(_:)-6wtxp"},"doc://Factory/documentation/Factory/Resolving":{"type":"topic","title":"Resolving","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","abstract":[{"text":"When protocol is applied to a container it enables a typed registration\/resolution mode.","type":"text"}],"role":"symbol","kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Resolving"}],"url":"\/documentation\/factory\/resolving","navigatorTitle":[{"kind":"identifier","text":"Resolving"}]},"doc://Factory/documentation/Factory/Resolving/resolve(_:)-82xu1":{"kind":"symbol","title":"resolve(_:)","url":"\/documentation\/factory\/resolving\/resolve(_:)-82xu1","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-82xu1","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type) -> "},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"abstract":[{"type":"text","text":"Resolves a type from this container."}],"role":"symbol","type":"topic"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"abstract":[{"text":"Resolves a type from this container.","type":"text"}],"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Resolving"]]},"metadata":{"roleHeading":"Instance Method","symbolKind":"method","required":true,"title":"resolve(_:)","role":"symbol","externalID":"s:7Factory9ResolvingP7resolveyqd__Sgqd__mlF","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":".Type) -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?"}],"modules":[{"name":"Factory"}]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"type","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":".Type) -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":"?","kind":"text"}]}],"kind":"declarations"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"defaultImplementationsSections":[{"title":"Resolving Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-82xu1"]}],"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/resolving\/resolve(_:)-6wtxp"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-6wtxp","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/Resolving/resolve(_:)-6wtxp":{"title":"resolve(_:)","defaultImplementations":1,"abstract":[{"text":"Resolves a type from this container.","type":"text"}],"kind":"symbol","required":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-6wtxp","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":".Type) -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"url":"\/documentation\/factory\/resolving\/resolve(_:)-6wtxp"},"doc://Factory/documentation/Factory/Resolving":{"title":"Resolving","abstract":[{"type":"text","text":"When protocol is applied to a container it enables a typed registration\/resolution mode."}],"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Resolving"}],"navigatorTitle":[{"text":"Resolving","kind":"identifier"}],"url":"\/documentation\/factory\/resolving","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving"},"doc://Factory/documentation/Factory/Resolving/resolve(_:)-82xu1":{"title":"resolve(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-82xu1","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"T","kind":"typeIdentifier"},{"text":".Type) -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}],"type":"topic","abstract":[{"text":"Resolves a type from this container.","type":"text"}],"role":"symbol","url":"\/documentation\/factory\/resolving\/resolve(_:)-82xu1","kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/resolving/resolve(_:)-82xu1.json b/docs/data/documentation/factory/resolving/resolve(_:)-82xu1.json index 42012094..e442f62c 100644 --- a/docs/data/documentation/factory/resolving/resolve(_:)-82xu1.json +++ b/docs/data/documentation/factory/resolving/resolve(_:)-82xu1.json @@ -1 +1 @@ -{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/resolving\/resolve(_:)-82xu1"]}],"metadata":{"title":"resolve(_:)","symbolKind":"method","externalID":"s:7Factory9ResolvingPAAE7resolveyqd__Sgqd__mlF","extendedModule":"Factory","role":"symbol","modules":[{"name":"Factory"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"T"},{"text":".Type) -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}],"roleHeading":"Instance Method"},"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-82xu1"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Resolving","doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-6wtxp"]]},"schemaVersion":{"minor":3,"major":0,"patch":0},"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"type"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type = T.self) -> "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?"}],"languages":["swift"]}]}],"abstract":[{"text":"Resolves a type from this container.","type":"text"}],"references":{"doc://Factory/documentation/Factory/Resolving/resolve(_:)-82xu1":{"kind":"symbol","title":"resolve(_:)","url":"\/documentation\/factory\/resolving\/resolve(_:)-82xu1","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-82xu1","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type) -> "},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"abstract":[{"type":"text","text":"Resolves a type from this container."}],"role":"symbol","type":"topic"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Resolving/resolve(_:)-6wtxp":{"role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type) -> "},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"kind":"symbol","defaultImplementations":1,"abstract":[{"text":"Resolves a type from this container.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-6wtxp","type":"topic","title":"resolve(_:)","required":true,"url":"\/documentation\/factory\/resolving\/resolve(_:)-6wtxp"},"doc://Factory/documentation/Factory/Resolving":{"type":"topic","title":"Resolving","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","abstract":[{"text":"When protocol is applied to a container it enables a typed registration\/resolution mode.","type":"text"}],"role":"symbol","kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Resolving"}],"url":"\/documentation\/factory\/resolving","navigatorTitle":[{"kind":"identifier","text":"Resolving"}]}}} \ No newline at end of file +{"abstract":[{"type":"text","text":"Resolves a type from this container."}],"kind":"symbol","primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"type","kind":"internalParam"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type = T.self) -> "},{"text":"T","kind":"typeIdentifier"},{"text":"?","kind":"text"}]}],"kind":"declarations"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-82xu1"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Resolving","doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-6wtxp"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":".Type) -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"modules":[{"name":"Factory"}],"title":"resolve(_:)","roleHeading":"Instance Method","externalID":"s:7Factory9ResolvingPAAE7resolveyqd__Sgqd__mlF","symbolKind":"method","extendedModule":"Factory","role":"symbol"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/resolving\/resolve(_:)-82xu1"]}],"sections":[],"references":{"doc://Factory/documentation/Factory/Resolving/resolve(_:)-82xu1":{"title":"resolve(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-82xu1","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"T","kind":"typeIdentifier"},{"text":".Type) -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}],"type":"topic","abstract":[{"text":"Resolves a type from this container.","type":"text"}],"role":"symbol","url":"\/documentation\/factory\/resolving\/resolve(_:)-82xu1","kind":"symbol"},"doc://Factory/documentation/Factory/Resolving/resolve(_:)-6wtxp":{"title":"resolve(_:)","defaultImplementations":1,"abstract":[{"text":"Resolves a type from this container.","type":"text"}],"kind":"symbol","required":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-6wtxp","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":".Type) -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"url":"\/documentation\/factory\/resolving\/resolve(_:)-6wtxp"},"doc://Factory/documentation/Factory/Resolving":{"title":"Resolving","abstract":[{"type":"text","text":"When protocol is applied to a container it enables a typed registration\/resolution mode."}],"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Resolving"}],"navigatorTitle":[{"text":"Resolving","kind":"identifier"}],"url":"\/documentation\/factory\/resolving","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/scope.json b/docs/data/documentation/factory/scope.json index 75286f1e..69e8c1ef 100644 --- a/docs/data/documentation/factory/scope.json +++ b/docs/data/documentation/factory/scope.json @@ -1 +1 @@ -{"variants":[{"paths":["\/documentation\/factory\/scope"],"traits":[{"interfaceLanguage":"swift"}]}],"topicSections":[{"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"],"title":"Type Properties"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"platforms":["macOS"],"languages":["swift"]}]},{"kind":"content","content":[{"text":"Overview","type":"heading","anchor":"overview","level":2},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"inlineContent":[{"type":"text","text":"That behavior can vary according to the scope type (e.g. Shared or Graph)"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," self { MyService() }"," .singleton"," }","}"]},{"type":"paragraph","inlineContent":[{"text":"Scopes work hand in hand with Containers to managed object lifecycles. If the container ever goes our of scope, so","type":"text"},{"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":" "},{"text":"of the dependency will be created each and every time that factory is resolved.","type":"text"}]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope","interfaceLanguage":"swift"},"sections":[],"metadata":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"title":"Scope","roleHeading":"Class","role":"symbol","externalID":"s:7Factory5ScopeC","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"modules":[{"name":"Factory"}],"symbolKind":"class"},"kind":"symbol","schemaVersion":{"minor":3,"patch":0,"major":0},"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"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}],"relationshipsSections":[{"kind":"relationships","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"],"title":"Inherited By","type":"inheritedBy"}],"references":{"doc://Factory/documentation/Factory/Scope/singleton-swift.type.property":{"type":"topic","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory5ScopeC","text":"Scope","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"Singleton","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC9SingletonC"}],"title":"singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/singleton-swift.type.property","kind":"symbol","abstract":[{"text":"A reference to the default singleton scope manager.","type":"text"}],"role":"symbol","url":"\/documentation\/factory\/scope\/singleton-swift.type.property"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","title":"Scopes"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"type":"topic","url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Shared"}],"abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"role":"symbol"},"doc://Factory/documentation/Factory/Scope/shared-swift.type.property":{"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"kind":"text","text":": "},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"text":"Shared","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC6SharedC"}],"role":"symbol","url":"\/documentation\/factory\/scope\/shared-swift.type.property","abstract":[{"text":"A reference to the default shared scope manager.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/shared-swift.type.property","title":"shared"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"title":"Scope.Graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"title":"Scope.Unique","abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scope/cached-swift.type.property":{"role":"symbol","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier","text":"Scope"},{"kind":"text","text":"."},{"text":"Cached","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC6CachedC"}],"title":"cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/cached-swift.type.property","url":"\/documentation\/factory\/scope\/cached-swift.type.property","type":"topic","kind":"symbol","abstract":[{"type":"text","text":"A reference to the default cached scope manager."}]},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","url":"\/documentation\/factory\/scope\/singleton-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"type":"topic","role":"symbol","title":"Scope.Singleton","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/graph-swift.type.property":{"role":"symbol","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"text":"graph","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"text":".","kind":"text"},{"text":"Graph","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC5GraphC"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/graph-swift.type.property","title":"graph","url":"\/documentation\/factory\/scope\/graph-swift.type.property","type":"topic","kind":"symbol","abstract":[{"type":"text","text":"A reference to the default graph scope manager."}]},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/cached-swift.class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","navigatorTitle":[{"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."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Scope/unique-swift.type.property":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/unique-swift.type.property","title":"unique","kind":"symbol","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC6UniqueC","text":"Unique"}],"url":"\/documentation\/factory\/scope\/unique-swift.type.property","role":"symbol","abstract":[{"type":"text","text":"A reference to the default unique scope."}]}}} \ No newline at end of file +{"sections":[],"schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"role":"symbol","modules":[{"name":"Factory"}],"roleHeading":"Class","externalID":"s:7Factory5ScopeC","symbolKind":"class","title":"Scope"},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope","interfaceLanguage":"swift"},"topicSections":[{"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"],"title":"Type Properties"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"kind":"content","content":[{"type":"heading","level":2,"text":"Overview","anchor":"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"},{"text":" ","type":"text"},{"type":"text","text":"is cached. The next time that Factory is resolved a reference to the originally cached object will be returned."}]},{"inlineContent":[{"type":"text","text":"That behavior can vary according to the scope type (e.g. Shared or Graph)"}],"type":"paragraph"},{"code":["extension Container {"," var service: Factory {"," self { MyService() }"," .singleton"," }","}"],"type":"codeListing","syntax":"swift"},{"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"},{"text":" ","type":"text"},{"text":"will all of its cached references.","type":"text"}]},{"inlineContent":[{"text":"If no scope is associated with a given Factory then the scope is considered to be unique and a new instance","type":"text"},{"type":"text","text":" "},{"text":"of the dependency will be created each and every time that factory is resolved.","type":"text"}],"type":"paragraph"}]}],"relationshipsSections":[{"kind":"relationships","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"],"type":"inheritedBy","title":"Inherited By"}],"seeAlsoSections":[{"generated":true,"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"],"title":"Scope Class Definitions"}],"variants":[{"paths":["\/documentation\/factory\/scope"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"references":{"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","title":"Scope.Graph","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"navigatorTitle":[{"text":"Graph","kind":"identifier"}],"role":"symbol","abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory/Scope/singleton-swift.type.property":{"fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"singleton","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Scope","preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC9SingletonC","text":"Singleton"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/singleton-swift.type.property","url":"\/documentation\/factory\/scope\/singleton-swift.type.property","type":"topic","title":"singleton","abstract":[{"type":"text","text":"A reference to the default singleton scope manager."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"},"doc://Factory/documentation/Factory/Scope/cached-swift.type.property":{"role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC6CachedC","text":"Cached"}],"kind":"symbol","title":"cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/cached-swift.type.property","abstract":[{"type":"text","text":"A reference to the default cached scope manager."}],"url":"\/documentation\/factory\/scope\/cached-swift.type.property"},"doc://Factory/documentation/Factory/Scope/shared-swift.type.property":{"abstract":[{"type":"text","text":"A reference to the default shared scope manager."}],"title":"shared","url":"\/documentation\/factory\/scope\/shared-swift.type.property","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC","text":"Scope","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Shared","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC6SharedC"}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/shared-swift.type.property","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/graph-swift.type.property":{"url":"\/documentation\/factory\/scope\/graph-swift.type.property","title":"graph","type":"topic","kind":"symbol","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"graph","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC5GraphC","kind":"typeIdentifier","text":"Graph"}],"role":"symbol","abstract":[{"text":"A reference to the default graph scope manager.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/graph-swift.type.property"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Shared","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"kind":"article"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Unique","kind":"identifier"}],"type":"topic","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"role":"symbol","kind":"symbol","abstract":[{"text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","title":"Scope.Unique","url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","title":"Scope.Singleton","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scope/unique-swift.type.property":{"title":"unique","kind":"symbol","url":"\/documentation\/factory\/scope\/unique-swift.type.property","abstract":[{"type":"text","text":"A reference to the default unique scope."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/unique-swift.type.property","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"unique","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC6UniqueC","text":"Unique"}],"type":"topic"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Cached","kind":"identifier"}],"type":"topic","navigatorTitle":[{"text":"Cached","kind":"identifier"}],"role":"symbol","kind":"symbol","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","title":"Scope.Cached","url":"\/documentation\/factory\/scope\/cached-swift.class"}}} \ 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 d43958d2..766ce55d 100644 --- a/docs/data/documentation/factory/scope/cached-swift.class.json +++ b/docs/data/documentation/factory/scope/cached-swift.class.json @@ -1 +1 @@ -{"seeAlsoSections":[{"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"],"title":"Scope Class Definitions","generated":true}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/cached-swift.class"]}],"kind":"symbol","sections":[],"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class\/init()"]}],"relationshipsSections":[{"kind":"relationships","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"],"type":"inheritsFrom","title":"Inherits From"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"final","kind":"keyword"},{"kind":"text","text":" "},{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Cached"}],"languages":["swift"]}],"kind":"declarations"}],"metadata":{"roleHeading":"Class","symbolKind":"class","modules":[{"name":"Factory"}],"externalID":"s:7Factory5ScopeC6CachedC","title":"Scope.Cached","extendedModule":"Factory","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"navigatorTitle":[{"text":"Cached","kind":"identifier"}]},"references":{"doc://Factory/documentation/Factory/Scope/Cached-swift.class/init()":{"url":"\/documentation\/factory\/scope\/cached-swift.class\/init()","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class\/init()","role":"symbol","type":"topic","title":"init()","kind":"symbol","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}]},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"type":"topic","url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Shared"}],"abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"role":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","title":"Scopes"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"title":"Scope.Unique","abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"title":"Scope.Graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/cached-swift.class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","navigatorTitle":[{"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."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","url":"\/documentation\/factory\/scope\/singleton-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"type":"topic","role":"symbol","title":"Scope.Singleton","kind":"symbol"}}} \ No newline at end of file +{"metadata":{"extendedModule":"Factory","symbolKind":"class","role":"symbol","modules":[{"name":"Factory"}],"roleHeading":"Class","navigatorTitle":[{"text":"Cached","kind":"identifier"}],"title":"Scope.Cached","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Cached"}],"externalID":"s:7Factory5ScopeC6CachedC"},"kind":"symbol","seeAlsoSections":[{"generated":true,"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"]}],"sections":[],"abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class\/init()"],"title":"Initializers"}],"schemaVersion":{"minor":3,"major":0,"patch":0},"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"],"title":"Inherits From","type":"inheritsFrom","kind":"relationships"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"final","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Cached","kind":"identifier"}],"languages":["swift"]}]}],"variants":[{"paths":["\/documentation\/factory\/scope\/cached-swift.class"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","title":"Scope.Singleton","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Shared","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Unique","kind":"identifier"}],"type":"topic","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"role":"symbol","kind":"symbol","abstract":[{"text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","title":"Scope.Unique","url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class/init()":{"url":"\/documentation\/factory\/scope\/cached-swift.class\/init()","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class\/init()","kind":"symbol","type":"topic","role":"symbol","title":"init()","fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"abstract":[]},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"kind":"article"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Cached","kind":"identifier"}],"type":"topic","navigatorTitle":[{"text":"Cached","kind":"identifier"}],"role":"symbol","kind":"symbol","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","title":"Scope.Cached","url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","title":"Scope.Graph","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"navigatorTitle":[{"text":"Graph","kind":"identifier"}],"role":"symbol","abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ 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 cfe17275..78db13a1 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 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"override","kind":"keyword"},{"kind":"text","text":" "},{"text":"init","kind":"keyword"},{"kind":"text","text":"()"}]}]}],"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class\/init()","interfaceLanguage":"swift"},"sections":[],"metadata":{"externalID":"s:7Factory5ScopeC6CachedCAEycfc","modules":[{"name":"Factory"}],"symbolKind":"init","role":"symbol","roleHeading":"Initializer","title":"init()","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/cached-swift.class\/init()"]}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/cached-swift.class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","navigatorTitle":[{"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."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","title":"Scopes"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class/init()":{"url":"\/documentation\/factory\/scope\/cached-swift.class\/init()","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class\/init()","role":"symbol","type":"topic","title":"init()","kind":"symbol","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}]}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"]]},"schemaVersion":{"major":0,"patch":0,"minor":3},"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"override"},{"text":" ","kind":"text"},{"text":"init","kind":"keyword"},{"text":"()","kind":"text"}],"languages":["swift"]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class\/init()","interfaceLanguage":"swift"},"metadata":{"role":"symbol","title":"init()","roleHeading":"Initializer","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"symbolKind":"init","modules":[{"name":"Factory"}],"externalID":"s:7Factory5ScopeC6CachedCAEycfc"},"variants":[{"paths":["\/documentation\/factory\/scope\/cached-swift.class\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"references":{"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"kind":"article"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Cached","kind":"identifier"}],"type":"topic","navigatorTitle":[{"text":"Cached","kind":"identifier"}],"role":"symbol","kind":"symbol","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","title":"Scope.Cached","url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class/init()":{"url":"\/documentation\/factory\/scope\/cached-swift.class\/init()","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class\/init()","kind":"symbol","type":"topic","role":"symbol","title":"init()","fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"abstract":[]}}} \ 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 71ae5656..fa17876a 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 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/cached-swift.type.property","interfaceLanguage":"swift"},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"metadata":{"role":"symbol","modules":[{"name":"Factory"}],"roleHeading":"Type Property","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"text":"cached","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Cached","preciseIdentifier":"s:7Factory5ScopeC6CachedC"}],"extendedModule":"Factory","title":"cached","symbolKind":"property","externalID":"s:7Factory5ScopeC6cachedAC6CachedCvpZ"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/cached-swift.type.property"]}],"sections":[],"abstract":[{"text":"A reference to the default cached scope manager.","type":"text"}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"text":"cached","kind":"identifier"},{"kind":"text","text":": "},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"text":".","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"typeIdentifier","text":"Cached","preciseIdentifier":"s:7Factory5ScopeC6CachedC"}],"languages":["swift"]}],"kind":"declarations"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory/Scope/cached-swift.type.property":{"role":"symbol","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier","text":"Scope"},{"kind":"text","text":"."},{"text":"Cached","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC6CachedC"}],"title":"cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/cached-swift.type.property","url":"\/documentation\/factory\/scope\/cached-swift.type.property","type":"topic","kind":"symbol","abstract":[{"type":"text","text":"A reference to the default cached scope manager."}]},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/cached-swift.class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","navigatorTitle":[{"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."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","title":"Scopes"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"}}} \ No newline at end of file +{"sections":[],"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/cached-swift.type.property"]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"text":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Cached","preciseIdentifier":"s:7Factory5ScopeC6CachedC","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","kind":"typeIdentifier"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/cached-swift.type.property","interfaceLanguage":"swift"},"metadata":{"extendedModule":"Factory","roleHeading":"Type Property","role":"symbol","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC","text":"Scope","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC6CachedC","kind":"typeIdentifier","text":"Cached"}],"title":"cached","externalID":"s:7Factory5ScopeC6cachedAC6CachedCvpZ","modules":[{"name":"Factory"}],"symbolKind":"property"},"abstract":[{"type":"text","text":"A reference to the default cached scope manager."}],"references":{"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"kind":"article"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"},"doc://Factory/documentation/Factory/Scope/cached-swift.type.property":{"role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC6CachedC","text":"Cached"}],"kind":"symbol","title":"cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/cached-swift.type.property","abstract":[{"type":"text","text":"A reference to the default cached scope manager."}],"url":"\/documentation\/factory\/scope\/cached-swift.type.property"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Cached","kind":"identifier"}],"type":"topic","navigatorTitle":[{"text":"Cached","kind":"identifier"}],"role":"symbol","kind":"symbol","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","title":"Scope.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 5d86f116..3d5cc7d8 100644 --- a/docs/data/documentation/factory/scope/graph-swift.class.json +++ b/docs/data/documentation/factory/scope/graph-swift.class.json @@ -1 +1 @@ -{"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"kind":"symbol","topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class\/init()"]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"final","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Graph","kind":"identifier"}],"languages":["swift"]}]},{"content":[{"type":"heading","level":2,"text":"Overview","anchor":"overview"},{"inlineContent":[{"type":"text","text":"This scope is managed and cleared by the main resolution function at the end of each resolution cycle."}],"type":"paragraph"}],"kind":"content"}],"seeAlsoSections":[{"generated":true,"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"]}],"variants":[{"paths":["\/documentation\/factory\/scope\/graph-swift.class"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"sections":[],"metadata":{"modules":[{"name":"Factory"}],"externalID":"s:7Factory5ScopeC5GraphC","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"symbolKind":"class","title":"Scope.Graph","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"roleHeading":"Class","extendedModule":"Factory","role":"symbol"},"relationshipsSections":[{"type":"inheritsFrom","kind":"relationships","title":"Inherits From","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","title":"Scopes"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"title":"Scope.Unique","abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"title":"Scope.Graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class/init()":{"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class\/init()","kind":"symbol","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"title":"init()","url":"\/documentation\/factory\/scope\/graph-swift.class\/init()","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"type":"topic","url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Shared"}],"abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"role":"symbol"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/cached-swift.class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","navigatorTitle":[{"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."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","url":"\/documentation\/factory\/scope\/singleton-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"type":"topic","role":"symbol","title":"Scope.Singleton","kind":"symbol"}}} \ No newline at end of file +{"sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class\/init()"],"title":"Initializers"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"],"title":"Inherits From","kind":"relationships","type":"inheritsFrom"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"final"},{"text":" ","kind":"text"},{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}]}],"kind":"declarations"},{"content":[{"level":2,"text":"Overview","anchor":"overview","type":"heading"},{"inlineContent":[{"type":"text","text":"This scope is managed and cleared by the main resolution function at the end of each resolution cycle."}],"type":"paragraph"}],"kind":"content"}],"metadata":{"extendedModule":"Factory","roleHeading":"Class","title":"Scope.Graph","role":"symbol","externalID":"s:7Factory5ScopeC5GraphC","modules":[{"name":"Factory"}],"navigatorTitle":[{"text":"Graph","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"symbolKind":"class"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"kind":"symbol","seeAlsoSections":[{"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,"title":"Scope Class Definitions"}],"variants":[{"paths":["\/documentation\/factory\/scope\/graph-swift.class"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/Scope/Graph-swift.class/init()":{"abstract":[],"fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"kind":"symbol","type":"topic","role":"symbol","title":"init()","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class\/init()","url":"\/documentation\/factory\/scope\/graph-swift.class\/init()"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","title":"Scope.Graph","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"navigatorTitle":[{"text":"Graph","kind":"identifier"}],"role":"symbol","abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","title":"Scope.Singleton","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"kind":"article"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Unique","kind":"identifier"}],"type":"topic","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"role":"symbol","kind":"symbol","abstract":[{"text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","title":"Scope.Unique","url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Shared","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Cached","kind":"identifier"}],"type":"topic","navigatorTitle":[{"text":"Cached","kind":"identifier"}],"role":"symbol","kind":"symbol","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","title":"Scope.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/init().json b/docs/data/documentation/factory/scope/graph-swift.class/init().json index 2ab573fb..447f8d52 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":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"override","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"init"},{"kind":"text","text":"()"}]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/graph-swift.class\/init()"]}],"schemaVersion":{"major":0,"patch":0,"minor":3},"sections":[],"metadata":{"externalID":"s:7Factory5ScopeC5GraphCAEycfc","role":"symbol","modules":[{"name":"Factory"}],"roleHeading":"Initializer","symbolKind":"init","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"title":"init()"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"]]},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class\/init()","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","title":"Scopes"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Scope/Graph-swift.class/init()":{"abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class\/init()","kind":"symbol","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"title":"init()","url":"\/documentation\/factory\/scope\/graph-swift.class\/init()","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"title":"Scope.Graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"role":"symbol","kind":"symbol"}}} \ No newline at end of file +{"sections":[],"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/scope\/graph-swift.class\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"]]},"metadata":{"externalID":"s:7Factory5ScopeC5GraphCAEycfc","fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"role":"symbol","symbolKind":"init","title":"init()","roleHeading":"Initializer","modules":[{"name":"Factory"}]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"override","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"init"},{"kind":"text","text":"()"}],"platforms":["macOS"],"languages":["swift"]}]}],"schemaVersion":{"patch":0,"minor":3,"major":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class\/init()","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","title":"Scope.Graph","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"navigatorTitle":[{"text":"Graph","kind":"identifier"}],"role":"symbol","abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class/init()":{"abstract":[],"fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"kind":"symbol","type":"topic","role":"symbol","title":"init()","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class\/init()","url":"\/documentation\/factory\/scope\/graph-swift.class\/init()"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"kind":"article"}}} \ 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 96b27230..bcd794ea 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 @@ -{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/graph-swift.type.property"]}],"sections":[],"metadata":{"roleHeading":"Type Property","modules":[{"name":"Factory"}],"role":"symbol","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"graph","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":"."},{"text":"Graph","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC5GraphC"}],"title":"graph","extendedModule":"Factory","symbolKind":"property","externalID":"s:7Factory5ScopeC5graphAC5GraphCvpZ"},"kind":"symbol","abstract":[{"type":"text","text":"A reference to the default graph scope manager."}],"schemaVersion":{"minor":3,"major":0,"patch":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/graph-swift.type.property","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"text":"Scope","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory5ScopeC5GraphC","text":"Graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"typeIdentifier"}],"languages":["swift"]}]}],"references":{"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/Scope/graph-swift.type.property":{"role":"symbol","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"text":"graph","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"text":".","kind":"text"},{"text":"Graph","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC5GraphC"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/graph-swift.type.property","title":"graph","url":"\/documentation\/factory\/scope\/graph-swift.type.property","type":"topic","kind":"symbol","abstract":[{"type":"text","text":"A reference to the default graph scope manager."}]},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","title":"Scopes"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"title":"Scope.Graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/graph-swift.type.property","interfaceLanguage":"swift"},"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/graph-swift.type.property"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"graph"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","text":"Scope","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Graph","preciseIdentifier":"s:7Factory5ScopeC5GraphC","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","kind":"typeIdentifier"}],"platforms":["macOS"]}],"kind":"declarations"}],"abstract":[{"text":"A reference to the default graph scope manager.","type":"text"}],"metadata":{"symbolKind":"property","role":"symbol","roleHeading":"Type Property","modules":[{"name":"Factory"}],"extendedModule":"Factory","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"graph","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory5ScopeC","text":"Scope","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"Graph","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC5GraphC"}],"externalID":"s:7Factory5ScopeC5graphAC5GraphCvpZ","title":"graph"},"references":{"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","title":"Scope.Graph","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"navigatorTitle":[{"text":"Graph","kind":"identifier"}],"role":"symbol","abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory/Scope/graph-swift.type.property":{"url":"\/documentation\/factory\/scope\/graph-swift.type.property","title":"graph","type":"topic","kind":"symbol","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"graph","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC5GraphC","kind":"typeIdentifier","text":"Graph"}],"role":"symbol","abstract":[{"text":"A reference to the default graph scope manager.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/graph-swift.type.property"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"kind":"article"}}} \ 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 58d8eaca..08d9fb96 100644 --- a/docs/data/documentation/factory/scope/shared-swift.class.json +++ b/docs/data/documentation/factory/scope/shared-swift.class.json @@ -1 +1 @@ -{"abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"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}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class"},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"final"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}]}]}],"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/shared-swift.class"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class\/init()"]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"relationshipsSections":[{"kind":"relationships","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"],"type":"inheritsFrom","title":"Inherits From"}],"sections":[],"metadata":{"roleHeading":"Class","symbolKind":"class","modules":[{"name":"Factory"}],"externalID":"s:7Factory5ScopeC6SharedC","title":"Scope.Shared","extendedModule":"Factory","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"navigatorTitle":[{"text":"Shared","kind":"identifier"}]},"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","title":"Scopes"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"type":"topic","url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Shared"}],"abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"role":"symbol"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"title":"Scope.Graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/cached-swift.class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","navigatorTitle":[{"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."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","url":"\/documentation\/factory\/scope\/singleton-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"type":"topic","role":"symbol","title":"Scope.Singleton","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"title":"Scope.Unique","abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class/init()":{"type":"topic","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"url":"\/documentation\/factory\/scope\/shared-swift.class\/init()","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class\/init()","role":"symbol","abstract":[],"title":"init()","kind":"symbol"}}} \ No newline at end of file +{"schemaVersion":{"minor":3,"major":0,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"variants":[{"paths":["\/documentation\/factory\/scope\/shared-swift.class"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class"},"seeAlsoSections":[{"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,"title":"Scope Class Definitions"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"final"},{"text":" ","kind":"text"},{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Shared","kind":"identifier"}],"languages":["swift"]}]}],"metadata":{"title":"Scope.Shared","extendedModule":"Factory","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Shared","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"Shared"}],"role":"symbol","modules":[{"name":"Factory"}],"roleHeading":"Class","externalID":"s:7Factory5ScopeC6SharedC","symbolKind":"class"},"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class\/init()"],"title":"Initializers"}],"sections":[],"abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"relationshipsSections":[{"title":"Inherits From","kind":"relationships","type":"inheritsFrom","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Shared","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class/init()":{"type":"topic","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class\/init()","url":"\/documentation\/factory\/scope\/shared-swift.class\/init()","abstract":[],"kind":"symbol","role":"symbol","title":"init()"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"kind":"article"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","title":"Scope.Graph","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"navigatorTitle":[{"text":"Graph","kind":"identifier"}],"role":"symbol","abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","title":"Scope.Singleton","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Cached","kind":"identifier"}],"type":"topic","navigatorTitle":[{"text":"Cached","kind":"identifier"}],"role":"symbol","kind":"symbol","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","title":"Scope.Cached","url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Unique","kind":"identifier"}],"type":"topic","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"role":"symbol","kind":"symbol","abstract":[{"text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","title":"Scope.Unique","url":"\/documentation\/factory\/scope\/unique-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 342741cf..153945ed 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 @@ -{"schemaVersion":{"minor":3,"patch":0,"major":0},"sections":[],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class"]]},"metadata":{"externalID":"s:7Factory5ScopeC6SharedCAEycfc","modules":[{"name":"Factory"}],"fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"symbolKind":"init","role":"symbol","title":"init()","roleHeading":"Initializer"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class\/init()","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"override","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"init"},{"kind":"text","text":"()"}]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/shared-swift.class\/init()"]}],"references":{"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"type":"topic","url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Shared"}],"abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","title":"Scopes"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class/init()":{"type":"topic","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"url":"\/documentation\/factory\/scope\/shared-swift.class\/init()","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class\/init()","role":"symbol","abstract":[],"title":"init()","kind":"symbol"}}} \ No newline at end of file +{"kind":"symbol","schemaVersion":{"minor":3,"patch":0,"major":0},"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class\/init()"},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"override","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"init"},{"kind":"text","text":"()"}]}]}],"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Initializer","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"externalID":"s:7Factory5ScopeC6SharedCAEycfc","symbolKind":"init","role":"symbol","title":"init()"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/shared-swift.class\/init()"]}],"references":{"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"kind":"article"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Shared","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class/init()":{"type":"topic","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class\/init()","url":"\/documentation\/factory\/scope\/shared-swift.class\/init()","abstract":[],"kind":"symbol","role":"symbol","title":"init()"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ 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 1e569343..99524a32 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":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"text":".","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","preciseIdentifier":"s:7Factory5ScopeC6SharedC","kind":"typeIdentifier","text":"Shared"}],"languages":["swift"]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/shared-swift.type.property"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/shared-swift.type.property"},"schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"sections":[],"metadata":{"symbolKind":"property","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier","text":"Scope"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC6SharedC","text":"Shared"}],"extendedModule":"Factory","role":"symbol","roleHeading":"Type Property","externalID":"s:7Factory5ScopeC6sharedAC6SharedCvpZ","title":"shared","modules":[{"name":"Factory"}]},"abstract":[{"text":"A reference to the default shared scope manager.","type":"text"}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Scope/shared-swift.type.property":{"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"kind":"text","text":": "},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"text":"Shared","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC6SharedC"}],"role":"symbol","url":"\/documentation\/factory\/scope\/shared-swift.type.property","abstract":[{"text":"A reference to the default shared scope manager.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/shared-swift.type.property","title":"shared"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"type":"topic","url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Shared"}],"abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"role":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","title":"Scopes"}}} \ No newline at end of file +{"kind":"symbol","metadata":{"externalID":"s:7Factory5ScopeC6sharedAC6SharedCvpZ","role":"symbol","modules":[{"name":"Factory"}],"extendedModule":"Factory","symbolKind":"property","title":"shared","roleHeading":"Type Property","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC6SharedC","kind":"typeIdentifier","text":"Shared"}]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/shared-swift.type.property","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"sections":[],"abstract":[{"text":"A reference to the default shared scope manager.","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"kind":"text","text":"."},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","preciseIdentifier":"s:7Factory5ScopeC6SharedC","kind":"typeIdentifier","text":"Shared"}],"platforms":["macOS"],"languages":["swift"]}]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"paths":["\/documentation\/factory\/scope\/shared-swift.type.property"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Shared","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"kind":"article"},"doc://Factory/documentation/Factory/Scope/shared-swift.type.property":{"abstract":[{"type":"text","text":"A reference to the default shared scope manager."}],"title":"shared","url":"\/documentation\/factory\/scope\/shared-swift.type.property","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC","text":"Scope","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Shared","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC6SharedC"}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/shared-swift.type.property","type":"topic","kind":"symbol"}}} \ 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 2360e238..c756f6e4 100644 --- a/docs/data/documentation/factory/scope/singleton-swift.class.json +++ b/docs/data/documentation/factory/scope/singleton-swift.class.json @@ -1 +1 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","interfaceLanguage":"swift"},"abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/init()"],"title":"Initializers"},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/reset()"]}],"metadata":{"externalID":"s:7Factory5ScopeC9SingletonC","role":"symbol","modules":[{"name":"Factory"}],"roleHeading":"Class","symbolKind":"class","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"extendedModule":"Factory","title":"Scope.Singleton","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Singleton","kind":"identifier"}]},"schemaVersion":{"patch":0,"minor":3,"major":0},"kind":"symbol","sections":[],"relationshipsSections":[{"type":"inheritsFrom","title":"Inherits From","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"],"kind":"relationships"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"final","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Singleton","kind":"identifier"}],"platforms":["macOS"],"languages":["swift"]}]}],"variants":[{"paths":["\/documentation\/factory\/scope\/singleton-swift.class"],"traits":[{"interfaceLanguage":"swift"}]}],"seeAlsoSections":[{"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,"title":"Scope Class Definitions"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"references":{"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"title":"Scope.Graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class/init()":{"fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class\/init()","role":"symbol","type":"topic","kind":"symbol","title":"init()","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/init()"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/cached-swift.class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","navigatorTitle":[{"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."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","url":"\/documentation\/factory\/scope\/singleton-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"type":"topic","role":"symbol","title":"Scope.Singleton","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"type":"topic","url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Shared"}],"abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","title":"Scopes"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class/reset()":{"role":"symbol","url":"\/documentation\/factory\/scope\/singleton-swift.class\/reset()","abstract":[{"type":"text","text":"Reset"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/reset()","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"reset","kind":"identifier"},{"text":"()","kind":"text"}],"title":"reset()"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"title":"Scope.Unique","abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"url":"\/documentation\/factory\/scope\/unique-swift.class"}}} \ No newline at end of file +{"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()"]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"final","kind":"keyword"},{"kind":"text","text":" "},{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Singleton","kind":"identifier"}],"languages":["swift"]}]}],"seeAlsoSections":[{"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,"title":"Scope Class Definitions"}],"relationshipsSections":[{"title":"Inherits From","kind":"relationships","type":"inheritsFrom","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"]}],"variants":[{"paths":["\/documentation\/factory\/scope\/singleton-swift.class"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"},"sections":[],"metadata":{"roleHeading":"Class","extendedModule":"Factory","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"title":"Scope.Singleton","externalID":"s:7Factory5ScopeC9SingletonC","modules":[{"name":"Factory"}],"symbolKind":"class","navigatorTitle":[{"kind":"identifier","text":"Singleton"}]},"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Cached","kind":"identifier"}],"type":"topic","navigatorTitle":[{"text":"Cached","kind":"identifier"}],"role":"symbol","kind":"symbol","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","title":"Scope.Cached","url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"kind":"article"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","title":"Scope.Graph","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"navigatorTitle":[{"text":"Graph","kind":"identifier"}],"role":"symbol","abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class/init()":{"role":"symbol","type":"topic","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"kind":"symbol","title":"init()","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/init()","abstract":[],"url":"\/documentation\/factory\/scope\/singleton-swift.class\/init()"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Unique","kind":"identifier"}],"type":"topic","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"role":"symbol","kind":"symbol","abstract":[{"text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","title":"Scope.Unique","url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","title":"Scope.Singleton","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class/reset()":{"role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"()"}],"kind":"symbol","title":"reset()","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/reset()","abstract":[{"text":"Reset","type":"text"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class\/reset()"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Shared","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol"}}} \ 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 45fc9e31..7d5a2ffe 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 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/init()","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/singleton-swift.class\/init()"]}],"metadata":{"symbolKind":"init","fragments":[{"kind":"identifier","text":"init"},{"text":"()","kind":"text"}],"externalID":"s:7Factory5ScopeC9SingletonCAEycfc","role":"symbol","modules":[{"name":"Factory"}],"roleHeading":"Initializer","title":"init()"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"override"},{"kind":"text","text":" "},{"kind":"keyword","text":"init"},{"text":"()","kind":"text"}],"languages":["swift"]}],"kind":"declarations"}],"kind":"symbol","sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory/Scope/Singleton-swift.class/init()":{"fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class\/init()","role":"symbol","type":"topic","kind":"symbol","title":"init()","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/init()"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","url":"\/documentation\/factory\/scope\/singleton-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"type":"topic","role":"symbol","title":"Scope.Singleton","kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","title":"Scopes"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"]]},"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/scope\/singleton-swift.class\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"override"},{"kind":"text","text":" "},{"text":"init","kind":"keyword"},{"kind":"text","text":"()"}]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/init()","interfaceLanguage":"swift"},"sections":[],"metadata":{"role":"symbol","roleHeading":"Initializer","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"symbolKind":"init","externalID":"s:7Factory5ScopeC9SingletonCAEycfc","modules":[{"name":"Factory"}],"title":"init()"},"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","title":"Scope.Singleton","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class/init()":{"role":"symbol","type":"topic","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"kind":"symbol","title":"init()","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/init()","abstract":[],"url":"\/documentation\/factory\/scope\/singleton-swift.class\/init()"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"kind":"article"}}} \ 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 76031ebb..876c2596 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 @@ -{"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/reset()","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"text":"()","kind":"text"}],"platforms":["macOS"]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"]]},"sections":[],"schemaVersion":{"patch":0,"minor":3,"major":0},"abstract":[{"type":"text","text":"Reset"}],"metadata":{"title":"reset()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"()"}],"externalID":"s:7Factory5ScopeC9SingletonC5resetyyF","role":"symbol","modules":[{"name":"Factory"}],"symbolKind":"method","roleHeading":"Instance Method"},"variants":[{"paths":["\/documentation\/factory\/scope\/singleton-swift.class\/reset()"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","type":"topic","kind":"symbol","title":"Factory"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","url":"\/documentation\/factory\/scope\/singleton-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"type":"topic","role":"symbol","title":"Scope.Singleton","kind":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","title":"Scopes"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class/reset()":{"role":"symbol","url":"\/documentation\/factory\/scope\/singleton-swift.class\/reset()","abstract":[{"type":"text","text":"Reset"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/reset()","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"reset","kind":"identifier"},{"text":"()","kind":"text"}],"title":"reset()"}}} \ No newline at end of file +{"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/reset()","interfaceLanguage":"swift"},"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"reset","kind":"identifier"},{"kind":"text","text":"()"}],"symbolKind":"method","modules":[{"name":"Factory"}],"roleHeading":"Instance Method","externalID":"s:7Factory5ScopeC9SingletonC5resetyyF","title":"reset()","role":"symbol"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"kind":"text","text":"()"}]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/singleton-swift.class\/reset()"]}],"abstract":[{"text":"Reset","type":"text"}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class/reset()":{"role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"()"}],"kind":"symbol","title":"reset()","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/reset()","abstract":[{"text":"Reset","type":"text"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class\/reset()"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"kind":"article"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","title":"Scope.Singleton","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol"}}} \ 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 6b5b72e7..c91615ef 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 @@ -{"metadata":{"fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier","text":"Scope"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC9SingletonC","text":"Singleton","kind":"typeIdentifier"}],"title":"singleton","modules":[{"name":"Factory"}],"extendedModule":"Factory","role":"symbol","symbolKind":"property","roleHeading":"Type Property","externalID":"s:7Factory5ScopeC9singletonAC9SingletonCvpZ"},"kind":"symbol","abstract":[{"type":"text","text":"A reference to the default singleton scope manager."}],"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"singleton"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"text":"Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","preciseIdentifier":"s:7Factory5ScopeC9SingletonC","kind":"typeIdentifier"}]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/singleton-swift.type.property"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/singleton-swift.type.property","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","title":"Scopes"},"doc://Factory/documentation/Factory/Scope/singleton-swift.type.property":{"type":"topic","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory5ScopeC","text":"Scope","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"Singleton","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC9SingletonC"}],"title":"singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/singleton-swift.type.property","kind":"symbol","abstract":[{"text":"A reference to the default singleton scope manager.","type":"text"}],"role":"symbol","url":"\/documentation\/factory\/scope\/singleton-swift.type.property"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","url":"\/documentation\/factory\/scope\/singleton-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"type":"topic","role":"symbol","title":"Scope.Singleton","kind":"symbol"}}} \ No newline at end of file +{"sections":[],"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Type Property","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"singleton"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"text":".","kind":"text"},{"text":"Singleton","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC9SingletonC"}],"externalID":"s:7Factory5ScopeC9singletonAC9SingletonCvpZ","symbolKind":"property","role":"symbol","title":"singleton","extendedModule":"Factory"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/singleton-swift.type.property","interfaceLanguage":"swift"},"schemaVersion":{"minor":3,"patch":0,"major":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"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","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory5ScopeC9SingletonC","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","text":"Singleton","kind":"typeIdentifier"}]}]}],"kind":"symbol","abstract":[{"type":"text","text":"A reference to the default singleton scope manager."}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/singleton-swift.type.property"]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"kind":"article"},"doc://Factory/documentation/Factory/Scope/singleton-swift.type.property":{"fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"singleton","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Scope","preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC9SingletonC","text":"Singleton"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/singleton-swift.type.property","url":"\/documentation\/factory\/scope\/singleton-swift.type.property","type":"topic","title":"singleton","abstract":[{"type":"text","text":"A reference to the default singleton scope manager."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","title":"Scope.Singleton","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol"}}} \ 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 6174cfe7..a6f36d90 100644 --- a/docs/data/documentation/factory/scope/unique-swift.class.json +++ b/docs/data/documentation/factory/scope/unique-swift.class.json @@ -1 +1 @@ -{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class"},"sections":[],"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class\/init()"]}],"relationshipsSections":[{"type":"inheritsFrom","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"],"kind":"relationships","title":"Inherits From"}],"seeAlsoSections":[{"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,"title":"Scope Class Definitions"}],"variants":[{"paths":["\/documentation\/factory\/scope\/unique-swift.class"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"final"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Unique"}]}]}],"metadata":{"symbolKind":"class","roleHeading":"Class","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"title":"Scope.Unique","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"externalID":"s:7Factory5ScopeC6UniqueC","extendedModule":"Factory"},"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle.","type":"text"}],"references":{"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","title":"Scopes"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"type":"topic","url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Shared"}],"abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"role":"symbol"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","url":"\/documentation\/factory\/scope\/singleton-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"type":"topic","role":"symbol","title":"Scope.Singleton","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/cached-swift.class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","navigatorTitle":[{"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."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"title":"Scope.Graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class/init()":{"abstract":[],"url":"\/documentation\/factory\/scope\/unique-swift.class\/init()","role":"symbol","type":"topic","title":"init()","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class\/init()","fragments":[{"kind":"identifier","text":"init"},{"text":"()","kind":"text"}]},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"title":"Scope.Unique","abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"url":"\/documentation\/factory\/scope\/unique-swift.class"}}} \ No newline at end of file +{"abstract":[{"text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle.","type":"text"}],"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class\/init()"],"title":"Initializers"}],"relationshipsSections":[{"kind":"relationships","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"],"type":"inheritsFrom","title":"Inherits From"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"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}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class"},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"final","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Unique","kind":"identifier"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"metadata":{"extendedModule":"Factory","roleHeading":"Class","title":"Scope.Unique","symbolKind":"class","externalID":"s:7Factory5ScopeC6UniqueC","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"role":"symbol","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/unique-swift.class"]}],"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"kind":"symbol","references":{"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","title":"Scope.Graph","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"navigatorTitle":[{"text":"Graph","kind":"identifier"}],"role":"symbol","abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"kind":"article"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Cached","kind":"identifier"}],"type":"topic","navigatorTitle":[{"text":"Cached","kind":"identifier"}],"role":"symbol","kind":"symbol","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","title":"Scope.Cached","url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class/init()":{"kind":"symbol","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class\/init()","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"url":"\/documentation\/factory\/scope\/unique-swift.class\/init()","role":"symbol","type":"topic","title":"init()"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Shared","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","title":"Scope.Singleton","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Unique","kind":"identifier"}],"type":"topic","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"role":"symbol","kind":"symbol","abstract":[{"text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","title":"Scope.Unique","url":"\/documentation\/factory\/scope\/unique-swift.class"}}} \ 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 cf8d2c5a..44ff47b9 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 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class\/init()","interfaceLanguage":"swift"},"schemaVersion":{"minor":3,"patch":0,"major":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"override","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"init"},{"text":"()","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}]}],"metadata":{"role":"symbol","externalID":"s:7Factory5ScopeC6UniqueCAEycfc","roleHeading":"Initializer","symbolKind":"init","fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"modules":[{"name":"Factory"}],"title":"init()"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class"]]},"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/unique-swift.class\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/Scope/Unique-swift.class/init()":{"abstract":[],"url":"\/documentation\/factory\/scope\/unique-swift.class\/init()","role":"symbol","type":"topic","title":"init()","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class\/init()","fragments":[{"kind":"identifier","text":"init"},{"text":"()","kind":"text"}]},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"title":"Scope.Unique","abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","title":"Scopes"},"doc://Factory/documentation/Factory":{"role":"collection","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","type":"topic","kind":"symbol","title":"Factory"}}} \ No newline at end of file +{"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"override"},{"text":" ","kind":"text"},{"text":"init","kind":"keyword"},{"kind":"text","text":"()"}]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/scope\/unique-swift.class\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"title":"init()","modules":[{"name":"Factory"}],"roleHeading":"Initializer","symbolKind":"init","externalID":"s:7Factory5ScopeC6UniqueCAEycfc","fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"role":"symbol"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class\/init()","interfaceLanguage":"swift"},"kind":"symbol","sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory/Scope/Unique-swift.class/init()":{"kind":"symbol","abstract":[],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class\/init()","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"url":"\/documentation\/factory\/scope\/unique-swift.class\/init()","role":"symbol","type":"topic","title":"init()"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Unique","kind":"identifier"}],"type":"topic","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"role":"symbol","kind":"symbol","abstract":[{"text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","title":"Scope.Unique","url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"kind":"article"}}} \ 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 001ff01f..20376f59 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 @@ -{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/unique-swift.type.property"},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","text":"Scope"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC6UniqueC","text":"Unique","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","kind":"typeIdentifier"}]}],"kind":"declarations"},{"kind":"content","content":[{"level":2,"anchor":"discussion","text":"Discussion","type":"heading"},{"inlineContent":[{"type":"text","text":"If no scope cache is specified then Factory is running in unique more."}],"type":"paragraph"}]}],"kind":"symbol","schemaVersion":{"minor":3,"major":0,"patch":0},"sections":[],"metadata":{"roleHeading":"Type Property","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"text":"unique","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier","text":"Scope"},{"text":".","kind":"text"},{"text":"Unique","preciseIdentifier":"s:7Factory5ScopeC6UniqueC","kind":"typeIdentifier"}],"extendedModule":"Factory","title":"unique","externalID":"s:7Factory5ScopeC6uniqueAC6UniqueCvpZ","role":"symbol","modules":[{"name":"Factory"}],"symbolKind":"property"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/unique-swift.type.property"]}],"abstract":[{"type":"text","text":"A reference to the default unique scope."}],"references":{"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"title":"Scope.Unique","abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/Scope/unique-swift.type.property":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/unique-swift.type.property","title":"unique","kind":"symbol","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC6UniqueC","text":"Unique"}],"url":"\/documentation\/factory\/scope\/unique-swift.type.property","role":"symbol","abstract":[{"type":"text","text":"A reference to the default unique scope."}]},"doc://Factory/documentation/Factory/Scopes":{"role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","title":"Scopes"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/unique-swift.type.property","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"text":".","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","text":"Unique","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC6UniqueC"}]}]},{"content":[{"type":"heading","anchor":"discussion","text":"Discussion","level":2},{"type":"paragraph","inlineContent":[{"text":"If no scope cache is specified then Factory is running in unique more.","type":"text"}]}],"kind":"content"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"abstract":[{"type":"text","text":"A reference to the default unique scope."}],"sections":[],"kind":"symbol","metadata":{"role":"symbol","title":"unique","roleHeading":"Type Property","extendedModule":"Factory","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"unique","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"text":"Unique","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC6UniqueC"}],"externalID":"s:7Factory5ScopeC6uniqueAC6UniqueCvpZ","modules":[{"name":"Factory"}],"symbolKind":"property"},"variants":[{"paths":["\/documentation\/factory\/scope\/unique-swift.type.property"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"kind":"article"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Scope/unique-swift.type.property":{"title":"unique","kind":"symbol","url":"\/documentation\/factory\/scope\/unique-swift.type.property","abstract":[{"type":"text","text":"A reference to the default unique scope."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/unique-swift.type.property","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"unique","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC6UniqueC","text":"Unique"}],"type":"topic"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Unique","kind":"identifier"}],"type":"topic","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"role":"symbol","kind":"symbol","abstract":[{"text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","title":"Scope.Unique","url":"\/documentation\/factory\/scope\/unique-swift.class"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/scopes.json b/docs/data/documentation/factory/scopes.json index 3b0cfdf1..422c4f23 100644 --- a/docs/data/documentation/factory/scopes.json +++ b/docs/data/documentation/factory/scopes.json @@ -1 +1 @@ -{"metadata":{"modules":[{"name":"Factory"}],"role":"collectionGroup","title":"Scopes"},"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"article","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scopes","interfaceLanguage":"swift"},"sections":[],"abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"seeAlsoSections":[{"generated":true,"identifiers":["doc:\/\/Factory\/documentation\/Factory\/GettingStarted","doc:\/\/Factory\/documentation\/Factory\/Containers"],"title":"The Basics"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scopes"]}],"primaryContentSections":[{"content":[{"type":"heading","text":"Overview","level":2,"anchor":"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."}]},{"inlineContent":[{"text":"And if not, the concept is easy to understand: Just how long should an instance of an object live?","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"inlineContent":[{"text":"This is easily done in Factory.","type":"text"}],"type":"paragraph"},{"level":2,"type":"heading","text":"Singleton","anchor":"Singleton"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Just specify a singleton factory."}]},{"code":["extension Container {"," var myService: Factory { "," self { MyService() }"," .singleton"," }","}"],"type":"codeListing","syntax":"swift"},{"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":"paragraph"},{"type":"codeListing","syntax":"swift","code":["let a = container.myService()","let b = container.myService()"]},{"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"},{"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 "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing"},{"text":" for more information on how to handle this.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"Another issue to keep in mind is that singletons are global, meaning that they’re ","type":"text"},{"type":"emphasis","inlineContent":[{"text":"not","type":"text"}]},{"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"},{"text":" from both, we’ll get the ","type":"text"},{"inlineContent":[{"text":"same","type":"text"}],"type":"emphasis"},{"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":[{"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":"text"},{"type":"emphasis","inlineContent":[{"text":"and only one","type":"text"}]},{"text":" instance of an object.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"So what do we do if we need our object to be cached?","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"Just say so.","type":"text"}]},{"type":"heading","text":"Cached","level":2,"anchor":"Cached"},{"type":"paragraph","inlineContent":[{"text":"Cached items are persisted until the cache is reset or the container is deallocated. Consider the following Factory registration.","type":"text"}]},{"code":["extension Container {"," var cachedService: Factory { "," self { MyService() }.cached"," }","}"],"syntax":"swift","type":"codeListing"},{"inlineContent":[{"text":"Now let’s resolve it.","type":"text"}],"type":"paragraph"},{"syntax":"swift","code":["let a = container.cachedService()","let b = container.cachedService()"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"When we do this we see that both ","type":"text"},{"code":"a","type":"codeVoice"},{"type":"text","text":" and "},{"type":"codeVoice","code":"b"},{"text":" reference the same instance, just as we saw with the singleton example above.","type":"text"}]},{"type":"paragraph","inlineContent":[{"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.","type":"text"}]},{"text":"Shared","level":2,"anchor":"Shared","type":"heading"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var sharedService: Factory { "," self { MyService() }.shared"," }","}"]},{"type":"paragraph","inlineContent":[{"text":"Now let’s resolve it.","type":"text"}]},{"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 "},{"code":"a","type":"codeVoice"},{"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"},{"text":" and ","type":"text"},{"type":"codeVoice","code":"b"},{"text":" is released (set to nil in the example), the weak reference maintained by the shared cache is also released.","type":"text"}]},{"inlineContent":[{"text":"So when we resolve ","type":"text"},{"code":"c","type":"codeVoice"},{"text":" we’re going to get a new instance, and the cycle proceeds anew.","type":"text"}],"type":"paragraph"},{"level":2,"anchor":"Custom-Scopes","type":"heading","text":"Custom Scopes"},{"type":"paragraph","inlineContent":[{"text":"You can also add your own special purpose caches to the mix. Try this.","type":"text"}]},{"type":"codeListing","code":["extension Scope {"," static let session = Cached()","}","","extension Container {"," var authenticatedUser: Factory { "," self { AuthenticatedUser() }"," .scope(.session)"," }"," var profileImageCache: Factory { "," self { ProfileImageCache() } "," .scope(.session)"," }","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Once created, a single instance of "},{"code":"AuthenticatedUser","type":"codeVoice"},{"text":" and ","type":"text"},{"code":"ProfileImageCache","type":"codeVoice"},{"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","code":["func logout() {"," Container.shared.manager.reset(scope: .session)"," ..."," }"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"One note: Like shared variables in custom containers, don’t forget to define the new scope as a ‘let’ variable, not ‘var’. Defining it as a ‘static var’ will cause Swift to issue concurrency warnings in the future whenever that variable is accessed."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Custom scopes are powerful tools to have in your arsenal. Use them."}]},{"text":"Graph Scope","level":2,"anchor":"Graph-Scope","type":"heading"},{"inlineContent":[{"text":"There’s one additional scope, called ","type":"text"},{"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":"paragraph"},{"code":["class ProtocolConsumer {"," @Injected(\\.idProvider) var ids"," @Injected(\\.valueProvider) var values"," init() {}","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"The ","type":"text"},{"type":"codeVoice","code":"ProtocolConsumer"},{"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":"text"}]},{"type":"codeListing","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 }","}"],"syntax":"swift"},{"inlineContent":[{"text":"Both provider factories reference the same factory. When Factory is asked for an instance of ","type":"text"},{"code":"consumer","type":"codeVoice"},{"type":"text","text":", both providers will receive the same instance of "},{"type":"codeVoice","code":"MyService"},{"text":".","type":"text"}],"type":"paragraph"},{"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 "},{"code":"commonProviding","type":"codeVoice"},{"text":".","type":"text"}]},{"inlineContent":[{"text":"The second is that there needs to be a “root” to the graph.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"In the above example, the "},{"code":"consumer","type":"codeVoice"},{"text":" object is the root. Factory is asked for a consumer, which in turn requires two providers.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"If you were to instantiate an instance of ","type":"text"},{"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."}]},{"inlineContent":[{"type":"text","text":"See: "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","isActive":true,"type":"reference"},{"text":" for more on this.","type":"text"}],"type":"paragraph"},{"text":"Unique","type":"heading","level":2,"anchor":"Unique"},{"inlineContent":[{"text":"The last scope we’re going to discuss is ","type":"text"},{"code":"unique","type":"codeVoice"},{"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"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Everyone gets a new, unique instance."}]},{"type":"paragraph","inlineContent":[{"text":"Unique.","type":"text"}]},{"anchor":"Default-Scope","type":"heading","text":"Default Scope","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory’s can have their scopes defined in two different ways:"}]},{"type":"orderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"text":"We can use a scope modifier, as we’ve shown above.","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"We don’t specify a scope at all, in which case the scope "},{"inlineContent":[{"text":"usually","type":"text"}],"type":"emphasis"},{"type":"text","text":" defaults to "},{"type":"codeVoice","code":"unique"},{"type":"text","text":"."}]}]}]},{"type":"paragraph","inlineContent":[{"text":"The key word here is ","type":"text"},{"inlineContent":[{"type":"text","text":"usually"}],"type":"emphasis"},{"type":"text","text":", because Factory lets you control the default scope on a per-container basis."}]},{"code":["extension Container: AutoRegistering {"," func autoRegister() {"," manager.defaultScope = .cached"," ..."," }","}"],"type":"codeListing","syntax":"swift"},{"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 "},{"code":"cached","type":"codeVoice"},{"text":" scope by default.","type":"text"}],"type":"paragraph"},{"type":"heading","anchor":"Lifecycles","text":"Lifecycles","level":2},{"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 "},{"code":"cachedService","type":"codeVoice"},{"type":"text","text":" three times, I’ll get the same instance of the object each time."}]},{"syntax":"swift","code":["let a = container.cachedService()","let b = container.cachedService()","let c = container.cachedService()"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"In this example, a, b, and c are identical.","type":"text"}]},{"inlineContent":[{"text":"But if we create two instances of the above container and resolve ","type":"text"},{"type":"codeVoice","code":"cachedService"},{"text":" from both, we’ll get two different instances of the service.","type":"text"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["let a = container1.cachedService()","let b = container2.cachedService()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Scope is managed by the container."}]},{"name":"Warning","type":"aside","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"If a container ever goes out of scope, so will all of its registrations and cached objects."}]}],"style":"warning"},{"type":"paragraph","inlineContent":[{"type":"text","text":"See the “Releasing a Container” discussion in "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","isActive":true,"type":"reference"},{"text":" for more information.","type":"text"}]},{"anchor":"TimeToLive","type":"heading","text":"TimeToLive","level":2},{"inlineContent":[{"type":"text","text":"Factory provides a “time to live” option for scoped dependencies."}],"type":"paragraph"},{"code":["extension Container {"," var authenticatedUser: Factory { "," self { AuthenticatedUser() }"," .scope(.session)"," .timeToLive(60 * 20) \/\/ (60 seconds * 20) = 20 minutes"," }","}"],"type":"codeListing","syntax":"swift"},{"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 "},{"inlineContent":[{"text":"after","type":"text"}],"type":"emphasis"},{"type":"text","text":" that period will discard the previously cached item, caching and returning a new instance instead."}]},{"inlineContent":[{"text":"Requesting a cached item before the timeout period ends returns the currently cached item and effectively restarts the clock for that item.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Like registrations, setting a time to live on a dependency only affects the ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"next"}]},{"type":"text","text":" resolution for that item. Anything already resolved and referenced stays resolved and referenced."}]},{"type":"heading","text":"Reset","anchor":"Reset","level":2},{"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."}]},{"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":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"You can reset the cache for ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"all"}]},{"text":" of the scopes managed by that container.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.manager.reset(options: .scope)"]},{"inlineContent":[{"type":"text","text":"As mentioned earlier, Singletons are global and they’re "},{"inlineContent":[{"text":"not","type":"text"}],"type":"emphasis"},{"type":"text","text":" managed by any particular container. If needed, the singleton scope can be reset directly."}],"type":"paragraph"},{"syntax":"swift","code":["Scope.singleton.reset()"],"type":"codeListing"},{"type":"aside","style":"important","content":[{"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":"paragraph"}],"name":"Important"}],"kind":"content"}],"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":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","title":"Resolution Cycles","url":"\/documentation\/factory\/cycle","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"role":"article"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","url":"\/documentation\/factory\/scope\/singleton-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}],"type":"topic","role":"symbol","title":"Scope.Singleton","kind":"symbol"},"doc://Factory/documentation/Factory/GettingStarted":{"url":"\/documentation\/factory\/gettingstarted","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"type":"topic","title":"Getting Started","role":"collectionGroup"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.class","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"title":"Scope.Graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","title":"Scope","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"type":"text","text":" "},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Cached"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Testing":{"title":"Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"url":"\/documentation\/factory\/testing","kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","role":"article"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"type":"topic","url":"\/documentation\/factory\/scope\/cached-swift.class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","navigatorTitle":[{"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."}],"role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Containers":{"role":"article","abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","title":"Containers","type":"topic","url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"type":"topic","url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Shared"}],"abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"role":"symbol"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"kind":"symbol","role":"symbol","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"title":"Scope.Unique","abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"url":"\/documentation\/factory\/scope\/unique-swift.class"}}} \ No newline at end of file +{"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"metadata":{"modules":[{"name":"Factory"}],"role":"collectionGroup","title":"Scopes"},"kind":"article","schemaVersion":{"minor":3,"major":0,"patch":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scopes"]}],"seeAlsoSections":[{"generated":true,"title":"The Basics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/GettingStarted","doc:\/\/Factory\/documentation\/Factory\/Containers"]}],"topicSections":[{"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"],"title":"Scope Class Definitions"}],"primaryContentSections":[{"content":[{"level":2,"text":"Overview","type":"heading","anchor":"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."}]},{"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"},{"type":"paragraph","inlineContent":[{"text":"This is easily done in Factory.","type":"text"}]},{"text":"Singleton","level":2,"type":"heading","anchor":"Singleton"},{"type":"paragraph","inlineContent":[{"text":"Just specify a singleton factory.","type":"text"}]},{"syntax":"swift","type":"codeListing","code":["extension Container {"," var myService: Factory { "," self { MyService() }"," .singleton"," }","}"]},{"type":"paragraph","inlineContent":[{"text":"Now whenever someone requests an instance of ","type":"text"},{"type":"codeVoice","code":"myService"},{"text":" they’ll get the same instance of the object as everyone else.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["let a = container.myService()","let b = container.myService()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"When we do this, both "},{"code":"a","type":"codeVoice"},{"text":" and ","type":"text"},{"type":"codeVoice","code":"b"},{"text":" refer to the same instance.","type":"text"}]},{"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 "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","type":"reference","isActive":true},{"text":" for more information on how to handle this.","type":"text"}]},{"inlineContent":[{"text":"Another issue to keep in mind is that singletons are global, meaning that they’re ","type":"text"},{"type":"emphasis","inlineContent":[{"text":"not","type":"text"}]},{"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"},{"text":" from both, we’ll get the ","type":"text"},{"type":"emphasis","inlineContent":[{"text":"same","type":"text"}]},{"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"},{"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 "},{"inlineContent":[{"type":"text","text":"and only one"}],"type":"emphasis"},{"text":" instance of an object.","type":"text"}]},{"inlineContent":[{"text":"So what do we do if we need our object to be cached?","type":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"Just say so."}],"type":"paragraph"},{"text":"Cached","anchor":"Cached","level":2,"type":"heading"},{"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."}]},{"code":["extension Container {"," var cachedService: Factory { "," self { MyService() }.cached"," }","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"Now let’s resolve it.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["let a = container.cachedService()","let b = container.cachedService()"]},{"inlineContent":[{"type":"text","text":"When we do this we see that both "},{"code":"a","type":"codeVoice"},{"type":"text","text":" and "},{"type":"codeVoice","code":"b"},{"text":" reference the same instance, just as we saw with the singleton example above.","type":"text"}],"type":"paragraph"},{"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."}]},{"level":2,"anchor":"Shared","text":"Shared","type":"heading"},{"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":"paragraph"},{"syntax":"swift","type":"codeListing","code":["extension Container {"," var sharedService: Factory { "," self { MyService() }.shared"," }","}"]},{"inlineContent":[{"text":"Now let’s resolve it.","type":"text"}],"type":"paragraph"},{"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()"]},{"inlineContent":[{"text":"When ","type":"text"},{"type":"codeVoice","code":"a"},{"text":" was resolved it was cached in the shared cache. When ","type":"text"},{"code":"b","type":"codeVoice"},{"type":"text","text":" is resolved it’s pulled from the cache as we might expect. But when the last strong external reference to "},{"code":"a","type":"codeVoice"},{"type":"text","text":" and "},{"code":"b","type":"codeVoice"},{"text":" is released (set to nil in the example), the weak reference maintained by the shared cache is also released.","type":"text"}],"type":"paragraph"},{"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."}]},{"level":2,"type":"heading","text":"Custom Scopes","anchor":"Custom-Scopes"},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can also add your own special purpose caches to the mix. Try this."}]},{"syntax":"swift","type":"codeListing","code":["extension Scope {"," static let session = Cached()","}","","extension Container {"," var authenticatedUser: Factory { "," self { AuthenticatedUser() }"," .scope(.session)"," }"," var profileImageCache: Factory { "," self { ProfileImageCache() } "," .scope(.session)"," }","}"]},{"type":"paragraph","inlineContent":[{"text":"Once created, a single instance of ","type":"text"},{"type":"codeVoice","code":"AuthenticatedUser"},{"text":" and ","type":"text"},{"code":"ProfileImageCache","type":"codeVoice"},{"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":"text"}]},{"type":"codeListing","code":["func logout() {"," Container.shared.manager.reset(scope: .session)"," ..."," }"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"One note: Like shared variables in custom containers, don’t forget to define the new scope as a ‘let’ variable, not ‘var’. Defining it as a ‘static var’ will cause Swift to issue concurrency warnings in the future whenever that variable is accessed."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Custom scopes are powerful tools to have in your arsenal. Use them."}]},{"level":2,"type":"heading","anchor":"Graph-Scope","text":"Graph Scope"},{"inlineContent":[{"text":"There’s one additional scope, called ","type":"text"},{"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":"paragraph"},{"syntax":"swift","code":["class ProtocolConsumer {"," @Injected(\\.idProvider) var ids"," @Injected(\\.valueProvider) var values"," init() {}","}"],"type":"codeListing"},{"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":"paragraph"},{"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":"codeListing","syntax":"swift"},{"inlineContent":[{"text":"Both provider factories reference the same factory. When Factory is asked for an instance of ","type":"text"},{"code":"consumer","type":"codeVoice"},{"type":"text","text":", both providers will receive the same instance of "},{"type":"codeVoice","code":"MyService"},{"text":".","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"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":"text"},{"code":"commonProviding","type":"codeVoice"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"text":"The second is that there needs to be a “root” to the graph.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"In the above example, the "},{"code":"consumer","type":"codeVoice"},{"text":" object is the root. Factory is asked for a consumer, which in turn requires two providers.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you were to instantiate an instance of "},{"code":"ProtocolConsumer","type":"codeVoice"},{"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: "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","isActive":true,"type":"reference"},{"type":"text","text":" for more on this."}]},{"anchor":"Unique","level":2,"text":"Unique","type":"heading"},{"type":"paragraph","inlineContent":[{"text":"The last scope we’re going to discuss is ","type":"text"},{"type":"codeVoice","code":"unique"},{"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":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Everyone gets a new, unique instance."}]},{"inlineContent":[{"type":"text","text":"Unique."}],"type":"paragraph"},{"level":2,"text":"Default Scope","anchor":"Default-Scope","type":"heading"},{"inlineContent":[{"text":"Factory’s can have their scopes defined in two different ways:","type":"text"}],"type":"paragraph"},{"type":"orderedList","items":[{"content":[{"inlineContent":[{"text":"We can use a scope modifier, as we’ve shown above.","type":"text"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"text":"We don’t specify a scope at all, in which case the scope ","type":"text"},{"inlineContent":[{"text":"usually","type":"text"}],"type":"emphasis"},{"text":" defaults to ","type":"text"},{"type":"codeVoice","code":"unique"},{"type":"text","text":"."}],"type":"paragraph"}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The key word here is "},{"type":"emphasis","inlineContent":[{"text":"usually","type":"text"}]},{"text":", because Factory lets you control the default scope on a per-container basis.","type":"text"}]},{"code":["extension Container: AutoRegistering {"," func autoRegister() {"," manager.defaultScope = .cached"," ..."," }","}"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"text":"Now any Factory registration resolved on that container that ","type":"text"},{"inlineContent":[{"type":"text","text":"doesn’t specify a scope of its own"}],"type":"emphasis"},{"text":" will use the ","type":"text"},{"code":"cached","type":"codeVoice"},{"text":" scope by default.","type":"text"}],"type":"paragraph"},{"type":"heading","text":"Lifecycles","level":2,"anchor":"Lifecycles"},{"inlineContent":[{"type":"text","text":"Scope caches for all types except singletons are maintained by the Factory’s container."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"If I create an instance of ","type":"text"},{"type":"codeVoice","code":"Container"},{"text":" and use it to resolve ","type":"text"},{"type":"codeVoice","code":"cachedService"},{"type":"text","text":" three times, I’ll get the same instance of the object each time."}]},{"syntax":"swift","type":"codeListing","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","code":["let a = container1.cachedService()","let b = container2.cachedService()"],"syntax":"swift"},{"inlineContent":[{"type":"text","text":"Scope is managed by the container."}],"type":"paragraph"},{"name":"Warning","type":"aside","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":"paragraph","inlineContent":[{"text":"See the “Releasing a Container” discussion in ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","isActive":true},{"text":" for more information.","type":"text"}]},{"anchor":"TimeToLive","type":"heading","text":"TimeToLive","level":2},{"type":"paragraph","inlineContent":[{"text":"Factory provides a “time to live” option for scoped dependencies.","type":"text"}]},{"code":["extension Container {"," var authenticatedUser: Factory { "," self { AuthenticatedUser() }"," .scope(.session)"," .timeToLive(60 * 20) \/\/ (60 seconds * 20) = 20 minutes"," }","}"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"text":"As shown above, set a time to live for 20 minutes and any new request for that dependency that occurs ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"after"}]},{"text":" that period will discard the previously cached item, caching and returning a new instance instead.","type":"text"}],"type":"paragraph"},{"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."}]},{"inlineContent":[{"type":"text","text":"Like registrations, setting a time to live on a dependency only affects the "},{"type":"emphasis","inlineContent":[{"text":"next","type":"text"}]},{"type":"text","text":" resolution for that item. Anything already resolved and referenced stays resolved and referenced."}],"type":"paragraph"},{"level":2,"type":"heading","anchor":"Reset","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."}]},{"syntax":"swift","type":"codeListing","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)"]},{"inlineContent":[{"text":"You can reset the cache for ","type":"text"},{"inlineContent":[{"text":"all","type":"text"}],"type":"emphasis"},{"text":" of the scopes managed by that container.","type":"text"}],"type":"paragraph"},{"code":["Container.shared.manager.reset(options: .scope)"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As mentioned earlier, Singletons are global and they’re "},{"type":"emphasis","inlineContent":[{"text":"not","type":"text"}]},{"text":" managed by any particular container. If needed, the singleton scope can be reset directly.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["Scope.singleton.reset()"]},{"content":[{"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":[{"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":"text"}],"type":"paragraph"}],"style":"important","type":"aside","name":"Important"}],"kind":"content"}],"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."}],"references":{"doc://Factory/documentation/Factory/GettingStarted":{"url":"\/documentation\/factory\/gettingstarted","identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","role":"collectionGroup","kind":"article","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"type":"topic","title":"Getting Started"},"doc://Factory/documentation/Factory/Testing":{"title":"Testing","url":"\/documentation\/factory\/testing","abstract":[{"text":"Using Factory for Unit and UI Testing.","type":"text"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","type":"topic","role":"article"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","title":"Scope.Graph","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"navigatorTitle":[{"text":"Graph","kind":"identifier"}],"role":"symbol","abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","title":"Scope.Singleton","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Cached","kind":"identifier"}],"type":"topic","navigatorTitle":[{"text":"Cached","kind":"identifier"}],"role":"symbol","kind":"symbol","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","title":"Scope.Cached","url":"\/documentation\/factory\/scope\/cached-swift.class"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Containers":{"type":"topic","role":"article","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","title":"Containers","abstract":[{"text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?","type":"text"}],"url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Unique","kind":"identifier"}],"type":"topic","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"role":"symbol","kind":"symbol","abstract":[{"text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","title":"Scope.Unique","url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Cycle":{"url":"\/documentation\/factory\/cycle","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","role":"article","kind":"article","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"type":"topic","title":"Resolution Cycles"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Shared","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","abstract":[{"text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scope":{"navigatorTitle":[{"kind":"identifier","text":"Scope"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","abstract":[{"text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,","type":"text"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"type":"codeVoice","code":"Singleton"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"text":".","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","title":"Scope"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/sharedcontainer.json b/docs/data/documentation/factory/sharedcontainer.json index 33b0e0a6..7114a92a 100644 --- a/docs/data/documentation/factory/sharedcontainer.json +++ b/docs/data/documentation/factory/sharedcontainer.json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"SharedContainer"},{"kind":"text","text":" : "},{"preciseIdentifier":"s:7Factory16ManagedContainerP","text":"ManagedContainer","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"kind":"content","content":[{"text":"Overview","anchor":"overview","type":"heading","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s an example of reaching out to a Container’s shared instance for dependency resolution."}]},{"code":["class ContentViewModel {"," let service: MyServiceType = Container.shared.service()","}"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"type":"text","text":"The default "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"reference","isActive":true},{"text":" provided is a SharedContainer. It can be used in both roles as needed.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"See ","type":"text"},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","type":"reference"},{"type":"text","text":" for more information."}]}]}],"sections":[],"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/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."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"relationshipsSections":[{"kind":"relationships","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"],"type":"inheritsFrom","title":"Inherits From"},{"type":"conformingTypes","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container"],"kind":"relationships","title":"Conforming Types"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer"},"schemaVersion":{"minor":3,"major":0,"patch":0},"metadata":{"symbolKind":"protocol","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"SharedContainer","kind":"identifier"}],"externalID":"s:7Factory15SharedContainerP","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"modules":[{"name":"Factory"}],"roleHeading":"Protocol","title":"SharedContainer"},"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/SharedContainer\/shared"],"title":"Type Properties"}],"references":{"doc://Factory/documentation/Factory/Containers":{"role":"article","abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","title":"Containers","type":"topic","url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory/SharedContainer/shared":{"fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"shared"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/sharedcontainer\/shared","role":"symbol","type":"topic","kind":"symbol","required":true,"title":"shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer\/shared","abstract":[{"type":"text","text":"Defines a single “shared” container for that container type."}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/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","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"title":"SharedContainer","url":"\/documentation\/factory\/sharedcontainer","navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}],"navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"kind":"symbol","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer","role":"symbol","url":"\/documentation\/factory\/managedcontainer"},"doc://Factory/documentation/Factory/Container":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Container"}],"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container"}}} \ No newline at end of file +{"sections":[],"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/SharedContainer\/shared"],"title":"Type Properties"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"SharedContainer"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","text":"ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP"}],"languages":["swift"],"platforms":["macOS"]}]},{"content":[{"text":"Overview","type":"heading","level":2,"anchor":"overview"},{"type":"paragraph","inlineContent":[{"text":"Here’s an example of reaching out to a Container’s shared instance for dependency resolution.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel {"," let service: MyServiceType = Container.shared.service()","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The default "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"reference","isActive":true},{"type":"text","text":" provided is a SharedContainer. It can be used in both roles as needed."}]},{"inlineContent":[{"type":"text","text":"See "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","isActive":true},{"text":" for more information.","type":"text"}],"type":"paragraph"}],"kind":"content"}],"variants":[{"paths":["\/documentation\/factory\/sharedcontainer"],"traits":[{"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."}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer"},"relationshipsSections":[{"title":"Inherits From","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"],"kind":"relationships","type":"inheritsFrom"},{"title":"Conforming Types","kind":"relationships","type":"conformingTypes","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container"]}],"metadata":{"navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}],"externalID":"s:7Factory15SharedContainerP","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"text":"SharedContainer","kind":"identifier"}],"title":"SharedContainer","role":"symbol","symbolKind":"protocol","roleHeading":"Protocol"},"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory/Containers":{"type":"topic","role":"article","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","title":"Containers","abstract":[{"text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?","type":"text"}],"url":"\/documentation\/factory\/containers"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Container","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","navigatorTitle":[{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"text":"ManagedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"type":"topic","url":"\/documentation\/factory\/managedcontainer","title":"ManagedContainer"},"doc://Factory/documentation/Factory/SharedContainer/shared":{"required":true,"kind":"symbol","url":"\/documentation\/factory\/sharedcontainer\/shared","title":"shared","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer\/shared","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"shared"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"type":"topic","abstract":[{"type":"text","text":"Defines a single “shared” container for that container type."}]},"doc://Factory/documentation/Factory/SharedContainer":{"title":"SharedContainer","type":"topic","url":"\/documentation\/factory\/sharedcontainer","role":"symbol","navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"SharedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ 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 e0e1d840..d8c7accb 100644 --- a/docs/data/documentation/factory/sharedcontainer/shared.json +++ b/docs/data/documentation/factory/sharedcontainer/shared.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/SharedContainer"]]},"schemaVersion":{"major":0,"patch":0,"minor":3},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer\/shared"},"metadata":{"roleHeading":"Type Property","symbolKind":"property","modules":[{"name":"Factory"}],"externalID":"s:7Factory15SharedContainerP6sharedxvpZ","title":"shared","role":"symbol","required":true,"fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}]},"kind":"symbol","abstract":[{"text":"Defines a single “shared” container for that container type.","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/sharedcontainer\/shared"]}],"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","text":"Discussion","type":"heading","level":2},{"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."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note this should be defined as a ‘let’ variable, not ‘var’. Using ‘static var’ will cause Swift to issue concurrency warnings in the"},{"type":"text","text":" "},{"type":"text","text":"future whenever the container is accessed."}]}]}],"references":{"doc://Factory/documentation/Factory/SharedContainer/shared":{"fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"shared"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/sharedcontainer\/shared","role":"symbol","type":"topic","kind":"symbol","required":true,"title":"shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer\/shared","abstract":[{"type":"text","text":"Defines a single “shared” container for that container type."}]},"doc://Factory/documentation/Factory/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","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"title":"SharedContainer","url":"\/documentation\/factory\/sharedcontainer","navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"sections":[],"metadata":{"externalID":"s:7Factory15SharedContainerP6sharedxvpZ","symbolKind":"property","title":"shared","role":"symbol","modules":[{"name":"Factory"}],"roleHeading":"Type Property","required":true,"fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer\/shared"},"variants":[{"paths":["\/documentation\/factory\/sharedcontainer\/shared"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/SharedContainer"]]},"schemaVersion":{"major":0,"patch":0,"minor":3},"abstract":[{"text":"Defines a single “shared” container for that container type.","type":"text"}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}],"languages":["swift"]}],"kind":"declarations"},{"kind":"content","content":[{"level":2,"text":"Discussion","anchor":"discussion","type":"heading"},{"type":"paragraph","inlineContent":[{"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"},{"type":"text","text":" "},{"type":"text","text":"mixed environments where you’re passing container references AND using the @Injected property wrappers."}]},{"inlineContent":[{"text":"Note this should be defined as a ‘let’ variable, not ‘var’. Using ‘static var’ will cause Swift to issue concurrency warnings in the","type":"text"},{"type":"text","text":" "},{"type":"text","text":"future whenever the container is accessed."}],"type":"paragraph"}]}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/SharedContainer/shared":{"required":true,"kind":"symbol","url":"\/documentation\/factory\/sharedcontainer\/shared","title":"shared","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer\/shared","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"shared"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"type":"topic","abstract":[{"type":"text","text":"Defines a single “shared” container for that container type."}]},"doc://Factory/documentation/Factory/SharedContainer":{"title":"SharedContainer","type":"topic","url":"\/documentation\/factory\/sharedcontainer","role":"symbol","navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"SharedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/tags.json b/docs/data/documentation/factory/tags.json index 18ab6c9e..f8393bcb 100644 --- a/docs/data/documentation/factory/tags.json +++ b/docs/data/documentation/factory/tags.json @@ -1 +1 @@ -{"sections":[],"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Tags"},"seeAlsoSections":[{"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"],"title":"Advanced Topics","generated":true}],"kind":"article","variants":[{"paths":["\/documentation\/factory\/tags"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"content":[{"text":"Overview","level":2,"anchor":"Overview","type":"heading"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"syntax":"swift","code":["let processors = container.resolve(tagged: \"processor\")"],"type":"codeListing"},{"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)"]},{"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":[{"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":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"So what can we do?"}]},{"anchor":"Simple-Solution","type":"heading","text":"Simple Solution","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"Consider the following Factory registrations."}]},{"code":["extension SharedContainer {"," var processor1: Factory { self { Processor1() } }"," var processor2: Factory { self { Processor2() } }","}"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"type":"text","text":"And now the following container extension added to our main application."}],"type":"paragraph"},{"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."}]},{"code":["extension Container {"," public func processors() -> [Processor] {"," Container.processors.map { self[keyPath: $0]() }"," }","}"],"type":"codeListing","syntax":"swift"},{"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."}]},{"inlineContent":[{"type":"text","text":"But we can do more."}],"type":"paragraph"},{"level":2,"anchor":"Appending-New-Processors","text":"Appending New Processors","type":"heading"},{"inlineContent":[{"type":"text","text":"First, note that anything could be added to the array at any point in time."}],"type":"paragraph"},{"code":["extension Container: AutoRegistering {"," func autoRegister() {"," Container.processors.append(\\.processor3)"," }"," var processor3: Factory { self { Processor3() } }","}"],"type":"codeListing","syntax":"swift"},{"level":2,"type":"heading","anchor":"Multiple-Modules-and-Anonymous-Processors","text":"Multiple Modules and Anonymous Processors"},{"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":[{"text":"In that case you could ask a set of modules for their own, anonymous contributions.","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["extension Container: AutoRegistering {"," func autoRegister() {"," Container.processors += ModuleA.availableProcessors()"," Container.processors += ModuleB.availableProcessors()"," Container.processors += ModuleC.availableProcessors()"," }","}"]},{"level":2,"text":"Priority","type":"heading","anchor":"Priority"},{"inlineContent":[{"type":"text","text":"The basic solution can obviously be expanded as needed, perhaps by creating a struct that allows for tag priority."}],"type":"paragraph"},{"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":"codeListing"},{"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."}]}],"kind":"content"}],"metadata":{"roleHeading":"Article","modules":[{"name":"Factory"}],"role":"article","title":"Tags"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"references":{"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Design":{"url":"\/documentation\/factory\/design","title":"Designing Factory","role":"article","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Design"},"doc://Factory/documentation/Factory/Optionals":{"type":"topic","kind":"article","abstract":[{"text":"With Factory registrations can be performed at any time.","type":"text"}],"title":"Optionals and Dynamic Registration","identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","url":"\/documentation\/factory\/optionals","role":"article"},"doc://Factory/documentation/Factory/Modifiers":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","title":"Factory Modifiers","url":"\/documentation\/factory\/modifiers","abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"role":"article"},"doc://Factory/documentation/Factory/Modules":{"type":"topic","url":"\/documentation\/factory\/modules","role":"article","kind":"article","title":"Modular Development","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}]},"doc://Factory/documentation/Factory/Cycle":{"kind":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","title":"Resolution Cycles","url":"\/documentation\/factory\/cycle","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"role":"article"},"doc://Factory/documentation/Factory/Functional":{"title":"Functional Injection","identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","url":"\/documentation\/factory\/functional","type":"topic","role":"article","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"kind":"article"}}} \ No newline at end of file +{"primaryContentSections":[{"content":[{"anchor":"Overview","text":"Overview","level":2,"type":"heading"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"type":"codeListing","code":["let processors = container.resolve(tagged: \"processor\")"],"syntax":"swift"},{"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":"paragraph"},{"syntax":"swift","code":["let processors = container.resolve(Processing.self)"],"type":"codeListing"},{"inlineContent":[{"type":"text","text":"Doing this sort of thing in Factory is somewhat problematic, in that in most cases for most instances there "},{"inlineContent":[{"type":"text","text":"isn’t"}],"type":"emphasis"},{"type":"text","text":" a registration phase. Factory’s are lazy creatures, and they’re not evaluated until the Factory is requested."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"So what can we do?"}]},{"text":"Simple Solution","type":"heading","level":2,"anchor":"Simple-Solution"},{"type":"paragraph","inlineContent":[{"text":"Consider the following Factory registrations.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["extension SharedContainer {"," var processor1: Factory { self { Processor1() } }"," var processor2: Factory { self { Processor2() } }","}"]},{"type":"paragraph","inlineContent":[{"text":"And now the following container extension added to our main application.","type":"text"}]},{"type":"codeListing","code":["extension Container {"," public static var processors: [KeyPath>] = ["," \\.processor1,"," \\.processor2,"," ]","}"],"syntax":"swift"},{"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":[{"text":"Once that’s done, accomplishing the lookup and getting the list of actual processors is a piece of cake.","type":"text"}]},{"code":["extension Container {"," public func processors() -> [Processor] {"," Container.processors.map { self[keyPath: $0]() }"," }","}"],"syntax":"swift","type":"codeListing"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"But we can do more."}]},{"anchor":"Appending-New-Processors","text":"Appending New Processors","type":"heading","level":2},{"type":"paragraph","inlineContent":[{"text":"First, note that anything could be added to the array at any point in time.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["extension Container: AutoRegistering {"," func autoRegister() {"," Container.processors.append(\\.processor3)"," }"," var processor3: Factory { self { Processor3() } }","}"]},{"type":"heading","text":"Multiple Modules and Anonymous Processors","anchor":"Multiple-Modules-and-Anonymous-Processors","level":2},{"type":"paragraph","inlineContent":[{"text":"Above we mentioned that that main app should know what processors are available to it. That said, sometime you may not.","type":"text"}]},{"inlineContent":[{"type":"text","text":"In that case you could ask a set of modules for their own, anonymous contributions."}],"type":"paragraph"},{"code":["extension Container: AutoRegistering {"," func autoRegister() {"," Container.processors += ModuleA.availableProcessors()"," Container.processors += ModuleB.availableProcessors()"," Container.processors += ModuleC.availableProcessors()"," }","}"],"type":"codeListing","syntax":"swift"},{"anchor":"Priority","type":"heading","level":2,"text":"Priority"},{"inlineContent":[{"text":"The basic solution can obviously be expanded as needed, perhaps by creating a struct that allows for tag priority.","type":"text"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","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":[{"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.","type":"text"}]}],"kind":"content"}],"seeAlsoSections":[{"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,"title":"Advanced Topics"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/tags"]}],"metadata":{"role":"article","modules":[{"name":"Factory"}],"title":"Tags","roleHeading":"Article"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Tags"},"abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"sections":[],"kind":"article","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/Optionals":{"url":"\/documentation\/factory\/optionals","identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","role":"article","kind":"article","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"type":"topic","title":"Optionals and Dynamic Registration"},"doc://Factory/documentation/Factory/Cycle":{"url":"\/documentation\/factory\/cycle","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","role":"article","kind":"article","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"type":"topic","title":"Resolution Cycles"},"doc://Factory/documentation/Factory/Functional":{"url":"\/documentation\/factory\/functional","identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","role":"article","kind":"article","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"type":"topic","title":"Functional Injection"},"doc://Factory/documentation/Factory/Modules":{"url":"\/documentation\/factory\/modules","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","role":"article","kind":"article","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"type":"topic","title":"Modular Development"},"doc://Factory/documentation/Factory/Modifiers":{"kind":"article","abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"title":"Factory Modifiers","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","role":"article","type":"topic","url":"\/documentation\/factory\/modifiers"},"doc://Factory/documentation/Factory/Design":{"url":"\/documentation\/factory\/design","identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","role":"article","kind":"article","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"type":"topic","title":"Designing Factory"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/testing.json b/docs/data/documentation/factory/testing.json index d87f82d8..ba6b0fd8 100644 --- a/docs/data/documentation/factory/testing.json +++ b/docs/data/documentation/factory/testing.json @@ -1 +1 @@ -{"abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"kind":"article","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Testing","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"content","content":[{"type":"heading","level":2,"anchor":"Overview","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":[{"text":"But Factory has other enhancements designed to make unit testing and user interface testing simpler and easier.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Some, like "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","isActive":true,"type":"reference"},{"text":" you may have already seen and used. Others, like pushing\/popping container state, resetting, and so on, are discussed below.","type":"text"}]},{"inlineContent":[{"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.","type":"text"}],"type":"paragraph"},{"anchor":"The-Unit-Test-Environment","level":2,"text":"The Unit Test Environment","type":"heading"},{"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"},{"type":"paragraph","inlineContent":[{"text":"This means that application main ran, that the application delegate’s ","type":"text"},{"code":"didFinishLaunchingWithOptions","type":"codeVoice"},{"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, "},{"inlineContent":[{"text":"then","type":"text"}],"type":"emphasis"},{"text":" XCTest will start constructing test classes and running test cases.","type":"text"}]},{"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":[{"text":"Including dependency injection code.","type":"text"}]}]},{"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":[{"text":"This is specially true when dealing with ","type":"text"},{"type":"emphasis","inlineContent":[{"text":"singletons","type":"text"}]},{"type":"text","text":". But again, let’s save that topic for a bit later."}]},{"text":"Changing, Not Rebuilding","anchor":"Changing-Not-Rebuilding","type":"heading","level":2},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"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":[{"text":"That said, other services like analytics might want to be swapped out during testing. Don’t want to feed the system all of your dummy test data. Again, ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","isActive":true,"type":"reference"},{"type":"text","text":" can help with that."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But we’re here to test, and one thing we probably "},{"inlineContent":[{"type":"text","text":"do"}],"type":"emphasis"},{"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":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Again, Factory makes that easy."}]},{"syntax":"swift","type":"codeListing","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)","}"]},{"inlineContent":[{"type":"text","text":"Or we can write a test against unstable test data…"}],"type":"paragraph"},{"type":"codeListing","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)","}"],"syntax":"swift"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"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":[{"text":"original","type":"text"}]},{"type":"text","text":" object that demonstrated a "},{"inlineContent":[{"text":"different","type":"text"}],"type":"emphasis"},{"type":"text","text":" behavior. Or setting up circumstances where randomizing tests can cause the same thing to occur."}]},{"type":"paragraph","inlineContent":[{"text":"Sound confusing? It is. Try tracking it down in actual code.","type":"text"}]},{"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":[{"text":"Fortunately, Factory can help with that.","type":"text"}]},{"text":"Pushing and Popping State","level":2,"anchor":"Pushing-and-Popping-State","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"In your unit test setUp function you can "},{"type":"emphasis","inlineContent":[{"type":"text","text":"push"}]},{"text":" the current state of the registration system and then register and test anything you want.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Then in teardown you can "},{"type":"emphasis","inlineContent":[{"text":"pop","type":"text"}]},{"text":" the stack, eliminating all of your changes and restoring the container to its original state before the push.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This lets each set of tests start from the same initial state, regardless 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)"," }","}"]},{"inlineContent":[{"text":"That’s pretty much it. Our ","type":"text"},{"type":"codeVoice","code":"AccountsViewModel"},{"type":"text","text":" depended on an "},{"code":"AccountsLoading","type":"codeVoice"},{"type":"text","text":" service."}],"type":"paragraph"},{"inlineContent":[{"text":"Change the service provided and we change the ","type":"text"},{"inlineContent":[{"text":"data","type":"text"}],"type":"emphasis"},{"text":" provided. Change the ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"data"}]},{"text":" provided and we change our view model’s behavior.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"And then we test the results to see if everything matches up with our expectations."}],"type":"paragraph"},{"text":"Diving Deeper","type":"heading","level":2,"anchor":"Diving-Deeper"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that the above is just one way of doing things. If, for example, our "},{"code":"AccountLoader","type":"codeVoice"},{"type":"text","text":" service depended on a custom network layer, we could reach further down the stack."}]},{"code":["func testNoAccounts() async throws {"," let json = #\"{ \"accounts\": [] }\"#"," Container.shared.networking.register { MockJSON(json) }"," let model = Container.shared.accountsViewModel()"," \/\/ as before","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"We create the ","type":"text"},{"code":"AccountsViewModel","type":"codeVoice"},{"text":", the view model injects the ","type":"text"},{"type":"codeVoice","code":"AccountLoading"},{"text":" service, and that service injects our mock network service.","type":"text"}]},{"inlineContent":[{"type":"text","text":"Same for our error code."}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["func testNoAccounts() async throws {"," Container.shared.networking.register { MockError(404) }"," let model = Container.shared.accountsViewModel()"," \/\/ as before","}"]},{"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"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory makes reaching deep into a dependency tree and adjusting behavior simple and easy."}]},{"inlineContent":[{"type":"text","text":"It can even help you see what’s "},{"type":"emphasis","inlineContent":[{"text":"inside","type":"text"}]},{"text":" that dependency tree. See ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging"},{"text":" for more information.","type":"text"}],"type":"paragraph"},{"type":"heading","anchor":"Rebuilding-The-Container","text":"Rebuilding The Container","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"In your unit test setUp function you can also just reset the container and start over from scratch. No teardown needed."}]},{"type":"codeListing","code":["final class FactoryCoreTests: XCTestCase {",""," override func setUp() {"," Container.shared.reset()"," Container.shared.setupMocks()"," }"," "," func testNoAccounts() throws {"," ..."," }","}"],"syntax":"swift"},{"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."}],"type":"paragraph"},{"text":"Passed Containers","type":"heading","anchor":"Passed-Containers","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can also pass the container into the view model itself."}]},{"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)"," }","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This does, of course, assume that you structured your app appropriately."}]},{"text":"Common Setup","level":2,"anchor":"Common-Setup","type":"heading"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"codeListing","code":["extension Container {"," func setupMocks() {"," myService.register { MockServiceN(4) }"," sharedService.register { MockService2() }"," }","}"],"syntax":"swift"},{"level":2,"text":"Testing Singletons","anchor":"Testing-Singletons","type":"heading"},{"inlineContent":[{"type":"text","text":"Let’s talk singletons. The singleton scope cache is global, meaning that it’s "},{"type":"emphasis","inlineContent":[{"text":"not","type":"text"}]},{"text":" managed by any specific container.","type":"text"}],"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"},{"type":"paragraph","inlineContent":[{"text":"Singletons are, after all, expected to be singletons.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"So what to do about it? Well, if needed we can reset ","type":"text"},{"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."}]},{"code":["Scope.singleton.reset()"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or you can reset a specific singleton by reaching out to its factory."}]},{"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":"codeListing"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"paragraph","inlineContent":[{"text":"This also applies to singletons ","type":"text"},{"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":[{"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":"text"}]},{"type":"paragraph","inlineContent":[{"text":"Got that, Highlander?","type":"text"}]},{"type":"heading","anchor":"Xcode-UITesting","text":"Xcode UITesting","level":2},{"type":"paragraph","inlineContent":[{"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":"text"},{"type":"emphasis","inlineContent":[{"text":"before","type":"text"}]},{"type":"text","text":" it gets to RunLoop.main and starts idling."}]},{"inlineContent":[{"text":"How?","type":"text"}],"type":"paragraph"},{"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":[{"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":"text"}]},{"code":["import Foundation","import Factory","","extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," if ProcessInfo().arguments.contains(\"mock1\") {"," myServiceType.register { MockServiceN(1) }"," }"," #endif"," }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or you can simplify things with an "},{"type":"codeVoice","code":"arg"},{"text":" context that accomplishes the same thing.","type":"text"}]},{"type":"codeListing","code":["import Foundation","import Factory","","extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," myServiceType.onArg(\"mock1\") { MockServiceN(1) }"," #endif"," }","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"There are many contexts for testing, previews, and even UITesting. See ","type":"text"},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","type":"reference"},{"type":"text","text":" for more."}]},{"inlineContent":[{"text":"Obviously, one can add as many different test cases and registrations as needed.","type":"text"}],"type":"paragraph"}]}],"variants":[{"paths":["\/documentation\/factory\/testing"],"traits":[{"interfaceLanguage":"swift"}]}],"seeAlsoSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Previews","doc:\/\/Factory\/documentation\/Factory\/Contexts","doc:\/\/Factory\/documentation\/Factory\/Debugging","doc:\/\/Factory\/documentation\/Factory\/Chains"],"generated":true,"title":"Development and Testing"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"sections":[],"metadata":{"title":"Testing","modules":[{"name":"Factory"}],"roleHeading":"Article","role":"article"},"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory/Previews":{"abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","kind":"article","title":"SwiftUI Previews","url":"\/documentation\/factory\/previews","type":"topic","role":"article"},"doc://Factory/documentation/Factory/Debugging":{"abstract":[{"type":"text","text":"Additional support for debugging resolution cycles, dependency chains and other issue."}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","title":"Debugging","url":"\/documentation\/factory\/debugging","type":"topic","role":"article"},"doc://Factory/documentation/Factory/Chains":{"abstract":[{"type":"text","text":"Detecting and solving Circular Dependency Chains."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","kind":"article","title":"Circular Dependency Chains","url":"\/documentation\/factory\/chains","type":"topic","role":"article"},"doc://Factory/documentation/Factory/Contexts":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","title":"Contexts","type":"topic","role":"article","abstract":[{"text":"Changing injection results under special circumstances.","type":"text"}],"kind":"article","url":"\/documentation\/factory\/contexts"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"kind":"article","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"sections":[],"abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"schemaVersion":{"major":0,"patch":0,"minor":3},"metadata":{"roleHeading":"Article","role":"article","title":"Testing","modules":[{"name":"Factory"}]},"primaryContentSections":[{"kind":"content","content":[{"level":2,"type":"heading","anchor":"Overview","text":"Overview"},{"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":"paragraph"},{"syntax":"swift","code":["Container.shared.accountLoading.register { MockNoAccounts() }"],"type":"codeListing"},{"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":[{"text":"Some, like ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","isActive":true,"type":"reference"},{"text":" you may have already seen and used. Others, like pushing\/popping container state, resetting, and so on, are discussed below.","type":"text"}]},{"inlineContent":[{"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.","type":"text"}],"type":"paragraph"},{"text":"The Unit Test Environment","type":"heading","anchor":"The-Unit-Test-Environment","level":2},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"inlineContent":[{"text":"This means that application main ran, that the application delegate’s ","type":"text"},{"code":"didFinishLaunchingWithOptions","type":"codeVoice"},{"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":[{"text":"then","type":"text"}]},{"type":"text","text":" XCTest will start constructing test classes and running test cases."}],"type":"paragraph"},{"inlineContent":[{"text":"All of which means that a LOT of code has already run before your first test has even fired.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"strong","inlineContent":[{"text":"Including dependency injection code.","type":"text"}]}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"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."}]},{"level":2,"anchor":"Changing-Not-Rebuilding","text":"Changing, Not Rebuilding","type":"heading"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"That said, other services like analytics might want to be swapped out during testing. Don’t want to feed the system all of your dummy test data. Again, ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","isActive":true},{"type":"text","text":" can help with that."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"But we’re here to test, and one thing we probably ","type":"text"},{"inlineContent":[{"type":"text","text":"do"}],"type":"emphasis"},{"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."}]},{"inlineContent":[{"type":"text","text":"Again, Factory makes that easy."}],"type":"paragraph"},{"type":"codeListing","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)","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"Or we can write a test against unstable test data…","type":"text"}]},{"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":"codeListing","syntax":"swift"},{"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 "},{"inlineContent":[{"type":"text","text":"original"}],"type":"emphasis"},{"type":"text","text":" object that demonstrated a "},{"inlineContent":[{"type":"text","text":"different"}],"type":"emphasis"},{"type":"text","text":" behavior. Or setting up circumstances where randomizing tests can cause the same thing to occur."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Sound confusing? It is. Try tracking it down in actual code.","type":"text"}]},{"inlineContent":[{"text":"How to solve it? Well, the best solution to that sort of problem is to avoid it in the first place.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Fortunately, Factory can help with that."}]},{"text":"Pushing and Popping State","anchor":"Pushing-and-Popping-State","level":2,"type":"heading"},{"inlineContent":[{"type":"text","text":"In your unit test setUp function you can "},{"type":"emphasis","inlineContent":[{"text":"push","type":"text"}]},{"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"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This lets each set of tests start from the same initial state, regardless of what any prior test had changed."}]},{"inlineContent":[{"text":"The following example assumes we’re using the shared container.","type":"text"}],"type":"paragraph"},{"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 "},{"code":"AccountsLoading","type":"codeVoice"},{"type":"text","text":" service."}]},{"type":"paragraph","inlineContent":[{"text":"Change the service provided and we change the ","type":"text"},{"type":"emphasis","inlineContent":[{"text":"data","type":"text"}]},{"type":"text","text":" provided. Change the "},{"type":"emphasis","inlineContent":[{"text":"data","type":"text"}]},{"type":"text","text":" provided and we change our view model’s behavior."}]},{"inlineContent":[{"text":"And then we test the results to see if everything matches up with our expectations.","type":"text"}],"type":"paragraph"},{"text":"Diving Deeper","level":2,"anchor":"Diving-Deeper","type":"heading"},{"inlineContent":[{"text":"Note that the above is just one way of doing things. If, for example, our ","type":"text"},{"type":"codeVoice","code":"AccountLoader"},{"text":" service depended on a custom network layer, we could reach further down the stack.","type":"text"}],"type":"paragraph"},{"syntax":"swift","code":["func testNoAccounts() async throws {"," let json = #\"{ \"accounts\": [] }\"#"," Container.shared.networking.register { MockJSON(json) }"," let model = Container.shared.accountsViewModel()"," \/\/ as before","}"],"type":"codeListing"},{"inlineContent":[{"text":"We create the ","type":"text"},{"type":"codeVoice","code":"AccountsViewModel"},{"text":", the view model injects the ","type":"text"},{"type":"codeVoice","code":"AccountLoading"},{"text":" service, and that service injects our mock network service.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"Same for our error code.","type":"text"}],"type":"paragraph"},{"syntax":"swift","code":["func testNoAccounts() async throws {"," Container.shared.networking.register { MockError(404) }"," let model = Container.shared.accountsViewModel()"," \/\/ as before","}"],"type":"codeListing"},{"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":[{"text":"It can even help you see what’s ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"inside"}]},{"text":" that dependency tree. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","isActive":true,"type":"reference"},{"type":"text","text":" for more information."}]},{"anchor":"Rebuilding-The-Container","level":2,"text":"Rebuilding The Container","type":"heading"},{"inlineContent":[{"text":"In your unit test setUp function you can also just reset the container and start over from scratch. No teardown needed.","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["final class FactoryCoreTests: XCTestCase {",""," override func setUp() {"," Container.shared.reset()"," 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."}]},{"type":"heading","text":"Passed Containers","level":2,"anchor":"Passed-Containers"},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can also pass the container into the view model itself."}]},{"syntax":"swift","type":"codeListing","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":[{"text":"This does, of course, assume that you structured your app appropriately.","type":"text"}]},{"level":2,"text":"Common Setup","type":"heading","anchor":"Common-Setup"},{"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":"paragraph"},{"syntax":"swift","code":["extension Container {"," func setupMocks() {"," myService.register { MockServiceN(4) }"," sharedService.register { MockService2() }"," }","}"],"type":"codeListing"},{"level":2,"type":"heading","text":"Testing Singletons","anchor":"Testing-Singletons"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s talk singletons. The singleton scope cache is global, meaning that it’s "},{"inlineContent":[{"type":"text","text":"not"}],"type":"emphasis"},{"text":" managed by any specific container.","type":"text"}]},{"inlineContent":[{"text":"That being the case, neither the push\/pull mechanism or the container rebuilding mechanisms described above will clear any cached singleton instances.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Singletons are, after all, expected to be singletons.","type":"text"}]},{"inlineContent":[{"text":"So what to do about it? Well, if needed we can reset ","type":"text"},{"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":"paragraph"},{"code":["Scope.singleton.reset()"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"Or you can reset a specific singleton by reaching out to its factory.","type":"text"}]},{"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":"codeListing"},{"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":[{"text":"This also applies to singletons ","type":"text"},{"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"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"inlineContent":[{"type":"text","text":"Got that, Highlander?"}],"type":"paragraph"},{"level":2,"anchor":"Xcode-UITesting","type":"heading","text":"Xcode UITesting"},{"inlineContent":[{"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":"text"},{"type":"emphasis","inlineContent":[{"text":"before","type":"text"}]},{"type":"text","text":" it gets to RunLoop.main and starts idling."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"How?"}]},{"type":"paragraph","inlineContent":[{"text":"One solution is passed parameters.","type":"text"}]},{"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)"," }","} "]},{"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":"paragraph"},{"code":["import Foundation","import Factory","","extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," if ProcessInfo().arguments.contains(\"mock1\") {"," myServiceType.register { MockServiceN(1) }"," }"," #endif"," }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"Or you can simplify things with an ","type":"text"},{"code":"arg","type":"codeVoice"},{"text":" context that accomplishes the same thing.","type":"text"}]},{"syntax":"swift","code":["import Foundation","import Factory","","extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," myServiceType.onArg(\"mock1\") { MockServiceN(1) }"," #endif"," }","}"],"type":"codeListing"},{"inlineContent":[{"type":"text","text":"There are many contexts for testing, previews, and even UITesting. See "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","type":"reference"},{"text":" for more.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Obviously, one can add as many different test cases and registrations as needed."}]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/testing"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Testing","interfaceLanguage":"swift"},"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/Chains":{"title":"Circular Dependency Chains","url":"\/documentation\/factory\/chains","abstract":[{"text":"Detecting and solving Circular Dependency Chains.","type":"text"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","type":"topic","role":"article"},"doc://Factory/documentation/Factory/Contexts":{"abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"type":"topic","role":"article","title":"Contexts","kind":"article","url":"\/documentation\/factory\/contexts","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"},"doc://Factory/documentation/Factory/Previews":{"title":"SwiftUI Previews","url":"\/documentation\/factory\/previews","abstract":[{"text":"Mocking dependencies for SwiftUI Previews.","type":"text"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","type":"topic","role":"article"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/Debugging":{"title":"Debugging","url":"\/documentation\/factory\/debugging","abstract":[{"text":"Additional support for debugging resolution cycles, dependency chains and other issue.","type":"text"}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","type":"topic","role":"article"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/weaklazyinjected.json b/docs/data/documentation/factory/weaklazyinjected.json index 3e0a7c62..9e045ff4 100644 --- a/docs/data/documentation/factory/weaklazyinjected.json +++ b/docs/data/documentation/factory/weaklazyinjected.json @@ -1 +1 @@ -{"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-4r0lx","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-75hq3"]},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/projectedValue","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/wrappedValue"],"title":"Instance Properties"},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolve(reset:)","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolvedOrNil()"]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/weaklazyinjected"]}],"sections":[],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"@propertyWrapper","kind":"attribute"},{"kind":"text","text":" "},{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">","kind":"text"}]}]},{"kind":"content","content":[{"level":2,"type":"heading","text":"Overview","anchor":"overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This wrapper maintains a weak reference to the object in question, so it must exist elsewhere.t"},{"text":" ","type":"text"},{"text":"It’s useful for delegate patterns and parent\/child relationships.","type":"text"}]},{"inlineContent":[{"text":"Property wrappers implement an annotation pattern to resolving dependencies, similar to using","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"EnvironmentObject in SwiftUI."}],"type":"paragraph"},{"code":["class MyViewModel {"," @LazyInjected(\\.myService) var service"," @LazyInjected(\\MyCustomContainer.myService) var service","}"],"syntax":"swift","type":"codeListing"},{"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":" "},{"text":"allows you to point an instance on your own customer container type.","type":"text"}]},{"content":[{"inlineContent":[{"type":"text","text":"Lazy injection is resolved the first time the dependency is referenced by the code, "},{"inlineContent":[{"type":"text","text":"not"}],"type":"strong"},{"type":"text","text":" on initialization."}],"type":"paragraph"}],"style":"note","name":"Note","type":"aside"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"},"metadata":{"title":"WeakLazyInjected","roleHeading":"Structure","modules":[{"name":"Factory"}],"role":"symbol","externalID":"s:7Factory16WeakLazyInjectedV","symbolKind":"struct","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"text":"WeakLazyInjected","kind":"identifier"}]},"schemaVersion":{"patch":0,"minor":3,"major":0},"references":{"doc://Factory/documentation/Factory/WeakLazyInjected/resolvedOrNil()":{"title":"resolvedOrNil()","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolvedOrNil()","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/resolvedornil()","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolvedOrNil"},{"text":"() -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?"}],"abstract":[{"text":"Projected function returns resolved instance if it exists.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/WeakLazyInjected/resolve(reset:)":{"title":"resolve(reset:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolve(reset:)","url":"\/documentation\/factory\/weaklazyinjected\/resolve(reset:)","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier","text":"FactoryResetOptions"},{"text":")","kind":"text"}],"kind":"symbol","abstract":[{"text":"Allows the user to force a Factory resolution at their discretion.","type":"text"}]},"doc://Factory/documentation/Factory/WeakLazyInjected":{"kind":"symbol","type":"topic","title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}]},"doc://Factory/documentation/Factory/WeakLazyInjected/init(_:)-75hq3":{"fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"<"},{"text":"C","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"kind":"text","text":", "},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"role":"symbol","abstract":[{"text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-75hq3","kind":"symbol","url":"\/documentation\/factory\/weaklazyinjected\/init(_:)-75hq3","type":"topic","title":"init(_:)"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/WeakLazyInjected/wrappedValue":{"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"role":"symbol","abstract":[{"text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time.","type":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/wrappedValue","title":"wrappedValue","url":"\/documentation\/factory\/weaklazyinjected\/wrappedvalue","type":"topic"},"doc://Factory/documentation/Factory/WeakLazyInjected/init(_:)-4r0lx":{"fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier","text":"KeyPath"},{"kind":"text","text":"<"},{"preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier","text":"Container"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"role":"symbol","abstract":[{"text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-4r0lx","kind":"symbol","url":"\/documentation\/factory\/weaklazyinjected\/init(_:)-4r0lx","type":"topic","title":"init(_:)"},"doc://Factory/documentation/Factory/WeakLazyInjected/projectedValue":{"kind":"symbol","title":"projectedValue","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/projectedValue","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected\/projectedvalue","abstract":[{"text":"Unwraps the property wrapper granting access to the resolve\/reset function.","type":"text"}],"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"text":"WeakLazyInjected","preciseIdentifier":"s:7Factory16WeakLazyInjectedV","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}]},"doc://Factory/documentation/Factory/WeakLazyInjected/factory":{"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"text":": ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"role":"symbol","abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/factory","title":"factory","url":"\/documentation\/factory\/weaklazyinjected\/factory","type":"topic"}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/weaklazyinjected"]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"kind":"symbol","sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"metadata":{"role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"roleHeading":"Structure","modules":[{"name":"Factory"}],"title":"WeakLazyInjected","externalID":"s:7Factory16WeakLazyInjectedV","symbolKind":"struct","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}]},"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-4r0lx","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-75hq3"],"title":"Initializers"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/projectedValue","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/wrappedValue"],"title":"Instance Properties"},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolve(reset:)","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolvedOrNil()"]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"attribute","text":"@propertyWrapper"},{"text":" ","kind":"text"},{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"WeakLazyInjected"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">","kind":"text"}]}]},{"kind":"content","content":[{"anchor":"overview","type":"heading","level":2,"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"},{"text":" ","type":"text"},{"type":"text","text":"It’s useful for delegate patterns and parent\/child relationships."}]},{"type":"paragraph","inlineContent":[{"text":"Property wrappers implement an annotation pattern to resolving dependencies, similar to using","type":"text"},{"type":"text","text":" "},{"text":"EnvironmentObject in SwiftUI.","type":"text"}]},{"code":["class MyViewModel {"," @LazyInjected(\\.myService) var service"," @LazyInjected(\\MyCustomContainer.myService) var service","}"],"syntax":"swift","type":"codeListing"},{"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."},{"text":" ","type":"text"},{"type":"text","text":"The short version of the keyPath resolves to the default container, while the expanded version"},{"text":" ","type":"text"},{"type":"text","text":"allows you to point an instance on your own customer container type."}]},{"name":"Note","type":"aside","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":[{"text":"not","type":"text"}]},{"text":" on initialization.","type":"text"}]}]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"kind":"symbol","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"type":"topic","url":"\/documentation\/factory\/weaklazyinjected"},"doc://Factory/documentation/Factory/WeakLazyInjected/resolvedOrNil()":{"kind":"symbol","abstract":[{"text":"Projected function returns resolved instance if it exists.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolvedOrNil()","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolvedOrNil","kind":"identifier"},{"kind":"text","text":"() -> "},{"text":"T","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"url":"\/documentation\/factory\/weaklazyinjected\/resolvedornil()","role":"symbol","type":"topic","title":"resolvedOrNil()"},"doc://Factory/documentation/Factory/WeakLazyInjected/init(_:)-75hq3":{"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/weaklazyinjected\/init(_:)-75hq3","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-75hq3","fragments":[{"text":"init","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"C"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}],"title":"init(_:)","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}]},"doc://Factory/documentation/Factory/WeakLazyInjected/factory":{"type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"kind":"symbol","title":"factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/factory","abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"url":"\/documentation\/factory\/weaklazyinjected\/factory","role":"symbol"},"doc://Factory/documentation/Factory/WeakLazyInjected/wrappedValue":{"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/weaklazyinjected\/wrappedvalue","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/wrappedValue","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"wrappedValue","kind":"identifier"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"title":"wrappedValue","abstract":[{"type":"text","text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time."}]},"doc://Factory/documentation/Factory/WeakLazyInjected/init(_:)-4r0lx":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-4r0lx","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"kind":"text","text":"<"},{"text":"Container","kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}],"kind":"symbol","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/init(_:)-4r0lx"},"doc://Factory/documentation/Factory/WeakLazyInjected/projectedValue":{"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/weaklazyinjected\/projectedvalue","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/projectedValue","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"projectedValue"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory16WeakLazyInjectedV","text":"WeakLazyInjected","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"title":"projectedValue","abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}]},"doc://Factory/documentation/Factory/WeakLazyInjected/resolve(reset:)":{"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/weaklazyinjected\/resolve(reset:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolve(reset:)","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"text":"(","kind":"text"},{"text":"reset","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","kind":"typeIdentifier"},{"text":")","kind":"text"}],"title":"resolve(reset:)","abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}]}}} \ 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 a26965c9..e33e1043 100644 --- a/docs/data/documentation/factory/weaklazyinjected/factory.json +++ b/docs/data/documentation/factory/weaklazyinjected/factory.json @@ -1 +1 @@ -{"kind":"symbol","abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/factory"},"sections":[],"metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"role":"symbol","modules":[{"name":"Factory"}],"externalID":"s:7Factory16WeakLazyInjectedV7factoryA2AVyxGvp","title":"factory","roleHeading":"Instance Property","symbolKind":"property"},"schemaVersion":{"major":0,"patch":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"> { "},{"text":"get","kind":"keyword"},{"kind":"text","text":" }"}]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/factory"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/WeakLazyInjected":{"kind":"symbol","type":"topic","title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/WeakLazyInjected/factory":{"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"text":": ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"role":"symbol","abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/factory","title":"factory","url":"\/documentation\/factory\/weaklazyinjected\/factory","type":"topic"},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]}}} \ No newline at end of file +{"sections":[],"schemaVersion":{"minor":3,"major":0,"patch":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/factory"},"abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/factory"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"factory","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"> { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}],"languages":["swift"]}]}],"kind":"symbol","metadata":{"roleHeading":"Instance Property","modules":[{"name":"Factory"}],"symbolKind":"property","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"factory","kind":"identifier"},{"kind":"text","text":": "},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"role":"symbol","title":"factory","externalID":"s:7Factory16WeakLazyInjectedV7factoryA2AVyxGvp"},"references":{"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/WeakLazyInjected/factory":{"type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"kind":"symbol","title":"factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/factory","abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"url":"\/documentation\/factory\/weaklazyinjected\/factory","role":"symbol"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"kind":"symbol","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"type":"topic","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 0a170ed7..8e816044 100644 --- a/docs/data/documentation/factory/weaklazyinjected/init(_:)-4r0lx.json +++ b/docs/data/documentation/factory/weaklazyinjected/init(_:)-4r0lx.json @@ -1 +1 @@ -{"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"externalID":"s:7Factory16WeakLazyInjectedVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc","roleHeading":"Initializer","role":"symbol","symbolKind":"init","title":"init(_:)","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"Container","kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"modules":[{"name":"Factory"}]},"kind":"symbol","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"keyPath","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","preciseIdentifier":"s:7Factory9ContainerC","text":"Container","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}],"languages":["swift"]}],"kind":"declarations"},{"parameters":[{"content":[{"inlineContent":[{"type":"text","text":"KeyPath to a Factory on the default Container."}],"type":"paragraph"}],"name":"keyPath"}],"kind":"parameters"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-4r0lx"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/weaklazyinjected\/init(_:)-4r0lx"]}],"sections":[],"references":{"doc://Factory/documentation/Factory/Container":{"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Container"}],"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"kind":"symbol","type":"topic","title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/WeakLazyInjected/init(_:)-4r0lx":{"fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier","text":"KeyPath"},{"kind":"text","text":"<"},{"preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier","text":"Container"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"role":"symbol","abstract":[{"text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-4r0lx","kind":"symbol","url":"\/documentation\/factory\/weaklazyinjected\/init(_:)-4r0lx","type":"topic","title":"init(_:)"}}} \ No newline at end of file +{"metadata":{"role":"symbol","symbolKind":"init","modules":[{"name":"Factory"}],"title":"init(_:)","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier","text":"Container"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}],"roleHeading":"Initializer","externalID":"s:7Factory16WeakLazyInjectedVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc"},"schemaVersion":{"minor":3,"major":0,"patch":0},"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-4r0lx"},"sections":[],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"init"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"text":"Container","preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}]}]},{"kind":"parameters","parameters":[{"content":[{"inlineContent":[{"type":"text","text":"KeyPath to a Factory on the default Container."}],"type":"paragraph"}],"name":"keyPath"}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/weaklazyinjected\/init(_:)-4r0lx"]}],"references":{"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"kind":"symbol","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"type":"topic","url":"\/documentation\/factory\/weaklazyinjected"},"doc://Factory/documentation/Factory/WeakLazyInjected/init(_:)-4r0lx":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-4r0lx","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"kind":"text","text":"<"},{"text":"Container","kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}],"kind":"symbol","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/init(_:)-4r0lx"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","url":"\/documentation\/factory\/container","title":"Container","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Container","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","navigatorTitle":[{"kind":"identifier","text":"Container"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"type":"topic","role":"symbol"}}} \ 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 e7493266..49a74e3e 100644 --- a/docs/data/documentation/factory/weaklazyinjected/init(_:)-75hq3.json +++ b/docs/data/documentation/factory/weaklazyinjected/init(_:)-75hq3.json @@ -1 +1 @@ -{"metadata":{"title":"init(_:)","externalID":"s:7Factory16WeakLazyInjectedVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc","fragments":[{"text":"init","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"C"},{"text":">(","kind":"text"},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"symbolKind":"init","modules":[{"name":"Factory"}],"roleHeading":"Initializer","role":"symbol"},"sections":[],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"<"},{"text":"C","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>) "},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"text":"C","kind":"typeIdentifier"},{"text":" : ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","text":"SharedContainer","preciseIdentifier":"s:7Factory15SharedContainerP","kind":"typeIdentifier"}]}]},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"inlineContent":[{"text":"KeyPath to a Factory on the specified Container.","type":"text"}],"type":"paragraph"}]}]}],"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/init(_:)-75hq3"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-75hq3","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory/WeakLazyInjected/init(_:)-75hq3":{"fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"<"},{"text":"C","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"kind":"text","text":", "},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"role":"symbol","abstract":[{"text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-75hq3","kind":"symbol","url":"\/documentation\/factory\/weaklazyinjected\/init(_:)-75hq3","type":"topic","title":"init(_:)"},"doc://Factory/documentation/Factory/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","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"SharedContainer"}],"title":"SharedContainer","url":"\/documentation\/factory\/sharedcontainer","navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Factory":{"navigatorTitle":[{"kind":"identifier","text":"Factory"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"topic","abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"url":"\/documentation\/factory\/factory","kind":"symbol","title":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}]},"doc://Factory/documentation/Factory/WeakLazyInjected":{"kind":"symbol","type":"topic","title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"sections":[],"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Initializer","fragments":[{"text":"init","kind":"identifier"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"KeyPath","preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"externalID":"s:7Factory16WeakLazyInjectedVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc","symbolKind":"init","role":"symbol","title":"init(_:)"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-75hq3"},"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"init","kind":"keyword"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"C"},{"text":">(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"keyPath"},{"text":": ","kind":"text"},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"text":"C","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>) "},{"text":"where","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":" : "},{"preciseIdentifier":"s:7Factory15SharedContainerP","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","text":"SharedContainer","kind":"typeIdentifier"}],"languages":["swift"]}],"kind":"declarations"},{"parameters":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"KeyPath to a Factory on the specified Container."}]}],"name":"keyPath"}],"kind":"parameters"}],"kind":"symbol","abstract":[{"text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time.","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/weaklazyinjected\/init(_:)-75hq3"]}],"references":{"doc://Factory/documentation/Factory/WeakLazyInjected/init(_:)-75hq3":{"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/weaklazyinjected\/init(_:)-75hq3","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-75hq3","fragments":[{"text":"init","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"C"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}],"title":"init(_:)","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}]},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","title":"Factory","type":"topic","url":"\/documentation\/factory\/factory","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"role":"symbol"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"kind":"symbol","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"type":"topic","url":"\/documentation\/factory\/weaklazyinjected"},"doc://Factory/documentation/Factory/SharedContainer":{"title":"SharedContainer","type":"topic","url":"\/documentation\/factory\/sharedcontainer","role":"symbol","navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"SharedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ 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 8a1d9cbd..529bb81a 100644 --- a/docs/data/documentation/factory/weaklazyinjected/projectedvalue.json +++ b/docs/data/documentation/factory/weaklazyinjected/projectedvalue.json @@ -1 +1 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/projectedValue","interfaceLanguage":"swift"},"sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"text":"Unwraps the property wrapper granting access to the resolve\/reset function.","type":"text"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Instance Property","title":"projectedValue","role":"symbol","externalID":"s:7Factory16WeakLazyInjectedV14projectedValueACyxGvp","symbolKind":"property","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"projectedValue","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory16WeakLazyInjectedV","text":"WeakLazyInjected","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"projectedValue"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory16WeakLazyInjectedV","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"typeIdentifier","text":"WeakLazyInjected"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":"> { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" ","kind":"text"},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"languages":["swift"]}]}],"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/projectedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/WeakLazyInjected/projectedValue":{"kind":"symbol","title":"projectedValue","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/projectedValue","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected\/projectedvalue","abstract":[{"text":"Unwraps the property wrapper granting access to the resolve\/reset function.","type":"text"}],"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"text":"WeakLazyInjected","preciseIdentifier":"s:7Factory16WeakLazyInjectedV","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}]},"doc://Factory/documentation/Factory/WeakLazyInjected":{"kind":"symbol","type":"topic","title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}]},"doc://Factory/documentation/Factory":{"role":"collection","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":"doc:\/\/Factory\/documentation\/Factory","type":"topic","kind":"symbol","title":"Factory"}}} \ No newline at end of file +{"schemaVersion":{"minor":3,"patch":0,"major":0},"sections":[],"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"projectedValue"},{"text":": ","kind":"text"},{"text":"WeakLazyInjected","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","kind":"typeIdentifier","preciseIdentifier":"s:7Factory16WeakLazyInjectedV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"> { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" ","kind":"text"},{"text":"set","kind":"keyword"},{"text":" }","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}]}],"metadata":{"title":"projectedValue","role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory16WeakLazyInjectedV","text":"WeakLazyInjected","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"externalID":"s:7Factory16WeakLazyInjectedV14projectedValueACyxGvp","symbolKind":"property","roleHeading":"Instance Property","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/weaklazyinjected\/projectedvalue"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/projectedValue"},"kind":"symbol","references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/WeakLazyInjected/projectedValue":{"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/weaklazyinjected\/projectedvalue","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/projectedValue","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"projectedValue"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory16WeakLazyInjectedV","text":"WeakLazyInjected","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"title":"projectedValue","abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}]},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"kind":"symbol","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"type":"topic","url":"\/documentation\/factory\/weaklazyinjected"}}} \ 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 f5731068..c8e88105 100644 --- a/docs/data/documentation/factory/weaklazyinjected/resolve(reset:).json +++ b/docs/data/documentation/factory/weaklazyinjected/resolve(reset:).json @@ -1 +1 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolve(reset:)","interfaceLanguage":"swift"},"metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"reset"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier","text":"FactoryResetOptions"},{"kind":"text","text":")"}],"externalID":"s:7Factory16WeakLazyInjectedV7resolve5resetyAA0A12ResetOptionsO_tF","title":"resolve(reset:)","roleHeading":"Instance Method","role":"symbol","modules":[{"name":"Factory"}],"symbolKind":"method"},"sections":[],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"mutating"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"text":"reset","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"options","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":" = .none)"}],"languages":["swift"]}],"kind":"declarations"}],"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/resolve(reset:)"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"schemaVersion":{"minor":3,"major":0,"patch":0},"references":{"doc://Factory/documentation/Factory/WeakLazyInjected":{"kind":"symbol","type":"topic","title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}]},"doc://Factory/documentation/Factory/WeakLazyInjected/resolve(reset:)":{"title":"resolve(reset:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolve(reset:)","url":"\/documentation\/factory\/weaklazyinjected\/resolve(reset:)","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier","text":"FactoryResetOptions"},{"text":")","kind":"text"}],"kind":"symbol","abstract":[{"text":"Allows the user to force a Factory resolution at their discretion.","type":"text"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/FactoryResetOptions":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"title":"FactoryResetOptions"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"mutating"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolve"},{"text":"(","kind":"text"},{"text":"reset","kind":"externalParam"},{"kind":"text","text":" "},{"text":"options","kind":"internalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"typeIdentifier","text":"FactoryResetOptions"},{"kind":"text","text":" = .none)"}]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolve(reset:)"},"metadata":{"role":"symbol","title":"resolve(reset:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"("},{"text":"reset","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","kind":"typeIdentifier"},{"kind":"text","text":")"}],"symbolKind":"method","modules":[{"name":"Factory"}],"externalID":"s:7Factory16WeakLazyInjectedV7resolve5resetyAA0A12ResetOptionsO_tF"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/weaklazyinjected\/resolve(reset:)"]}],"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"sections":[],"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","title":"FactoryResetOptions","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryResetOptions","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"kind":"symbol","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"type":"topic","url":"\/documentation\/factory\/weaklazyinjected"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/WeakLazyInjected/resolve(reset:)":{"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/weaklazyinjected\/resolve(reset:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolve(reset:)","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"text":"(","kind":"text"},{"text":"reset","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","kind":"typeIdentifier"},{"text":")","kind":"text"}],"title":"resolve(reset:)","abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/weaklazyinjected/resolvedornil().json b/docs/data/documentation/factory/weaklazyinjected/resolvedornil().json index 0d8a2390..36e78738 100644 --- a/docs/data/documentation/factory/weaklazyinjected/resolvedornil().json +++ b/docs/data/documentation/factory/weaklazyinjected/resolvedornil().json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"resolvedOrNil","kind":"identifier"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"content":[{"level":2,"anchor":"discussion","text":"Discussion","type":"heading"},{"type":"paragraph","inlineContent":[{"text":"This can come in handy when you need to perform some sort of cleanup, but you don’t want to resolve","type":"text"},{"type":"text","text":" "},{"text":"the property wrapper instance if it hasn’t already been resolved.","type":"text"}]},{"syntax":"swift","code":["deinit {"," $myService.resolvedOrNil()?.cleanup()","}"],"type":"codeListing"}],"kind":"content"}],"abstract":[{"type":"text","text":"Projected function returns resolved instance if it exists."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolvedOrNil()"},"sections":[],"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/resolvedornil()"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"modules":[{"name":"Factory"}],"title":"resolvedOrNil()","externalID":"s:7Factory16WeakLazyInjectedV13resolvedOrNilxSgyF","role":"symbol","symbolKind":"method","roleHeading":"Instance Method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolvedOrNil"},{"kind":"text","text":"() -> "},{"text":"T","kind":"typeIdentifier"},{"text":"?","kind":"text"}]},"references":{"doc://Factory/documentation/Factory/WeakLazyInjected/resolvedOrNil()":{"title":"resolvedOrNil()","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolvedOrNil()","type":"topic","url":"\/documentation\/factory\/weaklazyinjected\/resolvedornil()","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolvedOrNil"},{"text":"() -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?"}],"abstract":[{"text":"Projected function returns resolved instance if it exists.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]},"doc://Factory/documentation/Factory/WeakLazyInjected":{"kind":"symbol","type":"topic","title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}]}}} \ No newline at end of file +{"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/resolvedornil()"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolvedOrNil","kind":"identifier"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"level":2,"type":"heading","anchor":"discussion","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This can come in handy when you need to perform some sort of cleanup, but you don’t want to resolve"},{"type":"text","text":" "},{"type":"text","text":"the property wrapper instance if it hasn’t already been resolved."}]},{"code":["deinit {"," $myService.resolvedOrNil()?.cleanup()","}"],"type":"codeListing","syntax":"swift"}]}],"metadata":{"roleHeading":"Instance Method","title":"resolvedOrNil()","modules":[{"name":"Factory"}],"symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"resolvedOrNil","kind":"identifier"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"role":"symbol","externalID":"s:7Factory16WeakLazyInjectedV13resolvedOrNilxSgyF"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolvedOrNil()","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"patch":0,"minor":3},"sections":[],"kind":"symbol","abstract":[{"text":"Projected function returns resolved instance if it exists.","type":"text"}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"kind":"symbol","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"type":"topic","url":"\/documentation\/factory\/weaklazyinjected"},"doc://Factory/documentation/Factory/WeakLazyInjected/resolvedOrNil()":{"kind":"symbol","abstract":[{"text":"Projected function returns resolved instance if it exists.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolvedOrNil()","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolvedOrNil","kind":"identifier"},{"kind":"text","text":"() -> "},{"text":"T","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"url":"\/documentation\/factory\/weaklazyinjected\/resolvedornil()","role":"symbol","type":"topic","title":"resolvedOrNil()"}}} \ 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 8d70d1f3..44e501b4 100644 --- a/docs/data/documentation/factory/weaklazyinjected/wrappedvalue.json +++ b/docs/data/documentation/factory/weaklazyinjected/wrappedvalue.json @@ -1 +1 @@ -{"abstract":[{"type":"text","text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"? { "},{"text":"mutating","kind":"keyword"},{"text":" ","kind":"text"},{"text":"get","kind":"keyword"},{"kind":"text","text":" "},{"text":"set","kind":"keyword"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/wrappedValue"},"sections":[],"metadata":{"symbolKind":"property","roleHeading":"Instance Property","modules":[{"name":"Factory"}],"externalID":"s:7Factory16WeakLazyInjectedV12wrappedValuexSgvp","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"wrappedValue","kind":"identifier"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"title":"wrappedValue","role":"symbol"},"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/wrappedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/WeakLazyInjected/wrappedValue":{"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"role":"symbol","abstract":[{"text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time.","type":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/wrappedValue","title":"wrappedValue","url":"\/documentation\/factory\/weaklazyinjected\/wrappedvalue","type":"topic"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"kind":"symbol","type":"topic","title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}]},"doc://Factory/documentation/Factory":{"role":"collection","title":"Factory","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}]}}} \ No newline at end of file +{"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/wrappedValue","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"wrappedValue","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"text":"? { ","kind":"text"},{"kind":"keyword","text":"mutating"},{"kind":"text","text":" "},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"text":"set","kind":"keyword"},{"text":" }","kind":"text"}],"platforms":["macOS"]}],"kind":"declarations"}],"metadata":{"title":"wrappedValue","modules":[{"name":"Factory"}],"roleHeading":"Instance Property","symbolKind":"property","externalID":"s:7Factory16WeakLazyInjectedV12wrappedValuexSgvp","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"wrappedValue","kind":"identifier"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?"}],"role":"symbol"},"sections":[],"schemaVersion":{"major":0,"patch":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/weaklazyinjected\/wrappedvalue"]}],"abstract":[{"text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time.","type":"text"}],"references":{"doc://Factory/documentation/Factory/WeakLazyInjected/wrappedValue":{"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/weaklazyinjected\/wrappedvalue","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/wrappedValue","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"wrappedValue","kind":"identifier"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"title":"wrappedValue","abstract":[{"type":"text","text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time."}]},"doc://Factory/documentation/Factory/WeakLazyInjected":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","title":"WeakLazyInjected","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"kind":"symbol","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves a weak instance of the desired type the first time the wrapped value is requested."}],"type":"topic","url":"\/documentation\/factory\/weaklazyinjected"},"doc://Factory/documentation/Factory":{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory","kind":"symbol","role":"collection","url":"\/documentation\/factory","title":"Factory"}}} \ No newline at end of file diff --git a/docs/documentation/factory/factoryautoregistering/index.html b/docs/documentation/factory/factoryautoregistering/index.html new file mode 100644 index 00000000..2fe353d5 --- /dev/null +++ b/docs/documentation/factory/factoryautoregistering/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/factory/factorycontainer/index.html b/docs/documentation/factory/factorycontainer/index.html new file mode 100644 index 00000000..2fe353d5 --- /dev/null +++ b/docs/documentation/factory/factorycontainer/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/factory/factorycontainermanager/index.html b/docs/documentation/factory/factorycontainermanager/index.html new file mode 100644 index 00000000..2fe353d5 --- /dev/null +++ b/docs/documentation/factory/factorycontainermanager/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/factory/factorymanagedcontainer/index.html b/docs/documentation/factory/factorymanagedcontainer/index.html new file mode 100644 index 00000000..2fe353d5 --- /dev/null +++ b/docs/documentation/factory/factorymanagedcontainer/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/factory/factoryresolving/index.html b/docs/documentation/factory/factoryresolving/index.html new file mode 100644 index 00000000..2fe353d5 --- /dev/null +++ b/docs/documentation/factory/factoryresolving/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/factory/factoryscope/index.html b/docs/documentation/factory/factoryscope/index.html new file mode 100644 index 00000000..2fe353d5 --- /dev/null +++ b/docs/documentation/factory/factoryscope/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/factory/factorysharedcontainer/index.html b/docs/documentation/factory/factorysharedcontainer/index.html new file mode 100644 index 00000000..2fe353d5 --- /dev/null +++ b/docs/documentation/factory/factorysharedcontainer/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/index/index.json b/docs/index/index.json index 37727b66..6e78d1b9 100644 --- a/docs/index/index.json +++ b/docs/index/index.json @@ -1 +1 @@ -{"interfaceLanguages":{"swift":[{"children":[{"title":"The Basics","type":"groupMarker"},{"children":[{"title":"Examples","type":"groupMarker"},{"path":"\/documentation\/factory\/registrations","title":"Sample Registrations","type":"article"},{"path":"\/documentation\/factory\/resolutions","title":"Sample Resolutions","type":"article"}],"path":"\/documentation\/factory\/gettingstarted","title":"Getting Started","type":"symbol"},{"path":"\/documentation\/factory\/containers","title":"Containers","type":"article"},{"children":[{"title":"Scope Class Definitions","type":"groupMarker"},{"children":[{"title":"Type Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/scope\/cached-swift.type.property","title":"static let cached: Scope.Cached","type":"property"},{"path":"\/documentation\/factory\/scope\/graph-swift.type.property","title":"static let graph: Scope.Graph","type":"property"},{"path":"\/documentation\/factory\/scope\/shared-swift.type.property","title":"static let shared: Scope.Shared","type":"property"},{"path":"\/documentation\/factory\/scope\/singleton-swift.type.property","title":"static let singleton: Scope.Singleton","type":"property"},{"path":"\/documentation\/factory\/scope\/unique-swift.type.property","title":"static let unique: Scope.Unique","type":"property"}],"path":"\/documentation\/factory\/scope","title":"Scope","type":"class"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/scope\/cached-swift.class\/init()","title":"init()","type":"init"}],"path":"\/documentation\/factory\/scope\/cached-swift.class","title":"Scope.Cached","type":"class"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/scope\/graph-swift.class\/init()","title":"init()","type":"init"}],"path":"\/documentation\/factory\/scope\/graph-swift.class","title":"Scope.Graph","type":"class"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/scope\/shared-swift.class\/init()","title":"init()","type":"init"}],"path":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","type":"class"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/scope\/singleton-swift.class\/init()","title":"init()","type":"init"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/scope\/singleton-swift.class\/reset()","title":"func reset()","type":"method"}],"path":"\/documentation\/factory\/scope\/singleton-swift.class","title":"Scope.Singleton","type":"class"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/scope\/unique-swift.class\/init()","title":"init()","type":"init"}],"path":"\/documentation\/factory\/scope\/unique-swift.class","title":"Scope.Unique","type":"class"}],"path":"\/documentation\/factory\/scopes","title":"Scopes","type":"symbol"},{"title":"Development and Testing","type":"groupMarker"},{"path":"\/documentation\/factory\/previews","title":"SwiftUI Previews","type":"article"},{"path":"\/documentation\/factory\/testing","title":"Testing","type":"article"},{"path":"\/documentation\/factory\/contexts","title":"Contexts","type":"article"},{"path":"\/documentation\/factory\/debugging","title":"Debugging","type":"article"},{"path":"\/documentation\/factory\/chains","title":"Circular Dependency Chains","type":"article"},{"title":"Advanced Topics","type":"groupMarker"},{"path":"\/documentation\/factory\/design","title":"Designing Factory","type":"article"},{"path":"\/documentation\/factory\/modifiers","title":"Factory Modifiers","type":"article"},{"path":"\/documentation\/factory\/modules","title":"Modular Development","type":"article"},{"path":"\/documentation\/factory\/cycle","title":"Resolution Cycles","type":"article"},{"path":"\/documentation\/factory\/optionals","title":"Optionals and Dynamic Registration","type":"article"},{"path":"\/documentation\/factory\/functional","title":"Functional Injection","type":"article"},{"path":"\/documentation\/factory\/tags","title":"Tags","type":"article"},{"title":"Additional Topics","type":"groupMarker"},{"path":"\/documentation\/factory\/migration","title":"Migration","type":"article"},{"title":"Classes","type":"groupMarker"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/container\/init()","title":"init()","type":"init"},{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/container\/manager","title":"let manager: ContainerManager","type":"property"},{"title":"Type Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/container\/shared","title":"static let shared: Container","type":"property"},{"title":"Default Implementations","type":"groupMarker"},{"children":[{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/container\/callasfunction(key:_:)-40wjo","title":"func callAsFunction(key: StaticString, (P) -> T) -> ParameterFactory","type":"method"},{"path":"\/documentation\/factory\/container\/callasfunction(key:_:)-8hpv0","title":"func callAsFunction(key: StaticString, () -> T) -> Factory","type":"method"},{"path":"\/documentation\/factory\/container\/decorator(_:)","title":"func decorator(((Any) -> ())?)","type":"method"},{"path":"\/documentation\/factory\/container\/promised(key:)-6682d","title":"func promised(key: StaticString) -> Factory","type":"method"},{"path":"\/documentation\/factory\/container\/promised(key:)-7g95","title":"func promised(key: StaticString) -> ParameterFactory","type":"method"},{"path":"\/documentation\/factory\/container\/reset(options:)","title":"func reset(options: FactoryResetOptions)","type":"method"},{"path":"\/documentation\/factory\/container\/with(_:)","title":"func with((Self) -> Void) -> Self","type":"method"}],"path":"\/documentation\/factory\/container\/managedcontainer-implementations","title":"ManagedContainer Implementations","type":"symbol"}],"path":"\/documentation\/factory\/container","title":"Container","type":"class"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/containermanager\/init()","title":"init()","type":"init"},{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/containermanager\/defaultscope","title":"var defaultScope: Scope?","type":"property"},{"path":"\/documentation\/factory\/containermanager\/dependencychaintestmax","title":"var dependencyChainTestMax: Int","type":"property"},{"path":"\/documentation\/factory\/containermanager\/logger","title":"var logger: (String) -> Void","type":"property"},{"path":"\/documentation\/factory\/containermanager\/promisetriggerserror","title":"var promiseTriggersError: Bool","type":"property"},{"path":"\/documentation\/factory\/containermanager\/trace","title":"var trace: Bool","type":"property"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/containermanager\/pop()","title":"func pop()","type":"method"},{"path":"\/documentation\/factory\/containermanager\/push()","title":"func push()","type":"method"},{"path":"\/documentation\/factory\/containermanager\/reset(options:)","title":"func reset(options: FactoryResetOptions)","type":"method"},{"path":"\/documentation\/factory\/containermanager\/reset(scope:)","title":"func reset(scope: Scope)","type":"method"}],"path":"\/documentation\/factory\/containermanager","title":"ContainerManager","type":"class"},{"title":"Protocols","type":"groupMarker"},{"children":[{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/autoregistering\/autoregister()","title":"func autoRegister()","type":"method"}],"path":"\/documentation\/factory\/autoregistering","title":"AutoRegistering","type":"protocol"},{"children":[{"title":"Associated Types","type":"groupMarker"},{"path":"\/documentation\/factory\/factorymodifying\/p","title":"P","type":"associatedtype"},{"path":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"associatedtype"},{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/factorymodifying\/cached","title":"var cached: Self","type":"property"},{"path":"\/documentation\/factory\/factorymodifying\/graph","title":"var graph: Self","type":"property"},{"path":"\/documentation\/factory\/factorymodifying\/registration","title":"var registration: FactoryRegistration","type":"property"},{"path":"\/documentation\/factory\/factorymodifying\/shared","title":"var shared: Self","type":"property"},{"path":"\/documentation\/factory\/factorymodifying\/singleton","title":"var singleton: Self","type":"property"},{"path":"\/documentation\/factory\/factorymodifying\/unique","title":"var unique: Self","type":"property"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/factorymodifying\/context(_:factory:)","title":"func context(FactoryContextType..., factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factorymodifying\/decorator(_:)","title":"func decorator((Self.T) -> Void) -> Self","type":"method"},{"path":"\/documentation\/factory\/factorymodifying\/onarg(_:factory:)","title":"func onArg(String, factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factorymodifying\/onargs(_:factory:)","title":"func onArgs([String], factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factorymodifying\/ondebug(factory:)","title":"func onDebug(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factorymodifying\/ondevice(factory:)","title":"func onDevice(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factorymodifying\/onpreview(factory:)","title":"func onPreview(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factorymodifying\/onsimulator(factory:)","title":"func onSimulator(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factorymodifying\/ontest(factory:)","title":"func onTest(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factorymodifying\/once()","title":"func once() -> Self","type":"method"},{"path":"\/documentation\/factory\/factorymodifying\/reset(_:)","title":"func reset(FactoryResetOptions) -> Self","type":"method"},{"path":"\/documentation\/factory\/factorymodifying\/scope(_:)","title":"func scope(Scope) -> Self","type":"method"},{"path":"\/documentation\/factory\/factorymodifying\/timetolive(_:)","title":"func timeToLive(TimeInterval) -> Self","type":"method"}],"path":"\/documentation\/factory\/factorymodifying","title":"FactoryModifying","type":"protocol"},{"children":[{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/managedcontainer\/manager","title":"var manager: ContainerManager","type":"property"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-65zle","title":"func callAsFunction(key: StaticString, () -> T) -> Factory","type":"method"},{"path":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-78te9","title":"func callAsFunction(key: StaticString, (P) -> T) -> ParameterFactory","type":"method"},{"path":"\/documentation\/factory\/managedcontainer\/decorator(_:)","title":"func decorator(((Any) -> ())?)","type":"method"},{"path":"\/documentation\/factory\/managedcontainer\/promised(key:)-1ucr5","title":"func promised(key: StaticString) -> Factory","type":"method"},{"path":"\/documentation\/factory\/managedcontainer\/promised(key:)-33ecn","title":"func promised(key: StaticString) -> ParameterFactory","type":"method"},{"path":"\/documentation\/factory\/managedcontainer\/reset(options:)","title":"func reset(options: FactoryResetOptions)","type":"method"},{"path":"\/documentation\/factory\/managedcontainer\/with(_:)","title":"func with((Self) -> Void) -> Self","type":"method"}],"path":"\/documentation\/factory\/managedcontainer","title":"ManagedContainer","type":"protocol"},{"children":[{"title":"Instance Methods","type":"groupMarker"},{"children":[{"children":[{"path":"\/documentation\/factory\/resolving\/factory(_:)-6s19m","title":"func factory(T.Type) -> Factory?","type":"method"}],"title":"Resolving Implementations","type":"groupMarker"}],"path":"\/documentation\/factory\/resolving\/factory(_:)-4znbq","title":"func factory(T.Type) -> Factory?","type":"method"},{"children":[{"children":[{"path":"\/documentation\/factory\/resolving\/register(_:factory:)-7yaqv","title":"func register(T.Type, factory: () -> T) -> Factory","type":"method"}],"title":"Resolving Implementations","type":"groupMarker"}],"path":"\/documentation\/factory\/resolving\/register(_:factory:)-81zql","title":"func register(T.Type, factory: () -> T) -> Factory","type":"method"},{"children":[{"children":[{"path":"\/documentation\/factory\/resolving\/resolve(_:)-82xu1","title":"func resolve(T.Type) -> T?","type":"method"}],"title":"Resolving Implementations","type":"groupMarker"}],"path":"\/documentation\/factory\/resolving\/resolve(_:)-6wtxp","title":"func resolve(T.Type) -> T?","type":"method"}],"path":"\/documentation\/factory\/resolving","title":"Resolving","type":"protocol"},{"children":[{"title":"Type Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/sharedcontainer\/shared","title":"static var shared: Self","type":"property"}],"path":"\/documentation\/factory\/sharedcontainer","title":"SharedContainer","type":"protocol"},{"title":"Structures","type":"groupMarker"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/factory\/init(_:key:_:)","title":"init(ManagedContainer, key: StaticString, () -> T)","type":"init"},{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/factory\/registration","title":"var registration: FactoryRegistration","type":"property"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/factory\/callasfunction()","title":"func callAsFunction() -> T","type":"method"},{"path":"\/documentation\/factory\/factory\/register(factory:)","title":"func register(factory: () -> T) -> Factory","type":"method"},{"path":"\/documentation\/factory\/factory\/resolve()","title":"func resolve() -> T","type":"method"},{"title":"Default Implementations","type":"groupMarker"},{"children":[{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/factory\/cached","title":"var cached: Self","type":"property"},{"path":"\/documentation\/factory\/factory\/graph","title":"var graph: Self","type":"property"},{"path":"\/documentation\/factory\/factory\/shared","title":"var shared: Self","type":"property"},{"path":"\/documentation\/factory\/factory\/singleton","title":"var singleton: Self","type":"property"},{"path":"\/documentation\/factory\/factory\/unique","title":"var unique: Self","type":"property"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/factory\/context(_:factory:)","title":"func context(FactoryContextType..., factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factory\/decorator(_:)","title":"func decorator((Self.T) -> Void) -> Self","type":"method"},{"path":"\/documentation\/factory\/factory\/onarg(_:factory:)","title":"func onArg(String, factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factory\/onargs(_:factory:)","title":"func onArgs([String], factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factory\/ondebug(factory:)","title":"func onDebug(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factory\/ondevice(factory:)","title":"func onDevice(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factory\/onpreview(factory:)","title":"func onPreview(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factory\/onsimulator(factory:)","title":"func onSimulator(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factory\/ontest(factory:)","title":"func onTest(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factory\/once()","title":"func once() -> Self","type":"method"},{"path":"\/documentation\/factory\/factory\/reset(_:)","title":"func reset(FactoryResetOptions) -> Self","type":"method"},{"path":"\/documentation\/factory\/factory\/scope(_:)","title":"func scope(Scope) -> Self","type":"method"},{"path":"\/documentation\/factory\/factory\/timetolive(_:)","title":"func timeToLive(TimeInterval) -> Self","type":"method"}],"path":"\/documentation\/factory\/factory\/factorymodifying-implementations","title":"FactoryModifying Implementations","type":"symbol"}],"path":"\/documentation\/factory\/factory","title":"Factory","type":"struct"},{"children":[{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/factorycontext\/arguments","title":"var arguments: [String]","type":"property"},{"path":"\/documentation\/factory\/factorycontext\/isdebug","title":"var isDebug: Bool","type":"property"},{"path":"\/documentation\/factory\/factorycontext\/ispreview","title":"var isPreview: Bool","type":"property"},{"path":"\/documentation\/factory\/factorycontext\/issimulator","title":"var isSimulator: Bool","type":"property"},{"path":"\/documentation\/factory\/factorycontext\/istest","title":"var isTest: Bool","type":"property"},{"path":"\/documentation\/factory\/factorycontext\/runtimearguments","title":"var runtimeArguments: [String : String]","type":"property"},{"title":"Type Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/factorycontext\/current","title":"static var current: FactoryContext","type":"property"},{"title":"Type Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/factorycontext\/removearg(forkey:)","title":"static func removeArg(forKey: String)","type":"method"},{"path":"\/documentation\/factory\/factorycontext\/setarg(_:forkey:)","title":"static func setArg(String, forKey: String)","type":"method"}],"path":"\/documentation\/factory\/factorycontext","title":"FactoryContext","type":"struct"},{"children":[{"title":"Operators","type":"groupMarker"},{"path":"\/documentation\/factory\/factorykey\/==(_:_:)","title":"static func == (FactoryKey, FactoryKey) -> Bool","type":"op"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/factorykey\/hash(into:)","title":"func hash(into: inout Hasher)","type":"method"},{"title":"Default Implementations","type":"groupMarker"},{"children":[{"title":"Operators","type":"groupMarker"},{"path":"\/documentation\/factory\/factorykey\/!=(_:_:)","title":"static func != (Self, Self) -> Bool","type":"op"}],"path":"\/documentation\/factory\/factorykey\/equatable-implementations","title":"Equatable Implementations","type":"symbol"}],"path":"\/documentation\/factory\/factorykey","title":"FactoryKey","type":"struct"},{"children":[{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/factoryregistration\/key","title":"let key: FactoryKey","type":"property"}],"path":"\/documentation\/factory\/factoryregistration","title":"FactoryRegistration","type":"struct"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/injected\/init(_:)-7xpmb","title":"init(KeyPath>)","type":"init"},{"path":"\/documentation\/factory\/injected\/init(_:)-9sxzk","title":"init(KeyPath>)","type":"init"},{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/injected\/factory","title":"var factory: Factory","type":"property"},{"path":"\/documentation\/factory\/injected\/projectedvalue","title":"var projectedValue: Injected","type":"property"},{"path":"\/documentation\/factory\/injected\/wrappedvalue","title":"var wrappedValue: T","type":"property"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/injected\/resolve(reset:)","title":"func resolve(reset: FactoryResetOptions)","type":"method"}],"path":"\/documentation\/factory\/injected","title":"Injected","type":"struct"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/injectedobject\/init(_:)-4awwf","title":"init(T)","type":"init"},{"path":"\/documentation\/factory\/injectedobject\/init(_:)-7dlth","title":"init(KeyPath>)","type":"init"},{"path":"\/documentation\/factory\/injectedobject\/init(_:)-8lxkh","title":"init(KeyPath>)","type":"init"},{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/injectedobject\/projectedvalue","title":"var projectedValue: ObservedObject.Wrapper","type":"property"},{"path":"\/documentation\/factory\/injectedobject\/wrappedvalue","title":"var wrappedValue: T","type":"property"},{"title":"Default Implementations","type":"groupMarker"},{"children":[{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/injectedobject\/update()","title":"func update()","type":"method"}],"path":"\/documentation\/factory\/injectedobject\/dynamicproperty-implementations","title":"DynamicProperty Implementations","type":"symbol"}],"path":"\/documentation\/factory\/injectedobject","title":"InjectedObject","type":"struct"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/injectedtype\/init()","title":"init()","type":"init"},{"path":"\/documentation\/factory\/injectedtype\/init(_:)","title":"init(ManagedContainer)","type":"init"},{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/injectedtype\/wrappedvalue","title":"var wrappedValue: T?","type":"property"}],"path":"\/documentation\/factory\/injectedtype","title":"InjectedType","type":"struct"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/lazyinjected\/init(_:)-1mer0","title":"init(KeyPath>)","type":"init"},{"path":"\/documentation\/factory\/lazyinjected\/init(_:)-8np9u","title":"init(KeyPath>)","type":"init"},{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/lazyinjected\/factory","title":"var factory: Factory","type":"property"},{"path":"\/documentation\/factory\/lazyinjected\/projectedvalue","title":"var projectedValue: LazyInjected","type":"property"},{"path":"\/documentation\/factory\/lazyinjected\/wrappedvalue","title":"var wrappedValue: T","type":"property"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/lazyinjected\/resolve(reset:)","title":"func resolve(reset: FactoryResetOptions)","type":"method"},{"path":"\/documentation\/factory\/lazyinjected\/resolvedornil()","title":"func resolvedOrNil() -> T?","type":"method"}],"path":"\/documentation\/factory\/lazyinjected","title":"LazyInjected","type":"struct"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/parameterfactory\/init(_:key:_:)","title":"init(ManagedContainer, key: StaticString, (P) -> T)","type":"init"},{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/parameterfactory\/registration","title":"var registration: FactoryRegistration","type":"property"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/parameterfactory\/callasfunction(_:)","title":"func callAsFunction(P) -> T","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/register(factory:)","title":"func register(factory: (P) -> T) -> ParameterFactory","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/resolve(_:)","title":"func resolve(P) -> T","type":"method"},{"title":"Default Implementations","type":"groupMarker"},{"children":[{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/parameterfactory\/cached","title":"var cached: Self","type":"property"},{"path":"\/documentation\/factory\/parameterfactory\/graph","title":"var graph: Self","type":"property"},{"path":"\/documentation\/factory\/parameterfactory\/shared","title":"var shared: Self","type":"property"},{"path":"\/documentation\/factory\/parameterfactory\/singleton","title":"var singleton: Self","type":"property"},{"path":"\/documentation\/factory\/parameterfactory\/unique","title":"var unique: Self","type":"property"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/parameterfactory\/context(_:factory:)","title":"func context(FactoryContextType..., factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/decorator(_:)","title":"func decorator((Self.T) -> Void) -> Self","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/onarg(_:factory:)","title":"func onArg(String, factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/onargs(_:factory:)","title":"func onArgs([String], factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/ondebug(factory:)","title":"func onDebug(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/ondevice(factory:)","title":"func onDevice(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/onpreview(factory:)","title":"func onPreview(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/onsimulator(factory:)","title":"func onSimulator(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/ontest(factory:)","title":"func onTest(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/once()","title":"func once() -> Self","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/reset(_:)","title":"func reset(FactoryResetOptions) -> Self","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/scope(_:)","title":"func scope(Scope) -> Self","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/timetolive(_:)","title":"func timeToLive(TimeInterval) -> Self","type":"method"}],"path":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","title":"FactoryModifying Implementations","type":"symbol"}],"path":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","type":"struct"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/weaklazyinjected\/init(_:)-4r0lx","title":"init(KeyPath>)","type":"init"},{"path":"\/documentation\/factory\/weaklazyinjected\/init(_:)-75hq3","title":"init(KeyPath>)","type":"init"},{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/weaklazyinjected\/factory","title":"var factory: Factory","type":"property"},{"path":"\/documentation\/factory\/weaklazyinjected\/projectedvalue","title":"var projectedValue: WeakLazyInjected","type":"property"},{"path":"\/documentation\/factory\/weaklazyinjected\/wrappedvalue","title":"var wrappedValue: T?","type":"property"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/weaklazyinjected\/resolve(reset:)","title":"func resolve(reset: FactoryResetOptions)","type":"method"},{"path":"\/documentation\/factory\/weaklazyinjected\/resolvedornil()","title":"func resolvedOrNil() -> T?","type":"method"}],"path":"\/documentation\/factory\/weaklazyinjected","title":"WeakLazyInjected","type":"struct"},{"title":"Functions","type":"groupMarker"},{"path":"\/documentation\/factory\/resolve(_:)-52olu","title":"func resolve(KeyPath>) -> T","type":"func"},{"path":"\/documentation\/factory\/resolve(_:)-632zk","title":"func resolve(KeyPath>) -> T","type":"func"},{"title":"Enumerations","type":"groupMarker"},{"children":[{"title":"Enumeration Cases","type":"groupMarker"},{"path":"\/documentation\/factory\/factorycontexttype\/arg(_:)","title":"case arg(String)","type":"case"},{"path":"\/documentation\/factory\/factorycontexttype\/args(_:)","title":"case args([String])","type":"case"},{"path":"\/documentation\/factory\/factorycontexttype\/debug","title":"case debug","type":"case"},{"path":"\/documentation\/factory\/factorycontexttype\/device","title":"case device","type":"case"},{"path":"\/documentation\/factory\/factorycontexttype\/preview","title":"case preview","type":"case"},{"path":"\/documentation\/factory\/factorycontexttype\/simulator","title":"case simulator","type":"case"},{"path":"\/documentation\/factory\/factorycontexttype\/test","title":"case test","type":"case"},{"title":"Default Implementations","type":"groupMarker"},{"children":[{"title":"Operators","type":"groupMarker"},{"path":"\/documentation\/factory\/factorycontexttype\/!=(_:_:)","title":"static func != (Self, Self) -> Bool","type":"op"}],"path":"\/documentation\/factory\/factorycontexttype\/equatable-implementations","title":"Equatable Implementations","type":"symbol"}],"path":"\/documentation\/factory\/factorycontexttype","title":"FactoryContextType","type":"enum"},{"children":[{"title":"Enumeration Cases","type":"groupMarker"},{"path":"\/documentation\/factory\/factoryresetoptions\/all","title":"case all","type":"case"},{"path":"\/documentation\/factory\/factoryresetoptions\/context","title":"case context","type":"case"},{"path":"\/documentation\/factory\/factoryresetoptions\/none","title":"case none","type":"case"},{"path":"\/documentation\/factory\/factoryresetoptions\/registration","title":"case registration","type":"case"},{"path":"\/documentation\/factory\/factoryresetoptions\/scope","title":"case scope","type":"case"},{"title":"Default Implementations","type":"groupMarker"},{"children":[{"title":"Operators","type":"groupMarker"},{"path":"\/documentation\/factory\/factoryresetoptions\/!=(_:_:)","title":"static func != (Self, Self) -> Bool","type":"op"}],"path":"\/documentation\/factory\/factoryresetoptions\/equatable-implementations","title":"Equatable Implementations","type":"symbol"}],"path":"\/documentation\/factory\/factoryresetoptions","title":"FactoryResetOptions","type":"enum"}],"path":"\/documentation\/factory","title":"Factory","type":"module"}]},"schemaVersion":{"major":0,"minor":1,"patch":1}} \ No newline at end of file +{"interfaceLanguages":{"swift":[{"children":[{"title":"The Basics","type":"groupMarker"},{"children":[{"title":"Examples","type":"groupMarker"},{"path":"\/documentation\/factory\/registrations","title":"Sample Registrations","type":"article"},{"path":"\/documentation\/factory\/resolutions","title":"Sample Resolutions","type":"article"}],"path":"\/documentation\/factory\/gettingstarted","title":"Getting Started","type":"symbol"},{"path":"\/documentation\/factory\/containers","title":"Containers","type":"article"},{"children":[{"title":"Scope Class Definitions","type":"groupMarker"},{"children":[{"title":"Type Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/scope\/cached-swift.type.property","title":"static let cached: Scope.Cached","type":"property"},{"path":"\/documentation\/factory\/scope\/graph-swift.type.property","title":"static let graph: Scope.Graph","type":"property"},{"path":"\/documentation\/factory\/scope\/shared-swift.type.property","title":"static let shared: Scope.Shared","type":"property"},{"path":"\/documentation\/factory\/scope\/singleton-swift.type.property","title":"static let singleton: Scope.Singleton","type":"property"},{"path":"\/documentation\/factory\/scope\/unique-swift.type.property","title":"static let unique: Scope.Unique","type":"property"}],"path":"\/documentation\/factory\/scope","title":"Scope","type":"class"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/scope\/cached-swift.class\/init()","title":"init()","type":"init"}],"path":"\/documentation\/factory\/scope\/cached-swift.class","title":"Scope.Cached","type":"class"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/scope\/graph-swift.class\/init()","title":"init()","type":"init"}],"path":"\/documentation\/factory\/scope\/graph-swift.class","title":"Scope.Graph","type":"class"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/scope\/shared-swift.class\/init()","title":"init()","type":"init"}],"path":"\/documentation\/factory\/scope\/shared-swift.class","title":"Scope.Shared","type":"class"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/scope\/singleton-swift.class\/init()","title":"init()","type":"init"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/scope\/singleton-swift.class\/reset()","title":"func reset()","type":"method"}],"path":"\/documentation\/factory\/scope\/singleton-swift.class","title":"Scope.Singleton","type":"class"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/scope\/unique-swift.class\/init()","title":"init()","type":"init"}],"path":"\/documentation\/factory\/scope\/unique-swift.class","title":"Scope.Unique","type":"class"}],"path":"\/documentation\/factory\/scopes","title":"Scopes","type":"symbol"},{"title":"Development and Testing","type":"groupMarker"},{"path":"\/documentation\/factory\/previews","title":"SwiftUI Previews","type":"article"},{"path":"\/documentation\/factory\/testing","title":"Testing","type":"article"},{"path":"\/documentation\/factory\/contexts","title":"Contexts","type":"article"},{"path":"\/documentation\/factory\/debugging","title":"Debugging","type":"article"},{"path":"\/documentation\/factory\/chains","title":"Circular Dependency Chains","type":"article"},{"title":"Advanced Topics","type":"groupMarker"},{"path":"\/documentation\/factory\/design","title":"Designing Factory","type":"article"},{"path":"\/documentation\/factory\/modifiers","title":"Factory Modifiers","type":"article"},{"path":"\/documentation\/factory\/modules","title":"Modular Development","type":"article"},{"path":"\/documentation\/factory\/cycle","title":"Resolution Cycles","type":"article"},{"path":"\/documentation\/factory\/optionals","title":"Optionals and Dynamic Registration","type":"article"},{"path":"\/documentation\/factory\/functional","title":"Functional Injection","type":"article"},{"path":"\/documentation\/factory\/tags","title":"Tags","type":"article"},{"title":"Additional Topics","type":"groupMarker"},{"path":"\/documentation\/factory\/migration","title":"Migration","type":"article"},{"title":"Classes","type":"groupMarker"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/container\/init()","title":"init()","type":"init"},{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/container\/manager","title":"let manager: ContainerManager","type":"property"},{"title":"Type Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/container\/shared","title":"static let shared: Container","type":"property"},{"title":"Default Implementations","type":"groupMarker"},{"children":[{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/container\/callasfunction(key:_:)-40wjo","title":"func callAsFunction(key: StaticString, (P) -> T) -> ParameterFactory","type":"method"},{"path":"\/documentation\/factory\/container\/callasfunction(key:_:)-8hpv0","title":"func callAsFunction(key: StaticString, () -> T) -> Factory","type":"method"},{"path":"\/documentation\/factory\/container\/decorator(_:)","title":"func decorator(((Any) -> ())?)","type":"method"},{"path":"\/documentation\/factory\/container\/promised(key:)-6682d","title":"func promised(key: StaticString) -> Factory","type":"method"},{"path":"\/documentation\/factory\/container\/promised(key:)-7g95","title":"func promised(key: StaticString) -> ParameterFactory","type":"method"},{"path":"\/documentation\/factory\/container\/reset(options:)","title":"func reset(options: FactoryResetOptions)","type":"method"},{"path":"\/documentation\/factory\/container\/with(_:)","title":"func with((Self) -> Void) -> Self","type":"method"}],"path":"\/documentation\/factory\/container\/managedcontainer-implementations","title":"ManagedContainer Implementations","type":"symbol"}],"path":"\/documentation\/factory\/container","title":"Container","type":"class"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/containermanager\/init()","title":"init()","type":"init"},{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/containermanager\/defaultscope","title":"var defaultScope: Scope?","type":"property"},{"path":"\/documentation\/factory\/containermanager\/dependencychaintestmax","title":"var dependencyChainTestMax: Int","type":"property"},{"path":"\/documentation\/factory\/containermanager\/logger","title":"var logger: (String) -> Void","type":"property"},{"path":"\/documentation\/factory\/containermanager\/promisetriggerserror","title":"var promiseTriggersError: Bool","type":"property"},{"path":"\/documentation\/factory\/containermanager\/trace","title":"var trace: Bool","type":"property"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/containermanager\/pop()","title":"func pop()","type":"method"},{"path":"\/documentation\/factory\/containermanager\/push()","title":"func push()","type":"method"},{"path":"\/documentation\/factory\/containermanager\/reset(options:)","title":"func reset(options: FactoryResetOptions)","type":"method"},{"path":"\/documentation\/factory\/containermanager\/reset(scope:)","title":"func reset(scope: Scope)","type":"method"}],"path":"\/documentation\/factory\/containermanager","title":"ContainerManager","type":"class"},{"title":"Protocols","type":"groupMarker"},{"children":[{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/autoregistering\/autoregister()","title":"func autoRegister()","type":"method"}],"path":"\/documentation\/factory\/autoregistering","title":"AutoRegistering","type":"protocol"},{"children":[{"title":"Associated Types","type":"groupMarker"},{"path":"\/documentation\/factory\/factorymodifying\/p","title":"P","type":"associatedtype"},{"path":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"associatedtype"},{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/factorymodifying\/cached","title":"var cached: Self","type":"property"},{"path":"\/documentation\/factory\/factorymodifying\/graph","title":"var graph: Self","type":"property"},{"path":"\/documentation\/factory\/factorymodifying\/registration","title":"var registration: FactoryRegistration","type":"property"},{"path":"\/documentation\/factory\/factorymodifying\/shared","title":"var shared: Self","type":"property"},{"path":"\/documentation\/factory\/factorymodifying\/singleton","title":"var singleton: Self","type":"property"},{"path":"\/documentation\/factory\/factorymodifying\/unique","title":"var unique: Self","type":"property"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/factorymodifying\/context(_:factory:)","title":"func context(FactoryContextType..., factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factorymodifying\/decorator(_:)","title":"func decorator((Self.T) -> Void) -> Self","type":"method"},{"path":"\/documentation\/factory\/factorymodifying\/onarg(_:factory:)","title":"func onArg(String, factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factorymodifying\/onargs(_:factory:)","title":"func onArgs([String], factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factorymodifying\/ondebug(factory:)","title":"func onDebug(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factorymodifying\/ondevice(factory:)","title":"func onDevice(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factorymodifying\/onpreview(factory:)","title":"func onPreview(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factorymodifying\/onsimulator(factory:)","title":"func onSimulator(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factorymodifying\/ontest(factory:)","title":"func onTest(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factorymodifying\/once()","title":"func once() -> Self","type":"method"},{"path":"\/documentation\/factory\/factorymodifying\/reset(_:)","title":"func reset(FactoryResetOptions) -> Self","type":"method"},{"path":"\/documentation\/factory\/factorymodifying\/scope(_:)","title":"func scope(Scope) -> Self","type":"method"},{"path":"\/documentation\/factory\/factorymodifying\/timetolive(_:)","title":"func timeToLive(TimeInterval) -> Self","type":"method"}],"path":"\/documentation\/factory\/factorymodifying","title":"FactoryModifying","type":"protocol"},{"children":[{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/managedcontainer\/manager","title":"var manager: ContainerManager","type":"property"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-65zle","title":"func callAsFunction(key: StaticString, () -> T) -> Factory","type":"method"},{"path":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-78te9","title":"func callAsFunction(key: StaticString, (P) -> T) -> ParameterFactory","type":"method"},{"path":"\/documentation\/factory\/managedcontainer\/decorator(_:)","title":"func decorator(((Any) -> ())?)","type":"method"},{"path":"\/documentation\/factory\/managedcontainer\/promised(key:)-1ucr5","title":"func promised(key: StaticString) -> Factory","type":"method"},{"path":"\/documentation\/factory\/managedcontainer\/promised(key:)-33ecn","title":"func promised(key: StaticString) -> ParameterFactory","type":"method"},{"path":"\/documentation\/factory\/managedcontainer\/reset(options:)","title":"func reset(options: FactoryResetOptions)","type":"method"},{"path":"\/documentation\/factory\/managedcontainer\/with(_:)","title":"func with((Self) -> Void) -> Self","type":"method"}],"path":"\/documentation\/factory\/managedcontainer","title":"ManagedContainer","type":"protocol"},{"children":[{"title":"Instance Methods","type":"groupMarker"},{"children":[{"children":[{"path":"\/documentation\/factory\/resolving\/factory(_:)-6s19m","title":"func factory(T.Type) -> Factory?","type":"method"}],"title":"Resolving Implementations","type":"groupMarker"}],"path":"\/documentation\/factory\/resolving\/factory(_:)-4znbq","title":"func factory(T.Type) -> Factory?","type":"method"},{"children":[{"children":[{"path":"\/documentation\/factory\/resolving\/register(_:factory:)-7yaqv","title":"func register(T.Type, factory: () -> T) -> Factory","type":"method"}],"title":"Resolving Implementations","type":"groupMarker"}],"path":"\/documentation\/factory\/resolving\/register(_:factory:)-81zql","title":"func register(T.Type, factory: () -> T) -> Factory","type":"method"},{"children":[{"children":[{"path":"\/documentation\/factory\/resolving\/resolve(_:)-82xu1","title":"func resolve(T.Type) -> T?","type":"method"}],"title":"Resolving Implementations","type":"groupMarker"}],"path":"\/documentation\/factory\/resolving\/resolve(_:)-6wtxp","title":"func resolve(T.Type) -> T?","type":"method"}],"path":"\/documentation\/factory\/resolving","title":"Resolving","type":"protocol"},{"children":[{"title":"Type Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/sharedcontainer\/shared","title":"static var shared: Self","type":"property"}],"path":"\/documentation\/factory\/sharedcontainer","title":"SharedContainer","type":"protocol"},{"title":"Structures","type":"groupMarker"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/factory\/init(_:key:_:)","title":"init(ManagedContainer, key: StaticString, () -> T)","type":"init"},{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/factory\/registration","title":"var registration: FactoryRegistration","type":"property"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/factory\/callasfunction()","title":"func callAsFunction() -> T","type":"method"},{"path":"\/documentation\/factory\/factory\/register(factory:)","title":"func register(factory: () -> T) -> Factory","type":"method"},{"path":"\/documentation\/factory\/factory\/resolve()","title":"func resolve() -> T","type":"method"},{"title":"Default Implementations","type":"groupMarker"},{"children":[{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/factory\/cached","title":"var cached: Self","type":"property"},{"path":"\/documentation\/factory\/factory\/graph","title":"var graph: Self","type":"property"},{"path":"\/documentation\/factory\/factory\/shared","title":"var shared: Self","type":"property"},{"path":"\/documentation\/factory\/factory\/singleton","title":"var singleton: Self","type":"property"},{"path":"\/documentation\/factory\/factory\/unique","title":"var unique: Self","type":"property"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/factory\/context(_:factory:)","title":"func context(FactoryContextType..., factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factory\/decorator(_:)","title":"func decorator((Self.T) -> Void) -> Self","type":"method"},{"path":"\/documentation\/factory\/factory\/onarg(_:factory:)","title":"func onArg(String, factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factory\/onargs(_:factory:)","title":"func onArgs([String], factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factory\/ondebug(factory:)","title":"func onDebug(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factory\/ondevice(factory:)","title":"func onDevice(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factory\/onpreview(factory:)","title":"func onPreview(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factory\/onsimulator(factory:)","title":"func onSimulator(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factory\/ontest(factory:)","title":"func onTest(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/factory\/once()","title":"func once() -> Self","type":"method"},{"path":"\/documentation\/factory\/factory\/reset(_:)","title":"func reset(FactoryResetOptions) -> Self","type":"method"},{"path":"\/documentation\/factory\/factory\/scope(_:)","title":"func scope(Scope) -> Self","type":"method"},{"path":"\/documentation\/factory\/factory\/timetolive(_:)","title":"func timeToLive(TimeInterval) -> Self","type":"method"}],"path":"\/documentation\/factory\/factory\/factorymodifying-implementations","title":"FactoryModifying Implementations","type":"symbol"}],"path":"\/documentation\/factory\/factory","title":"Factory","type":"struct"},{"children":[{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/factorycontext\/arguments","title":"var arguments: [String]","type":"property"},{"path":"\/documentation\/factory\/factorycontext\/isdebug","title":"var isDebug: Bool","type":"property"},{"path":"\/documentation\/factory\/factorycontext\/ispreview","title":"var isPreview: Bool","type":"property"},{"path":"\/documentation\/factory\/factorycontext\/issimulator","title":"var isSimulator: Bool","type":"property"},{"path":"\/documentation\/factory\/factorycontext\/istest","title":"var isTest: Bool","type":"property"},{"path":"\/documentation\/factory\/factorycontext\/runtimearguments","title":"var runtimeArguments: [String : String]","type":"property"},{"title":"Type Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/factorycontext\/current","title":"static var current: FactoryContext","type":"property"},{"title":"Type Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/factorycontext\/removearg(forkey:)","title":"static func removeArg(forKey: String)","type":"method"},{"path":"\/documentation\/factory\/factorycontext\/setarg(_:forkey:)","title":"static func setArg(String, forKey: String)","type":"method"}],"path":"\/documentation\/factory\/factorycontext","title":"FactoryContext","type":"struct"},{"children":[{"title":"Operators","type":"groupMarker"},{"path":"\/documentation\/factory\/factorykey\/==(_:_:)","title":"static func == (FactoryKey, FactoryKey) -> Bool","type":"op"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/factorykey\/hash(into:)","title":"func hash(into: inout Hasher)","type":"method"},{"title":"Default Implementations","type":"groupMarker"},{"children":[{"title":"Operators","type":"groupMarker"},{"path":"\/documentation\/factory\/factorykey\/!=(_:_:)","title":"static func != (Self, Self) -> Bool","type":"op"}],"path":"\/documentation\/factory\/factorykey\/equatable-implementations","title":"Equatable Implementations","type":"symbol"}],"path":"\/documentation\/factory\/factorykey","title":"FactoryKey","type":"struct"},{"children":[{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/factoryregistration\/key","title":"let key: FactoryKey","type":"property"}],"path":"\/documentation\/factory\/factoryregistration","title":"FactoryRegistration","type":"struct"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/injected\/init(_:)-7xpmb","title":"init(KeyPath>)","type":"init"},{"path":"\/documentation\/factory\/injected\/init(_:)-9sxzk","title":"init(KeyPath>)","type":"init"},{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/injected\/factory","title":"var factory: Factory","type":"property"},{"path":"\/documentation\/factory\/injected\/projectedvalue","title":"var projectedValue: Injected","type":"property"},{"path":"\/documentation\/factory\/injected\/wrappedvalue","title":"var wrappedValue: T","type":"property"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/injected\/resolve(reset:)","title":"func resolve(reset: FactoryResetOptions)","type":"method"}],"path":"\/documentation\/factory\/injected","title":"Injected","type":"struct"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/injectedobject\/init(_:)-4awwf","title":"init(T)","type":"init"},{"path":"\/documentation\/factory\/injectedobject\/init(_:)-7dlth","title":"init(KeyPath>)","type":"init"},{"path":"\/documentation\/factory\/injectedobject\/init(_:)-8lxkh","title":"init(KeyPath>)","type":"init"},{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/injectedobject\/projectedvalue","title":"var projectedValue: ObservedObject.Wrapper","type":"property"},{"path":"\/documentation\/factory\/injectedobject\/wrappedvalue","title":"var wrappedValue: T","type":"property"},{"title":"Default Implementations","type":"groupMarker"},{"children":[{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/injectedobject\/update()","title":"func update()","type":"method"}],"path":"\/documentation\/factory\/injectedobject\/dynamicproperty-implementations","title":"DynamicProperty Implementations","type":"symbol"}],"path":"\/documentation\/factory\/injectedobject","title":"InjectedObject","type":"struct"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/injectedtype\/init()","title":"init()","type":"init"},{"path":"\/documentation\/factory\/injectedtype\/init(_:)","title":"init(ManagedContainer)","type":"init"},{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/injectedtype\/wrappedvalue","title":"var wrappedValue: T?","type":"property"}],"path":"\/documentation\/factory\/injectedtype","title":"InjectedType","type":"struct"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/lazyinjected\/init(_:)-1mer0","title":"init(KeyPath>)","type":"init"},{"path":"\/documentation\/factory\/lazyinjected\/init(_:)-8np9u","title":"init(KeyPath>)","type":"init"},{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/lazyinjected\/factory","title":"var factory: Factory","type":"property"},{"path":"\/documentation\/factory\/lazyinjected\/projectedvalue","title":"var projectedValue: LazyInjected","type":"property"},{"path":"\/documentation\/factory\/lazyinjected\/wrappedvalue","title":"var wrappedValue: T","type":"property"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/lazyinjected\/resolve(reset:)","title":"func resolve(reset: FactoryResetOptions)","type":"method"},{"path":"\/documentation\/factory\/lazyinjected\/resolvedornil()","title":"func resolvedOrNil() -> T?","type":"method"}],"path":"\/documentation\/factory\/lazyinjected","title":"LazyInjected","type":"struct"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/parameterfactory\/init(_:key:_:)","title":"init(ManagedContainer, key: StaticString, (P) -> T)","type":"init"},{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/parameterfactory\/registration","title":"var registration: FactoryRegistration","type":"property"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/parameterfactory\/callasfunction(_:)","title":"func callAsFunction(P) -> T","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/register(factory:)","title":"func register(factory: (P) -> T) -> ParameterFactory","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/resolve(_:)","title":"func resolve(P) -> T","type":"method"},{"title":"Default Implementations","type":"groupMarker"},{"children":[{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/parameterfactory\/cached","title":"var cached: Self","type":"property"},{"path":"\/documentation\/factory\/parameterfactory\/graph","title":"var graph: Self","type":"property"},{"path":"\/documentation\/factory\/parameterfactory\/shared","title":"var shared: Self","type":"property"},{"path":"\/documentation\/factory\/parameterfactory\/singleton","title":"var singleton: Self","type":"property"},{"path":"\/documentation\/factory\/parameterfactory\/unique","title":"var unique: Self","type":"property"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/parameterfactory\/context(_:factory:)","title":"func context(FactoryContextType..., factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/decorator(_:)","title":"func decorator((Self.T) -> Void) -> Self","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/onarg(_:factory:)","title":"func onArg(String, factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/onargs(_:factory:)","title":"func onArgs([String], factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/ondebug(factory:)","title":"func onDebug(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/ondevice(factory:)","title":"func onDevice(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/onpreview(factory:)","title":"func onPreview(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/onsimulator(factory:)","title":"func onSimulator(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/ontest(factory:)","title":"func onTest(factory: (Self.P) -> Self.T) -> Self","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/once()","title":"func once() -> Self","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/reset(_:)","title":"func reset(FactoryResetOptions) -> Self","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/scope(_:)","title":"func scope(Scope) -> Self","type":"method"},{"path":"\/documentation\/factory\/parameterfactory\/timetolive(_:)","title":"func timeToLive(TimeInterval) -> Self","type":"method"}],"path":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","title":"FactoryModifying Implementations","type":"symbol"}],"path":"\/documentation\/factory\/parameterfactory","title":"ParameterFactory","type":"struct"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/weaklazyinjected\/init(_:)-4r0lx","title":"init(KeyPath>)","type":"init"},{"path":"\/documentation\/factory\/weaklazyinjected\/init(_:)-75hq3","title":"init(KeyPath>)","type":"init"},{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/weaklazyinjected\/factory","title":"var factory: Factory","type":"property"},{"path":"\/documentation\/factory\/weaklazyinjected\/projectedvalue","title":"var projectedValue: WeakLazyInjected","type":"property"},{"path":"\/documentation\/factory\/weaklazyinjected\/wrappedvalue","title":"var wrappedValue: T?","type":"property"},{"title":"Instance Methods","type":"groupMarker"},{"path":"\/documentation\/factory\/weaklazyinjected\/resolve(reset:)","title":"func resolve(reset: FactoryResetOptions)","type":"method"},{"path":"\/documentation\/factory\/weaklazyinjected\/resolvedornil()","title":"func resolvedOrNil() -> T?","type":"method"}],"path":"\/documentation\/factory\/weaklazyinjected","title":"WeakLazyInjected","type":"struct"},{"title":"Functions","type":"groupMarker"},{"path":"\/documentation\/factory\/resolve(_:)-52olu","title":"func resolve(KeyPath>) -> T","type":"func"},{"path":"\/documentation\/factory\/resolve(_:)-632zk","title":"func resolve(KeyPath>) -> T","type":"func"},{"title":"Type Aliases","type":"groupMarker"},{"path":"\/documentation\/factory\/factoryautoregistering","title":"FactoryAutoRegistering","type":"typealias"},{"path":"\/documentation\/factory\/factorycontainer","title":"FactoryContainer","type":"typealias"},{"path":"\/documentation\/factory\/factorycontainermanager","title":"FactoryContainerManager","type":"typealias"},{"path":"\/documentation\/factory\/factorymanagedcontainer","title":"FactoryManagedContainer","type":"typealias"},{"path":"\/documentation\/factory\/factoryresolving","title":"FactoryResolving","type":"typealias"},{"path":"\/documentation\/factory\/factoryscope","title":"FactoryScope","type":"typealias"},{"path":"\/documentation\/factory\/factorysharedcontainer","title":"FactorySharedContainer","type":"typealias"},{"title":"Enumerations","type":"groupMarker"},{"children":[{"title":"Enumeration Cases","type":"groupMarker"},{"path":"\/documentation\/factory\/factorycontexttype\/arg(_:)","title":"case arg(String)","type":"case"},{"path":"\/documentation\/factory\/factorycontexttype\/args(_:)","title":"case args([String])","type":"case"},{"path":"\/documentation\/factory\/factorycontexttype\/debug","title":"case debug","type":"case"},{"path":"\/documentation\/factory\/factorycontexttype\/device","title":"case device","type":"case"},{"path":"\/documentation\/factory\/factorycontexttype\/preview","title":"case preview","type":"case"},{"path":"\/documentation\/factory\/factorycontexttype\/simulator","title":"case simulator","type":"case"},{"path":"\/documentation\/factory\/factorycontexttype\/test","title":"case test","type":"case"},{"title":"Default Implementations","type":"groupMarker"},{"children":[{"title":"Operators","type":"groupMarker"},{"path":"\/documentation\/factory\/factorycontexttype\/!=(_:_:)","title":"static func != (Self, Self) -> Bool","type":"op"}],"path":"\/documentation\/factory\/factorycontexttype\/equatable-implementations","title":"Equatable Implementations","type":"symbol"}],"path":"\/documentation\/factory\/factorycontexttype","title":"FactoryContextType","type":"enum"},{"children":[{"title":"Enumeration Cases","type":"groupMarker"},{"path":"\/documentation\/factory\/factoryresetoptions\/all","title":"case all","type":"case"},{"path":"\/documentation\/factory\/factoryresetoptions\/context","title":"case context","type":"case"},{"path":"\/documentation\/factory\/factoryresetoptions\/none","title":"case none","type":"case"},{"path":"\/documentation\/factory\/factoryresetoptions\/registration","title":"case registration","type":"case"},{"path":"\/documentation\/factory\/factoryresetoptions\/scope","title":"case scope","type":"case"},{"title":"Default Implementations","type":"groupMarker"},{"children":[{"title":"Operators","type":"groupMarker"},{"path":"\/documentation\/factory\/factoryresetoptions\/!=(_:_:)","title":"static func != (Self, Self) -> Bool","type":"op"}],"path":"\/documentation\/factory\/factoryresetoptions\/equatable-implementations","title":"Equatable Implementations","type":"symbol"}],"path":"\/documentation\/factory\/factoryresetoptions","title":"FactoryResetOptions","type":"enum"}],"path":"\/documentation\/factory","title":"Factory","type":"module"}]},"schemaVersion":{"major":0,"minor":1,"patch":1}} \ No newline at end of file diff --git a/docs/metadata.json b/docs/metadata.json index 92c20376..195d5737 100644 --- a/docs/metadata.json +++ b/docs/metadata.json @@ -1 +1 @@ -{"bundleIdentifier":"Factory","schemaVersion":{"major":0,"patch":0,"minor":1},"bundleDisplayName":"Factory"} \ No newline at end of file +{"bundleDisplayName":"Factory","schemaVersion":{"major":0,"patch":0,"minor":1},"bundleIdentifier":"Factory"} \ No newline at end of file