diff --git a/Sources/Factory/Factory/Injections.swift b/Sources/Factory/Factory/Injections.swift index 1b7a5efd..c01f9443 100644 --- a/Sources/Factory/Factory/Injections.swift +++ b/Sources/Factory/Factory/Injections.swift @@ -36,13 +36,13 @@ import SwiftUI /// EnvironmentObject in SwiftUI. /// ```swift /// class MyViewModel { -/// @Injected(\.myService) var service -/// @Injected(\MyCustomContainer.myService) var service +/// @Injected(\.myService) var service1 +/// @Injected(\MyCustomContainer.myService) var service2 /// } /// ``` /// The provided keypath resolves to a Factory definition on the `shared` container required for each Container type. /// The short version of the keyPath resolves to the default container, while the expanded version -/// allows you to point an instance on your own customer container type. +/// allows you to point an instance of your own custom container type. /// /// > Note: The @Injected property wrapper will be resolved on **initialization**. In the above example /// the referenced dependencies will be acquired when the parent class is created. @@ -95,13 +95,13 @@ import SwiftUI /// EnvironmentObject in SwiftUI. /// ```swift /// class MyViewModel { -/// @LazyInjected(\.myService) var service -/// @LazyInjected(\MyCustomContainer.myService) var service +/// @LazyInjected(\.myService) var service1 +/// @LazyInjected(\MyCustomContainer.myService) var service2 /// } /// ``` /// The provided keypath resolves to a Factory definition on the `shared` container required for each Container type. /// The short version of the keyPath resolves to the default container, while the expanded version -/// allows you to point an instance on your own customer container type. +/// allows you to point an instance of your own custom container type. /// /// > Note: Lazy injection is resolved the first time the dependency is referenced by the code, and **not** on initialization. @propertyWrapper public struct LazyInjected { @@ -179,13 +179,13 @@ import SwiftUI /// /// ```swift /// class MyViewModel { -/// @LazyInjected(\.myService) var service -/// @LazyInjected(\MyCustomContainer.myService) var service +/// @LazyInjected(\.myService) var service1 +/// @LazyInjected(\MyCustomContainer.myService) var service2 /// } /// ``` /// The provided keypath resolves to a Factory definition on the `shared` container required for each Container type. /// The short version of the keyPath resolves to the default container, while the expanded version -/// allows you to point an instance on your own customer container type. +/// allows you to point an instance of your own custom container type. /// /// > Note: Lazy injection is resolved the first time the dependency is referenced by the code, **not** on initialization. @propertyWrapper public struct WeakLazyInjected { @@ -259,16 +259,29 @@ import SwiftUI /// EnvironmentObject in SwiftUI. /// ```swift /// class MyViewModel { -/// @DynamicInjected(\.myService) var service -/// @DynamicInjected(\MyCustomContainer.myService) var service +/// @DynamicInjected(\.myService) var service1 +/// @DynamicInjected(\MyCustomContainer.myService) var service2 /// } /// ``` /// The provided keypath resolves to a Factory definition on the `shared` container required for each Container type. /// The short version of the keyPath resolves to the default container, while the expanded version -/// allows you to point an instance on your own customer container type. +/// allows you to point an instance of your own custom container type. /// -/// - Note: The @DynamicInjected property wrapper will be resolved on **access**. In the above example -/// the referenced dependencies will be acquired each time the property is accessed. +/// - Important: The @DynamicInjected property wrapper's Factory will be resolved on each and every **access**. +/// +/// In the above example the referenced dependencies will be resolved and acquired each and every time one of the +/// properties are accessed. +/// +/// If the dependency is stateless this shouldn't be an issue. If the dependency needs to maintain state, however, +/// then it probably needs to be cached using one of Factory's caching mechanisms. +/// +/// ```swift +/// extension Container { +/// var myService: Factory { +/// self { MyService() }.cached +/// } +/// } +/// ``` @propertyWrapper public struct DynamicInjected { private let reference: BoxedFactoryReference diff --git a/docs/data/documentation/factory.json b/docs/data/documentation/factory.json index 94506403..816fc5f5 100644 --- a/docs/data/documentation/factory.json +++ b/docs/data/documentation/factory.json @@ -1 +1 @@ -{"abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory","interfaceLanguage":"swift"},"sections":[],"primaryContentSections":[{"kind":"content","content":[{"type":"heading","level":2,"text":"Overview","anchor":"Overview"},{"inlineContent":[{"text":"Factory is strongly influenced by SwiftUI, and in my opinion is highly suited for use in that environment.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory is…"}]},{"type":"unorderedList","items":[{"content":[{"inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Adaptable"}]},{"text":": Factory doesn’t tie you down to a single dependency injection strategy or technique.","type":"text"}],"type":"paragraph"}]},{"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":[{"inlineContent":[{"text":"Performant","type":"text"}],"type":"strong"},{"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."}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Safe"}]},{"type":"text","text":": Factory is compile-time safe; a factory for a given type must exist or the code simply will not compile."}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"text":"Concise","type":"text"}]},{"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":[{"inlineContent":[{"inlineContent":[{"text":"Documented","type":"text"}],"type":"strong"},{"type":"text","text":": Factory 2.0 has extensive DocC documentation and examples covering its classes, methods, and use cases."}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Lightweight"}]},{"text":": With all of that Factory is slim and trim, under 800 lines of executable code.","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Tested"}]},{"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"},{"text":": Factory is free and open source under the MIT License.","type":"text"}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Ready to get started?"}]}]}],"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"},{"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"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext","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"},{"title":"Functions","identifiers":["doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-52olu","doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-632zk"]},{"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":"Type Aliases"},{"title":"Enumerations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory"]}],"metadata":{"roleHeading":"Framework","title":"Factory","externalID":"Factory","symbolKind":"module","modules":[{"name":"Factory"}],"role":"collection"},"kind":"symbol","hierarchy":{"paths":[[]]},"references":{"doc://Factory/documentation/Factory/Modules":{"role":"article","title":"Modular Development","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","url":"\/documentation\/factory\/modules","kind":"article","type":"topic"},"doc://Factory/documentation/Factory/resolve(_:)-632zk":{"role":"symbol","abstract":[{"type":"text","text":"Global function to resolve a keypath on the specified shared container into the requested type"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolve"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":", "},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">>) -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"title":"resolve(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-632zk","kind":"symbol","url":"\/documentation\/factory\/resolve(_:)-632zk","type":"topic"},"doc://Factory/documentation/Factory/Modifiers":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","type":"topic","title":"Factory Modifiers","abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"url":"\/documentation\/factory\/modifiers","kind":"article","role":"article"},"doc://Factory/documentation/Factory/Debugging":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","url":"\/documentation\/factory\/debugging","title":"Debugging","role":"article","kind":"article","abstract":[{"text":"Additional support for debugging resolution cycles, dependency chains and other issue.","type":"text"}],"type":"topic"},"doc://Factory/documentation/Factory/FactorySharedContainer":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactorySharedContainer","type":"topic","fragments":[{"kind":"keyword","text":"typealias"},{"kind":"text","text":" "},{"text":"FactorySharedContainer","kind":"identifier"}],"abstract":[],"title":"FactorySharedContainer","navigatorTitle":[{"kind":"identifier","text":"FactorySharedContainer"}],"kind":"symbol","url":"\/documentation\/factory\/factorysharedcontainer","role":"symbol"},"doc://Factory/documentation/Factory/SharedContainer":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/sharedcontainer","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"title":"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."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"SharedContainer","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryContainerManager":{"type":"topic","abstract":[],"title":"FactoryContainerManager","role":"symbol","fragments":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryContainerManager","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContainerManager","kind":"symbol","navigatorTitle":[{"text":"FactoryContainerManager","kind":"identifier"}],"url":"\/documentation\/factory\/factorycontainermanager"},"doc://Factory/documentation/Factory/FactoryContainer":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContainer","type":"topic","fragments":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryContainer","kind":"identifier"}],"title":"FactoryContainer","abstract":[],"navigatorTitle":[{"kind":"identifier","text":"FactoryContainer"}],"url":"\/documentation\/factory\/factorycontainer","kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/Containers":{"kind":"article","abstract":[{"text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","title":"Containers","type":"topic","url":"\/documentation\/factory\/containers","role":"article"},"doc://Factory/documentation/Factory/FactoryResolving":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResolving","type":"topic","fragments":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResolving"}],"title":"FactoryResolving","abstract":[],"navigatorTitle":[{"text":"FactoryResolving","kind":"identifier"}],"url":"\/documentation\/factory\/factoryresolving","kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/Contexts":{"type":"topic","kind":"article","role":"article","url":"\/documentation\/factory\/contexts","title":"Contexts","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}]},"doc://Factory/documentation/Factory/Optionals":{"type":"topic","kind":"article","title":"Optionals and Dynamic Registration","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","url":"\/documentation\/factory\/optionals","role":"article"},"doc://Factory/documentation/Factory/Chains":{"title":"Circular Dependency Chains","kind":"article","url":"\/documentation\/factory\/chains","type":"topic","role":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","abstract":[{"text":"Detecting and solving Circular Dependency Chains.","type":"text"}]},"doc://Factory/documentation/Factory/FactoryScope":{"fragments":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryScope","kind":"identifier"}],"abstract":[],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryScope","type":"topic","title":"FactoryScope","navigatorTitle":[{"text":"FactoryScope","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/factoryscope"},"doc://Factory/documentation/Factory/Functional":{"type":"topic","kind":"article","title":"Functional Injection","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"url":"\/documentation\/factory\/functional","identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","role":"article"},"doc://Factory/documentation/Factory/InjectedType":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"InjectedType"}],"abstract":[{"type":"text","text":"Basic property wrapper for optional injected types"}],"title":"InjectedType","navigatorTitle":[{"kind":"identifier","text":"InjectedType"}],"kind":"symbol","url":"\/documentation\/factory\/injectedtype","role":"symbol"},"doc://Factory/documentation/Factory/GettingStarted":{"type":"topic","title":"Getting Started","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","url":"\/documentation\/factory\/gettingstarted","role":"collectionGroup"},"doc://Factory/documentation/Factory/Migration":{"title":"Migration","kind":"article","url":"\/documentation\/factory\/migration","identifier":"doc:\/\/Factory\/documentation\/Factory\/Migration","role":"article","type":"topic","abstract":[{"type":"text","text":"Moving from 1.x to 2.0"}]},"doc://Factory/documentation/Factory/Testing":{"type":"topic","kind":"article","role":"article","url":"\/documentation\/factory\/testing","title":"Testing","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}]},"doc://Factory/documentation/Factory/FactoryContext":{"navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","abstract":[],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContext"}],"kind":"symbol","type":"topic","title":"FactoryContext","url":"\/documentation\/factory\/factorycontext","role":"symbol"},"doc://Factory/documentation/Factory/resolve(_:)-52olu":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-52olu","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC","text":"Container"},{"kind":"text","text":", "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>) -> "},{"kind":"typeIdentifier","text":"T"}],"title":"resolve(_:)","abstract":[{"text":"Global function to resolve a keypath on Container.shared into the requested type","type":"text"}],"url":"\/documentation\/factory\/resolve(_:)-52olu","kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/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"},{"text":" ","kind":"text"},{"kind":"identifier","text":"WeakLazyInjected"}]},"doc://Factory/documentation/Factory/Previews":{"title":"SwiftUI Previews","kind":"article","url":"\/documentation\/factory\/previews","type":"topic","role":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","abstract":[{"text":"Mocking dependencies for SwiftUI Previews.","type":"text"}]},"doc://Factory/documentation/Factory/AutoRegistering":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"AutoRegistering","kind":"identifier"}],"type":"topic","role":"symbol","title":"AutoRegistering","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","navigatorTitle":[{"text":"AutoRegistering","kind":"identifier"}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"code":"Container","type":"codeVoice"},{"type":"text","text":"."}],"url":"\/documentation\/factory\/autoregistering","kind":"symbol"},"doc://Factory/documentation/Factory/InjectedObject":{"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","role":"symbol","title":"InjectedObject"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}]},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/Tags":{"role":"article","title":"Tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","url":"\/documentation\/factory\/tags","kind":"article","type":"topic"},"doc://Factory/documentation/Factory/Cycle":{"type":"topic","kind":"article","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"title":"Resolution Cycles","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","url":"\/documentation\/factory\/cycle","role":"article"},"doc://Factory/documentation/Factory/Design":{"type":"topic","kind":"article","title":"Designing Factory","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","url":"\/documentation\/factory\/design","role":"article"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"title":"FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}]},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"ManagedContainer","kind":"identifier"}],"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"title":"ManagedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","type":"topic","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}]},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"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."}],"type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"kind":"symbol","url":"\/documentation\/factory\/containermanager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","title":"ContainerManager","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"role":"symbol","type":"topic"},"doc://Factory/documentation/Factory/Injected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"title":"Injected","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryManagedContainer":{"title":"FactoryManagedContainer","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryManagedContainer","role":"symbol","url":"\/documentation\/factory\/factorymanagedcontainer","abstract":[],"type":"topic","fragments":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryManagedContainer"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryManagedContainer"}]},"doc://Factory/documentation/Factory/FactoryContextType":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontexttype","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"title":"FactoryContextType","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryContextType","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryAutoRegistering":{"url":"\/documentation\/factory\/factoryautoregistering","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryAutoRegistering","kind":"symbol","type":"topic","navigatorTitle":[{"text":"FactoryAutoRegistering","kind":"identifier"}],"title":"FactoryAutoRegistering","fragments":[{"text":"typealias","kind":"keyword"},{"text":" ","kind":"text"},{"text":"FactoryAutoRegistering","kind":"identifier"}],"role":"symbol","abstract":[]},"doc://Factory/documentation/Factory/Scopes":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","title":"Scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"url":"\/documentation\/factory\/scopes","kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","navigatorTitle":[{"text":"Container","kind":"identifier"}],"title":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"role":"symbol","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/FactoryRegistration":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"FactoryRegistration","kind":"identifier"}],"title":"FactoryRegistration","abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"url":"\/documentation\/factory\/factoryregistration","kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/Resolving":{"kind":"symbol","role":"symbol","url":"\/documentation\/factory\/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"},{"text":"Resolving","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"Resolving"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","title":"Resolving"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"content","content":[{"text":"Overview","level":2,"type":"heading","anchor":"Overview"},{"inlineContent":[{"text":"Factory is strongly influenced by SwiftUI, and in my opinion is highly suited for use in that environment.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory is…"}]},{"items":[{"content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"type":"text","text":"Adaptable"}],"type":"strong"},{"type":"text","text":": Factory doesn’t tie you down to a single dependency injection strategy or technique."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"type":"text","text":"Powerful"}],"type":"strong"},{"text":": Factory supports containers, scopes, passed parameters, contexts, decorators, unit tests, SwiftUI Previews, and much, much more.","type":"text"}]}]},{"content":[{"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."}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"type":"text","text":"Safe"}],"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":[{"type":"strong","inlineContent":[{"type":"text","text":"Documented"}]},{"text":": Factory 2.0 has extensive DocC documentation and examples covering its classes, methods, and use cases.","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"text":"Lightweight","type":"text"}],"type":"strong"},{"text":": With all of that Factory is slim and trim, under 800 lines of executable code.","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"text":"Tested","type":"text"}]},{"type":"text","text":": Unit tests with 100% code coverage helps ensure correct operation of registrations, resolutions, and scopes."}]}]},{"content":[{"inlineContent":[{"inlineContent":[{"type":"text","text":"Free"}],"type":"strong"},{"type":"text","text":": Factory is free and open source under the MIT License."}],"type":"paragraph"}]}],"type":"unorderedList"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Ready to get started?"}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":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"]},{"title":"Classes","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]},{"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\/DynamicInjected","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext","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"},{"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"]}],"hierarchy":{"paths":[[]]},"kind":"symbol","abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"sections":[],"metadata":{"symbolKind":"module","roleHeading":"Framework","role":"collection","modules":[{"name":"Factory"}],"title":"Factory","externalID":"Factory"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/factory"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/resolve(_:)-52olu":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-52olu","url":"\/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"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"text":"<","kind":"text"},{"text":"Container","kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">>) -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/FactoryContext":{"abstract":[],"role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","title":"FactoryContext","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/resolve(_:)-632zk":{"abstract":[{"text":"Global function to resolve a keypath on the specified shared container into the requested type","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/resolve(_:)-632zk","role":"symbol","title":"resolve(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"<"},{"text":"C","kind":"genericParameter"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>) -> "},{"kind":"typeIdentifier","text":"T"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-632zk"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}]},"doc://Factory/documentation/Factory/WeakLazyInjected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"title":"WeakLazyInjected","url":"\/documentation\/factory\/weaklazyinjected","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"text":"WeakLazyInjected","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryResetOptions":{"title":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","type":"topic","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Contexts":{"url":"\/documentation\/factory\/contexts","kind":"article","role":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","title":"Contexts","abstract":[{"text":"Changing injection results under special circumstances.","type":"text"}]},"doc://Factory/documentation/Factory/Containers":{"kind":"article","type":"topic","title":"Containers","url":"\/documentation\/factory\/containers","identifier":"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?"}]},"doc://Factory/documentation/Factory/Tags":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","kind":"article","role":"article","abstract":[{"text":"Obtaining a list of dependencies of a given type.","type":"text"}],"url":"\/documentation\/factory\/tags","title":"Tags","type":"topic"},"doc://Factory/documentation/Factory/Migration":{"kind":"article","type":"topic","title":"Migration","url":"\/documentation\/factory\/migration","identifier":"doc:\/\/Factory\/documentation\/Factory\/Migration","role":"article","abstract":[{"type":"text","text":"Moving from 1.x to 2.0"}]},"doc://Factory/documentation/Factory/Modifiers":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","kind":"article","role":"article","abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"url":"\/documentation\/factory\/modifiers","title":"Factory Modifiers","type":"topic"},"doc://Factory/documentation/Factory/Previews":{"abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","url":"\/documentation\/factory\/previews","role":"article","type":"topic","title":"SwiftUI Previews"},"doc://Factory/documentation/Factory/SharedContainer":{"url":"\/documentation\/factory\/sharedcontainer","type":"topic","abstract":[{"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.","type":"text"}],"title":"SharedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"SharedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Cycle":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","abstract":[{"text":"What’s a resolution cycle, and why should we care?","type":"text"}],"role":"article","title":"Resolution Cycles","url":"\/documentation\/factory\/cycle"},"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol"},"doc://Factory/documentation/Factory/AutoRegistering":{"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AutoRegistering","kind":"identifier"}],"kind":"symbol","type":"topic","title":"AutoRegistering","url":"\/documentation\/factory\/autoregistering","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","role":"symbol","navigatorTitle":[{"text":"AutoRegistering","kind":"identifier"}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/FactoryRegistration":{"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryregistration","role":"symbol","title":"FactoryRegistration","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration"},"doc://Factory/documentation/Factory/FactoryContainer":{"fragments":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContainer"}],"kind":"symbol","type":"topic","title":"FactoryContainer","url":"\/documentation\/factory\/factorycontainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContainer","role":"symbol","navigatorTitle":[{"text":"FactoryContainer","kind":"identifier"}],"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","url":"\/documentation\/factory\/debugging","role":"article","type":"topic","title":"Debugging"},"doc://Factory/documentation/Factory/InjectedType":{"title":"InjectedType","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"InjectedType","kind":"identifier"}],"url":"\/documentation\/factory\/injectedtype","navigatorTitle":[{"kind":"identifier","text":"InjectedType"}],"abstract":[{"type":"text","text":"Basic property wrapper for optional injected types"}]},"doc://Factory/documentation/Factory/FactoryManagedContainer":{"fragments":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryManagedContainer"}],"kind":"symbol","type":"topic","title":"FactoryManagedContainer","url":"\/documentation\/factory\/factorymanagedcontainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryManagedContainer","role":"symbol","navigatorTitle":[{"text":"FactoryManagedContainer","kind":"identifier"}],"abstract":[]},"doc://Factory/documentation/Factory/FactoryResolving":{"type":"topic","fragments":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResolving"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryResolving"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResolving","url":"\/documentation\/factory\/factoryresolving","role":"symbol","abstract":[],"title":"FactoryResolving"},"doc://Factory/documentation/Factory/FactoryAutoRegistering":{"navigatorTitle":[{"kind":"identifier","text":"FactoryAutoRegistering"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryAutoRegistering","kind":"symbol","abstract":[],"role":"symbol","title":"FactoryAutoRegistering","url":"\/documentation\/factory\/factoryautoregistering","fragments":[{"text":"typealias","kind":"keyword"},{"text":" ","kind":"text"},{"text":"FactoryAutoRegistering","kind":"identifier"}]},"doc://Factory/documentation/Factory/Design":{"url":"\/documentation\/factory\/design","title":"Designing Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","kind":"article","role":"article","abstract":[{"text":"Rationale behind the design decisions made in Factory 1.0 and 2.0","type":"text"}],"type":"topic"},"doc://Factory/documentation/Factory/FactorySharedContainer":{"fragments":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactorySharedContainer"}],"kind":"symbol","type":"topic","title":"FactorySharedContainer","url":"\/documentation\/factory\/factorysharedcontainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactorySharedContainer","role":"symbol","navigatorTitle":[{"text":"FactorySharedContainer","kind":"identifier"}],"abstract":[]},"doc://Factory/documentation/Factory/Injected":{"navigatorTitle":[{"text":"Injected","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"role":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}]},"doc://Factory/documentation/Factory/Container":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","title":"Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"url":"\/documentation\/factory\/container","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}],"navigatorTitle":[{"text":"Container","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryScope":{"title":"FactoryScope","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryScope","role":"symbol","type":"topic","navigatorTitle":[{"text":"FactoryScope","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryScope"}],"url":"\/documentation\/factory\/factoryscope","abstract":[],"kind":"symbol"},"doc://Factory/documentation/Factory/Testing":{"abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"kind":"article","url":"\/documentation\/factory\/testing","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","role":"article","type":"topic","title":"Testing"},"doc://Factory/documentation/Factory/ManagedContainer":{"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","role":"symbol","navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ManagedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer"},"doc://Factory/documentation/Factory/Optionals":{"identifier":"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","url":"\/documentation\/factory\/optionals","role":"article"},"doc://Factory/documentation/Factory/Chains":{"kind":"article","title":"Circular Dependency Chains","url":"\/documentation\/factory\/chains","identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","role":"article","type":"topic","abstract":[{"type":"text","text":"Detecting and solving Circular Dependency Chains."}]},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","title":"InjectedObject","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}]},"doc://Factory/documentation/Factory/Resolving":{"title":"Resolving","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"Resolving","kind":"identifier"}],"url":"\/documentation\/factory\/resolving","navigatorTitle":[{"kind":"identifier","text":"Resolving"}],"abstract":[{"text":"When protocol is applied to a container it enables a typed registration\/resolution mode.","type":"text"}]},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"url":"\/documentation\/factory\/containermanager","navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}]},"doc://Factory/documentation/Factory/Modules":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","kind":"article","role":"article","abstract":[{"text":"Using Factory in a project with multiple modules.","type":"text"}],"url":"\/documentation\/factory\/modules","title":"Modular Development","type":"topic"},"doc://Factory/documentation/Factory/FactoryContextType":{"role":"symbol","url":"\/documentation\/factory\/factorycontexttype","title":"FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContextType"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory/Functional":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","kind":"article","role":"article","abstract":[{"text":"Factory can inject more than service classes and structs.","type":"text"}],"url":"\/documentation\/factory\/functional","title":"Functional Injection","type":"topic"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/DynamicInjected":{"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"DynamicInjected"}],"navigatorTitle":[{"text":"DynamicInjected","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected","kind":"symbol","type":"topic","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"title":"DynamicInjected","role":"symbol","url":"\/documentation\/factory\/dynamicinjected"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContainerManager":{"title":"FactoryContainerManager","url":"\/documentation\/factory\/factorycontainermanager","role":"symbol","type":"topic","abstract":[],"kind":"symbol","fragments":[{"kind":"keyword","text":"typealias"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContainerManager"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContainerManager","navigatorTitle":[{"text":"FactoryContainerManager","kind":"identifier"}]},"doc://Factory/documentation/Factory/GettingStarted":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","type":"topic","kind":"article","abstract":[{"text":"Defining a Factory, resolving it, and changing the default behavior.","type":"text"}],"url":"\/documentation\/factory\/gettingstarted","title":"Getting Started","role":"collectionGroup"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/autoregistering.json b/docs/data/documentation/factory/autoregistering.json index 8783962a..adfacfba 100644 --- a/docs/data/documentation/factory/autoregistering.json +++ b/docs/data/documentation/factory/autoregistering.json @@ -1 +1 @@ -{"variants":[{"paths":["\/documentation\/factory\/autoregistering"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/AutoRegistering\/autoRegister()"],"title":"Instance Methods"}],"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Protocol","symbolKind":"protocol","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"AutoRegistering"}],"externalID":"s:7Factory15AutoRegisteringP","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"AutoRegistering"}],"title":"AutoRegistering"},"abstract":[{"text":"Adds an registration “hook” to a ","type":"text"},{"code":"Container","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"AutoRegistering","kind":"identifier"}],"languages":["swift"]}]},{"kind":"content","content":[{"text":"Overview","level":2,"type":"heading","anchor":"overview"},{"inlineContent":[{"text":"Add this protocol to a container to support first-time registration of needed dependencies prior to first resolution","type":"text"},{"type":"text","text":" "},{"type":"text","text":"of a dependency on that container."}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["extension Container: @retroactive AutoRegistering {"," func autoRegister() {"," someService.register {"," CrossModuleService()"," }"," }","}"]},{"inlineContent":[{"type":"text","text":"The "},{"code":"autoRegister","type":"codeVoice"},{"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."}],"type":"paragraph"},{"name":"Warning","content":[{"type":"paragraph","inlineContent":[{"text":"Calling ","type":"text"},{"code":"container.manager.reset(options: .all)","type":"codeVoice"},{"type":"text","text":" restores the container to it’s initial state"},{"type":"text","text":" "},{"type":"text","text":"and autoRegister will be called again if it exists."}]}],"style":"warning","type":"aside"},{"inlineContent":[{"type":"text","text":"The "},{"code":"@retroactive","type":"codeVoice"},{"type":"text","text":" attribute is needed as of Swift 6 to silence a conformance warning."}],"type":"paragraph"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/AutoRegistering/autoRegister()":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"autoRegister"},{"kind":"text","text":"()"}],"type":"topic","role":"symbol","title":"autoRegister()","required":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering\/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."}],"url":"\/documentation\/factory\/autoregistering\/autoregister()","kind":"symbol"},"doc://Factory/documentation/Factory/AutoRegistering":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"AutoRegistering","kind":"identifier"}],"type":"topic","role":"symbol","title":"AutoRegistering","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","navigatorTitle":[{"text":"AutoRegistering","kind":"identifier"}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"code":"Container","type":"codeVoice"},{"type":"text","text":"."}],"url":"\/documentation\/factory\/autoregistering","kind":"symbol"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Protocol","symbolKind":"protocol","title":"AutoRegistering","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AutoRegistering","kind":"identifier"}],"role":"symbol","externalID":"s:7Factory15AutoRegisteringP","navigatorTitle":[{"kind":"identifier","text":"AutoRegistering"}]},"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"AutoRegistering"}],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","type":"heading","text":"Overview","level":2},{"inlineContent":[{"type":"text","text":"Add this protocol to a container to support first-time registration of needed dependencies prior to first resolution"},{"type":"text","text":" "},{"type":"text","text":"of a dependency on that container."}],"type":"paragraph"},{"code":["extension Container: @retroactive AutoRegistering {"," func autoRegister() {"," someService.register {"," CrossModuleService()"," }"," }","}"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"text":"The ","type":"text"},{"type":"codeVoice","code":"autoRegister"},{"type":"text","text":" function is called on each instantiated container prior to"},{"type":"text","text":" "},{"text":"the first resolution of a Factory on that container.","type":"text"}],"type":"paragraph"},{"name":"Warning","type":"aside","content":[{"inlineContent":[{"type":"text","text":"Calling "},{"type":"codeVoice","code":"container.manager.reset(options: .all)"},{"text":" restores the container to it’s initial state","type":"text"},{"type":"text","text":" "},{"type":"text","text":"and autoRegister will be called again if it exists."}],"type":"paragraph"}],"style":"warning"},{"inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"@retroactive"},{"type":"text","text":" attribute is needed as of Swift 6 to silence a conformance warning."}],"type":"paragraph"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","interfaceLanguage":"swift"},"topicSections":[{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/AutoRegistering\/autoRegister()"]}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"text":".","type":"text"}],"variants":[{"paths":["\/documentation\/factory\/autoregistering"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/AutoRegistering/autoRegister()":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"autoRegister","kind":"identifier"},{"text":"()","kind":"text"}],"kind":"symbol","required":true,"type":"topic","title":"autoRegister()","url":"\/documentation\/factory\/autoregistering\/autoregister()","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering\/autoRegister()","role":"symbol","abstract":[{"type":"text","text":"User provided function that supports first-time registration of needed dependencies prior to first resolution"},{"type":"text","text":" "},{"type":"text","text":"of a dependency on that container."}]},"doc://Factory/documentation/Factory/AutoRegistering":{"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AutoRegistering","kind":"identifier"}],"kind":"symbol","type":"topic","title":"AutoRegistering","url":"\/documentation\/factory\/autoregistering","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","role":"symbol","navigatorTitle":[{"text":"AutoRegistering","kind":"identifier"}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 adff4ce5..af85820a 100644 --- a/docs/data/documentation/factory/autoregistering/autoregister().json +++ b/docs/data/documentation/factory/autoregistering/autoregister().json @@ -1 +1 @@ -{"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/autoregistering\/autoregister()"]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/AutoRegistering"]]},"abstract":[{"type":"text","text":"User provided function that supports first-time registration of needed dependencies prior to first resolution"},{"type":"text","text":" "},{"type":"text","text":"of a dependency on that container."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering\/autoRegister()","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"autoRegister"},{"text":"()","kind":"text"}]}]}],"sections":[],"metadata":{"modules":[{"name":"Factory"}],"title":"autoRegister()","role":"symbol","roleHeading":"Instance Method","externalID":"s:7Factory15AutoRegisteringP12autoRegisteryyF","symbolKind":"method","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"autoRegister"},{"text":"()","kind":"text"}],"required":true},"references":{"doc://Factory/documentation/Factory/AutoRegistering":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"AutoRegistering","kind":"identifier"}],"type":"topic","role":"symbol","title":"AutoRegistering","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","navigatorTitle":[{"text":"AutoRegistering","kind":"identifier"}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"code":"Container","type":"codeVoice"},{"type":"text","text":"."}],"url":"\/documentation\/factory\/autoregistering","kind":"symbol"},"doc://Factory/documentation/Factory/AutoRegistering/autoRegister()":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"autoRegister"},{"kind":"text","text":"()"}],"type":"topic","role":"symbol","title":"autoRegister()","required":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering\/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."}],"url":"\/documentation\/factory\/autoregistering\/autoregister()","kind":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering\/autoRegister()"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"autoRegister"},{"text":"()","kind":"text"}],"languages":["swift"]}],"kind":"declarations"}],"abstract":[{"type":"text","text":"User provided function that supports first-time registration of needed dependencies prior to first resolution"},{"type":"text","text":" "},{"text":"of a dependency on that container.","type":"text"}],"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/AutoRegistering"]]},"metadata":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"autoRegister"},{"text":"()","kind":"text"}],"required":true,"externalID":"s:7Factory15AutoRegisteringP12autoRegisteryyF","roleHeading":"Instance Method","title":"autoRegister()","symbolKind":"method","role":"symbol","modules":[{"name":"Factory"}]},"variants":[{"paths":["\/documentation\/factory\/autoregistering\/autoregister()"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"references":{"doc://Factory/documentation/Factory/AutoRegistering/autoRegister()":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"autoRegister","kind":"identifier"},{"text":"()","kind":"text"}],"kind":"symbol","required":true,"type":"topic","title":"autoRegister()","url":"\/documentation\/factory\/autoregistering\/autoregister()","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering\/autoRegister()","role":"symbol","abstract":[{"type":"text","text":"User provided function that supports first-time registration of needed dependencies prior to first resolution"},{"type":"text","text":" "},{"type":"text","text":"of a dependency on that container."}]},"doc://Factory/documentation/Factory/AutoRegistering":{"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AutoRegistering","kind":"identifier"}],"kind":"symbol","type":"topic","title":"AutoRegistering","url":"\/documentation\/factory\/autoregistering","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","role":"symbol","navigatorTitle":[{"text":"AutoRegistering","kind":"identifier"}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","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 073cdba7..08fc7eb8 100644 --- a/docs/data/documentation/factory/chains.json +++ b/docs/data/documentation/factory/chains.json @@ -1 +1 @@ -{"seeAlsoSections":[{"generated":true,"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"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Chains","interfaceLanguage":"swift"},"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/chains"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"kind":"content","content":[{"text":"Circular Dependency Chain Detection","anchor":"Circular-Dependency-Chain-Detection","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"What’s a circular dependency? Let’s say that A needs B to be constructed, and B needs a C. But what happens if C needs an A?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Examine the following class definitions."}]},{"syntax":"swift","code":["class CircularA {"," @Injected(\\.circularB) var circularB","}","","class CircularB {"," @Injected(\\.circularC) var circularC","}","","class CircularC {"," @Injected(\\.circularA) var circularA","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Attempting make an instance of "},{"type":"codeVoice","code":"CircularA"},{"text":" is going to result in an infinite loop.","type":"text"}]},{"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"},{"type":"paragraph","inlineContent":[{"text":"This is a circular dependency chain.","type":"text"}]},{"level":2,"type":"heading","text":"Resolution","anchor":"Resolution"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"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"],"syntax":null,"type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"With the above information in hand we should be able to find the problem and fix it.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"We could fix things by changing CircularC’s injection wrapper to "},{"type":"codeVoice","code":"LazyInjected"},{"text":" or, better yet, ","type":"text"},{"code":"WeakLazyInjected","type":"codeVoice"},{"text":" in order to avoid a retain cycle.","type":"text"}]},{"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"},{"type":"text","text":" are depending upon into a "},{"type":"emphasis","inlineContent":[{"type":"text","text":"third"}]},{"type":"text","text":" object they both could include."}]},{"inlineContent":[{"type":"text","text":"Circular dependencies such as this are usually a violation of the Single Responsibility Principle, and should be avoided."}],"type":"paragraph"},{"name":"Important","type":"aside","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"}]}]},{"level":2,"anchor":"Disabling-CDC-Detection","text":"Disabling CDC Detection","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If needed circular dependency chain detecting can be disabled by setting the detection limit to zero."}]},{"syntax":"swift","type":"codeListing","code":["Container.shared.manager.dependencyChainTestMax = 0"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The default value for "},{"type":"codeVoice","code":"dependencyChainTestMax"},{"type":"text","text":" is 10. That means the detector fires if the same class type appears during a single resolution cycle more than 10 times."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This value can be increased (or decreased) as needed."}]}]}],"kind":"article","metadata":{"roleHeading":"Article","role":"article","modules":[{"name":"Factory"}],"title":"Circular Dependency Chains"},"schemaVersion":{"patch":0,"minor":3,"major":0},"abstract":[{"text":"Detecting and solving Circular Dependency Chains.","type":"text"}],"references":{"doc://Factory/documentation/Factory/Previews":{"title":"SwiftUI Previews","kind":"article","url":"\/documentation\/factory\/previews","type":"topic","role":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","abstract":[{"text":"Mocking dependencies for SwiftUI Previews.","type":"text"}]},"doc://Factory/documentation/Factory/Testing":{"type":"topic","kind":"article","role":"article","url":"\/documentation\/factory\/testing","title":"Testing","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}]},"doc://Factory/documentation/Factory/Contexts":{"type":"topic","kind":"article","role":"article","url":"\/documentation\/factory\/contexts","title":"Contexts","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}]},"doc://Factory/documentation/Factory/Debugging":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","url":"\/documentation\/factory\/debugging","title":"Debugging","role":"article","kind":"article","abstract":[{"text":"Additional support for debugging resolution cycles, dependency chains and other issue.","type":"text"}],"type":"topic"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"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"}],"schemaVersion":{"minor":3,"major":0,"patch":0},"sections":[],"primaryContentSections":[{"kind":"content","content":[{"level":2,"type":"heading","anchor":"Circular-Dependency-Chain-Detection","text":"Circular Dependency Chain Detection"},{"type":"paragraph","inlineContent":[{"type":"text","text":"What’s a circular dependency? Let’s say that A needs B to be constructed, and B needs a C. But what happens if C needs an A?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Examine the following class definitions."}]},{"type":"codeListing","code":["class CircularA {"," @Injected(\\.circularB) var circularB","}","","class CircularB {"," @Injected(\\.circularC) var circularC","}","","class CircularC {"," @Injected(\\.circularA) var circularA","}"],"syntax":"swift"},{"inlineContent":[{"type":"text","text":"Attempting make an instance of "},{"type":"codeVoice","code":"CircularA"},{"type":"text","text":" is going to result in an infinite loop."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"paragraph","inlineContent":[{"text":"This is a circular dependency chain.","type":"text"}]},{"text":"Resolution","level":2,"type":"heading","anchor":"Resolution"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"All Factory can do in this case is die gracefully and in the process dump the dependency chain that indicates where the problem lies."}]},{"type":"codeListing","syntax":null,"code":["2022-12-23 14:57:23.512032-0600 FactoryDemo[47546:6946786] Factory\/Factory.swift:393: ","Fatal error: circular dependency chain - CircularA > CircularB > CircularC > CircularA"]},{"type":"paragraph","inlineContent":[{"text":"With the above information in hand we should be able to find the problem and fix it.","type":"text"}]},{"inlineContent":[{"type":"text","text":"We could fix things by changing CircularC’s injection wrapper to "},{"type":"codeVoice","code":"LazyInjected"},{"text":" or, better yet, ","type":"text"},{"type":"codeVoice","code":"WeakLazyInjected"},{"type":"text","text":" in order to avoid a retain cycle."}],"type":"paragraph"},{"inlineContent":[{"text":"But a better solution would probably entail finding and breaking out the functionality that ","type":"text"},{"code":"CircularA","type":"codeVoice"},{"type":"text","text":" and "},{"type":"codeVoice","code":"CircularC"},{"type":"text","text":" are depending upon into a "},{"inlineContent":[{"type":"text","text":"third"}],"type":"emphasis"},{"text":" object they both could include.","type":"text"}],"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":[{"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"}]}],"style":"important","name":"Important"},{"anchor":"Disabling-CDC-Detection","text":"Disabling CDC Detection","type":"heading","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"If needed circular dependency chain detecting can be disabled by setting the detection limit to zero."}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.manager.dependencyChainTestMax = 0"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The default value for "},{"type":"codeVoice","code":"dependencyChainTestMax"},{"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":[{"text":"This value can be increased (or decreased) as needed.","type":"text"}]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Chains","interfaceLanguage":"swift"},"metadata":{"title":"Circular Dependency Chains","roleHeading":"Article","modules":[{"name":"Factory"}],"role":"article"},"kind":"article","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/chains"]}],"abstract":[{"text":"Detecting and solving Circular Dependency Chains.","type":"text"}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"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","url":"\/documentation\/factory\/debugging","role":"article","type":"topic","title":"Debugging"},"doc://Factory/documentation/Factory/Previews":{"abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","url":"\/documentation\/factory\/previews","role":"article","type":"topic","title":"SwiftUI Previews"},"doc://Factory/documentation/Factory/Contexts":{"url":"\/documentation\/factory\/contexts","kind":"article","role":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","title":"Contexts","abstract":[{"text":"Changing injection results under special circumstances.","type":"text"}]},"doc://Factory/documentation/Factory/Testing":{"abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"kind":"article","url":"\/documentation\/factory\/testing","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","role":"article","type":"topic","title":"Testing"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/container.json b/docs/data/documentation/factory/container.json index 4ac333a4..cd5a4618 100644 --- a/docs/data/documentation/factory/container.json +++ b/docs/data/documentation/factory/container.json @@ -1 +1 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container","interfaceLanguage":"swift"},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"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"]},{"title":"Default Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"],"generated":true}],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"final","kind":"keyword"},{"kind":"text","text":" "},{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"},{"content":[{"type":"heading","anchor":"overview","level":2,"text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Containers are used by Factory to manage object creation, object resolution, and object lifecycles in general."}]},{"type":"codeListing","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Registrations and scope caches will persist as long as the associated container remains in scope."}]},{"type":"paragraph","inlineContent":[{"text":"See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","isActive":true},{"type":"text","text":" for more information."}]}],"kind":"content"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"relationshipsSections":[{"type":"conformsTo","kind":"relationships","title":"Conforms To","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","doc:\/\/Factory\/documentation\/Factory\/SharedContainer","doc:\/\/Factory\/s8SendableP"]}],"variants":[{"paths":["\/documentation\/factory\/container"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"symbolKind":"class","navigatorTitle":[{"text":"Container","kind":"identifier"}],"modules":[{"name":"Factory"}],"externalID":"s:7Factory9ContainerC","roleHeading":"Class","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"title":"Container"},"references":{"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"ManagedContainer","kind":"identifier"}],"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"title":"ManagedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","type":"topic","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}]},"doc://Factory/documentation/Factory/Container/shared":{"abstract":[{"type":"text","text":"Define the default shared container."}],"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","kind":"typeIdentifier","text":"Container"}],"type":"topic","title":"shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/shared","url":"\/documentation\/factory\/container\/shared","role":"symbol","kind":"symbol"},"doc://Factory/s8SendableP":{"type":"unresolvable","identifier":"doc:\/\/Factory\/s8SendableP","title":"Swift.Sendable"},"doc://Factory/documentation/Factory/Container/init()":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/init()","url":"\/documentation\/factory\/container\/init()","fragments":[{"kind":"identifier","text":"init"},{"text":"()","kind":"text"}],"role":"symbol","title":"init()","kind":"symbol","abstract":[{"type":"text","text":"Public initializer"}]},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","navigatorTitle":[{"text":"Container","kind":"identifier"}],"title":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"role":"symbol","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/SharedContainer":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/sharedcontainer","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"title":"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."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"SharedContainer","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"abstract":[],"type":"topic","kind":"article","title":"ManagedContainer Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","role":"collectionGroup","url":"\/documentation\/factory\/container\/managedcontainer-implementations"},"doc://Factory/documentation/Factory/Containers":{"kind":"article","abstract":[{"text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","title":"Containers","type":"topic","url":"\/documentation\/factory\/containers","role":"article"},"doc://Factory/documentation/Factory/Container/manager":{"fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"manager","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory16ContainerManagerC","text":"ContainerManager","kind":"typeIdentifier"}],"type":"topic","role":"symbol","title":"manager","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/manager","url":"\/documentation\/factory\/container\/manager","abstract":[{"type":"text","text":"Define the container’s manager."}],"kind":"symbol"}}} \ No newline at end of file +{"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container\/init()"],"title":"Initializers"},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container\/manager"]},{"title":"Type Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container\/shared"]},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"],"generated":true,"title":"Default Implementations"}],"abstract":[{"type":"text","text":"This is the default Container provided for your convenience by Factory."}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container"]}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","doc:\/\/Factory\/documentation\/Factory\/SharedContainer","doc:\/\/Factory\/s8SendableP"],"kind":"relationships","title":"Conforms To","type":"conformsTo"}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"final","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Container","kind":"identifier"}]}],"kind":"declarations"},{"kind":"content","content":[{"type":"heading","text":"Overview","level":2,"anchor":"overview"},{"inlineContent":[{"type":"text","text":"Containers are used by Factory to manage object creation, object resolution, and object lifecycles in general."}],"type":"paragraph"},{"type":"codeListing","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"],"syntax":"swift"},{"inlineContent":[{"type":"text","text":"Registrations and scope caches will persist as long as the associated container remains in scope."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","type":"reference","isActive":true},{"text":" for more information.","type":"text"}],"type":"paragraph"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"sections":[],"metadata":{"role":"symbol","externalID":"s:7Factory9ContainerC","roleHeading":"Class","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Container","kind":"identifier"}],"title":"Container","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"Container"}],"symbolKind":"class"},"references":{"doc://Factory/documentation/Factory/Container":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","title":"Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"url":"\/documentation\/factory\/container","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}],"navigatorTitle":[{"text":"Container","kind":"identifier"}]},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"kind":"article","type":"topic","title":"ManagedContainer Implementations","url":"\/documentation\/factory\/container\/managedcontainer-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","role":"collectionGroup","abstract":[]},"doc://Factory/documentation/Factory/SharedContainer":{"url":"\/documentation\/factory\/sharedcontainer","type":"topic","abstract":[{"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.","type":"text"}],"title":"SharedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"SharedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}]},"doc://Factory/documentation/Factory/Containers":{"kind":"article","type":"topic","title":"Containers","url":"\/documentation\/factory\/containers","identifier":"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?"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/s8SendableP":{"type":"unresolvable","title":"Swift.Sendable","identifier":"doc:\/\/Factory\/s8SendableP"},"doc://Factory/documentation/Factory/ManagedContainer":{"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","role":"symbol","navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ManagedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer"},"doc://Factory/documentation/Factory/Container/init()":{"fragments":[{"kind":"identifier","text":"init"},{"text":"()","kind":"text"}],"kind":"symbol","type":"topic","title":"init()","url":"\/documentation\/factory\/container\/init()","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/init()","role":"symbol","abstract":[{"type":"text","text":"Public initializer"}]},"doc://Factory/documentation/Factory/Container/shared":{"fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory9ContainerC","text":"Container","kind":"typeIdentifier"}],"kind":"symbol","type":"topic","title":"shared","url":"\/documentation\/factory\/container\/shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/shared","role":"symbol","abstract":[{"type":"text","text":"Define the default shared container."}]},"doc://Factory/documentation/Factory/Container/manager":{"fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"manager","kind":"identifier"},{"text":": ","kind":"text"},{"text":"ContainerManager","kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ContainerManagerC"}],"kind":"symbol","type":"topic","title":"manager","url":"\/documentation\/factory\/container\/manager","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/manager","role":"symbol","abstract":[{"type":"text","text":"Define the container’s manager."}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/container/callasfunction(key:_:)-33sw2.json b/docs/data/documentation/factory/container/callasfunction(key:_:)-33sw2.json index 066f6976..c5233c0f 100644 --- a/docs/data/documentation/factory/container/callasfunction(key:_:)-33sw2.json +++ b/docs/data/documentation/factory/container/callasfunction(key:_:)-33sw2.json @@ -1 +1 @@ -{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container\/callasfunction(key:_:)-33sw2"]}],"metadata":{"roleHeading":"Instance Method","extendedModule":"Factory","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":", () -> "},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"symbolKind":"method","title":"callAsFunction(key:_:)","role":"symbol","modules":[{"name":"Factory"}],"externalID":"s:7Factory16ManagedContainerPAAE14callAsFunction3key_A2AVyqd__Gs12StaticStringV_qd__yYbctlF::SYNTHESIZED::s:7Factory9ContainerC"},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"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":" = "},{"text":"#function","kind":"keyword"},{"text":", ","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"factory"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"text":" () -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}]}]}],"abstract":[{"text":"Syntactic sugar allows container to create a properly bound Factory.","type":"text"}],"kind":"symbol","sections":[],"schemaVersion":{"patch":0,"minor":3,"major":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-33sw2","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"references":{"doc://Factory/documentation/Factory/Container/callAsFunction(key:_:)-33sw2":{"type":"topic","kind":"symbol","abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound Factory."}],"title":"callAsFunction(key:_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-33sw2","url":"\/documentation\/factory\/container\/callasfunction(key:_:)-33sw2","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier","text":"StaticString"},{"kind":"text","text":", () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}]},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","navigatorTitle":[{"text":"Container","kind":"identifier"}],"title":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"role":"symbol","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"abstract":[],"type":"topic","kind":"article","title":"ManagedContainer Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","role":"collectionGroup","url":"\/documentation\/factory\/container\/managedcontainer-implementations"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"schemaVersion":{"major":0,"patch":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"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":" () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"typeIdentifier","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}]}]}],"kind":"symbol","sections":[],"abstract":[{"text":"Syntactic sugar allows container to create a properly bound Factory.","type":"text"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-33sw2"},"metadata":{"title":"callAsFunction(key:_:)","roleHeading":"Instance Method","role":"symbol","modules":[{"name":"Factory"}],"symbolKind":"method","extendedModule":"Factory","externalID":"s:7Factory16ManagedContainerPAAE14callAsFunction3key_A2AVyqd__Gs12StaticStringV_qd__yYbctlF::SYNTHESIZED::s:7Factory9ContainerC","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier","text":"StaticString"},{"text":", () -> ","kind":"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"}]},"variants":[{"paths":["\/documentation\/factory\/container\/callasfunction(key:_:)-33sw2"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Container/callAsFunction(key:_:)-33sw2":{"abstract":[{"text":"Syntactic sugar allows container to create a properly bound Factory.","type":"text"}],"title":"callAsFunction(key:_:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-33sw2","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"text":", () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"url":"\/documentation\/factory\/container\/callasfunction(key:_:)-33sw2","kind":"symbol"},"doc://Factory/documentation/Factory/Container":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","title":"Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"url":"\/documentation\/factory\/container","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}],"navigatorTitle":[{"text":"Container","kind":"identifier"}]},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"kind":"article","type":"topic","title":"ManagedContainer Implementations","url":"\/documentation\/factory\/container\/managedcontainer-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","role":"collectionGroup","abstract":[]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/container/callasfunction(key:_:)-9b7qn.json b/docs/data/documentation/factory/container/callasfunction(key:_:)-9b7qn.json index be5b198e..cad63d4b 100644 --- a/docs/data/documentation/factory/container/callasfunction(key:_:)-9b7qn.json +++ b/docs/data/documentation/factory/container/callasfunction(key:_:)-9b7qn.json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"text":"P","kind":"genericParameter"},{"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"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"factory","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"ParameterFactory","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"platforms":["macOS"]}],"kind":"declarations"}],"sections":[],"schemaVersion":{"patch":0,"minor":3,"major":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"metadata":{"role":"symbol","title":"callAsFunction(key:_:)","symbolKind":"method","roleHeading":"Instance Method","modules":[{"name":"Factory"}],"extendedModule":"Factory","fragments":[{"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"},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier","text":"StaticString"},{"text":", (","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"T","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:7Factory16ManagedContainerPAAE14callAsFunction3key_AA09ParameterA0Vyqd__qd_0_Gs12StaticStringV_qd_0_qd__Ybctr0_lF::SYNTHESIZED::s:7Factory9ContainerC"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-9b7qn"},"abstract":[{"text":"Syntactic sugar allows container to create a properly bound ParameterFactory.","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container\/callasfunction(key:_:)-9b7qn"]}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/Container/callAsFunction(key:_:)-9b7qn":{"type":"topic","kind":"symbol","abstract":[{"text":"Syntactic sugar allows container to create a properly bound ParameterFactory.","type":"text"}],"title":"callAsFunction(key:_:)","url":"\/documentation\/factory\/container\/callasfunction(key:_:)-9b7qn","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-9b7qn","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"callAsFunction","kind":"identifier"},{"kind":"text","text":"<"},{"text":"P","kind":"genericParameter"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"kind":"text","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":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}]},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","navigatorTitle":[{"text":"Container","kind":"identifier"}],"title":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"role":"symbol","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"abstract":[],"type":"topic","kind":"article","title":"ManagedContainer Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","role":"collectionGroup","url":"\/documentation\/factory\/container\/managedcontainer-implementations"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-9b7qn","interfaceLanguage":"swift"},"kind":"symbol","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 properly bound ParameterFactory.","type":"text"}],"variants":[{"paths":["\/documentation\/factory\/container\/callasfunction(key:_:)-9b7qn"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"text":" = ","kind":"text"},{"text":"#function","kind":"keyword"},{"kind":"text","text":", "},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"factory","kind":"internalParam"},{"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","preciseIdentifier":"s:7Factory09ParameterA0V","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}]}]}],"metadata":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"text":"P","kind":"genericParameter"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"kind":"text","text":", ("},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"externalID":"s:7Factory16ManagedContainerPAAE14callAsFunction3key_AA09ParameterA0Vyqd__qd_0_Gs12StaticStringV_qd_0_qd__Ybctr0_lF::SYNTHESIZED::s:7Factory9ContainerC","roleHeading":"Instance Method","title":"callAsFunction(key:_:)","symbolKind":"method","role":"symbol","extendedModule":"Factory","modules":[{"name":"Factory"}]},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory/Container/callAsFunction(key:_:)-9b7qn":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"text":"<","kind":"text"},{"text":"P","kind":"genericParameter"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"text":", (","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"kind":"symbol","type":"topic","title":"callAsFunction(key:_:)","url":"\/documentation\/factory\/container\/callasfunction(key:_:)-9b7qn","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-9b7qn","role":"symbol","abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound ParameterFactory."}]},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"kind":"article","type":"topic","title":"ManagedContainer Implementations","url":"\/documentation\/factory\/container\/managedcontainer-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","role":"collectionGroup","abstract":[]},"doc://Factory/documentation/Factory/Container":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","title":"Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"url":"\/documentation\/factory\/container","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}],"navigatorTitle":[{"text":"Container","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"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 a038d08e..dacc9917 100644 --- a/docs/data/documentation/factory/container/decorator(_:).json +++ b/docs/data/documentation/factory/container/decorator(_:).json @@ -1 +1 @@ -{"abstract":[{"text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container.","type":"text"}],"metadata":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"decorator","kind":"identifier"},{"kind":"text","text":"((("},{"kind":"keyword","text":"Any"},{"kind":"text","text":") -> ())?)"}],"roleHeading":"Instance Method","role":"symbol","modules":[{"name":"Factory"}],"title":"decorator(_:)","extendedModule":"Factory","externalID":"s:7Factory16ManagedContainerPAAE9decoratoryyyypcSgF::SYNTHESIZED::s:7Factory9ContainerC","symbolKind":"method"},"sections":[],"kind":"symbol","primaryContentSections":[{"declarations":[{"platforms":["macOS"],"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"},{"text":": ((","kind":"text"},{"text":"Any","kind":"keyword"},{"text":") -> ())?)","kind":"text"}],"languages":["swift"]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/container\/decorator(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/decorator(_:)","interfaceLanguage":"swift"},"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":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"abstract":[],"type":"topic","kind":"article","title":"ManagedContainer Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","role":"collectionGroup","url":"\/documentation\/factory\/container\/managedcontainer-implementations"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","navigatorTitle":[{"text":"Container","kind":"identifier"}],"title":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"role":"symbol","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/Container/decorator(_:)":{"type":"topic","kind":"symbol","abstract":[{"text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container.","type":"text"}],"title":"decorator(_:)","url":"\/documentation\/factory\/container\/decorator(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/decorator(_:)","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"decorator","kind":"identifier"},{"kind":"text","text":"((("},{"kind":"keyword","text":"Any"},{"kind":"text","text":") -> ())?)"}]}}} \ No newline at end of file +{"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"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"},{"kind":"text","text":") -> ())?)"}]}],"kind":"declarations"}],"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"]]},"kind":"symbol","abstract":[{"text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container.","type":"text"}],"sections":[],"metadata":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"text":"(((","kind":"text"},{"kind":"keyword","text":"Any"},{"text":") -> ())?)","kind":"text"}],"externalID":"s:7Factory16ManagedContainerPAAE9decoratoryyyypcSgF::SYNTHESIZED::s:7Factory9ContainerC","roleHeading":"Instance Method","title":"decorator(_:)","symbolKind":"method","role":"symbol","extendedModule":"Factory","modules":[{"name":"Factory"}]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Container\/decorator(_:)"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container\/decorator(_:)"]}],"references":{"doc://Factory/documentation/Factory/Container/decorator(_:)":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"text":"(((","kind":"text"},{"kind":"keyword","text":"Any"},{"text":") -> ())?)","kind":"text"}],"kind":"symbol","type":"topic","title":"decorator(_:)","url":"\/documentation\/factory\/container\/decorator(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/decorator(_:)","role":"symbol","abstract":[{"text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container.","type":"text"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"kind":"article","type":"topic","title":"ManagedContainer Implementations","url":"\/documentation\/factory\/container\/managedcontainer-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","role":"collectionGroup","abstract":[]},"doc://Factory/documentation/Factory/Container":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","title":"Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"url":"\/documentation\/factory\/container","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}],"navigatorTitle":[{"text":"Container","kind":"identifier"}]}}} \ 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 c27092e8..0e098fbe 100644 --- a/docs/data/documentation/factory/container/init().json +++ b/docs/data/documentation/factory/container/init().json @@ -1 +1 @@ -{"metadata":{"fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"symbolKind":"init","role":"symbol","title":"init()","externalID":"s:7Factory9ContainerCACycfc","roleHeading":"Initializer","modules":[{"name":"Factory"}]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Container\/init()"},"kind":"symbol","abstract":[{"text":"Public initializer","type":"text"}],"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"()"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"schemaVersion":{"major":0,"patch":0,"minor":3},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container\/init()"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container"]]},"sections":[],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","navigatorTitle":[{"text":"Container","kind":"identifier"}],"title":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"role":"symbol","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/Container/init()":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/init()","url":"\/documentation\/factory\/container\/init()","fragments":[{"kind":"identifier","text":"init"},{"text":"()","kind":"text"}],"role":"symbol","title":"init()","kind":"symbol","abstract":[{"type":"text","text":"Public initializer"}]}}} \ No newline at end of file +{"metadata":{"fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"role":"symbol","roleHeading":"Initializer","externalID":"s:7Factory9ContainerCACycfc","title":"init()","symbolKind":"init","modules":[{"name":"Factory"}]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Container\/init()"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"init","kind":"keyword"},{"kind":"text","text":"()"}],"languages":["swift"]}]}],"variants":[{"paths":["\/documentation\/factory\/container\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","abstract":[{"type":"text","text":"Public initializer"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Container/init()":{"fragments":[{"kind":"identifier","text":"init"},{"text":"()","kind":"text"}],"kind":"symbol","type":"topic","title":"init()","url":"\/documentation\/factory\/container\/init()","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/init()","role":"symbol","abstract":[{"type":"text","text":"Public initializer"}]},"doc://Factory/documentation/Factory/Container":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","title":"Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"url":"\/documentation\/factory\/container","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}],"navigatorTitle":[{"text":"Container","kind":"identifier"}]}}} \ 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 73172ef3..c7e5727e 100644 --- a/docs/data/documentation/factory/container/managedcontainer-implementations.json +++ b/docs/data/documentation/factory/container/managedcontainer-implementations.json @@ -1 +1 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","interfaceLanguage":"swift"},"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"API Collection","role":"collectionGroup","title":"ManagedContainer Implementations"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container"]]},"variants":[{"paths":["\/documentation\/factory\/container\/managedcontainer-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"kind":"article","topicSections":[{"generated":true,"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-33sw2","doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-9b7qn","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(_:)"]}],"references":{"doc://Factory/documentation/Factory/Container/with(_:)":{"type":"topic","kind":"symbol","abstract":[{"text":"Defines a with function to allow container transformation on assignment.","type":"text"}],"title":"with(_:)","url":"\/documentation\/factory\/container\/with(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/with(_:)","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"with"},{"text":"((","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:s4Voida","kind":"typeIdentifier","text":"Void"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory/Container/reset(options:)":{"type":"topic","kind":"symbol","abstract":[{"text":"Defines a thread safe access mechanism to reset the container.","type":"text"}],"title":"reset(options:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/reset(options:)","url":"\/documentation\/factory\/container\/reset(options:)","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"text":"options","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}]},"doc://Factory/documentation/Factory/Container/promised(key:)-6682d":{"type":"topic","kind":"symbol","abstract":[{"text":"Syntactic sugar allows container to create a factory whose optional registration is promised before resolution.","type":"text"}],"title":"promised(key:)","url":"\/documentation\/factory\/container\/promised(key:)-6682d","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-6682d","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"promised","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"text":") -> ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?>"}]},"doc://Factory/documentation/Factory/Container/promised(key:)-7g95":{"type":"topic","kind":"symbol","abstract":[{"type":"text","text":"Syntactic sugar allows container to create a parameter factory whose optional registration is promised before resolution."}],"title":"promised(key:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-7g95","url":"\/documentation\/factory\/container\/promised(key:)-7g95","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"promised","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"kind":"text","text":") -> "},{"text":"ParameterFactory","kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}]},"doc://Factory/documentation/Factory/Container/callAsFunction(key:_:)-9b7qn":{"type":"topic","kind":"symbol","abstract":[{"text":"Syntactic sugar allows container to create a properly bound ParameterFactory.","type":"text"}],"title":"callAsFunction(key:_:)","url":"\/documentation\/factory\/container\/callasfunction(key:_:)-9b7qn","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-9b7qn","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"callAsFunction","kind":"identifier"},{"kind":"text","text":"<"},{"text":"P","kind":"genericParameter"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"kind":"text","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":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}]},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","navigatorTitle":[{"text":"Container","kind":"identifier"}],"title":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"role":"symbol","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Container/callAsFunction(key:_:)-33sw2":{"type":"topic","kind":"symbol","abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound Factory."}],"title":"callAsFunction(key:_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-33sw2","url":"\/documentation\/factory\/container\/callasfunction(key:_:)-33sw2","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier","text":"StaticString"},{"kind":"text","text":", () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}]},"doc://Factory/documentation/Factory/Container/decorator(_:)":{"type":"topic","kind":"symbol","abstract":[{"text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container.","type":"text"}],"title":"decorator(_:)","url":"\/documentation\/factory\/container\/decorator(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/decorator(_:)","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"decorator","kind":"identifier"},{"kind":"text","text":"((("},{"kind":"keyword","text":"Any"},{"kind":"text","text":") -> ())?)"}]}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container"]]},"sections":[],"kind":"article","topicSections":[{"generated":true,"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-33sw2","doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-9b7qn","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(_:)"],"title":"Instance Methods"}],"metadata":{"roleHeading":"API Collection","role":"collectionGroup","modules":[{"name":"Factory"}],"title":"ManagedContainer Implementations"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container\/managedcontainer-implementations"]}],"schemaVersion":{"patch":0,"minor":3,"major":0},"references":{"doc://Factory/documentation/Factory/Container":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","title":"Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"url":"\/documentation\/factory\/container","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}],"navigatorTitle":[{"text":"Container","kind":"identifier"}]},"doc://Factory/documentation/Factory/Container/reset(options:)":{"role":"symbol","abstract":[{"text":"Defines a thread safe access mechanism to reset the container.","type":"text"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","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"}],"kind":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/reset(options:)","title":"reset(options:)","url":"\/documentation\/factory\/container\/reset(options:)"},"doc://Factory/documentation/Factory/Container/callAsFunction(key:_:)-9b7qn":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"text":"<","kind":"text"},{"text":"P","kind":"genericParameter"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"text":", (","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"kind":"symbol","type":"topic","title":"callAsFunction(key:_:)","url":"\/documentation\/factory\/container\/callasfunction(key:_:)-9b7qn","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-9b7qn","role":"symbol","abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound ParameterFactory."}]},"doc://Factory/documentation/Factory/Container/with(_:)":{"title":"with(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/with(_:)","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"with"},{"kind":"text","text":"(("},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:s4Voida","kind":"typeIdentifier","text":"Void"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/container\/with(_:)","abstract":[{"text":"Defines a with function to allow container transformation on assignment.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Container/callAsFunction(key:_:)-33sw2":{"abstract":[{"text":"Syntactic sugar allows container to create a properly bound Factory.","type":"text"}],"title":"callAsFunction(key:_:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/callAsFunction(key:_:)-33sw2","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"text":", () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"url":"\/documentation\/factory\/container\/callasfunction(key:_:)-33sw2","kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Container/promised(key:)-6682d":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"text":"StaticString","preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?>","kind":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-6682d","abstract":[{"text":"Syntactic sugar allows container to create a factory whose optional registration is promised before resolution.","type":"text"}],"role":"symbol","url":"\/documentation\/factory\/container\/promised(key:)-6682d","kind":"symbol","title":"promised(key:)"},"doc://Factory/documentation/Factory/Container/promised(key:)-7g95":{"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a parameter factory whose optional registration is promised before resolution."}],"role":"symbol","fragments":[{"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"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"text":"StaticString","preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":"?>","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-7g95","title":"promised(key:)","url":"\/documentation\/factory\/container\/promised(key:)-7g95","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Container/decorator(_:)":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"text":"(((","kind":"text"},{"kind":"keyword","text":"Any"},{"text":") -> ())?)","kind":"text"}],"kind":"symbol","type":"topic","title":"decorator(_:)","url":"\/documentation\/factory\/container\/decorator(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/decorator(_:)","role":"symbol","abstract":[{"text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container.","type":"text"}]}}} \ 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 93a227cf..86beea34 100644 --- a/docs/data/documentation/factory/container/manager.json +++ b/docs/data/documentation/factory/container/manager.json @@ -1 +1 @@ -{"schemaVersion":{"minor":3,"major":0,"patch":0},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"text":"manager","kind":"identifier"},{"text":": ","kind":"text"},{"text":"ContainerManager","kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ContainerManagerC","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager"}],"platforms":["macOS"]}]}],"abstract":[{"type":"text","text":"Define the container’s manager."}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container\/manager"]}],"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/manager","interfaceLanguage":"swift"},"metadata":{"roleHeading":"Instance Property","title":"manager","symbolKind":"property","externalID":"s:7Factory9ContainerC7managerAA0B7ManagerCvp","fragments":[{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ContainerManagerC","text":"ContainerManager"}],"role":"symbol","modules":[{"name":"Factory"}]},"references":{"doc://Factory/documentation/Factory/Container/manager":{"fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"manager","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory16ContainerManagerC","text":"ContainerManager","kind":"typeIdentifier"}],"type":"topic","role":"symbol","title":"manager","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/manager","url":"\/documentation\/factory\/container\/manager","abstract":[{"type":"text","text":"Define the container’s manager."}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"type":"topic","kind":"symbol","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"title":"Factory","url":"\/documentation\/factory","identifier":"doc:\/\/Factory\/documentation\/Factory","role":"collection"},"doc://Factory/documentation/Factory/ContainerManager":{"kind":"symbol","navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ContainerManager"}],"url":"\/documentation\/factory\/containermanager"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","navigatorTitle":[{"text":"Container","kind":"identifier"}],"title":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"role":"symbol","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container\/manager"]}],"metadata":{"modules":[{"name":"Factory"}],"title":"manager","fragments":[{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"manager","kind":"identifier"},{"kind":"text","text":": "},{"text":"ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC","kind":"typeIdentifier"}],"roleHeading":"Instance Property","symbolKind":"property","role":"symbol","externalID":"s:7Factory9ContainerC7managerAA0B7ManagerCvp"},"sections":[],"abstract":[{"text":"Define the container’s manager.","type":"text"}],"schemaVersion":{"patch":0,"minor":3,"major":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Container\/manager"},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"manager","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","text":"ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/Container":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","title":"Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"url":"\/documentation\/factory\/container","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}],"navigatorTitle":[{"text":"Container","kind":"identifier"}]},"doc://Factory/documentation/Factory/Container/manager":{"fragments":[{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"manager","kind":"identifier"},{"text":": ","kind":"text"},{"text":"ContainerManager","kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ContainerManagerC"}],"kind":"symbol","type":"topic","title":"manager","url":"\/documentation\/factory\/container\/manager","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/manager","role":"symbol","abstract":[{"type":"text","text":"Define the container’s manager."}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"url":"\/documentation\/factory\/containermanager","navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"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/container/promised(key:)-6682d.json b/docs/data/documentation/factory/container/promised(key:)-6682d.json index 8b7c849f..415b0c73 100644 --- a/docs/data/documentation/factory/container/promised(key:)-6682d.json +++ b/docs/data/documentation/factory/container/promised(key:)-6682d.json @@ -1 +1 @@ -{"variants":[{"paths":["\/documentation\/factory\/container\/promised(key:)-6682d"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory whose optional registration is promised before resolution."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"text":" = ","kind":"text"},{"text":"#function","kind":"keyword"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?>"}],"languages":["swift"]}]},{"kind":"content","content":[{"type":"heading","level":2,"text":"Discussion","anchor":"discussion"},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public var accountLoader: Factory { promised() }","}"]},{"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","type":"text"},{"type":"text","text":" "},{"text":"inform you of the mistake. But in a released application, ","type":"text"},{"type":"codeVoice","code":"promised()"},{"text":" simply returns nil and your application can continue on.","type":"text"}]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-6682d"},"schemaVersion":{"minor":3,"major":0,"patch":0},"kind":"symbol","sections":[],"metadata":{"modules":[{"name":"Factory"}],"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","text":"StaticString","preciseIdentifier":"s:s12StaticStringV"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"title":"promised(key:)","role":"symbol","extendedModule":"Factory","roleHeading":"Instance Method","externalID":"s:7Factory16ManagedContainerPAAE8promised3keyA2AVyqd__SgGs12StaticStringV_tlF::SYNTHESIZED::s:7Factory9ContainerC","symbolKind":"method"},"references":{"doc://Factory/documentation/Factory/Container/promised(key:)-6682d":{"type":"topic","kind":"symbol","abstract":[{"text":"Syntactic sugar allows container to create a factory whose optional registration is promised before resolution.","type":"text"}],"title":"promised(key:)","url":"\/documentation\/factory\/container\/promised(key:)-6682d","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-6682d","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"promised","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"text":") -> ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?>"}]},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","navigatorTitle":[{"text":"Container","kind":"identifier"}],"title":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"role":"symbol","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"abstract":[],"type":"topic","kind":"article","title":"ManagedContainer Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","role":"collectionGroup","url":"\/documentation\/factory\/container\/managedcontainer-implementations"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"}}} \ No newline at end of file +{"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"promised","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":" = "},{"text":"#function","kind":"keyword"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}]}],"kind":"declarations"},{"kind":"content","content":[{"text":"Discussion","anchor":"discussion","type":"heading","level":2},{"syntax":"swift","type":"codeListing","code":["extension Container {"," public var accountLoader: Factory { promised() }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"When run in debug mode and the application attempts to resolve an unregistered accountLoader, "},{"type":"codeVoice","code":"promised()"},{"type":"text","text":" will trigger a fatalError to"},{"text":" ","type":"text"},{"text":"inform you of the mistake. But in a released application, ","type":"text"},{"type":"codeVoice","code":"promised()"},{"type":"text","text":" simply returns nil and your application can continue on."}]}]}],"metadata":{"role":"symbol","modules":[{"name":"Factory"}],"symbolKind":"method","extendedModule":"Factory","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"promised","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"StaticString","preciseIdentifier":"s:s12StaticStringV"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?>"}],"title":"promised(key:)","roleHeading":"Instance Method","externalID":"s:7Factory16ManagedContainerPAAE8promised3keyA2AVyqd__SgGs12StaticStringV_tlF::SYNTHESIZED::s:7Factory9ContainerC"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-6682d","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"text":"Syntactic sugar allows container to create a factory whose optional registration is promised before resolution.","type":"text"}],"variants":[{"paths":["\/documentation\/factory\/container\/promised(key:)-6682d"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/Container/promised(key:)-6682d":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"text":"StaticString","preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?>","kind":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-6682d","abstract":[{"text":"Syntactic sugar allows container to create a factory whose optional registration is promised before resolution.","type":"text"}],"role":"symbol","url":"\/documentation\/factory\/container\/promised(key:)-6682d","kind":"symbol","title":"promised(key:)"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"kind":"article","type":"topic","title":"ManagedContainer Implementations","url":"\/documentation\/factory\/container\/managedcontainer-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","role":"collectionGroup","abstract":[]},"doc://Factory/documentation/Factory/Container":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","title":"Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"url":"\/documentation\/factory\/container","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}],"navigatorTitle":[{"text":"Container","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 abd5e2eb..aebe5a33 100644 --- a/docs/data/documentation/factory/container/promised(key:)-7g95.json +++ b/docs/data/documentation/factory/container/promised(key:)-7g95.json @@ -1 +1 @@ -{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container\/promised(key:)-7g95"]}],"kind":"symbol","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 parameter factory whose optional registration is promised before resolution.","type":"text"}],"metadata":{"role":"symbol","extendedModule":"Factory","symbolKind":"method","roleHeading":"Instance Method","externalID":"s:7Factory16ManagedContainerPAAE8promised3keyAA09ParameterA0Vyqd__qd_0_SgGs12StaticStringV_tr0_lF::SYNTHESIZED::s:7Factory9ContainerC","title":"promised(key:)","modules":[{"name":"Factory"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"StaticString","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"text":"<","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}]},"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"promised"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","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":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","text":"ParameterFactory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?>"}],"languages":["swift"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"code":["extension Container {"," public var accountLoader: Factory { _ in promised() }","}"],"type":"codeListing","syntax":"swift"},{"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"},{"text":" ","type":"text"},{"type":"text","text":"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"}]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-7g95","interfaceLanguage":"swift"},"sections":[],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Container/promised(key:)-7g95":{"type":"topic","kind":"symbol","abstract":[{"type":"text","text":"Syntactic sugar allows container to create a parameter factory whose optional registration is promised before resolution."}],"title":"promised(key:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-7g95","url":"\/documentation\/factory\/container\/promised(key:)-7g95","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"promised","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"kind":"text","text":") -> "},{"text":"ParameterFactory","kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}]},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","navigatorTitle":[{"text":"Container","kind":"identifier"}],"title":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"role":"symbol","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"abstract":[],"type":"topic","kind":"article","title":"ManagedContainer Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","role":"collectionGroup","url":"\/documentation\/factory\/container\/managedcontainer-implementations"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"sections":[],"metadata":{"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"promised","kind":"identifier"},{"text":"<","kind":"text"},{"text":"P","kind":"genericParameter"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"StaticString","preciseIdentifier":"s:s12StaticStringV"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?>"}],"symbolKind":"method","title":"promised(key:)","roleHeading":"Instance Method","modules":[{"name":"Factory"}],"externalID":"s:7Factory16ManagedContainerPAAE8promised3keyAA09ParameterA0Vyqd__qd_0_SgGs12StaticStringV_tr0_lF::SYNTHESIZED::s:7Factory9ContainerC","extendedModule":"Factory"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-7g95","interfaceLanguage":"swift"},"schemaVersion":{"minor":3,"patch":0,"major":0},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container\/promised(key:)-7g95"]}],"abstract":[{"text":"Syntactic sugar allows container to create a parameter factory whose optional registration is promised before resolution.","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"promised","kind":"identifier"},{"kind":"text","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"},{"kind":"text","text":" = "},{"text":"#function","kind":"keyword"},{"text":") -> ","kind":"text"},{"text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?>","kind":"text"}],"languages":["swift"]}]},{"content":[{"anchor":"discussion","type":"heading","level":2,"text":"Discussion"},{"code":["extension Container {"," public var accountLoader: Factory { _ in promised() }","}"],"syntax":"swift","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","type":"text"},{"text":" ","type":"text"},{"text":"inform you of the mistake. But in a released application, ","type":"text"},{"code":"promised()","type":"codeVoice"},{"text":" simply returns nil and your application can continue on.","type":"text"}]}],"kind":"content"}],"references":{"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"kind":"article","type":"topic","title":"ManagedContainer Implementations","url":"\/documentation\/factory\/container\/managedcontainer-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","role":"collectionGroup","abstract":[]},"doc://Factory/documentation/Factory/Container/promised(key:)-7g95":{"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a parameter factory whose optional registration is promised before resolution."}],"role":"symbol","fragments":[{"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"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"text":"StaticString","preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":"?>","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/promised(key:)-7g95","title":"promised(key:)","url":"\/documentation\/factory\/container\/promised(key:)-7g95","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Container":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","title":"Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"url":"\/documentation\/factory\/container","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}],"navigatorTitle":[{"text":"Container","kind":"identifier"}]}}} \ 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 2d54808b..ff440aee 100644 --- a/docs/data/documentation/factory/container/reset(options:).json +++ b/docs/data/documentation/factory/container/reset(options:).json @@ -1 +1 @@ -{"schemaVersion":{"patch":0,"minor":3,"major":0},"abstract":[{"type":"text","text":"Defines a thread safe access mechanism to reset the container."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/reset(options:)","interfaceLanguage":"swift"},"metadata":{"extendedModule":"Factory","roleHeading":"Instance Method","title":"reset(options:)","modules":[{"name":"Factory"}],"externalID":"s:7Factory16ManagedContainerPAAE5reset7optionsyAA0A12ResetOptionsO_tF::SYNTHESIZED::s:7Factory9ContainerC","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"text":"options","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"symbolKind":"method","role":"symbol"},"variants":[{"paths":["\/documentation\/factory\/container\/reset(options:)"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"reset","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"options"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","text":"FactoryResetOptions"},{"kind":"text","text":" = .all)"}],"platforms":["macOS"],"languages":["swift"]}]}],"sections":[],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"type":"topic","title":"ManagedContainer Implementations","abstract":[],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","url":"\/documentation\/factory\/container\/managedcontainer-implementations","role":"collectionGroup"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","navigatorTitle":[{"text":"Container","kind":"identifier"}],"title":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"role":"symbol","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"title":"FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}]},"doc://Factory/documentation/Factory/Container/reset(options:)":{"type":"topic","kind":"symbol","abstract":[{"text":"Defines a thread safe access mechanism to reset the container.","type":"text"}],"title":"reset(options:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/reset(options:)","url":"\/documentation\/factory\/container\/reset(options:)","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"text":"options","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}]}}} \ No newline at end of file +{"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/reset(options:)","interfaceLanguage":"swift"},"metadata":{"roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"text":"options","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"text":")","kind":"text"}],"symbolKind":"method","externalID":"s:7Factory16ManagedContainerPAAE5reset7optionsyAA0A12ResetOptionsO_tF::SYNTHESIZED::s:7Factory9ContainerC","modules":[{"name":"Factory"}],"extendedModule":"Factory","title":"reset(options:)","role":"symbol"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"text":"options","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":" = .all)"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"patch":0,"minor":3,"major":0},"variants":[{"paths":["\/documentation\/factory\/container\/reset(options:)"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"text":"Defines a thread safe access mechanism to reset the container.","type":"text"}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"title":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","type":"topic","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Container":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","title":"Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"url":"\/documentation\/factory\/container","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}],"navigatorTitle":[{"text":"Container","kind":"identifier"}]},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"kind":"article","type":"topic","title":"ManagedContainer Implementations","url":"\/documentation\/factory\/container\/managedcontainer-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","role":"collectionGroup","abstract":[]},"doc://Factory/documentation/Factory/Container/reset(options:)":{"role":"symbol","abstract":[{"text":"Defines a thread safe access mechanism to reset the container.","type":"text"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","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"}],"kind":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/reset(options:)","title":"reset(options:)","url":"\/documentation\/factory\/container\/reset(options:)"}}} \ 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 e6db6dbb..15b4fc8b 100644 --- a/docs/data/documentation/factory/container/shared.json +++ b/docs/data/documentation/factory/container/shared.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"kind":"text","text":": "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","preciseIdentifier":"s:7Factory9ContainerC","text":"Container","kind":"typeIdentifier"}]}]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","abstract":[{"type":"text","text":"Define the default shared container."}],"metadata":{"fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"}],"symbolKind":"property","title":"shared","role":"symbol","externalID":"s:7Factory9ContainerC6sharedACvpZ","modules":[{"name":"Factory"}],"roleHeading":"Type Property"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container\/shared"]}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/shared","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container"]]},"references":{"doc://Factory/documentation/Factory/Container":{"kind":"symbol","navigatorTitle":[{"text":"Container","kind":"identifier"}],"title":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"role":"symbol","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/Container/shared":{"abstract":[{"type":"text","text":"Define the default shared container."}],"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","kind":"typeIdentifier","text":"Container"}],"type":"topic","title":"shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/shared","url":"\/documentation\/factory\/container\/shared","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"kind":"text","text":": "},{"text":"Container","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","preciseIdentifier":"s:7Factory9ContainerC"}],"platforms":["macOS"],"languages":["swift"]}]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container\/shared"]}],"metadata":{"externalID":"s:7Factory9ContainerC6sharedACvpZ","role":"symbol","modules":[{"name":"Factory"}],"roleHeading":"Type Property","title":"shared","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory9ContainerC","text":"Container","kind":"typeIdentifier"}],"symbolKind":"property"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Container\/shared","interfaceLanguage":"swift"},"sections":[],"abstract":[{"type":"text","text":"Define the default shared container."}],"references":{"doc://Factory/documentation/Factory/Container":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","title":"Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"url":"\/documentation\/factory\/container","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}],"navigatorTitle":[{"text":"Container","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Container/shared":{"fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory9ContainerC","text":"Container","kind":"typeIdentifier"}],"kind":"symbol","type":"topic","title":"shared","url":"\/documentation\/factory\/container\/shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/shared","role":"symbol","abstract":[{"type":"text","text":"Define the default shared container."}]}}} \ 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 266fcad5..915991e8 100644 --- a/docs/data/documentation/factory/container/with(_:).json +++ b/docs/data/documentation/factory/container/with(_:).json @@ -1 +1 @@ -{"metadata":{"symbolKind":"method","roleHeading":"Instance Method","externalID":"s:7Factory16ManagedContainerPAAE4withyxyxXEF::SYNTHESIZED::s:7Factory9ContainerC","extendedModule":"Factory","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"with","kind":"identifier"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"text":") -> ","kind":"text"},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"with(_:)","modules":[{"name":"Factory"}],"role":"symbol"},"abstract":[{"type":"text","text":"Defines a with function to allow container transformation on assignment."}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container\/with(_:)"]}],"kind":"symbol","sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Container\/with(_:)"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"with"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"transform","kind":"internalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"schemaVersion":{"patch":0,"minor":3,"major":0},"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Container/with(_:)":{"type":"topic","kind":"symbol","abstract":[{"text":"Defines a with function to allow container transformation on assignment.","type":"text"}],"title":"with(_:)","url":"\/documentation\/factory\/container\/with(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/with(_:)","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"with"},{"text":"((","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:s4Voida","kind":"typeIdentifier","text":"Void"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","navigatorTitle":[{"text":"Container","kind":"identifier"}],"title":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"role":"symbol","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"abstract":[],"type":"topic","kind":"article","title":"ManagedContainer Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","role":"collectionGroup","url":"\/documentation\/factory\/container\/managedcontainer-implementations"}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/container\/with(_:)"]}],"sections":[],"kind":"symbol","abstract":[{"type":"text","text":"Defines a with function to allow container transformation on assignment."}],"schemaVersion":{"patch":0,"minor":3,"major":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Container","doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations"]]},"metadata":{"extendedModule":"Factory","title":"with(_:)","role":"symbol","externalID":"s:7Factory16ManagedContainerPAAE4withyxyxXEF::SYNTHESIZED::s:7Factory9ContainerC","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"with"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"roleHeading":"Instance Method","modules":[{"name":"Factory"}],"symbolKind":"method"},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"with","kind":"identifier"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"transform","kind":"internalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:s4Voida","kind":"typeIdentifier","text":"Void"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Container\/with(_:)"},"references":{"doc://Factory/documentation/Factory/Container/with(_:)":{"title":"with(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/with(_:)","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"with"},{"kind":"text","text":"(("},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:s4Voida","kind":"typeIdentifier","text":"Void"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/container\/with(_:)","abstract":[{"text":"Defines a with function to allow container transformation on assignment.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Container":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","title":"Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"url":"\/documentation\/factory\/container","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}],"navigatorTitle":[{"text":"Container","kind":"identifier"}]},"doc://Factory/documentation/Factory/Container/ManagedContainer-Implementations":{"kind":"article","type":"topic","title":"ManagedContainer Implementations","url":"\/documentation\/factory\/container\/managedcontainer-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container\/ManagedContainer-Implementations","role":"collectionGroup","abstract":[]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/containermanager.json b/docs/data/documentation/factory/containermanager.json index 40c6137e..706b8f8c 100644 --- a/docs/data/documentation/factory/containermanager.json +++ b/docs/data/documentation/factory/containermanager.json @@ -1 +1 @@ -{"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"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."}],"schemaVersion":{"minor":3,"major":0,"patch":0},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/init()"]},{"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"}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/s8SendableP"],"kind":"relationships","type":"conformsTo","title":"Conforms To"}],"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/containermanager"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"roleHeading":"Class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"symbolKind":"class","title":"ContainerManager","navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"externalID":"s:7Factory16ContainerManagerC","modules":[{"name":"Factory"}],"role":"symbol"},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"final","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"kind":"content","content":[{"level":2,"text":"Overview","anchor":"overview","type":"heading"},{"inlineContent":[{"text":"Every container requires a ContainerManager.","type":"text"}],"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":[{"type":"text","text":"Those functions are designed primarily for testing."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Class is @unchecked Sendable as all public state is managed via global locking mechanisms"}]}]}],"references":{"doc://Factory/documentation/Factory/ContainerManager/trace":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/trace","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"trace","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}],"abstract":[{"text":"Public var enabling factory resolution trace statements in debug mode for ALL containers.","type":"text"}],"title":"trace","kind":"symbol","url":"\/documentation\/factory\/containermanager\/trace","role":"symbol"},"doc://Factory/documentation/Factory/ContainerManager/push()":{"type":"topic","abstract":[{"type":"text","text":"Test function pushes the current registration and cache states"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"push","kind":"identifier"},{"text":"()","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/push()","title":"push()","url":"\/documentation\/factory\/containermanager\/push()"},"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"kind":"symbol","url":"\/documentation\/factory\/containermanager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","title":"ContainerManager","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"role":"symbol","type":"topic"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ContainerManager/logger":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/logger","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"logger","kind":"identifier"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":") -> "},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"}],"abstract":[{"text":"Public access to logging facility in debug mode for ALL containers.","type":"text"}],"title":"logger","kind":"symbol","url":"\/documentation\/factory\/containermanager\/logger","role":"symbol"},"doc://Factory/documentation/Factory/ContainerManager/init()":{"url":"\/documentation\/factory\/containermanager\/init()","abstract":[{"type":"text","text":"Public initializer"}],"type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/init()","title":"init()","role":"symbol","fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}]},"doc://Factory/documentation/Factory/ContainerManager/defaultScope":{"type":"topic","title":"defaultScope","abstract":[{"text":"Default scope","type":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/defaultScope","url":"\/documentation\/factory\/containermanager\/defaultscope","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"defaultScope"},{"text":": ","kind":"text"},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?"}]},"doc://Factory/s8SendableP":{"identifier":"doc:\/\/Factory\/s8SendableP","type":"unresolvable","title":"Swift.Sendable"},"doc://Factory/documentation/Factory/ContainerManager/reset(options:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(options:)","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"text":"options","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":")"}],"abstract":[{"text":"Resets the Container to its original state, removing all registrations and clearing all scope caches.","type":"text"}],"title":"reset(options:)","kind":"symbol","url":"\/documentation\/factory\/containermanager\/reset(options:)","role":"symbol"},"doc://Factory/documentation/Factory/ContainerManager/promiseTriggersError":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/promiseTriggersError","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"promiseTriggersError","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"abstract":[{"text":"Public variable promise behavior","type":"text"}],"title":"promiseTriggersError","kind":"symbol","url":"\/documentation\/factory\/containermanager\/promisetriggerserror","role":"symbol"},"doc://Factory/documentation/Factory/ContainerManager/dependencyChainTestMax":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/dependencyChainTestMax","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"dependencyChainTestMax","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"}],"abstract":[{"text":"Public variable exposing dependency chain test maximum","type":"text"}],"title":"dependencyChainTestMax","kind":"symbol","url":"\/documentation\/factory\/containermanager\/dependencychaintestmax","role":"symbol"},"doc://Factory/documentation/Factory/ContainerManager/reset(scope:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(scope:)","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"reset","kind":"identifier"},{"text":"(","kind":"text"},{"text":"scope","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier","text":"Scope"},{"text":")","kind":"text"}],"abstract":[{"text":"Clears any cached values associated with a specific scope, leaving the other scope caches intact.","type":"text"}],"title":"reset(scope:)","kind":"symbol","url":"\/documentation\/factory\/containermanager\/reset(scope:)","role":"symbol"},"doc://Factory/documentation/Factory/ContainerManager/pop()":{"role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"pop","kind":"identifier"},{"text":"()","kind":"text"}],"type":"topic","kind":"symbol","title":"pop()","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/pop()","abstract":[{"type":"text","text":"Test function pops and restores a previously pushed registration and cache state"}],"url":"\/documentation\/factory\/containermanager\/pop()"}}} \ No newline at end of file +{"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"final"},{"text":" ","kind":"text"},{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"ContainerManager","kind":"identifier"}]}],"kind":"declarations"},{"content":[{"anchor":"overview","level":2,"type":"heading","text":"Overview"},{"inlineContent":[{"type":"text","text":"Every container requires a ContainerManager."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"ContainerManager also implements several functions that can be used to reset the container"},{"type":"text","text":" "},{"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":[{"text":"Those functions are designed primarily for testing.","type":"text"}]},{"inlineContent":[{"type":"text","text":"Class is @unchecked Sendable as all public state is managed via global locking mechanisms"}],"type":"paragraph"}],"kind":"content"}],"kind":"symbol","topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/init()"]},{"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"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/s8SendableP"],"type":"conformsTo","kind":"relationships","title":"Conforms To"}],"sections":[],"metadata":{"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"modules":[{"name":"Factory"}],"symbolKind":"class","roleHeading":"Class","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ContainerManager"}],"title":"ContainerManager","externalID":"s:7Factory16ContainerManagerC"},"variants":[{"paths":["\/documentation\/factory\/containermanager"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","interfaceLanguage":"swift"},"abstract":[{"text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container.","type":"text"}],"schemaVersion":{"major":0,"patch":0,"minor":3},"references":{"doc://Factory/documentation/Factory/ContainerManager/defaultScope":{"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"defaultScope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"text":"?","kind":"text"}],"abstract":[{"text":"Default scope","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/defaultScope","type":"topic","title":"defaultScope","kind":"symbol","url":"\/documentation\/factory\/containermanager\/defaultscope","role":"symbol"},"doc://Factory/documentation/Factory/ContainerManager/pop()":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/pop()","kind":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"pop"},{"kind":"text","text":"()"}],"url":"\/documentation\/factory\/containermanager\/pop()","abstract":[{"type":"text","text":"Test function pops and restores a previously pushed registration and cache state"}],"title":"pop()"},"doc://Factory/documentation/Factory/ContainerManager/reset(options:)":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(options:)","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"text":"options","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"text":")","kind":"text"}],"url":"\/documentation\/factory\/containermanager\/reset(options:)","abstract":[{"type":"text","text":"Resets the Container to its original state, removing all registrations and clearing all scope caches."}],"title":"reset(options:)"},"doc://Factory/documentation/Factory/ContainerManager/push()":{"url":"\/documentation\/factory\/containermanager\/push()","abstract":[{"text":"Test function pushes the current registration and cache states","type":"text"}],"type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/push()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"push","kind":"identifier"},{"kind":"text","text":"()"}],"role":"symbol","title":"push()"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ContainerManager/init()":{"url":"\/documentation\/factory\/containermanager\/init()","abstract":[{"type":"text","text":"Public initializer"}],"type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/init()","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"role":"symbol","title":"init()"},"doc://Factory/documentation/Factory/ContainerManager/logger":{"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"logger","kind":"identifier"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"text":"Void","preciseIdentifier":"s:s4Voida","kind":"typeIdentifier"}],"title":"logger","type":"topic","url":"\/documentation\/factory\/containermanager\/logger","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/logger","kind":"symbol","abstract":[{"type":"text","text":"Public access to logging facility in debug mode for ALL containers."}],"role":"symbol"},"doc://Factory/documentation/Factory/ContainerManager/promiseTriggersError":{"url":"\/documentation\/factory\/containermanager\/promisetriggerserror","abstract":[{"text":"Public variable promise behavior","type":"text"}],"type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/promiseTriggersError","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"promiseTriggersError"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}],"role":"symbol","title":"promiseTriggersError"},"doc://Factory/documentation/Factory/ContainerManager/dependencyChainTestMax":{"url":"\/documentation\/factory\/containermanager\/dependencychaintestmax","abstract":[{"text":"Public variable exposing dependency chain test maximum","type":"text"}],"type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/dependencyChainTestMax","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"dependencyChainTestMax","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Int","kind":"typeIdentifier","preciseIdentifier":"s:Si"}],"role":"symbol","title":"dependencyChainTestMax"},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"url":"\/documentation\/factory\/containermanager","navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}]},"doc://Factory/s8SendableP":{"type":"unresolvable","identifier":"doc:\/\/Factory\/s8SendableP","title":"Swift.Sendable"},"doc://Factory/documentation/Factory/ContainerManager/trace":{"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","type":"topic","url":"\/documentation\/factory\/containermanager\/trace","role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"trace"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"}]},"doc://Factory/documentation/Factory/ContainerManager/reset(scope:)":{"kind":"symbol","title":"reset(scope:)","abstract":[{"type":"text","text":"Clears any cached values associated with a specific scope, leaving the other scope caches intact."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(scope:)","type":"topic","url":"\/documentation\/factory\/containermanager\/reset(scope:)","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"text":"(","kind":"text"},{"text":"scope","kind":"externalParam"},{"kind":"text","text":": "},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":")"}]}}} \ 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 d93bc151..d2397183 100644 --- a/docs/data/documentation/factory/containermanager/defaultscope.json +++ b/docs/data/documentation/factory/containermanager/defaultscope.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"abstract":[{"type":"text","text":"Default scope"}],"metadata":{"symbolKind":"property","role":"symbol","roleHeading":"Instance Property","modules":[{"name":"Factory"}],"title":"defaultScope","externalID":"s:7Factory16ContainerManagerC12defaultScopeAA0E0CSgvp","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"defaultScope"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier","text":"Scope"},{"kind":"text","text":"?"}]},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"defaultScope"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"? { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"text":" }","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"schemaVersion":{"minor":3,"major":0,"patch":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/defaultScope"},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager\/defaultscope"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"kind":"symbol","url":"\/documentation\/factory\/containermanager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","title":"ContainerManager","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"role":"symbol","type":"topic"},"doc://Factory/documentation/Factory/ContainerManager/defaultScope":{"type":"topic","title":"defaultScope","abstract":[{"text":"Default scope","type":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/defaultScope","url":"\/documentation\/factory\/containermanager\/defaultscope","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"defaultScope"},{"text":": ","kind":"text"},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"?"}]}}} \ No newline at end of file +{"schemaVersion":{"minor":3,"major":0,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"defaultScope","kind":"identifier"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"? { "},{"text":"get","kind":"keyword"},{"text":" ","kind":"text"},{"text":"set","kind":"keyword"},{"kind":"text","text":" }"}],"platforms":["macOS"],"languages":["swift"]}]}],"abstract":[{"type":"text","text":"Default scope"}],"variants":[{"paths":["\/documentation\/factory\/containermanager\/defaultscope"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"role":"symbol","externalID":"s:7Factory16ContainerManagerC12defaultScopeAA0E0CSgvp","symbolKind":"property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"defaultScope"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"text":"?","kind":"text"}],"roleHeading":"Instance Property","title":"defaultScope","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/defaultScope"},"kind":"symbol","sections":[],"references":{"doc://Factory/documentation/Factory/ContainerManager/defaultScope":{"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"defaultScope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"text":"?","kind":"text"}],"abstract":[{"text":"Default scope","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/defaultScope","type":"topic","title":"defaultScope","kind":"symbol","url":"\/documentation\/factory\/containermanager\/defaultscope","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"url":"\/documentation\/factory\/containermanager","navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}]},"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]}}} \ 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 450ea260..0f75c5ad 100644 --- a/docs/data/documentation/factory/containermanager/dependencychaintestmax.json +++ b/docs/data/documentation/factory/containermanager/dependencychaintestmax.json @@ -1 +1 @@ -{"schemaVersion":{"minor":3,"patch":0,"major":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/dependencyChainTestMax","interfaceLanguage":"swift"},"kind":"symbol","sections":[],"abstract":[{"type":"text","text":"Public variable exposing dependency chain test maximum"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"dependencyChainTestMax"},{"text":": ","kind":"text"},{"text":"Int","preciseIdentifier":"s:Si","kind":"typeIdentifier"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"text":" ","kind":"text"},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"platforms":["macOS"]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/containermanager\/dependencychaintestmax"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"title":"dependencyChainTestMax","role":"symbol","symbolKind":"property","externalID":"s:7Factory16ContainerManagerC22dependencyChainTestMaxSivp","roleHeading":"Instance Property","modules":[{"name":"Factory"}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"dependencyChainTestMax","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Si","kind":"typeIdentifier","text":"Int"}]},"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"kind":"symbol","url":"\/documentation\/factory\/containermanager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","title":"ContainerManager","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"role":"symbol","type":"topic"},"doc://Factory/documentation/Factory/ContainerManager/dependencyChainTestMax":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/dependencyChainTestMax","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"dependencyChainTestMax","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"}],"abstract":[{"text":"Public variable exposing dependency chain test maximum","type":"text"}],"title":"dependencyChainTestMax","kind":"symbol","url":"\/documentation\/factory\/containermanager\/dependencychaintestmax","role":"symbol"}}} \ No newline at end of file +{"abstract":[{"type":"text","text":"Public variable exposing dependency chain test maximum"}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"dependencyChainTestMax"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"text":"set","kind":"keyword"},{"text":" }","kind":"text"}],"platforms":["macOS"]}],"kind":"declarations"}],"kind":"symbol","metadata":{"externalID":"s:7Factory16ContainerManagerC22dependencyChainTestMaxSivp","roleHeading":"Instance Property","symbolKind":"property","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"dependencyChainTestMax","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Int","kind":"typeIdentifier","preciseIdentifier":"s:Si"}],"modules":[{"name":"Factory"}],"role":"symbol","title":"dependencyChainTestMax"},"schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/dependencyChainTestMax"},"variants":[{"paths":["\/documentation\/factory\/containermanager\/dependencychaintestmax"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/ContainerManager/dependencyChainTestMax":{"url":"\/documentation\/factory\/containermanager\/dependencychaintestmax","abstract":[{"text":"Public variable exposing dependency chain test maximum","type":"text"}],"type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/dependencyChainTestMax","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"dependencyChainTestMax","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Int","kind":"typeIdentifier","preciseIdentifier":"s:Si"}],"role":"symbol","title":"dependencyChainTestMax"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"url":"\/documentation\/factory\/containermanager","navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"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/containermanager/init().json b/docs/data/documentation/factory/containermanager/init().json index 4b48de08..09bcc004 100644 --- a/docs/data/documentation/factory/containermanager/init().json +++ b/docs/data/documentation/factory/containermanager/init().json @@ -1 +1 @@ -{"metadata":{"externalID":"s:7Factory16ContainerManagerCACycfc","symbolKind":"init","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"roleHeading":"Initializer","role":"symbol","modules":[{"name":"Factory"}],"title":"init()"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/containermanager\/init()"]}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"init"},{"text":"()","kind":"text"}],"languages":["swift"]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/init()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Public initializer"}],"kind":"symbol","sections":[],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"kind":"symbol","url":"\/documentation\/factory\/containermanager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","title":"ContainerManager","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"role":"symbol","type":"topic"},"doc://Factory/documentation/Factory/ContainerManager/init()":{"url":"\/documentation\/factory\/containermanager\/init()","abstract":[{"type":"text","text":"Public initializer"}],"type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/init()","title":"init()","role":"symbol","fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}]}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/containermanager\/init()"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/init()"},"schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"roleHeading":"Initializer","modules":[{"name":"Factory"}],"symbolKind":"init","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"title":"init()","externalID":"s:7Factory16ContainerManagerCACycfc","role":"symbol"},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"abstract":[{"text":"Public initializer","type":"text"}],"sections":[],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"init","kind":"keyword"},{"kind":"text","text":"()"}]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory/ContainerManager/init()":{"url":"\/documentation\/factory\/containermanager\/init()","abstract":[{"type":"text","text":"Public initializer"}],"type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/init()","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"role":"symbol","title":"init()"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"url":"\/documentation\/factory\/containermanager","navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"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/containermanager/logger.json b/docs/data/documentation/factory/containermanager/logger.json index ec2a67d6..d66ff130 100644 --- a/docs/data/documentation/factory/containermanager/logger.json +++ b/docs/data/documentation/factory/containermanager/logger.json @@ -1 +1 @@ -{"abstract":[{"type":"text","text":"Public access to logging facility in debug mode for ALL containers."}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/containermanager\/logger"]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"kind":"symbol","sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/logger","interfaceLanguage":"swift"},"metadata":{"roleHeading":"Instance Property","modules":[{"name":"Factory"}],"externalID":"s:7Factory16ContainerManagerC6loggeryySScvp","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"logger"},{"text":": (","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:s4Voida","text":"Void","kind":"typeIdentifier"}],"title":"logger","role":"symbol","symbolKind":"property"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"logger","kind":"identifier"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"text":"set","kind":"keyword"},{"text":" }","kind":"text"}],"languages":["swift"]}]}],"references":{"doc://Factory/documentation/Factory/ContainerManager/logger":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/logger","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"logger","kind":"identifier"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":") -> "},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"}],"abstract":[{"text":"Public access to logging facility in debug mode for ALL containers.","type":"text"}],"title":"logger","kind":"symbol","url":"\/documentation\/factory\/containermanager\/logger","role":"symbol"},"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"kind":"symbol","url":"\/documentation\/factory\/containermanager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","title":"ContainerManager","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"role":"symbol","type":"topic"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"logger","kind":"identifier"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":") -> ","kind":"text"},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":" { "},{"text":"get","kind":"keyword"},{"kind":"text","text":" "},{"text":"set","kind":"keyword"},{"text":" }","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"metadata":{"title":"logger","externalID":"s:7Factory16ContainerManagerC6loggeryySScvp","symbolKind":"property","modules":[{"name":"Factory"}],"roleHeading":"Instance Property","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"logger"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":") -> ","kind":"text"},{"text":"Void","preciseIdentifier":"s:s4Voida","kind":"typeIdentifier"}],"role":"symbol"},"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager\/logger"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/logger","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Public access to logging facility in debug mode for ALL containers."}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"url":"\/documentation\/factory\/containermanager","navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}]},"doc://Factory/documentation/Factory/ContainerManager/logger":{"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"logger","kind":"identifier"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":") -> "},{"text":"Void","preciseIdentifier":"s:s4Voida","kind":"typeIdentifier"}],"title":"logger","type":"topic","url":"\/documentation\/factory\/containermanager\/logger","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/logger","kind":"symbol","abstract":[{"type":"text","text":"Public access to logging facility in debug mode for ALL containers."}],"role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 38e1b950..1b89e6eb 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"]]},"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"pop","kind":"identifier"},{"text":"()","kind":"text"}],"languages":["swift"]}]}],"metadata":{"role":"symbol","symbolKind":"method","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"pop","kind":"identifier"},{"text":"()","kind":"text"}],"title":"pop()","extendedModule":"Factory","roleHeading":"Instance Method","modules":[{"name":"Factory"}],"externalID":"s:7Factory16ContainerManagerC3popyyF"},"sections":[],"schemaVersion":{"minor":3,"major":0,"patch":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/pop()","interfaceLanguage":"swift"},"abstract":[{"text":"Test function pops and restores a previously pushed registration and cache state","type":"text"}],"variants":[{"paths":["\/documentation\/factory\/containermanager\/pop()"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"kind":"symbol","url":"\/documentation\/factory\/containermanager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","title":"ContainerManager","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"role":"symbol","type":"topic"},"doc://Factory/documentation/Factory/ContainerManager/pop()":{"role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"pop","kind":"identifier"},{"text":"()","kind":"text"}],"type":"topic","kind":"symbol","title":"pop()","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/pop()","abstract":[{"type":"text","text":"Test function pops and restores a previously pushed registration and cache state"}],"url":"\/documentation\/factory\/containermanager\/pop()"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"pop","kind":"identifier"},{"text":"()","kind":"text"}],"platforms":["macOS"]}]}],"sections":[],"metadata":{"roleHeading":"Instance Method","title":"pop()","symbolKind":"method","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"pop","kind":"identifier"},{"text":"()","kind":"text"}],"modules":[{"name":"Factory"}],"externalID":"s:7Factory16ContainerManagerC3popyyF","extendedModule":"Factory"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/pop()"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/containermanager\/pop()"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"type":"text","text":"Test function pops and restores a previously pushed registration and cache state"}],"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory/ContainerManager/pop()":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/pop()","kind":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"pop"},{"kind":"text","text":"()"}],"url":"\/documentation\/factory\/containermanager\/pop()","abstract":[{"type":"text","text":"Test function pops and restores a previously pushed registration and cache state"}],"title":"pop()"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"url":"\/documentation\/factory\/containermanager","navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"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/containermanager/promisetriggerserror.json b/docs/data/documentation/factory/containermanager/promisetriggerserror.json index 71d13d50..10aa16f7 100644 --- a/docs/data/documentation/factory/containermanager/promisetriggerserror.json +++ b/docs/data/documentation/factory/containermanager/promisetriggerserror.json @@ -1 +1 @@ -{"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager\/promisetriggerserror"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"text":"Public variable promise behavior","type":"text"}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"promiseTriggersError"},{"kind":"text","text":": "},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" ","kind":"text"},{"kind":"keyword","text":"set"},{"text":" }","kind":"text"}],"languages":["swift"]}]}],"metadata":{"roleHeading":"Instance Property","symbolKind":"property","title":"promiseTriggersError","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"promiseTriggersError"},{"text":": ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"externalID":"s:7Factory16ContainerManagerC20promiseTriggersErrorSbvp","modules":[{"name":"Factory"}],"role":"symbol"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/promiseTriggersError","interfaceLanguage":"swift"},"schemaVersion":{"patch":0,"minor":3,"major":0},"references":{"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"kind":"symbol","url":"\/documentation\/factory\/containermanager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","title":"ContainerManager","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"role":"symbol","type":"topic"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ContainerManager/promiseTriggersError":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/promiseTriggersError","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"promiseTriggersError","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"abstract":[{"text":"Public variable promise behavior","type":"text"}],"title":"promiseTriggersError","kind":"symbol","url":"\/documentation\/factory\/containermanager\/promisetriggerserror","role":"symbol"}}} \ No newline at end of file +{"schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"kind":"symbol","abstract":[{"type":"text","text":"Public variable promise behavior"}],"metadata":{"externalID":"s:7Factory16ContainerManagerC20promiseTriggersErrorSbvp","roleHeading":"Instance Property","symbolKind":"property","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"promiseTriggersError"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"}],"modules":[{"name":"Factory"}],"role":"symbol","title":"promiseTriggersError"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"promiseTriggersError","kind":"identifier"},{"kind":"text","text":": "},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"text":"set","kind":"keyword"},{"kind":"text","text":" }"}],"languages":["swift"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/containermanager\/promisetriggerserror"]}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/promiseTriggersError","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ContainerManager/promiseTriggersError":{"url":"\/documentation\/factory\/containermanager\/promisetriggerserror","abstract":[{"text":"Public variable promise behavior","type":"text"}],"type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/promiseTriggersError","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"promiseTriggersError"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}],"role":"symbol","title":"promiseTriggersError"},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"url":"\/documentation\/factory\/containermanager","navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"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/containermanager/push().json b/docs/data/documentation/factory/containermanager/push().json index 04a812f6..378d8f05 100644 --- a/docs/data/documentation/factory/containermanager/push().json +++ b/docs/data/documentation/factory/containermanager/push().json @@ -1 +1 @@ -{"abstract":[{"text":"Test function pushes the current registration and cache states","type":"text"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/push()","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"push","kind":"identifier"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"schemaVersion":{"patch":0,"minor":3,"major":0},"metadata":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"push"},{"kind":"text","text":"()"}],"title":"push()","roleHeading":"Instance Method","symbolKind":"method","extendedModule":"Factory","modules":[{"name":"Factory"}],"externalID":"s:7Factory16ContainerManagerC4pushyyF","role":"symbol"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/containermanager\/push()"]}],"sections":[],"references":{"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"kind":"symbol","url":"\/documentation\/factory\/containermanager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","title":"ContainerManager","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"role":"symbol","type":"topic"},"doc://Factory/documentation/Factory/ContainerManager/push()":{"type":"topic","abstract":[{"type":"text","text":"Test function pushes the current registration and cache states"}],"kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"push","kind":"identifier"},{"text":"()","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/push()","title":"push()","url":"\/documentation\/factory\/containermanager\/push()"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"push","kind":"identifier"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/containermanager\/push()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/push()","interfaceLanguage":"swift"},"sections":[],"abstract":[{"text":"Test function pushes the current registration and cache states","type":"text"}],"metadata":{"externalID":"s:7Factory16ContainerManagerC4pushyyF","roleHeading":"Instance Method","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"push"},{"text":"()","kind":"text"}],"extendedModule":"Factory","modules":[{"name":"Factory"}],"role":"symbol","title":"push()"},"kind":"symbol","references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ContainerManager/push()":{"url":"\/documentation\/factory\/containermanager\/push()","abstract":[{"text":"Test function pushes the current registration and cache states","type":"text"}],"type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/push()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"push","kind":"identifier"},{"kind":"text","text":"()"}],"role":"symbol","title":"push()"},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"url":"\/documentation\/factory\/containermanager","navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"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/containermanager/reset(options:).json b/docs/data/documentation/factory/containermanager/reset(options:).json index e710e37b..03627b00 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"}]}],"sections":[],"abstract":[{"text":"Resets the Container to its original state, removing all registrations and clearing all scope caches.","type":"text"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"reset","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"options"},{"text":": ","kind":"text"},{"text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"typeIdentifier"},{"text":" = .all)","kind":"text"}],"languages":["swift"]}],"kind":"declarations"}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(options:)"},"metadata":{"role":"symbol","externalID":"s:7Factory16ContainerManagerC5reset7optionsyAA0A12ResetOptionsO_tF","modules":[{"name":"Factory"}],"title":"reset(options:)","roleHeading":"Instance Method","symbolKind":"method","extendedModule":"Factory","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"},{"kind":"text","text":")"}]},"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"title":"FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}]},"doc://Factory/documentation/Factory/ContainerManager/reset(options:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(options:)","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"text":"options","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":")"}],"abstract":[{"text":"Resets the Container to its original state, removing all registrations and clearing all scope caches.","type":"text"}],"title":"reset(options:)","kind":"symbol","url":"\/documentation\/factory\/containermanager\/reset(options:)","role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"kind":"symbol","url":"\/documentation\/factory\/containermanager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","title":"ContainerManager","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"role":"symbol","type":"topic"}}} \ No newline at end of file +{"schemaVersion":{"minor":3,"patch":0,"major":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/containermanager\/reset(options:)"]}],"kind":"symbol","sections":[],"metadata":{"extendedModule":"Factory","roleHeading":"Instance Method","modules":[{"name":"Factory"}],"symbolKind":"method","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"options"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","kind":"typeIdentifier"},{"text":")","kind":"text"}],"role":"symbol","externalID":"s:7Factory16ContainerManagerC5reset7optionsyAA0A12ResetOptionsO_tF","title":"reset(options:)"},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"text":"options","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":" = .all)"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"abstract":[{"text":"Resets the Container to its original state, removing all registrations and clearing all scope caches.","type":"text"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(options:)","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"title":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","type":"topic","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ContainerManager/reset(options:)":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(options:)","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"text":"options","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"text":")","kind":"text"}],"url":"\/documentation\/factory\/containermanager\/reset(options:)","abstract":[{"type":"text","text":"Resets the Container to its original state, removing all registrations and clearing all scope caches."}],"title":"reset(options:)"},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"url":"\/documentation\/factory\/containermanager","navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"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/containermanager/reset(scope:).json b/docs/data/documentation/factory/containermanager/reset(scope:).json index b508a914..929f8747 100644 --- a/docs/data/documentation/factory/containermanager/reset(scope:).json +++ b/docs/data/documentation/factory/containermanager/reset(scope:).json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"abstract":[{"type":"text","text":"Clears any cached values associated with a specific scope, leaving the other scope caches intact."}],"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(scope:)"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"scope"},{"kind":"text","text":": "},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"text":")","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}]}],"variants":[{"paths":["\/documentation\/factory\/containermanager\/reset(scope:)"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"title":"reset(scope:)","role":"symbol","extendedModule":"Factory","symbolKind":"method","externalID":"s:7Factory16ContainerManagerC5reset5scopeyAA5ScopeC_tF","modules":[{"name":"Factory"}],"roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"text":"scope","kind":"externalParam"},{"kind":"text","text":": "},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":")"}]},"sections":[],"kind":"symbol","references":{"doc://Factory/documentation/Factory/ContainerManager/reset(scope:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(scope:)","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"reset","kind":"identifier"},{"text":"(","kind":"text"},{"text":"scope","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier","text":"Scope"},{"text":")","kind":"text"}],"abstract":[{"text":"Clears any cached values associated with a specific scope, leaving the other scope caches intact.","type":"text"}],"title":"reset(scope:)","kind":"symbol","url":"\/documentation\/factory\/containermanager\/reset(scope:)","role":"symbol"},"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"kind":"symbol","url":"\/documentation\/factory\/containermanager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","title":"ContainerManager","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"role":"symbol","type":"topic"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"metadata":{"extendedModule":"Factory","title":"reset(scope:)","externalID":"s:7Factory16ContainerManagerC5reset5scopeyAA5ScopeC_tF","role":"symbol","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"text":"scope","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC","text":"Scope","kind":"typeIdentifier"},{"kind":"text","text":")"}],"roleHeading":"Instance Method","symbolKind":"method"},"abstract":[{"type":"text","text":"Clears any cached values associated with a specific scope, leaving the other scope caches intact."}],"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(scope:)"},"variants":[{"paths":["\/documentation\/factory\/containermanager\/reset(scope:)"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"patch":0,"minor":3,"major":0},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"text":"scope","kind":"externalParam"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope","kind":"typeIdentifier"},{"text":")","kind":"text"}],"languages":["swift"]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ContainerManager/reset(scope:)":{"kind":"symbol","title":"reset(scope:)","abstract":[{"type":"text","text":"Clears any cached values associated with a specific scope, leaving the other scope caches intact."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/reset(scope:)","type":"topic","url":"\/documentation\/factory\/containermanager\/reset(scope:)","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"text":"(","kind":"text"},{"text":"scope","kind":"externalParam"},{"kind":"text","text":": "},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":")"}]},"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"url":"\/documentation\/factory\/containermanager","navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"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/containermanager/trace.json b/docs/data/documentation/factory/containermanager/trace.json index d43660ec..6b6cf2d6 100644 --- a/docs/data/documentation/factory/containermanager/trace.json +++ b/docs/data/documentation/factory/containermanager/trace.json @@ -1 +1 @@ -{"metadata":{"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"trace"},{"kind":"text","text":": "},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"title":"trace","modules":[{"name":"Factory"}],"roleHeading":"Instance Property","externalID":"s:7Factory16ContainerManagerC5traceSbvp","symbolKind":"property","role":"symbol"},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"trace","kind":"identifier"},{"kind":"text","text":": "},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"sections":[],"variants":[{"paths":["\/documentation\/factory\/containermanager\/trace"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/trace","interfaceLanguage":"swift"},"abstract":[{"text":"Public var enabling factory resolution trace statements in debug mode for ALL containers.","type":"text"}],"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"kind":"symbol","url":"\/documentation\/factory\/containermanager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","title":"ContainerManager","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"role":"symbol","type":"topic"},"doc://Factory/documentation/Factory/ContainerManager/trace":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/trace","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"trace","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}],"abstract":[{"text":"Public var enabling factory resolution trace statements in debug mode for ALL containers.","type":"text"}],"title":"trace","kind":"symbol","url":"\/documentation\/factory\/containermanager\/trace","role":"symbol"}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/containermanager\/trace"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager\/trace","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"trace","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Bool","preciseIdentifier":"s:Sb","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" ","kind":"text"},{"text":"set","kind":"keyword"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"abstract":[{"type":"text","text":"Public var enabling factory resolution trace statements in debug mode for ALL containers."}],"schemaVersion":{"patch":0,"minor":3,"major":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ContainerManager"]]},"metadata":{"modules":[{"name":"Factory"}],"externalID":"s:7Factory16ContainerManagerC5traceSbvp","title":"trace","symbolKind":"property","roleHeading":"Instance Property","role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"trace","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"}]},"kind":"symbol","sections":[],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"url":"\/documentation\/factory\/containermanager","navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}]},"doc://Factory/documentation/Factory/ContainerManager/trace":{"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","type":"topic","url":"\/documentation\/factory\/containermanager\/trace","role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"trace"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/containers.json b/docs/data/documentation/factory/containers.json index 384ebb82..a90cabcc 100644 --- a/docs/data/documentation/factory/containers.json +++ b/docs/data/documentation/factory/containers.json @@ -1 +1 @@ -{"seeAlsoSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/GettingStarted","doc:\/\/Factory\/documentation\/Factory\/Scopes"],"title":"The Basics","generated":true}],"variants":[{"paths":["\/documentation\/factory\/containers"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"kind":"content","content":[{"level":2,"anchor":"Overview","text":"Overview","type":"heading"},{"type":"paragraph","inlineContent":[{"text":"Containers are used by Factory to manage object creation, object resolution, and object lifecycles in general.","type":"text"}]},{"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":[{"text":"Factory 2.0 supports true container-based dependency injection.","type":"text"}],"type":"paragraph"},{"level":2,"anchor":"Containers-and-Factories","text":"Containers and Factories","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"A Factory definition is a computed property defined within a container extension. Each Factory needs a reference to its container, a scope, and it also requires a factory closure that will produce our dependency when asked to do so."}]},{"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","syntax":"swift","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"]},{"type":"paragraph","inlineContent":[{"text":"This process is covered in greater detail in ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","isActive":true,"type":"reference"},{"type":"text","text":"."}]},{"text":"Resolving a Dependency","level":2,"anchor":"Resolving-a-Dependency","type":"heading"},{"type":"paragraph","inlineContent":[{"text":"Once you’ve added a Factory to a container you can resolve it.","type":"text"}]},{"code":["let service = Container.shared.service()"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"Bingo. You now have your dependency.","type":"text"}]},{"level":2,"text":"The Default Container","anchor":"The-Default-Container","type":"heading"},{"inlineContent":[{"text":"Factory ships with a single ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","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":[{"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"},{"type":"heading","level":2,"text":"Container.shared","anchor":"Containershared"},{"type":"paragraph","inlineContent":[{"text":"As the default Container definition shows, each container class defined has a statically allocated ","type":"text"},{"type":"codeVoice","code":"shared"},{"text":" instance associated with it.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This instance can be referenced directly if you’re using a Service Locator-style pattern."}]},{"syntax":"swift","code":["let service = Container.shared.service()"],"type":"codeListing"},{"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"},{"level":2,"text":"Passing Containers","anchor":"Passing-Containers","type":"heading"},{"inlineContent":[{"type":"text","text":"Here’s an example of passing an instance of a container to a view model and then initializing a service from that container."}],"type":"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 "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","isActive":true},{"text":" page.","type":"text"}]},{"type":"heading","text":"SharedContainer","level":2,"anchor":"SharedContainer"},{"type":"paragraph","inlineContent":[{"type":"text","text":"All containers conform to the "},{"code":"SharedContainer","type":"codeVoice"},{"type":"text","text":" protocol. That basically means that each one must have its own "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager"},{"type":"text","text":" and implement a static "},{"code":"shared","type":"codeVoice"},{"type":"text","text":" instance."}]},{"type":"paragraph","inlineContent":[{"text":"SharedContainer also defines some common functionality for each container, like the ","type":"text"},{"code":"unique","type":"codeVoice"},{"type":"text","text":" convenience function we’ve seen used throughout."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that you can extend SharedContainer with your own Factory’s."}]},{"code":["extension SharedContainer {"," var commonService: Factory {"," self { MyService() }"," }","}"],"syntax":"swift","type":"codeListing"},{"inlineContent":[{"text":"The ","type":"text"},{"code":"commonService","type":"codeVoice"},{"text":" Factory will now be available on every container created.","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["let common1 = Container.shared.commonService()","let common2 = MyContainer.shared.commonService()"]},{"level":2,"text":"Custom Containers","anchor":"Custom-Containers","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"In a large project you might want to segregate factories into additional, smaller containers."}]},{"inlineContent":[{"type":"text","text":"Defining your own container class is simple. Just use the following as a template."}],"type":"paragraph"},{"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 "},{"type":"reference","isActive":true,"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"},{"type":"codeVoice","code":"final"},{"type":"text","text":"."}]},{"type":"aside","name":"Note","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"},{"text":" will cause Swift to issue concurrency warnings in the future whenever that variable is accessed.","type":"text"}]}]},{"anchor":"Referencing-Other-Containers","text":"Referencing Other Containers","type":"heading","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"Don’t forget that if need be you can reach across containers simply by specifying the full "},{"code":"container.factory","type":"codeVoice"},{"text":" path.","type":"text"}]},{"code":["extension PaymentsContainer {"," let anotherService = Factory { "," self { AnotherService(using: Container.shared.optionalService()) }"," }","}"],"type":"codeListing","syntax":"swift"},{"level":2,"anchor":"Injected-Property-Wrappers","type":"heading","text":"Injected Property Wrappers"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Property wrappers like "},{"type":"codeVoice","code":"@Injected"},{"text":" and ","type":"text"},{"type":"codeVoice","code":"@LazyInjected"},{"text":" always reference the ","type":"text"},{"code":"shared","type":"codeVoice"},{"type":"text","text":" container for that class type. Let’s get an instance of the "},{"type":"codeVoice","code":"cachedService"},{"type":"text","text":" object we defined above by providing a keypath to the desired class and service."}]},{"type":"codeListing","code":["class ContentViewModel: ObservableObject {"," @Injected(\\MyContainer.cachedService) var cachedService","}"],"syntax":"swift"},{"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"},{"text":".","type":"text"}],"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","type":"reference","isActive":true},{"text":", ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"},{"text":", and ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","isActive":true},{"type":"text","text":" for more."}],"type":"paragraph"},{"level":2,"text":"Registration and Scope Management","type":"heading","anchor":"Registration-and-Scope-Management"},{"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"}]},{"type":"codeListing","syntax":"swift","code":["let containerA = MyContainer()","containerA.register.cachedService { MockService() }","","\/\/ Will have a MockService","let service1 = containerA.cachedService() ","","\/\/ Will have a new or previously cached instance of ServiceType","let service2 = MyContainer.shared.cachedService() "]},{"type":"heading","text":"AutoRegister","level":2,"anchor":"AutoRegister"},{"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"}],"type":"paragraph"},{"syntax":"swift","code":["extension MyContainer: AutoRegistering {"," func autoRegister() {"," someService.register { ModuleB.SomeService() }"," }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Just make your container conform to "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","type":"reference"},{"type":"text","text":" and provide the "},{"code":"autoRegister","type":"codeVoice"},{"type":"text","text":" function. This function will be called "},{"type":"emphasis","inlineContent":[{"type":"text","text":"once"}]},{"type":"text","text":" prior to the very first Factory service resolution on that container."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that this can come in handy when you want to register instances of objects obtained across different modules, or change settings in the container manager."}]},{"level":2,"text":"AutoRegister and the Default Container","anchor":"AutoRegister-and-the-Default-Container","type":"heading"},{"inlineContent":[{"text":"One can add auto registration capabilities to Factory’s default container as well, but as of Swift 6 you’ll need to add the ","type":"text"},{"type":"codeVoice","code":"@retroactive"},{"text":"","type":"text"},{"type":"text","text":" "},{"text":"attribute to the ","type":"text"},{"code":"AutoRegistering","type":"codeVoice"},{"type":"text","text":" protocol definition."}],"type":"paragraph"},{"code":["extension Container: @retroactive AutoRegistering {"," func autoRegister() {"," someService.register { ModuleB.SomeService() }"," }","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This new attribute silences the warning, “Extension declares a conformance of imported type ‘Container’ to imported protocol ‘AutoRegistering’;"},{"text":" ","type":"text"},{"text":"this will not behave correctly if the owners of ‘Factory’ introduce this conformance in the future”.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Yeah. Me too. I know the developers of Swift mean well, but sometimes…"}]},{"level":2,"anchor":"Resetting-a-Container","text":"Resetting a Container","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Using "},{"code":"register","type":"codeVoice"},{"text":" on a factory lets us change the state of the system. But what if we need to revert to the original behavior?","type":"text"}]},{"inlineContent":[{"type":"text","text":"Simple. Just reset it to bring back the original factory closure. Or, if desired, you can reset "},{"inlineContent":[{"text":"everything","type":"text"}],"type":"emphasis"},{"text":" back to square one with a single command.","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"Swift","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."}]},{"type":"codeListing","code":["Container.shared.manager.reset(scope: .cached)"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"Note that resetting registrations also resets the container’s auto registration flag.","type":"text"}]},{"name":"Important","type":"aside","style":"important","content":[{"type":"paragraph","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":[{"type":"text","text":"next"}],"type":"emphasis"},{"type":"text","text":" time a Factory is asked to resolve a dependency that dependency will be a new instance."}]}]},{"type":"heading","level":2,"text":"Pushing and Popping State","anchor":"Pushing-and-Popping-State"},{"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 "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing"},{"type":"text","text":" for more information on this."}],"type":"paragraph"},{"type":"heading","anchor":"Releasing-a-Container","level":2,"text":"Releasing a Container"},{"type":"aside","style":"warning","content":[{"inlineContent":[{"type":"text","text":"If a container ever goes out of scope, so will all of its registrations and cached objects."}],"type":"paragraph"}],"name":"Warning"},{"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"},{"text":" Factory we defined above.","type":"text"}]},{"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","type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"From a certain point of view, replacing a container with a new one is the ultimate reset mechanism.","type":"text"}]},{"content":[{"inlineContent":[{"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":"text"},{"type":"codeVoice","code":"let s = Container.shared.myService()"},{"text":").","type":"text"}],"type":"paragraph"}],"type":"aside","name":"Note","style":"note"}]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"sections":[],"abstract":[{"type":"text","text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?"}],"metadata":{"roleHeading":"Article","title":"Containers","modules":[{"name":"Factory"}],"role":"article"},"kind":"article","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Containers","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/Testing":{"type":"topic","kind":"article","role":"article","url":"\/documentation\/factory\/testing","title":"Testing","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}]},"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"kind":"symbol","url":"\/documentation\/factory\/containermanager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","title":"ContainerManager","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"role":"symbol","type":"topic"},"doc://Factory/documentation/Factory/Resolutions":{"type":"topic","kind":"article","role":"article","url":"\/documentation\/factory\/resolutions","title":"Sample Resolutions","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","abstract":[{"type":"text","text":"There are many ways to use Factory to resolve dependencies. Here are a few examples."}]},"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}]},"doc://Factory/documentation/Factory/WeakLazyInjected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/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"},{"text":" ","kind":"text"},{"kind":"identifier","text":"WeakLazyInjected"}]},"doc://Factory/documentation/Factory/Injected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"title":"Injected","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]},"doc://Factory/documentation/Factory/Scopes":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","title":"Scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"url":"\/documentation\/factory\/scopes","kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","navigatorTitle":[{"text":"Container","kind":"identifier"}],"title":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"role":"symbol","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/GettingStarted":{"type":"topic","title":"Getting Started","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","url":"\/documentation\/factory\/gettingstarted","role":"collectionGroup"},"doc://Factory/documentation/Factory/InjectedObject":{"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","role":"symbol","title":"InjectedObject"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/AutoRegistering":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"AutoRegistering","kind":"identifier"}],"type":"topic","role":"symbol","title":"AutoRegistering","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","navigatorTitle":[{"text":"AutoRegistering","kind":"identifier"}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"code":"Container","type":"codeVoice"},{"type":"text","text":"."}],"url":"\/documentation\/factory\/autoregistering","kind":"symbol"}}} \ No newline at end of file +{"seeAlsoSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/GettingStarted","doc:\/\/Factory\/documentation\/Factory\/Scopes"],"title":"The Basics","generated":true}],"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"role":"article","title":"Containers","roleHeading":"Article","modules":[{"name":"Factory"}]},"primaryContentSections":[{"kind":"content","content":[{"type":"heading","anchor":"Overview","text":"Overview","level":2},{"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"}]},{"type":"paragraph","inlineContent":[{"text":"Factory 2.0 supports true container-based dependency injection.","type":"text"}]},{"anchor":"Containers-and-Factories","type":"heading","text":"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"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","isActive":true,"type":"reference"},{"type":"text","text":"."}]},{"type":"heading","anchor":"Resolving-a-Dependency","text":"Resolving a Dependency","level":2},{"inlineContent":[{"text":"Once you’ve added a Factory to a container you can resolve it.","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["let service = Container.shared.service()"]},{"inlineContent":[{"text":"Bingo. You now have your dependency.","type":"text"}],"type":"paragraph"},{"level":2,"text":"The Default Container","anchor":"The-Default-Container","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory ships with a single "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container"},{"text":" already constructed for your convenience.","type":"text"}]},{"syntax":"swift","type":"codeListing","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"},{"level":2,"text":"Container.shared","type":"heading","anchor":"Containershared"},{"type":"paragraph","inlineContent":[{"text":"As the default Container definition shows, each container class defined has a statically allocated ","type":"text"},{"type":"codeVoice","code":"shared"},{"text":" instance associated with it.","type":"text"}]},{"inlineContent":[{"text":"This instance can be referenced directly if you’re using a Service Locator-style pattern.","type":"text"}],"type":"paragraph"},{"type":"codeListing","code":["let service = Container.shared.service()"],"syntax":"swift"},{"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."}],"type":"paragraph"},{"anchor":"Passing-Containers","text":"Passing Containers","type":"heading","level":2},{"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."}]},{"syntax":"swift","code":["class ContentViewModel {"," let service2: MyServiceType"," init(container: Container) {"," service2 = container.service()"," }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"Additional examples and methods can be seen on the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions"},{"text":" page.","type":"text"}]},{"level":2,"text":"SharedContainer","type":"heading","anchor":"SharedContainer"},{"type":"paragraph","inlineContent":[{"text":"All containers conform to the ","type":"text"},{"code":"SharedContainer","type":"codeVoice"},{"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":[{"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."}],"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"},{"inlineContent":[{"text":"The ","type":"text"},{"type":"codeVoice","code":"commonService"},{"type":"text","text":" Factory will now be available on every container created."}],"type":"paragraph"},{"type":"codeListing","code":["let common1 = Container.shared.commonService()","let common2 = MyContainer.shared.commonService()"],"syntax":"swift"},{"anchor":"Custom-Containers","text":"Custom Containers","type":"heading","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"In a large project you might want to segregate factories into additional, smaller containers."}]},{"inlineContent":[{"type":"text","text":"Defining your own container class is simple. Just use the following as a template."}],"type":"paragraph"},{"type":"codeListing","code":["public final class MyContainer: SharedContainer {"," public static let shared = MyContainer()"," public let manager = ContainerManager()","}","","extension MyContainer {"," var cachedService: Factory {"," self { MyService() }.cached"," }","}"],"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 "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","type":"reference","isActive":true},{"text":", and implement a static ","type":"text"},{"code":"shared","type":"codeVoice"},{"text":" instance. It also must be marked ","type":"text"},{"code":"final","type":"codeVoice"},{"type":"text","text":"."}]},{"content":[{"inlineContent":[{"text":"Remember to define the “shared” container as a ","type":"text"},{"code":"let","type":"codeVoice"},{"type":"text","text":", not "},{"code":"var","type":"codeVoice"},{"type":"text","text":". Defining it as a "},{"code":"static var","type":"codeVoice"},{"type":"text","text":" will cause Swift to issue concurrency warnings in the future whenever that variable is accessed."}],"type":"paragraph"}],"type":"aside","name":"Note","style":"note"},{"text":"Referencing Other Containers","anchor":"Referencing-Other-Containers","type":"heading","level":2},{"inlineContent":[{"type":"text","text":"Don’t forget that if need be you can reach across containers simply by specifying the full "},{"code":"container.factory","type":"codeVoice"},{"type":"text","text":" path."}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["extension PaymentsContainer {"," let anotherService = Factory { "," self { AnotherService(using: Container.shared.optionalService()) }"," }","}"]},{"level":2,"type":"heading","anchor":"Injected-Property-Wrappers","text":"Injected Property Wrappers"},{"inlineContent":[{"text":"Property wrappers like ","type":"text"},{"type":"codeVoice","code":"@Injected"},{"text":" and ","type":"text"},{"code":"@LazyInjected","type":"codeVoice"},{"text":" always reference the ","type":"text"},{"code":"shared","type":"codeVoice"},{"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"},{"type":"codeListing","code":["class ContentViewModel: ObservableObject {"," @Injected(\\MyContainer.cachedService) var cachedService","}"],"syntax":"swift"},{"inlineContent":[{"text":"We now have an instance of ","type":"text"},{"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"},{"type":"text","text":"."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected"},{"type":"text","text":", "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected"},{"text":", ","type":"text"},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","type":"reference"},{"type":"text","text":", "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected"},{"type":"text","text":" and "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"reference"},{"text":" for more.","type":"text"}],"type":"paragraph"},{"type":"heading","text":"Registration and Scope Management","level":2,"anchor":"Registration-and-Scope-Management"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As mentioned earlier, factory registrations and scopes are managed by the container on which the dependency was created. Adding a registration or clearing a scope cache on one container has no effect on any other container."}]},{"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() "],"syntax":"swift","type":"codeListing"},{"type":"heading","text":"AutoRegister","anchor":"AutoRegister","level":2},{"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"}]},{"type":"codeListing","code":["extension MyContainer: AutoRegistering {"," func autoRegister() {"," someService.register { ModuleB.SomeService() }"," }","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Just make your container conform to "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","isActive":true,"type":"reference"},{"type":"text","text":" and provide the "},{"type":"codeVoice","code":"autoRegister"},{"type":"text","text":" function. This function will be called "},{"type":"emphasis","inlineContent":[{"text":"once","type":"text"}]},{"text":" prior to the very first Factory service resolution on that container.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that this can come in handy when you want to register instances of objects obtained across different modules, or change settings in the container manager."}]},{"type":"heading","level":2,"text":"AutoRegister and the Default Container","anchor":"AutoRegister-and-the-Default-Container"},{"type":"paragraph","inlineContent":[{"text":"One can add auto registration capabilities to Factory’s default container as well, but as of Swift 6 you’ll need to add the ","type":"text"},{"type":"codeVoice","code":"@retroactive"},{"text":"","type":"text"},{"text":" ","type":"text"},{"text":"attribute to the ","type":"text"},{"code":"AutoRegistering","type":"codeVoice"},{"text":" protocol definition.","type":"text"}]},{"type":"codeListing","code":["extension Container: @retroactive AutoRegistering {"," func autoRegister() {"," someService.register { ModuleB.SomeService() }"," }","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This new attribute silences the warning, “Extension declares a conformance of imported type ‘Container’ to imported protocol ‘AutoRegistering’;"},{"type":"text","text":" "},{"text":"this will not behave correctly if the owners of ‘Factory’ introduce this conformance in the future”.","type":"text"}]},{"inlineContent":[{"type":"text","text":"Yeah. Me too. I know the developers of Swift mean well, but sometimes…"}],"type":"paragraph"},{"level":2,"text":"Resetting a Container","anchor":"Resetting-a-Container","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Using "},{"type":"codeVoice","code":"register"},{"type":"text","text":" on a factory lets us change the state of the system. But what if we need to revert to the original behavior?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Simple. Just reset it to bring back the original factory closure. Or, if desired, you can reset "},{"type":"emphasis","inlineContent":[{"type":"text","text":"everything"}]},{"type":"text","text":" back to square one with a single command."}]},{"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)"],"syntax":"swift","type":"codeListing"},{"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":[{"text":"Note that resetting registrations also resets the container’s auto registration flag.","type":"text"}]},{"style":"important","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Resetting a container or scope has no effect whatsoever on anything that’s already been resolved by Factory. It only ensures that the "},{"inlineContent":[{"type":"text","text":"next"}],"type":"emphasis"},{"text":" time a Factory is asked to resolve a dependency that dependency will be a new instance.","type":"text"}]}],"name":"Important","type":"aside"},{"type":"heading","anchor":"Pushing-and-Popping-State","text":"Pushing and Popping State","level":2},{"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 "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","type":"reference"},{"type":"text","text":" for more information on this."}],"type":"paragraph"},{"anchor":"Releasing-a-Container","level":2,"type":"heading","text":"Releasing a Container"},{"name":"Warning","style":"warning","type":"aside","content":[{"type":"paragraph","inlineContent":[{"text":"If a container ever goes out of scope, so will all of its registrations and cached objects.","type":"text"}]}]},{"type":"paragraph","inlineContent":[{"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":"text"},{"code":"cachedService","type":"codeVoice"},{"text":" Factory we defined above.","type":"text"}]},{"syntax":"swift","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"},{"inlineContent":[{"text":"From a certain point of view, replacing a container with a new one is the ultimate reset mechanism.","type":"text"}],"type":"paragraph"},{"name":"Note","content":[{"inlineContent":[{"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":"text"},{"type":"codeVoice","code":"let s = Container.shared.myService()"},{"type":"text","text":")."}],"type":"paragraph"}],"type":"aside","style":"note"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"kind":"article","sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Containers","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/containers"]}],"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/Resolutions":{"role":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","title":"Sample Resolutions","kind":"article","url":"\/documentation\/factory\/resolutions","abstract":[{"type":"text","text":"There are many ways to use Factory to resolve dependencies. Here are a few examples."}]},"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol"},"doc://Factory/documentation/Factory/GettingStarted":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","type":"topic","kind":"article","abstract":[{"text":"Defining a Factory, resolving it, and changing the default behavior.","type":"text"}],"url":"\/documentation\/factory\/gettingstarted","title":"Getting Started","role":"collectionGroup"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}]},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","title":"InjectedObject","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}]},"doc://Factory/documentation/Factory/WeakLazyInjected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"title":"WeakLazyInjected","url":"\/documentation\/factory\/weaklazyinjected","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"text":"WeakLazyInjected","kind":"identifier"}]},"doc://Factory/documentation/Factory/Container":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","title":"Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"url":"\/documentation\/factory\/container","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}],"navigatorTitle":[{"text":"Container","kind":"identifier"}]},"doc://Factory/documentation/Factory/DynamicInjected":{"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"DynamicInjected"}],"navigatorTitle":[{"text":"DynamicInjected","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected","kind":"symbol","type":"topic","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"title":"DynamicInjected","role":"symbol","url":"\/documentation\/factory\/dynamicinjected"},"doc://Factory/documentation/Factory/Testing":{"abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"kind":"article","url":"\/documentation\/factory\/testing","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","role":"article","type":"topic","title":"Testing"},"doc://Factory/documentation/Factory/AutoRegistering":{"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AutoRegistering","kind":"identifier"}],"kind":"symbol","type":"topic","title":"AutoRegistering","url":"\/documentation\/factory\/autoregistering","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","role":"symbol","navigatorTitle":[{"text":"AutoRegistering","kind":"identifier"}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/Injected":{"navigatorTitle":[{"text":"Injected","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"role":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}]},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"url":"\/documentation\/factory\/containermanager","navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/contexts.json b/docs/data/documentation/factory/contexts.json index fc5872b6..e4475940 100644 --- a/docs/data/documentation/factory/contexts.json +++ b/docs/data/documentation/factory/contexts.json @@ -1 +1 @@ -{"schemaVersion":{"minor":3,"patch":0,"major":0},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Contexts","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Changing injection results under special circumstances."}],"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"]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/contexts"]}],"kind":"article","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","type":"heading","level":2,"text":"Overview"},{"inlineContent":[{"type":"text","text":"Developers often use Factory to mock data for previews and unit tests. Now Factory 2.1 extends these capabilities by allowing them to specify dependencies based on the application’s current "},{"type":"emphasis","inlineContent":[{"type":"text","text":"context"}]},{"text":".","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"What if, for example, you ","type":"text"},{"type":"strong","inlineContent":[{"type":"text","text":"never"}]},{"type":"text","text":" want your application’s analytics library to be called when running unit tests?"}]},{"inlineContent":[{"type":"text","text":"Piece of cake. Just register a new override for that particular context."}],"type":"paragraph"},{"syntax":"swift","code":["extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," container.analytics"," .context(.test) { MockAnalyticsEngine() }"," #endif"," }","}"],"type":"codeListing"},{"inlineContent":[{"type":"text","text":"Factory makes it easy."}],"type":"paragraph"},{"text":"Contexts","anchor":"Contexts","type":"heading","level":2},{"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":[{"text":"arg(String)","type":"text"}],"type":"strong"},{"text":" - application is launched with a particular argument.","type":"text"}]}]},{"content":[{"inlineContent":[{"inlineContent":[{"type":"text","text":"args([String])"}],"type":"strong"},{"text":" - application is launched with one of several arguments.","type":"text"}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"preview"}]},{"type":"text","text":" - application is running in Xcode Preview mode"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"type":"text","text":"test"}],"type":"strong"},{"text":" - application is running in Xcode Unit Test mode","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"debug"}]},{"text":" - application is running in Xcode DEBUG mode","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"text":"simulator","type":"text"}],"type":"strong"},{"type":"text","text":" - application is running within an Xcode simulator"}]}]},{"content":[{"inlineContent":[{"type":"strong","inlineContent":[{"text":"device","type":"text"}]},{"text":" - application is running on an actual device","type":"text"}],"type":"paragraph"}]}]},{"type":"paragraph","inlineContent":[{"text":"Let’s dive in.","type":"text"}]},{"type":"heading","text":"Some Examples","level":2,"anchor":"Some-Examples"},{"text":"• onTest","level":3,"anchor":"-onTest","type":"heading"},{"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() }"]},{"inlineContent":[{"text":"There’s also a shortcut version:","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["container.analytics"," .onTest { MockAnalyticsEngine() }"]},{"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":"paragraph"},{"type":"codeListing","code":["if ProcessInfo.processInfo.environment[\"XCTestConfigurationFilePath\"] != nil {"," container.analytics.register { MockAnalyticsEngine() }","}"],"syntax":"swift"},{"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"}]}]},{"text":"• onPreview","level":3,"type":"heading","anchor":"-onPreview"},{"type":"paragraph","inlineContent":[{"text":"This specifies a dependency that will be used whenever your app or module is running SwiftUI Previews.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["container.myServiceType"," .onPreview { MockService() }"]},{"inlineContent":[{"type":"text","text":"Which obviously makes your preview code itself much simpler."}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," ContentView()"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can, of course, still use the mechanisms shown in "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","isActive":true},{"text":".","type":"text"}]},{"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"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"that there’s no "},{"type":"codeVoice","code":"release"},{"type":"text","text":" context. Just use the standard "},{"type":"codeVoice","code":"register"},{"type":"text","text":" syntax in that case."}]}],"name":"Note","type":"aside","style":"note"},{"level":3,"text":"• onSimulator \/ onDevice","anchor":"-onSimulator--onDevice","type":"heading"},{"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."}]},{"level":3,"text":"• onArg","anchor":"-onArg","type":"heading"},{"inlineContent":[{"text":"The ","type":"text"},{"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"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As shown in the "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","isActive":true,"type":"reference"},{"type":"text","text":" section the test case itself is pretty standard."}]},{"syntax":"swift","code":["import XCTest","","final class FactoryDemoUITests: XCTestCase {"," func testExample() throws {"," let app = XCUIApplication()"," app.launchArguments.append(\"mock1\")"," app.launch()",""," let welcome = app.staticTexts[\"Mock Number 1! for Michael\"]"," XCTAssert(welcome.exists)"," }","} "],"type":"codeListing"},{"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"}]},{"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"," }","}"],"syntax":"swift","type":"codeListing"},{"text":"• onArgs","type":"heading","anchor":"-onArgs","level":3},{"type":"paragraph","inlineContent":[{"type":"text","text":"Similar to arg, but let’s you use the same factory when any of several arguments are passed."}]},{"type":"codeListing","syntax":"swift","code":["myServiceType"," .onArgs([\"mock0\", \"mock1\", \"mock3\"]) { "," EmptyService()"," }"]},{"text":"Runtime Arguments","type":"heading","level":2,"anchor":"Runtime-Arguments"},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can also add and remove your own arguments at runtime. Consider this…"}]},{"syntax":"swift","code":["FactoryContext.setArg(\"light\", forKey: \"theme\")","FactoryContext.removeArg(forKey: \"theme\")","","myStyleSystem { StandardTheme() }"," .onArg(\"light\") { LightTheme() }"," .onArg(\"dark\") { DarkTheme() }"],"type":"codeListing"},{"type":"heading","level":2,"text":"Multiple Contexts","anchor":"Multiple-Contexts"},{"type":"paragraph","inlineContent":[{"text":"As you may have noticed above in the ","type":"text"},{"code":"arg","type":"codeVoice"},{"text":" example, chaining multiple contexts together work just as you’d expect and are specified using Factory’s modifier syntax.","type":"text"}]},{"inlineContent":[{"type":"text","text":"Here’s an example of specifying separate services depending on context."}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["container.myServiceType"," .onPreview { MockService() }"," .onTest { UnitTestMockService() }"]},{"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() }"]},{"inlineContent":[{"type":"text","text":"Which brings us to…"}],"type":"paragraph"},{"level":2,"anchor":"Context-Precedence","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":[{"inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"arg[s]"}]}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"text":"preview","type":"text"}]},{"text":" *","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"text":"test","type":"text"}]},{"type":"text","text":" *"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"simulator"}]}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"device"}]}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"debug"}]},{"type":"text","text":" *"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"text":"registered factory","type":"text"}],"type":"strong"},{"type":"text","text":" (if any)"}]}]},{"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","text":"Global Context","level":2,"anchor":"Global-Context"},{"inlineContent":[{"type":"text","text":"Keep in mind that contexts are global. The entire app is running in debug more or it’s not. It was passed a “mock0” argument at runtime or it wasn’t."}],"type":"paragraph"},{"inlineContent":[{"text":"The ","type":"text"},{"type":"codeVoice","code":"onArg"},{"text":" and ","type":"text"},{"type":"codeVoice","code":"onDebug"},{"text":" and other context modifiers basically define how the app should respond to that particular context.","type":"text"}],"type":"paragraph"},{"type":"heading","text":"Changing a Context","anchor":"Changing-a-Context","level":2},{"type":"paragraph","inlineContent":[{"type":"text","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 "},{"inlineContent":[{"type":"text","text":"manually"}],"type":"strong"},{"text":" clear the scope cache for that object.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.myService"," .onTest { NullAnalyticsEngine() }"," .reset(.scope)"]},{"name":"Warning","type":"aside","style":"warning","content":[{"type":"paragraph","inlineContent":[{"text":"With ","type":"text"},{"type":"codeVoice","code":"reset"},{"text":" make sure you specify that you only want to clear the scope. Calling ","type":"text"},{"code":"reset","type":"codeVoice"},{"text":" without a parameter clears everything, including contexts like the one you just set!","type":"text"}]}]},{"type":"paragraph","inlineContent":[{"text":"See the section on ","type":"text"},{"type":"emphasis","inlineContent":[{"text":"The Factory Wins","type":"text"}]},{"text":" in ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","isActive":true,"type":"reference"},{"type":"text","text":" for more information on this and other scenarios."}]}]}],"metadata":{"title":"Contexts","modules":[{"name":"Factory"}],"roleHeading":"Article","role":"article"},"references":{"doc://Factory/documentation/Factory/Previews":{"title":"SwiftUI Previews","kind":"article","url":"\/documentation\/factory\/previews","type":"topic","role":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","abstract":[{"text":"Mocking dependencies for SwiftUI Previews.","type":"text"}]},"doc://Factory/documentation/Factory/Testing":{"type":"topic","kind":"article","role":"article","url":"\/documentation\/factory\/testing","title":"Testing","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}]},"doc://Factory/documentation/Factory/Debugging":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","url":"\/documentation\/factory\/debugging","title":"Debugging","role":"article","kind":"article","abstract":[{"text":"Additional support for debugging resolution cycles, dependency chains and other issue.","type":"text"}],"type":"topic"},"doc://Factory/documentation/Factory/Chains":{"title":"Circular Dependency Chains","kind":"article","url":"\/documentation\/factory\/chains","type":"topic","role":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","abstract":[{"text":"Detecting and solving Circular Dependency Chains.","type":"text"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Modifiers":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","type":"topic","title":"Factory Modifiers","abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"url":"\/documentation\/factory\/modifiers","kind":"article","role":"article"}}} \ No newline at end of file +{"kind":"article","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"Development and Testing","generated":true,"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Previews","doc:\/\/Factory\/documentation\/Factory\/Testing","doc:\/\/Factory\/documentation\/Factory\/Debugging","doc:\/\/Factory\/documentation\/Factory\/Chains"]}],"primaryContentSections":[{"kind":"content","content":[{"text":"Overview","anchor":"Overview","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Developers often use Factory to mock data for previews and unit tests. Now Factory 2.1 extends these capabilities by allowing them to specify dependencies based on the application’s current "},{"type":"emphasis","inlineContent":[{"text":"context","type":"text"}]},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"What if, for example, you "},{"type":"strong","inlineContent":[{"type":"text","text":"never"}]},{"type":"text","text":" want your application’s analytics library to be called when running unit tests?"}]},{"type":"paragraph","inlineContent":[{"text":"Piece of cake. Just register a new override for that particular context.","type":"text"}]},{"type":"codeListing","code":["extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," container.analytics"," .context(.test) { MockAnalyticsEngine() }"," #endif"," }","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory makes it easy."}]},{"level":2,"text":"Contexts","type":"heading","anchor":"Contexts"},{"inlineContent":[{"text":"Factory 2.1 provides quite a few predefined contexts for your use. They are:","type":"text"}],"type":"paragraph"},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"text":"arg(String)","type":"text"}]},{"text":" - application is launched with a particular argument.","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"args([String])"}]},{"type":"text","text":" - application is launched with one of several arguments."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"text":"preview","type":"text"}]},{"text":" - application is running in Xcode Preview mode","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"test"}]},{"text":" - application is running in Xcode Unit Test mode","type":"text"}]}]},{"content":[{"inlineContent":[{"inlineContent":[{"text":"debug","type":"text"}],"type":"strong"},{"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":[{"inlineContent":[{"type":"strong","inlineContent":[{"text":"device","type":"text"}]},{"type":"text","text":" - application is running on an actual device"}],"type":"paragraph"}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s dive in."}]},{"text":"Some Examples","level":2,"type":"heading","anchor":"Some-Examples"},{"level":3,"type":"heading","text":"• onTest","anchor":"-onTest"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As mentioned, the Factory closure associated with this context is used whenever your application or library is running unit tests using XCTest."}]},{"type":"codeListing","code":["container.analytics"," .context(.test) { MockAnalyticsEngine() }"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"There’s also a shortcut version:"}]},{"syntax":"swift","code":["container.analytics"," .onTest { MockAnalyticsEngine() }"],"type":"codeListing"},{"inlineContent":[{"type":"text","text":"Having contexts built into Factory saves you from having to go to StackOverflow in an attempt to figure out how to do the same thing for yourself."}],"type":"paragraph"},{"code":["if ProcessInfo.processInfo.environment[\"XCTestConfigurationFilePath\"] != nil {"," container.analytics.register { MockAnalyticsEngine() }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Using onTest is much easier."}]},{"type":"paragraph","inlineContent":[{"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"}],"type":"emphasis"}]},{"level":3,"anchor":"-onPreview","text":"• onPreview","type":"heading"},{"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":[{"type":"text","text":"Which obviously makes your preview code itself much simpler."}]},{"type":"codeListing","code":["struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," ContentView()"," }","}"],"syntax":"swift"},{"inlineContent":[{"text":"You can, of course, still use the mechanisms shown in ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","isActive":true},{"type":"text","text":"."}],"type":"paragraph"},{"anchor":"-onDebug","level":3,"type":"heading","text":"• 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"},{"type":"text","text":" context. Just use the standard "},{"code":"register","type":"codeVoice"},{"type":"text","text":" syntax in that case."}],"type":"paragraph"}],"type":"aside","style":"note"},{"anchor":"-onSimulator--onDevice","type":"heading","level":3,"text":"• onSimulator \/ onDevice"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Pretty apparent. What may not be so apparent, however, is that unlike all of the above these two contexts are also available in release builds."}]},{"text":"• onArg","type":"heading","level":3,"anchor":"-onArg"},{"type":"paragraph","inlineContent":[{"text":"The ","type":"text"},{"type":"codeVoice","code":"arg"},{"type":"text","text":" context is a powerful tool to have when you want to UITest your application and you want to change its behavior."}]},{"type":"paragraph","inlineContent":[{"text":"As shown in the ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","isActive":true},{"type":"text","text":" section the test case itself is pretty standard."}]},{"type":"codeListing","syntax":"swift","code":["import XCTest","","final class FactoryDemoUITests: XCTestCase {"," func testExample() throws {"," let app = XCUIApplication()"," app.launchArguments.append(\"mock1\")"," app.launch()",""," let welcome = app.staticTexts[\"Mock Number 1! for Michael\"]"," XCTAssert(welcome.exists)"," }","} "]},{"type":"paragraph","inlineContent":[{"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"}]},{"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":"codeListing","syntax":"swift"},{"level":3,"type":"heading","text":"• onArgs","anchor":"-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","code":["myServiceType"," .onArgs([\"mock0\", \"mock1\", \"mock3\"]) { "," EmptyService()"," }"],"syntax":"swift"},{"anchor":"Runtime-Arguments","text":"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"}]},{"type":"codeListing","syntax":"swift","code":["FactoryContext.setArg(\"light\", forKey: \"theme\")","FactoryContext.removeArg(forKey: \"theme\")","","myStyleSystem { StandardTheme() }"," .onArg(\"light\") { LightTheme() }"," .onArg(\"dark\") { DarkTheme() }"]},{"text":"Multiple Contexts","type":"heading","anchor":"Multiple-Contexts","level":2},{"type":"paragraph","inlineContent":[{"text":"As you may have noticed above in the ","type":"text"},{"code":"arg","type":"codeVoice"},{"text":" example, chaining multiple contexts together work just as you’d expect and are specified using Factory’s modifier syntax.","type":"text"}]},{"inlineContent":[{"text":"Here’s an example of specifying separate services depending on context.","type":"text"}],"type":"paragraph"},{"type":"codeListing","code":["container.myServiceType"," .onPreview { MockService() }"," .onTest { UnitTestMockService() }"],"syntax":"swift"},{"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":[{"text":"Which brings us to…","type":"text"}]},{"anchor":"Context-Precedence","type":"heading","level":2,"text":"Context Precedence"},{"inlineContent":[{"type":"text","text":"Registering multiple contexts could lead one to wonder just which one will be used in a situation where multiple contexts apply. Here’s the order of evaluation."}],"type":"paragraph"},{"items":[{"content":[{"inlineContent":[{"type":"strong","inlineContent":[{"text":"arg[s]","type":"text"}]}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"type":"strong","inlineContent":[{"text":"preview","type":"text"}]},{"type":"text","text":" *"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"test"}]},{"type":"text","text":" *"}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"text":"simulator","type":"text"}],"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":[{"type":"strong","inlineContent":[{"text":"registered factory","type":"text"}]},{"type":"text","text":" (if any)"}]}]},{"content":[{"inlineContent":[{"inlineContent":[{"type":"text","text":"original factory"}],"type":"strong"}],"type":"paragraph"}]}],"type":"unorderedList"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"heading","level":2,"text":"Global Context","anchor":"Global-Context"},{"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"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"code":"onArg","type":"codeVoice"},{"text":" and ","type":"text"},{"code":"onDebug","type":"codeVoice"},{"type":"text","text":" and other context modifiers basically define how the app should respond to that particular context."}]},{"text":"Changing a Context","level":2,"anchor":"Changing-a-Context","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","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":"strong","inlineContent":[{"type":"text","text":"manually"}]},{"type":"text","text":" clear the scope cache for that object."}]},{"type":"codeListing","code":["Container.shared.myService"," .onTest { NullAnalyticsEngine() }"," .reset(.scope)"],"syntax":"swift"},{"content":[{"inlineContent":[{"text":"With ","type":"text"},{"type":"codeVoice","code":"reset"},{"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":"paragraph"}],"type":"aside","style":"warning","name":"Warning"},{"type":"paragraph","inlineContent":[{"type":"text","text":"See the section on "},{"inlineContent":[{"type":"text","text":"The Factory Wins"}],"type":"emphasis"},{"type":"text","text":" in "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","isActive":true},{"text":" for more information on this and other scenarios.","type":"text"}]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Contexts","interfaceLanguage":"swift"},"sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"modules":[{"name":"Factory"}],"title":"Contexts","role":"article","roleHeading":"Article"},"variants":[{"paths":["\/documentation\/factory\/contexts"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"text":"Changing injection results under special circumstances.","type":"text"}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Testing":{"abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"kind":"article","url":"\/documentation\/factory\/testing","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","role":"article","type":"topic","title":"Testing"},"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","url":"\/documentation\/factory\/debugging","role":"article","type":"topic","title":"Debugging"},"doc://Factory/documentation/Factory/Chains":{"kind":"article","title":"Circular Dependency Chains","url":"\/documentation\/factory\/chains","identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","role":"article","type":"topic","abstract":[{"type":"text","text":"Detecting and solving Circular Dependency Chains."}]},"doc://Factory/documentation/Factory/Previews":{"abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","url":"\/documentation\/factory\/previews","role":"article","type":"topic","title":"SwiftUI Previews"},"doc://Factory/documentation/Factory/Modifiers":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","kind":"article","role":"article","abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"url":"\/documentation\/factory\/modifiers","title":"Factory Modifiers","type":"topic"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/cycle.json b/docs/data/documentation/factory/cycle.json index 2e3a4aaa..3e6108d8 100644 --- a/docs/data/documentation/factory/cycle.json +++ b/docs/data/documentation/factory/cycle.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"content":[{"text":"Overview","type":"heading","level":2,"anchor":"Overview"},{"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"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You ask for a dependency, and in the process it asks for it’s dependencies, and so on, until everyone has what it needs to do its job."}]},{"syntax":"swift","code":["let demo = Container.shared.cycleDemo()"],"type":"codeListing"},{"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."}]},{"text":"The Players","level":2,"anchor":"The-Players","type":"heading"},{"inlineContent":[{"text":"Consider the following set of classes and protocols:","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["class CycleDemo {"," @Injected(\\.aService) var aService: AServiceType"," @Injected(\\.bService) var bService: BServiceType","}","","public protocol AServiceType: AnyObject {"," var id: UUID { get }","}","","public protocol BServiceType: AnyObject {"," var text: String","}","","class ImplementsAB: AServiceType, BServiceType {"," @Injected(\\.networkService) var networkService"," var id: UUID = UUID()"," var text: String = \"AB\"","}","","class NetworkService {"," @LazyInjected(\\.preferences) var preferences","}","","class Preferences {"," \/\/ just a demo class","}"]},{"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","type":"heading","anchor":"The-Registrations","level":2},{"type":"paragraph","inlineContent":[{"text":"So let’s look next at the Factory registrations.","type":"text"}]},{"syntax":"swift","type":"codeListing","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() }"," }","}"]},{"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"},{"type":"emphasis","inlineContent":[{"text":"another","type":"text"}]},{"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","anchor":"Tracing-the-Resolution-Cycle","level":2,"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,"type":"codeListing","code":["0: Container.cycleDemo = N:105553131389696","1: Container.aService = N:105553119821680","2: Container.implementsAB = N:105553119821680","3: Container.networkService = N:105553119770688","1: Container.bService = N:105553119821680","2: Container.implementsAB = C:105553119821680"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Again, cycleDemo wants an aService from implementsAB, which wants a networkService. That’s created and returned, and now cycleDemo wants an bService from implementsAB."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But implementsAB was cached in the graph scope, and so the same instance (105553119821680) is returned (and which is why we don’t see networkService resolved again)."}]},{"type":"paragraph","inlineContent":[{"text":"And with that Swift provides us with a fully initialized instance of CycleDemo and its dependencies.","type":"text"}]},{"inlineContent":[{"type":"text","text":"That’s a resolution cycle."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"You ask for a dependency, and in the process it asks for its dependencies, and so on, until everyone has what it needs to do its job."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"When the initial result is returned that resolution cycle is over."}]},{"inlineContent":[{"text":"Until next time.","type":"text"}],"type":"paragraph"},{"text":"Missing Preferences","level":2,"type":"heading","anchor":"Missing-Preferences"},{"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"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Kicking off its own resolution cycle."}]},{"level":2,"anchor":"The-Missing-Graph","type":"heading","text":"The Missing Graph"},{"inlineContent":[{"text":"Just for fun, let’s consider what we’d see if we did:","type":"text"}],"type":"paragraph"},{"syntax":"swift","code":["let demo = CycleDemo()"],"type":"codeListing"},{"inlineContent":[{"type":"text","text":"Here’s the trace."}],"type":"paragraph"},{"type":"codeListing","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":"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":[{"type":"text","text":"two"}],"type":"strong"},{"text":" instances of networkService being resolved and two distinct instances of implementsAB. What gives?","type":"text"}]},{"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"},{"type":"codeListing","code":["class CycleDemo {"," @Injected(\\.aService) var aService: AServiceType"," @Injected(\\.bService) var bService: BServiceType","}"],"syntax":"swift"},{"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":[{"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"}]},{"inlineContent":[{"type":"text","text":"Swap out implementsAB’s graph scope for, say, singleton, and you’d see the following:"}],"type":"paragraph"},{"type":"codeListing","syntax":null,"code":["0: Container.aService = N:105553118258000","1: Container.implementsAB = N:105553118258000","2: Container.networkService = N:105553118258480","0: Container.bService = N:105553118258000","1: Container.implementsAB = C:105553118258000"]},{"inlineContent":[{"type":"text","text":"Which is what we’d expect. (Note that now aService and bService are the same instance.)"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Our initial example worked because we asked Factory to make CycleDemo for us, and so everything after the fact occurred within a single resolution cycle launched from a single Factory."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Graph scopes are powerful tools, and well-suited to a specific type of problem. That said, they’re also tricky to get right. Use them with caution."}]}],"kind":"content"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Cycle"},"kind":"article","metadata":{"roleHeading":"Article","role":"article","modules":[{"name":"Factory"}],"title":"Resolution Cycles"},"abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"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}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/cycle"]}],"sections":[],"references":{"doc://Factory/documentation/Factory/Modifiers":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","type":"topic","title":"Factory Modifiers","abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"url":"\/documentation\/factory\/modifiers","kind":"article","role":"article"},"doc://Factory/documentation/Factory/Functional":{"type":"topic","kind":"article","title":"Functional Injection","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"url":"\/documentation\/factory\/functional","identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","role":"article"},"doc://Factory/documentation/Factory/Optionals":{"type":"topic","kind":"article","title":"Optionals and Dynamic Registration","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","url":"\/documentation\/factory\/optionals","role":"article"},"doc://Factory/documentation/Factory/Tags":{"role":"article","title":"Tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","url":"\/documentation\/factory\/tags","kind":"article","type":"topic"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Design":{"type":"topic","kind":"article","title":"Designing Factory","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","url":"\/documentation\/factory\/design","role":"article"},"doc://Factory/documentation/Factory/Modules":{"role":"article","title":"Modular Development","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","url":"\/documentation\/factory\/modules","kind":"article","type":"topic"}}} \ No newline at end of file +{"sections":[],"metadata":{"modules":[{"name":"Factory"}],"title":"Resolution Cycles","roleHeading":"Article","role":"article"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"schemaVersion":{"minor":3,"major":0,"patch":0},"kind":"article","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/cycle"]}],"abstract":[{"text":"What’s a resolution cycle, and why should we care?","type":"text"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/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}],"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","type":"heading","text":"Overview","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."}]},{"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"},{"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."}]},{"text":"The Players","type":"heading","anchor":"The-Players","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"Consider the following set of classes and protocols:"}]},{"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"},{"text":"The Registrations","level":2,"anchor":"The-Registrations","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"So let’s look next at the Factory registrations."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var cycleDemo: Factory {"," self { CycleDemo() }"," }"," var aService: Factory {"," self { self.implementsAB() }"," }"," var bService: Factory {"," self { self.implementsAB() }"," }"," private var implementsAB: Factory {"," self { ImplementsAB() }"," .graph"," }"," var networkService: Factory {"," self { NetworkService() }"," }"," var preferences: Factory {"," self { Preferences() }"," }","}"]},{"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":[{"text":"another","type":"text"}],"type":"emphasis"},{"text":" Factory to get an instance of implementsAB.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"That Factory, in turn, asks Swift to make ImplementsAB, but again, "},{"inlineContent":[{"type":"text","text":"that"}],"type":"emphasis"},{"text":" object needs to initialize with a NetworkService. Another call through Factory.","type":"text"}],"type":"paragraph"},{"level":2,"text":"Tracing the Resolution Cycle","anchor":"Tracing-the-Resolution-Cycle","type":"heading"},{"inlineContent":[{"text":"Let’s turn on Factory’s trace function and see what we get. (Trace was edited for clarity.)","type":"text"}],"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"},{"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"},{"type":"paragraph","inlineContent":[{"type":"text","text":"But implementsAB was cached in the graph scope, and so the same instance (105553119821680) is returned (and which is why we don’t see networkService resolved again)."}]},{"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"},{"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":[{"text":"Until next time.","type":"text"}]},{"level":2,"text":"Missing Preferences","type":"heading","anchor":"Missing-Preferences"},{"type":"paragraph","inlineContent":[{"type":"text","text":"You might be wondering why the Preferences object used by NetworkService didn’t appear. That’s because it’s using a LazyInjected property wrapper, and as such the Preferences object won’t be created until it’s accessed for the first time."}]},{"inlineContent":[{"text":"Kicking off its own resolution cycle.","type":"text"}],"type":"paragraph"},{"text":"The Missing Graph","type":"heading","anchor":"The-Missing-Graph","level":2},{"inlineContent":[{"text":"Just for fun, let’s consider what we’d see if we did:","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["let demo = CycleDemo()"]},{"inlineContent":[{"type":"text","text":"Here’s the trace."}],"type":"paragraph"},{"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"},{"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 "},{"inlineContent":[{"type":"text","text":"two"}],"type":"strong"},{"text":" instances of networkService being resolved and two distinct instances of implementsAB. What gives?","type":"text"}],"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":[{"type":"text","text":"Why? Let’s look at the class again."}]},{"syntax":"swift","code":["class CycleDemo {"," @Injected(\\.aService) var aService: AServiceType"," @Injected(\\.bService) var bService: BServiceType","}"],"type":"codeListing"},{"inlineContent":[{"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":"text"}],"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."}]},{"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"]},{"inlineContent":[{"type":"text","text":"Which is what we’d expect. (Note that now aService and bService are the same instance.)"}],"type":"paragraph"},{"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"}]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Tags":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","kind":"article","role":"article","abstract":[{"text":"Obtaining a list of dependencies of a given type.","type":"text"}],"url":"\/documentation\/factory\/tags","title":"Tags","type":"topic"},"doc://Factory/documentation/Factory/Modifiers":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","kind":"article","role":"article","abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"url":"\/documentation\/factory\/modifiers","title":"Factory Modifiers","type":"topic"},"doc://Factory/documentation/Factory/Modules":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","kind":"article","role":"article","abstract":[{"text":"Using Factory in a project with multiple modules.","type":"text"}],"url":"\/documentation\/factory\/modules","title":"Modular Development","type":"topic"},"doc://Factory/documentation/Factory/Functional":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","kind":"article","role":"article","abstract":[{"text":"Factory can inject more than service classes and structs.","type":"text"}],"url":"\/documentation\/factory\/functional","title":"Functional Injection","type":"topic"},"doc://Factory/documentation/Factory/Optionals":{"identifier":"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","url":"\/documentation\/factory\/optionals","role":"article"},"doc://Factory/documentation/Factory/Design":{"url":"\/documentation\/factory\/design","title":"Designing Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","kind":"article","role":"article","abstract":[{"text":"Rationale behind the design decisions made in Factory 1.0 and 2.0","type":"text"}],"type":"topic"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/debugging.json b/docs/data/documentation/factory/debugging.json index 4b5ccaf5..f4cbd828 100644 --- a/docs/data/documentation/factory/debugging.json +++ b/docs/data/documentation/factory/debugging.json @@ -1 +1 @@ -{"metadata":{"role":"article","modules":[{"name":"Factory"}],"title":"Debugging","roleHeading":"Article"},"variants":[{"paths":["\/documentation\/factory\/debugging"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"article","primaryContentSections":[{"content":[{"text":"Tracing the Resolution Cycle","anchor":"Tracing-the-Resolution-Cycle","type":"heading","level":2},{"inlineContent":[{"type":"text","text":"When running in DEBUG mode Factory allows you to trace the injection process and see every object instantiated or returned from a cache during a given "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle"},{"text":".","type":"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":[{"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"},{"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":"paragraph"},{"type":"codeListing","syntax":"swift","code":["Container.shared.manager.trace.toggle()"]},{"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"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that enabling trace logging enables it for "},{"type":"emphasis","inlineContent":[{"text":"all","type":"text"}]},{"type":"text","text":" containers."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"One final consideration is that logging the construction of an object will show everything initialized as part of that resolution cycle. Anything created lazily after the fact may not appear in the trace."}]},{"anchor":"Logging","type":"heading","text":"Logging","level":2},{"type":"paragraph","inlineContent":[{"text":"Trace logs are usually just printed to the system log, but you can change that behavior if needed.","type":"text"}]},{"code":["Container.shared.manager.logger = {"," MyLogger.debug(\"Factory: \\($0)\")","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note this changes the logging behavior for "},{"type":"emphasis","inlineContent":[{"text":"all","type":"text"}]},{"type":"text","text":" containers."}]},{"type":"heading","level":2,"anchor":"Circular-Dependency-Chain-Detection","text":"Circular Dependency Chain Detection"},{"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"}]},{"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":[{"text":"The subject’s a bit involved, so there’s an entire page devoted to it.","type":"text"}]},{"inlineContent":[{"text":"See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","isActive":true,"type":"reference"},{"text":".","type":"text"}],"type":"paragraph"}],"kind":"content"}],"seeAlsoSections":[{"generated":true,"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"]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Debugging","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"abstract":[{"text":"Additional support for debugging resolution cycles, dependency chains and other issue.","type":"text"}],"sections":[],"references":{"doc://Factory/documentation/Factory/Contexts":{"type":"topic","kind":"article","role":"article","url":"\/documentation\/factory\/contexts","title":"Contexts","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}]},"doc://Factory/documentation/Factory/Cycle":{"type":"topic","kind":"article","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"title":"Resolution Cycles","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","url":"\/documentation\/factory\/cycle","role":"article"},"doc://Factory/documentation/Factory/Testing":{"type":"topic","kind":"article","role":"article","url":"\/documentation\/factory\/testing","title":"Testing","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Chains":{"title":"Circular Dependency Chains","kind":"article","url":"\/documentation\/factory\/chains","type":"topic","role":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","abstract":[{"text":"Detecting and solving Circular Dependency Chains.","type":"text"}]},"doc://Factory/documentation/Factory/Previews":{"title":"SwiftUI Previews","kind":"article","url":"\/documentation\/factory\/previews","type":"topic","role":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","abstract":[{"text":"Mocking dependencies for SwiftUI Previews.","type":"text"}]}}} \ No newline at end of file +{"seeAlsoSections":[{"title":"Development and Testing","generated":true,"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Previews","doc:\/\/Factory\/documentation\/Factory\/Testing","doc:\/\/Factory\/documentation\/Factory\/Contexts","doc:\/\/Factory\/documentation\/Factory\/Chains"]}],"primaryContentSections":[{"content":[{"anchor":"Tracing-the-Resolution-Cycle","level":2,"type":"heading","text":"Tracing the Resolution Cycle"},{"inlineContent":[{"type":"text","text":"When running in DEBUG mode Factory allows you to trace the injection process and see every object instantiated or returned from a cache during a given "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","isActive":true},{"text":".","type":"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":[{"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"},{"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":"paragraph"},{"type":"codeListing","code":["Container.shared.manager.trace.toggle()"],"syntax":"swift"},{"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":[{"text":"all","type":"text"}]},{"text":" containers.","type":"text"}]},{"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"}],"type":"paragraph"},{"type":"heading","anchor":"Logging","text":"Logging","level":2},{"type":"paragraph","inlineContent":[{"text":"Trace logs are usually just printed to the system log, but you can change that behavior if needed.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.manager.logger = {"," MyLogger.debug(\"Factory: \\($0)\")","}"]},{"inlineContent":[{"type":"text","text":"Note this changes the logging behavior for "},{"type":"emphasis","inlineContent":[{"type":"text","text":"all"}]},{"text":" containers.","type":"text"}],"type":"paragraph"},{"text":"Circular Dependency Chain Detection","type":"heading","anchor":"Circular-Dependency-Chain-Detection","level":2},{"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"}],"type":"paragraph"},{"inlineContent":[{"text":"That’s a Circular Dependency Chain.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory can detect such things and warn you about them during the development process."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The subject’s a bit involved, so there’s an entire page devoted to it."}]},{"type":"paragraph","inlineContent":[{"text":"See ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains"},{"type":"text","text":"."}]}],"kind":"content"}],"sections":[],"metadata":{"modules":[{"name":"Factory"}],"role":"article","roleHeading":"Article","title":"Debugging"},"kind":"article","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Debugging","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/debugging"]}],"abstract":[{"text":"Additional support for debugging resolution cycles, dependency chains and other issue.","type":"text"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/Previews":{"abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","url":"\/documentation\/factory\/previews","role":"article","type":"topic","title":"SwiftUI Previews"},"doc://Factory/documentation/Factory/Testing":{"abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"kind":"article","url":"\/documentation\/factory\/testing","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","role":"article","type":"topic","title":"Testing"},"doc://Factory/documentation/Factory/Cycle":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","abstract":[{"text":"What’s a resolution cycle, and why should we care?","type":"text"}],"role":"article","title":"Resolution Cycles","url":"\/documentation\/factory\/cycle"},"doc://Factory/documentation/Factory/Contexts":{"url":"\/documentation\/factory\/contexts","kind":"article","role":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","title":"Contexts","abstract":[{"text":"Changing injection results under special circumstances.","type":"text"}]},"doc://Factory/documentation/Factory/Chains":{"kind":"article","title":"Circular Dependency Chains","url":"\/documentation\/factory\/chains","identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","role":"article","type":"topic","abstract":[{"type":"text","text":"Detecting and solving Circular Dependency Chains."}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/design.json b/docs/data/documentation/factory/design.json index 9c120d4c..80abc898 100644 --- a/docs/data/documentation/factory/design.json +++ b/docs/data/documentation/factory/design.json @@ -1 +1 @@ -{"sections":[],"schemaVersion":{"patch":0,"minor":3,"major":0},"seeAlsoSections":[{"generated":true,"title":"Advanced Topics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Modifiers","doc:\/\/Factory\/documentation\/Factory\/Modules","doc:\/\/Factory\/documentation\/Factory\/Cycle","doc:\/\/Factory\/documentation\/Factory\/Optionals","doc:\/\/Factory\/documentation\/Factory\/Functional","doc:\/\/Factory\/documentation\/Factory\/Tags"]}],"abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"primaryContentSections":[{"kind":"content","content":[{"type":"heading","anchor":"Factory-10","level":2,"text":"Factory 1.0"},{"inlineContent":[{"text":"The first dependency injection system I wrote was ","type":"text"},{"identifier":"https:\/\/github.com\/hmlongco\/Resolver","isActive":true,"type":"reference"},{"type":"text","text":". That open source project, while quite powerful and still in use in many applications, suffered from a few drawbacks."}],"type":"paragraph"},{"type":"orderedList","items":[{"content":[{"inlineContent":[{"text":"Resolver required pre-registration of all services up front.","type":"text"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"type":"text","text":"Resolver uses type inference to dynamically find and return registered services from a container."}],"type":"paragraph"}]}]},{"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":[{"type":"text","text":"The second issue, however, is more problematic since failure to find a matching registration for that type can lead to an application crash. In real life that isn’t usually a problem as such a thing tends to be noticed and fixed the first time you run a unit test or the second you run the application to see if your newest feature works."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But still… could we do better? That question lead me on a quest for compile-time type safety. Several other systems have attempted to solve this, but I didn’t want to have to add a source code scanning and generation step to my build process, nor did I want to give up a lot of the control and flexibility inherent in a run-time-based system."}]},{"type":"paragraph","inlineContent":[{"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","inlineContent":[{"text":"Turns out I could.","type":"text"}]},{"text":"A Simple Example","level":2,"type":"heading","anchor":"A-Simple-Example"},{"type":"paragraph","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"}]},{"inlineContent":[{"text":"Factory is no exception. Here’s a simple dependency registration as defined for Factory 1.0.","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["extension Container {"," static let myService = Factory { "," MyService()"," }","}"]},{"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"},{"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","code":["class ContentViewModel: ObservableObject {"," @Injected(Container.myService) private var myService"," ...","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here our view model uses one of Factory 1.0’s "},{"type":"codeVoice","code":"@Injected"},{"type":"text","text":" property wrappers to request the desired dependency. Similar to "},{"code":"@Environment","type":"codeVoice"},{"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":"text"},{"code":"ContentViewModel","type":"codeVoice"},{"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 "},{"inlineContent":[{"type":"text","text":"must"}],"type":"emphasis"},{"text":" define a factory. That factory ","type":"text"},{"inlineContent":[{"type":"text","text":"must"}],"type":"emphasis"},{"type":"text","text":" return the desired type when asked. Fail to do either one and the code will simply not compile."}]},{"inlineContent":[{"type":"text","text":"As such, Factory is compile-time safe."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"But there was still a problem…","type":"text"}]},{"anchor":"Service-Locator","text":"Service Locator","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Containers in Factory 1.X were essentially namespaces, and not actual object instances that could be passed around. That made the overall syntax a lot cleaner, but that tradeoff resulted in a lack of functionality and the static class definitions prevented Factory from being used in anything other than a Service Locator role."}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel: ObservableObject {"," var myService = Container.myService()"," ...","}"]},{"inlineContent":[{"type":"text","text":"While that sufficed for many projects, it prevented Factory from being used or considered in projects that wanted or needed a true container-based Dependency Injection system."}],"type":"paragraph"},{"inlineContent":[{"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"},{"level":2,"type":"heading","text":"Factory 2.0","anchor":"Factory-20"},{"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()"," }"," }","}"]},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This double-definition mechanism is required primarily because Swift doesn’t allow extensions to define new variables on an existing objects. As such, a computed variable was really the only choice."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that when we create the actual Factory we pass it a reference to the enclosing container."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Unlike Factory 1.0 which maintained a global store, each Factory 2.0 container stores its own registrations and manages its own scope caches. This means that we can create multiple instances of the same container type, each with their own distinct registrations and caches."}]},{"anchor":"Convenience","type":"heading","text":"Convenience","level":2},{"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":"paragraph"},{"code":["extension Container {"," var myService: Factory {"," self { MyService() }"," }","}"],"type":"codeListing","syntax":"swift"},{"level":2,"text":"Scopes","anchor":"Scopes","type":"heading"},{"inlineContent":[{"text":"Factory scopes work just as they did before, only now they’re defined using a SwiftUI-like modifier syntax.","type":"text"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["extension Container {"," var myService: Factory {"," self { MyService() }"," .singleton"," }","}"]},{"type":"heading","text":"Container.shared","level":2,"anchor":"Containershared"},{"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."}]},{"syntax":"swift","code":["let service = Container.shared.service()"],"type":"codeListing"},{"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"},{"level":2,"anchor":"Passing-Containers","type":"heading","text":"Passing Containers"},{"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"},{"type":"codeListing","code":["class ContentViewModel {"," let myService: MyServiceType"," init(container: Container) {"," myService = container.myService()"," }","}"],"syntax":"swift"},{"inlineContent":[{"type":"text","text":"Additional examples and methods can be seen on the "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","isActive":true},{"type":"text","text":" page."}],"type":"paragraph"},{"text":"Injected Property Wrappers","type":"heading","level":2,"anchor":"Injected-Property-Wrappers"},{"inlineContent":[{"type":"text","text":"Property wrappers like @Injected and @LazyInjected always reference the "},{"type":"codeVoice","code":"shared"},{"text":" container for that class type.","type":"text"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["class ContentViewModel: ObservableObject {"," @Injected(\\.myService) var myService","}"]},{"inlineContent":[{"text":"Factory 2.0 also updates the syntax to use keyPaths, much like SwiftUI environment variables.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","isActive":true},{"text":", ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","isActive":true,"type":"reference"},{"text":", ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","isActive":true},{"text":", and ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","isActive":true,"type":"reference"},{"type":"text","text":" for more."}]},{"level":2,"text":"Breaking Changes","type":"heading","anchor":"Breaking-Changes"},{"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":[{"type":"text","text":"But under the hood Factory 2.0 still gives you the same feature set provided by 1.0, while adding and supporting new functionality and use cases."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"I think it’s worth it."}]}]}],"kind":"article","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Design","interfaceLanguage":"swift"},"metadata":{"role":"article","title":"Designing Factory","modules":[{"name":"Factory"}],"roleHeading":"Article"},"variants":[{"paths":["\/documentation\/factory\/design"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/Optionals":{"type":"topic","kind":"article","title":"Optionals and Dynamic Registration","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","url":"\/documentation\/factory\/optionals","role":"article"},"doc://Factory/documentation/Factory/Modules":{"role":"article","title":"Modular Development","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","url":"\/documentation\/factory\/modules","kind":"article","type":"topic"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/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"},{"text":" ","kind":"text"},{"kind":"identifier","text":"WeakLazyInjected"}]},"doc://Factory/documentation/Factory/Modifiers":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","type":"topic","title":"Factory Modifiers","abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"url":"\/documentation\/factory\/modifiers","kind":"article","role":"article"},"doc://Factory/documentation/Factory/Tags":{"role":"article","title":"Tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","url":"\/documentation\/factory\/tags","kind":"article","type":"topic"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/InjectedObject":{"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","role":"symbol","title":"InjectedObject"},"doc://Factory/documentation/Factory/Cycle":{"type":"topic","kind":"article","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"title":"Resolution Cycles","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","url":"\/documentation\/factory\/cycle","role":"article"},"doc://Factory/documentation/Factory/Resolutions":{"type":"topic","kind":"article","role":"article","url":"\/documentation\/factory\/resolutions","title":"Sample Resolutions","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","abstract":[{"type":"text","text":"There are many ways to use Factory to resolve dependencies. Here are a few examples."}]},"doc://Factory/documentation/Factory/Functional":{"type":"topic","kind":"article","title":"Functional Injection","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"url":"\/documentation\/factory\/functional","identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","role":"article"},"https://github.com/hmlongco/Resolver":{"type":"link","identifier":"https:\/\/github.com\/hmlongco\/Resolver","titleInlineContent":[{"text":"Resolver","type":"text"}],"title":"Resolver","url":"https:\/\/github.com\/hmlongco\/Resolver"},"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}]},"doc://Factory/documentation/Factory/Injected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"title":"Injected","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]}}} \ No newline at end of file +{"sections":[],"abstract":[{"text":"Rationale behind the design decisions made in Factory 1.0 and 2.0","type":"text"}],"seeAlsoSections":[{"title":"Advanced Topics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Modifiers","doc:\/\/Factory\/documentation\/Factory\/Modules","doc:\/\/Factory\/documentation\/Factory\/Cycle","doc:\/\/Factory\/documentation\/Factory\/Optionals","doc:\/\/Factory\/documentation\/Factory\/Functional","doc:\/\/Factory\/documentation\/Factory\/Tags"],"generated":true}],"variants":[{"paths":["\/documentation\/factory\/design"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"kind":"content","content":[{"anchor":"Factory-10","level":2,"type":"heading","text":"Factory 1.0"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The first dependency injection system I wrote was "},{"isActive":true,"identifier":"https:\/\/github.com\/hmlongco\/Resolver","type":"reference"},{"type":"text","text":". That open source project, while quite powerful and still in use in many applications, suffered from a few drawbacks."}]},{"type":"orderedList","items":[{"content":[{"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":"paragraph","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","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"}]},{"inlineContent":[{"type":"text","text":"But still… could we do better? That question lead me on a quest for compile-time type safety. Several other systems have attempted to solve this, but I didn’t want to have to add a source code scanning and generation step to my build process, nor did I want to give up a lot of the control and flexibility inherent in a run-time-based system."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"I also wanted something simple, fast, clean, and easy to use."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Could I have my cake and eat it too?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Turns out I could."}]},{"anchor":"A-Simple-Example","type":"heading","level":2,"text":"A Simple Example"},{"inlineContent":[{"type":"text","text":"Most container-based dependency injection systems require you to define in some way that a given service type is available for injection and many require some sort of factory or mechanism that will provide a new instance of the service when needed."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Factory is no exception. Here’s a simple dependency registration as defined for Factory 1.0.","type":"text"}]},{"syntax":"swift","code":["extension Container {"," static let myService = Factory { "," MyService()"," }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Unlike Resolver which often requires defining a plethora of nested registration functions, or SwiftUI, where defining a new environment variable requires creating a new EnvironmentKey and adding additional getters and setters, here we simply add a new "},{"type":"codeVoice","code":"Factory"},{"text":" to the default container. When called, the factory closure is evaluated and returns an instance of our dependency. That’s it.","type":"text"}]},{"inlineContent":[{"type":"text","text":"Injecting and using the service where needed is equally straightforward. Here’s one way to do it."}],"type":"paragraph"},{"syntax":"swift","code":["class ContentViewModel: ObservableObject {"," @Injected(Container.myService) private var myService"," ...","}"],"type":"codeListing"},{"inlineContent":[{"text":"Here our view model uses one of Factory 1.0’s ","type":"text"},{"code":"@Injected","type":"codeVoice"},{"text":" property wrappers to request the desired dependency. Similar to ","type":"text"},{"code":"@Environment","type":"codeVoice"},{"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":"text"},{"code":"ContentViewModel","type":"codeVoice"},{"type":"text","text":" is created."}],"type":"paragraph"},{"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"}]},{"type":"text","text":" define a factory. That factory "},{"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"}]},{"inlineContent":[{"type":"text","text":"But there was still a problem…"}],"type":"paragraph"},{"text":"Service Locator","level":2,"anchor":"Service-Locator","type":"heading"},{"type":"paragraph","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":"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"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s take a look."}]},{"anchor":"Factory-20","level":2,"type":"heading","text":"Factory 2.0"},{"inlineContent":[{"type":"text","text":"Here’s our earlier example, rebuilt for Factory 2.0."}],"type":"paragraph"},{"syntax":"swift","code":["extension Container {"," var myService: Factory {"," Factory(self) { "," MyService()"," }"," }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This double-definition mechanism is required primarily because Swift doesn’t allow extensions to define new variables on an existing objects. As such, a computed variable was really the only choice."}]},{"type":"paragraph","inlineContent":[{"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","type":"heading","anchor":"Convenience","level":2},{"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":"paragraph"},{"type":"codeListing","code":["extension Container {"," var myService: Factory {"," self { MyService() }"," }","}"],"syntax":"swift"},{"anchor":"Scopes","level":2,"type":"heading","text":"Scopes"},{"inlineContent":[{"text":"Factory scopes work just as they did before, only now they’re defined using a SwiftUI-like modifier syntax.","type":"text"}],"type":"paragraph"},{"code":["extension Container {"," var myService: Factory {"," self { MyService() }"," .singleton"," }","}"],"syntax":"swift","type":"codeListing"},{"type":"heading","anchor":"Containershared","text":"Container.shared","level":2},{"type":"paragraph","inlineContent":[{"text":"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 still want to use 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."}]},{"anchor":"Passing-Containers","type":"heading","level":2,"text":"Passing Containers"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s an example of passing an instance of a container to a view model and then initializing a service from that container. Doing this sort of thing is the primary rationale behind the changes to Factory for 2.0."}]},{"syntax":"swift","type":"codeListing","code":["class ContentViewModel {"," let myService: MyServiceType"," init(container: Container) {"," myService = container.myService()"," }","}"]},{"inlineContent":[{"text":"Additional examples and methods can be seen on the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions"},{"text":" page.","type":"text"}],"type":"paragraph"},{"text":"Injected Property Wrappers","type":"heading","level":2,"anchor":"Injected-Property-Wrappers"},{"type":"paragraph","inlineContent":[{"text":"Property wrappers like @Injected and @LazyInjected always reference the ","type":"text"},{"type":"codeVoice","code":"shared"},{"text":" container for that class type.","type":"text"}]},{"syntax":"swift","code":["class ContentViewModel: ObservableObject {"," @Injected(\\.myService) var myService","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"Factory 2.0 also updates the syntax to use keyPaths, much like SwiftUI environment variables.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"See ","type":"text"},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","type":"reference"},{"type":"text","text":", "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","type":"reference","isActive":true},{"text":", ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","isActive":true},{"type":"text","text":", "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected","isActive":true},{"type":"text","text":" and "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"reference"},{"text":" for more.","type":"text"}]},{"text":"Breaking Changes","type":"heading","level":2,"anchor":"Breaking-Changes"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Unfortunately, supporting true container-based DI required some major surgery on Factory 1.0’s syntax across the board. That’s why it’s version 2.0."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But under the hood Factory 2.0 still gives you the same feature set provided by 1.0, while adding and supporting new functionality and use cases."}]},{"inlineContent":[{"text":"I think it’s worth it.","type":"text"}],"type":"paragraph"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Design","interfaceLanguage":"swift"},"kind":"article","metadata":{"roleHeading":"Article","modules":[{"name":"Factory"}],"title":"Designing Factory","role":"article"},"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory/WeakLazyInjected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"title":"WeakLazyInjected","url":"\/documentation\/factory\/weaklazyinjected","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"text":"WeakLazyInjected","kind":"identifier"}]},"doc://Factory/documentation/Factory/Optionals":{"identifier":"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","url":"\/documentation\/factory\/optionals","role":"article"},"doc://Factory/documentation/Factory/Cycle":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","abstract":[{"text":"What’s a resolution cycle, and why should we care?","type":"text"}],"role":"article","title":"Resolution Cycles","url":"\/documentation\/factory\/cycle"},"doc://Factory/documentation/Factory/Modifiers":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","kind":"article","role":"article","abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"url":"\/documentation\/factory\/modifiers","title":"Factory Modifiers","type":"topic"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","title":"InjectedObject","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}]},"doc://Factory/documentation/Factory/Functional":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","kind":"article","role":"article","abstract":[{"text":"Factory can inject more than service classes and structs.","type":"text"}],"url":"\/documentation\/factory\/functional","title":"Functional Injection","type":"topic"},"doc://Factory/documentation/Factory/Resolutions":{"role":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","title":"Sample Resolutions","kind":"article","url":"\/documentation\/factory\/resolutions","abstract":[{"type":"text","text":"There are many ways to use Factory to resolve dependencies. Here are a few examples."}]},"doc://Factory/documentation/Factory/Tags":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","kind":"article","role":"article","abstract":[{"text":"Obtaining a list of dependencies of a given type.","type":"text"}],"url":"\/documentation\/factory\/tags","title":"Tags","type":"topic"},"doc://Factory/documentation/Factory/DynamicInjected":{"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"DynamicInjected"}],"navigatorTitle":[{"text":"DynamicInjected","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected","kind":"symbol","type":"topic","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"title":"DynamicInjected","role":"symbol","url":"\/documentation\/factory\/dynamicinjected"},"https://github.com/hmlongco/Resolver":{"type":"link","title":"Resolver","titleInlineContent":[{"text":"Resolver","type":"text"}],"url":"https:\/\/github.com\/hmlongco\/Resolver","identifier":"https:\/\/github.com\/hmlongco\/Resolver"},"doc://Factory/documentation/Factory/Modules":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","kind":"article","role":"article","abstract":[{"text":"Using Factory in a project with multiple modules.","type":"text"}],"url":"\/documentation\/factory\/modules","title":"Modular Development","type":"topic"},"doc://Factory/documentation/Factory/Injected":{"navigatorTitle":[{"text":"Injected","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"role":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/dynamicinjected.json b/docs/data/documentation/factory/dynamicinjected.json new file mode 100644 index 00000000..9fa6f934 --- /dev/null +++ b/docs/data/documentation/factory/dynamicinjected.json @@ -0,0 +1 @@ +{"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@propertyWrapper"},{"text":" ","kind":"text"},{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"DynamicInjected"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"level":2,"text":"Overview","type":"heading","anchor":"overview"},{"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 {"," @DynamicInjected(\\.myService) var service1"," @DynamicInjected(\\MyCustomContainer.myService) var service2","}"]},{"type":"paragraph","inlineContent":[{"text":"The provided keypath resolves to a Factory definition on the ","type":"text"},{"type":"codeVoice","code":"shared"},{"text":" container required for each Container type.","type":"text"},{"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 of your own custom container type.","type":"text"}]},{"style":"important","name":"Important","type":"aside","content":[{"inlineContent":[{"type":"text","text":"The @DynamicInjected property wrapper’s Factory will be resolved on each and every "},{"type":"strong","inlineContent":[{"type":"text","text":"access"}]},{"text":".","type":"text"}],"type":"paragraph"}]},{"type":"paragraph","inlineContent":[{"text":"In the above example the referenced dependencies will be resolved and acquired each and every time one of the","type":"text"},{"type":"text","text":" "},{"type":"text","text":"properties are accessed."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"If the dependency is stateless this shouldn’t be an issue. If the dependency needs to maintain state, however,"},{"type":"text","text":" "},{"type":"text","text":"then it probably needs to be cached using one of Factory’s caching mechanisms."}]},{"code":["extension Container {"," var myService: Factory {"," self { MyService() }.cached"," }","}"],"syntax":"swift","type":"codeListing"}]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/dynamicinjected"]}],"metadata":{"role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"DynamicInjected","kind":"identifier"}],"symbolKind":"struct","title":"DynamicInjected","navigatorTitle":[{"text":"DynamicInjected","kind":"identifier"}],"externalID":"s:7Factory15DynamicInjectedV","roleHeading":"Structure","modules":[{"name":"Factory"}]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected","interfaceLanguage":"swift"},"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/DynamicInjected\/init(_:)-2f6gs","doc:\/\/Factory\/documentation\/Factory\/DynamicInjected\/init(_:)-3wi25"],"title":"Initializers"},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/DynamicInjected\/projectedValue","doc:\/\/Factory\/documentation\/Factory\/DynamicInjected\/wrappedValue"]}],"sections":[],"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"references":{"doc://Factory/documentation/Factory/DynamicInjected/projectedValue":{"title":"projectedValue","identifier":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected\/projectedValue","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"url":"\/documentation\/factory\/dynamicinjected\/projectedvalue","abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"kind":"symbol"},"doc://Factory/documentation/Factory/DynamicInjected/wrappedValue":{"role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"wrappedValue"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"text":"Manages the wrapped dependency.","type":"text"}],"kind":"symbol","title":"wrappedValue","url":"\/documentation\/factory\/dynamicinjected\/wrappedvalue","identifier":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected\/wrappedValue","type":"topic"},"doc://Factory/documentation/Factory/DynamicInjected":{"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"DynamicInjected"}],"navigatorTitle":[{"text":"DynamicInjected","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected","kind":"symbol","type":"topic","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"title":"DynamicInjected","role":"symbol","url":"\/documentation\/factory\/dynamicinjected"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/DynamicInjected/init(_:)-2f6gs":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected\/init(_:)-2f6gs","kind":"symbol","type":"topic","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"<"},{"text":"C","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"text":"C","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"url":"\/documentation\/factory\/dynamicinjected\/init(_:)-2f6gs","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on access."}],"title":"init(_:)"},"doc://Factory/documentation/Factory/DynamicInjected/init(_:)-3wi25":{"role":"symbol","url":"\/documentation\/factory\/dynamicinjected\/init(_:)-3wi25","abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on access.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected\/init(_:)-3wi25","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"kind":"text","text":"<"},{"preciseIdentifier":"s:7Factory9ContainerC","text":"Container","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"type":"topic","kind":"symbol","title":"init(_:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/dynamicinjected/init(_:)-2f6gs.json b/docs/data/documentation/factory/dynamicinjected/init(_:)-2f6gs.json new file mode 100644 index 00000000..deef43d9 --- /dev/null +++ b/docs/data/documentation/factory/dynamicinjected/init(_:)-2f6gs.json @@ -0,0 +1 @@ +{"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"init","kind":"keyword"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"keyPath","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"C"},{"text":", ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">>) ","kind":"text"},{"kind":"keyword","text":"where"},{"text":" ","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"text":" : ","kind":"text"},{"text":"SharedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","preciseIdentifier":"s:7Factory15SharedContainerP","kind":"typeIdentifier"}],"languages":["swift"]}],"kind":"declarations"},{"parameters":[{"content":[{"inlineContent":[{"type":"text","text":"KeyPath to a Factory on the specified Container."}],"type":"paragraph"}],"name":"keyPath"}],"kind":"parameters"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/DynamicInjected"]]},"kind":"symbol","abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on access.","type":"text"}],"sections":[],"metadata":{"role":"symbol","modules":[{"name":"Factory"}],"symbolKind":"init","roleHeading":"Initializer","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}],"title":"init(_:)","externalID":"s:7Factory15DynamicInjectedVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected\/init(_:)-2f6gs","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/dynamicinjected\/init(_:)-2f6gs"]}],"references":{"doc://Factory/documentation/Factory/DynamicInjected":{"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"DynamicInjected"}],"navigatorTitle":[{"text":"DynamicInjected","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected","kind":"symbol","type":"topic","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"title":"DynamicInjected","role":"symbol","url":"\/documentation\/factory\/dynamicinjected"},"doc://Factory/documentation/Factory/SharedContainer":{"url":"\/documentation\/factory\/sharedcontainer","type":"topic","abstract":[{"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.","type":"text"}],"title":"SharedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"SharedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/DynamicInjected/init(_:)-2f6gs":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected\/init(_:)-2f6gs","kind":"symbol","type":"topic","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"<"},{"text":"C","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"text":"C","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"url":"\/documentation\/factory\/dynamicinjected\/init(_:)-2f6gs","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on access."}],"title":"init(_:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/dynamicinjected/init(_:)-3wi25.json b/docs/data/documentation/factory/dynamicinjected/init(_:)-3wi25.json new file mode 100644 index 00000000..25e9c97c --- /dev/null +++ b/docs/data/documentation/factory/dynamicinjected/init(_:)-3wi25.json @@ -0,0 +1 @@ +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected\/init(_:)-3wi25"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/dynamicinjected\/init(_:)-3wi25"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/DynamicInjected"]]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"keyPath","kind":"internalParam"},{"kind":"text","text":": "},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","text":"Container"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}],"languages":["swift"]}],"kind":"declarations"},{"kind":"parameters","parameters":[{"content":[{"inlineContent":[{"text":"KeyPath to a Factory on the default Container.","type":"text"}],"type":"paragraph"}],"name":"keyPath"}]}],"sections":[],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on access."}],"schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"symbolKind":"init","title":"init(_:)","roleHeading":"Initializer","modules":[{"name":"Factory"}],"externalID":"s:7Factory15DynamicInjectedVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc","role":"symbol","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"text":"Container","preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}]},"kind":"symbol","references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/DynamicInjected":{"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"DynamicInjected"}],"navigatorTitle":[{"text":"DynamicInjected","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected","kind":"symbol","type":"topic","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"title":"DynamicInjected","role":"symbol","url":"\/documentation\/factory\/dynamicinjected"},"doc://Factory/documentation/Factory/Container":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","title":"Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"url":"\/documentation\/factory\/container","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}],"navigatorTitle":[{"text":"Container","kind":"identifier"}]},"doc://Factory/documentation/Factory/DynamicInjected/init(_:)-3wi25":{"role":"symbol","url":"\/documentation\/factory\/dynamicinjected\/init(_:)-3wi25","abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on access.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected\/init(_:)-3wi25","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"kind":"text","text":"<"},{"preciseIdentifier":"s:7Factory9ContainerC","text":"Container","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"type":"topic","kind":"symbol","title":"init(_:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/dynamicinjected/projectedvalue.json b/docs/data/documentation/factory/dynamicinjected/projectedvalue.json new file mode 100644 index 00000000..ec7db64b --- /dev/null +++ b/docs/data/documentation/factory/dynamicinjected/projectedvalue.json @@ -0,0 +1 @@ +{"abstract":[{"text":"Unwraps the property wrapper granting access to the resolve\/reset function.","type":"text"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected\/projectedValue","interfaceLanguage":"swift"},"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"projectedValue","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"typeIdentifier","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":"> { ","kind":"text"},{"text":"get","kind":"keyword"},{"kind":"text","text":" }"}],"languages":["swift"]}]}],"variants":[{"paths":["\/documentation\/factory\/dynamicinjected\/projectedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","metadata":{"title":"projectedValue","role":"symbol","externalID":"s:7Factory15DynamicInjectedV14projectedValueA2AVyxGvp","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"modules":[{"name":"Factory"}],"roleHeading":"Instance Property","symbolKind":"property"},"schemaVersion":{"patch":0,"minor":3,"major":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/DynamicInjected"]]},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/DynamicInjected":{"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"DynamicInjected"}],"navigatorTitle":[{"text":"DynamicInjected","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected","kind":"symbol","type":"topic","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"title":"DynamicInjected","role":"symbol","url":"\/documentation\/factory\/dynamicinjected"},"doc://Factory/documentation/Factory/DynamicInjected/projectedValue":{"title":"projectedValue","identifier":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected\/projectedValue","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"url":"\/documentation\/factory\/dynamicinjected\/projectedvalue","abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/dynamicinjected/wrappedvalue.json b/docs/data/documentation/factory/dynamicinjected/wrappedvalue.json new file mode 100644 index 00000000..7c1e974a --- /dev/null +++ b/docs/data/documentation/factory/dynamicinjected/wrappedvalue.json @@ -0,0 +1 @@ +{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected\/wrappedValue","interfaceLanguage":"swift"},"kind":"symbol","schemaVersion":{"minor":3,"major":0,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"wrappedValue","kind":"identifier"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}],"platforms":["macOS"]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/DynamicInjected"]]},"abstract":[{"text":"Manages the wrapped dependency.","type":"text"}],"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/dynamicinjected\/wrappedvalue"]}],"metadata":{"title":"wrappedValue","externalID":"s:7Factory15DynamicInjectedV12wrappedValuexvp","role":"symbol","modules":[{"name":"Factory"}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"roleHeading":"Instance Property","symbolKind":"property"},"references":{"doc://Factory/documentation/Factory/DynamicInjected/wrappedValue":{"role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"wrappedValue"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"T"}],"abstract":[{"text":"Manages the wrapped dependency.","type":"text"}],"kind":"symbol","title":"wrappedValue","url":"\/documentation\/factory\/dynamicinjected\/wrappedvalue","identifier":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected\/wrappedValue","type":"topic"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/DynamicInjected":{"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"DynamicInjected"}],"navigatorTitle":[{"text":"DynamicInjected","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected","kind":"symbol","type":"topic","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"title":"DynamicInjected","role":"symbol","url":"\/documentation\/factory\/dynamicinjected"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory.json b/docs/data/documentation/factory/factory.json index 3a712625..58f226f2 100644 --- a/docs/data/documentation/factory/factory.json +++ b/docs/data/documentation/factory/factory.json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">","kind":"text"}]}],"kind":"declarations"},{"content":[{"level":2,"anchor":"overview","type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"It’s used to produce an object of the desired type when required. This may be a brand new instance or Factory may"},{"type":"text","text":" "},{"type":"text","text":"return a previously cached value from the specified scope."}]},{"type":"heading","text":"Defining a Factory","anchor":"Defining-a-Factory","level":2},{"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"},{"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"},{"type":"text","text":". The type must be explicitly defined, and is usually a"},{"text":" ","type":"text"},{"type":"text","text":"protocol to which the returned dependency conforms."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," Factory(self) { MyService() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Inside the computed variable we define our Factory, passing it a reference to the enclosing container. We also provide it with"},{"type":"text","text":" "},{"type":"text","text":"a closure that creates an instance of our dependency when required. That Factory is then returned to the caller, usually to be evaluated"},{"type":"text","text":" "},{"text":"(see ","type":"text"},{"type":"codeVoice","code":"callAsFunction()"},{"type":"text","text":" below). Every time we resolve this factory we’ll get a new, unique instance of our object."}]},{"inlineContent":[{"type":"text","text":"Factory also provides a bit of syntactic sugar that lets us do the same thing in a more convenient form,"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"]},{"type":"heading","anchor":"Transient","level":2,"text":"Transient"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you’re concerned about building Factory’s on the fly, don’t be. Like SwiftUI Views, Factory structs and modifiers"},{"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":"text"}]},{"inlineContent":[{"type":"text","text":"Other operations exist for Factory. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"},{"text":".","type":"text"}],"type":"paragraph"}],"kind":"content"}],"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory\/init(_:key:_:)"]},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory\/registration"]},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","doc:\/\/Factory\/documentation\/Factory\/Factory\/register(factory:)","doc:\/\/Factory\/documentation\/Factory\/Factory\/resolve()"]},{"title":"Default Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"],"generated":true}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","doc:\/\/Factory\/s8SendableP"],"kind":"relationships","title":"Conforms To","type":"conformsTo"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory"]}],"kind":"symbol","metadata":{"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}],"externalID":"s:7FactoryAAV","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"modules":[{"name":"Factory"}],"title":"Factory","role":"symbol","symbolKind":"struct","roleHeading":"Structure"},"schemaVersion":{"patch":0,"minor":3,"major":0},"references":{"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"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."}],"type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/Factory/init(_:key:_:)":{"url":"\/documentation\/factory\/factory\/init(_:key:_:)","kind":"symbol","fragments":[{"kind":"identifier","text":"init"},{"text":"(any ","kind":"text"},{"text":"ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"StaticString","preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier"},{"text":", () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":")"}],"title":"init(_:key:_:)","type":"topic","abstract":[{"type":"text","text":"Public initializer creates a Factory capable of managing dependencies of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/init(_:key:_:)","role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"kind":"article","title":"FactoryModifying Implementations","role":"collectionGroup","type":"topic","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"},"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"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"callAsFunction","kind":"identifier"},{"kind":"text","text":"() -> "},{"text":"T","kind":"typeIdentifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","title":"callAsFunction()","url":"\/documentation\/factory\/factory\/callasfunction()","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Factory/resolve()":{"abstract":[{"type":"text","text":"Unsugared resolution function."}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"() -> "},{"text":"T","kind":"typeIdentifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/resolve()","title":"resolve()","url":"\/documentation\/factory\/factory\/resolve()","role":"symbol","kind":"symbol"},"doc://Factory/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"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"register","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/register(factory:)","title":"register(factory:)","url":"\/documentation\/factory\/factory\/register(factory:)","role":"symbol","kind":"symbol"},"doc://Factory/s8SendableP":{"identifier":"doc:\/\/Factory\/s8SendableP","title":"Swift.Sendable","type":"unresolvable"},"doc://Factory/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":" "},{"text":"and others.","type":"text"}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"registration","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12RegistrationV","text":"FactoryRegistration"},{"text":"<","kind":"text"},{"preciseIdentifier":"s:s4Voida","text":"Void","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/registration","title":"registration","url":"\/documentation\/factory\/factory\/registration","role":"symbol","kind":"symbol"}}} \ No newline at end of file +{"relationshipsSections":[{"title":"Conforms To","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","doc:\/\/Factory\/s8SendableP"],"type":"conformsTo","kind":"relationships"}],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"kind":"content","content":[{"anchor":"overview","type":"heading","text":"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":" "},{"text":"return a previously cached value from the specified scope.","type":"text"}]},{"text":"Defining a Factory","level":2,"anchor":"Defining-a-Factory","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s define a Factory that returns an instance of "},{"code":"ServiceType","type":"codeVoice"},{"text":". To do that we need to extend a Factory ","type":"text"},{"type":"codeVoice","code":"Container"},{"type":"text","text":" and within"},{"type":"text","text":" "},{"text":"that container we define a new computed variable of type ","type":"text"},{"type":"codeVoice","code":"Factory"},{"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":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," Factory(self) { MyService() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Inside the computed variable we define our Factory, passing it a reference to the enclosing container. We also provide it with"},{"type":"text","text":" "},{"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"},{"type":"codeVoice","code":"callAsFunction()"},{"type":"text","text":" below). Every time we resolve this factory we’ll get a new, unique instance of our object."}]},{"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":"paragraph"},{"type":"codeListing","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"],"syntax":"swift"},{"type":"heading","level":2,"anchor":"Transient","text":"Transient"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you’re concerned about building Factory’s on the fly, don’t be. Like SwiftUI Views, Factory structs and modifiers"},{"type":"text","text":" "},{"type":"text","text":"are lightweight and transitory. They’re created when needed and then immediately discarded once their purpose has"},{"type":"text","text":" "},{"type":"text","text":"been served."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Other operations exist for Factory. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","isActive":true,"type":"reference"},{"type":"text","text":"."}]}]}],"abstract":[{"type":"text","text":"A Factory manages the dependency injection process for a specific object or service."}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory\/init(_:key:_:)"],"title":"Initializers"},{"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()"]},{"title":"Default Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"],"generated":true}],"metadata":{"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Factory","kind":"identifier"}],"navigatorTitle":[{"text":"Factory","kind":"identifier"}],"role":"symbol","roleHeading":"Structure","externalID":"s:7FactoryAAV","title":"Factory","symbolKind":"struct","modules":[{"name":"Factory"}]},"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"paths":["\/documentation\/factory\/factory"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","sections":[],"references":{"doc://Factory/documentation/Factory/Factory/register(factory:)":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/register(factory:)","kind":"symbol","abstract":[{"type":"text","text":"Registers a new factory closure capable of producing an object or service of the desired type."}],"role":"symbol","title":"register(factory:)","url":"\/documentation\/factory\/factory\/register(factory:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"register"},{"text":"(","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":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}]},"doc://Factory/s8SendableP":{"type":"unresolvable","identifier":"doc:\/\/Factory\/s8SendableP","title":"Swift.Sendable"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory/resolve()":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/resolve()","title":"resolve()","url":"\/documentation\/factory\/factory\/resolve()","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"() -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"abstract":[{"text":"Unsugared resolution function.","type":"text"}],"role":"symbol","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/factory\/factorymodifying-implementations","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory/Factory/init(_:key:_:)":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"(any "},{"kind":"typeIdentifier","text":"ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP"},{"text":", ","kind":"text"},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s12StaticStringV","text":"StaticString","kind":"typeIdentifier"},{"kind":"text","text":", () -> "},{"text":"T","kind":"typeIdentifier"},{"text":")","kind":"text"}],"kind":"symbol","type":"topic","title":"init(_:key:_:)","url":"\/documentation\/factory\/factory\/init(_:key:_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/init(_:key:_:)","role":"symbol","abstract":[{"text":"Public initializer creates a Factory capable of managing dependencies of the desired type.","type":"text"}]},"doc://Factory/documentation/Factory/Factory/registration":{"url":"\/documentation\/factory\/factory\/registration","kind":"symbol","type":"topic","role":"symbol","title":"registration","abstract":[{"type":"text","text":"Internal parameters for this Factory including id, container, the factory closure itself, the scope,"},{"text":" ","type":"text"},{"text":"and others.","type":"text"}],"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"registration","kind":"identifier"},{"text":": ","kind":"text"},{"text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/registration"},"doc://Factory/documentation/Factory/Factory/callAsFunction()":{"role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"text":"() -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"kind":"symbol","title":"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"},{"text":" ","type":"text"},{"text":"return a cached value from the specified scope.","type":"text"}],"url":"\/documentation\/factory\/factory\/callasfunction()","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","type":"topic"}}} \ 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 9f9b5636..3d6ac2dd 100644 --- a/docs/data/documentation/factory/factory/cached.json +++ b/docs/data/documentation/factory/factory/cached.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":"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"}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"platforms":["macOS"]}],"kind":"declarations"},{"content":[{"anchor":"discussion","text":"Discussion","level":2,"type":"heading"},{"syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .cached","}"],"type":"codeListing"}],"kind":"content"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/cached","interfaceLanguage":"swift"},"schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/cached"]}],"sections":[],"metadata":{"roleHeading":"Instance Property","extendedModule":"Factory","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"cached","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"symbolKind":"property","title":"cached","externalID":"s:7Factory0A9ModifyingPAAE6cachedxvp::SYNTHESIZED::s:7FactoryAAV","modules":[{"name":"Factory"}],"role":"symbol"},"kind":"symbol","references":{"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"kind":"article","title":"FactoryModifying Implementations","role":"collectionGroup","type":"topic","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Factory/cached":{"title":"cached","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"}],"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"cached","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factory\/cached","kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/cached","type":"topic"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"navigatorTitle":[{"text":"Cached","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/cached-swift.class","type":"topic","title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}]}}} \ No newline at end of file +{"sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"symbol","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":"."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/cached","interfaceLanguage":"swift"},"metadata":{"modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"cached","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"title":"cached","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE6cachedxvp::SYNTHESIZED::s:7FactoryAAV","symbolKind":"property","roleHeading":"Instance Property","extendedModule":"Factory"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"cached","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":[{"anchor":"discussion","text":"Discussion","type":"heading","level":2},{"code":["var service: Factory {"," factory { MyService() }"," .cached","}"],"type":"codeListing","syntax":"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\/cached"]}],"references":{"doc://Factory/documentation/Factory/Factory/cached":{"kind":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"cached","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"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"},{"text":".","type":"text"}],"title":"cached","url":"\/documentation\/factory\/factory\/cached","role":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/cached"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/factory\/factorymodifying-implementations","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/cached-swift.class","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 a5671c01..e25cb400 100644 --- a/docs/data/documentation/factory/factory/callasfunction().json +++ b/docs/data/documentation/factory/factory/callasfunction().json @@ -1 +1 @@ -{"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"kind":"symbol","primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"languages":["swift"]}],"kind":"declarations"},{"content":[{"level":2,"text":"Return Value","anchor":"return-value","type":"heading"},{"type":"paragraph","inlineContent":[{"text":"An object or service of the desired type.","type":"text"}]}],"kind":"content"},{"content":[{"type":"heading","level":2,"text":"Discussion","anchor":"discussion"},{"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"},{"type":"text","text":" "},{"type":"text","text":"and every container type."}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["let service = Container.shared.service()"]},{"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},{"type":"text","text":"."}],"type":"paragraph"},{"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"},{"type":"codeListing","syntax":"swift","code":["let service = container.service()"]},{"type":"paragraph","inlineContent":[{"text":"Finally, you can also use the @Injected property wrapper and specify a keyPaths to the desired dependency.","type":"text"}]},{"code":["@Injected(\\.service) var service: ServiceType"],"syntax":"swift","type":"codeListing"},{"inlineContent":[{"text":"Unless otherwise specified, the @Injected property wrapper looks for dependencies in the standard shared container provided by Factory,","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"so the above example is functionally identical to the "},{"type":"codeVoice","code":"Container.shared.service()"},{"type":"text","text":" example shown earlier. Here’s one pointing to"},{"type":"text","text":" "},{"text":"your own container.","type":"text"}],"type":"paragraph"},{"code":["@Injected(\\MyCustomContainer.service) var service: ServiceType"],"syntax":"swift","type":"codeListing"}],"kind":"content"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/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"},{"type":"text","text":" "},{"type":"text","text":"return a cached value from the specified scope."}],"metadata":{"roleHeading":"Instance Method","title":"callAsFunction()","role":"symbol","externalID":"s:7FactoryAAV14callAsFunctionxyF","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"() -> "},{"text":"T","kind":"typeIdentifier"}],"modules":[{"name":"Factory"}],"symbolKind":"method"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()"},"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"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"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"callAsFunction","kind":"identifier"},{"kind":"text","text":"() -> "},{"text":"T","kind":"typeIdentifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","title":"callAsFunction()","url":"\/documentation\/factory\/factory\/callasfunction()","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/callasfunction()"]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"sections":[],"metadata":{"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"roleHeading":"Instance Method","symbolKind":"method","title":"callAsFunction()","externalID":"s:7FactoryAAV14callAsFunctionxyF","modules":[{"name":"Factory"}]},"abstract":[{"type":"text","text":"Evaluates the factory and returns an object or service of the desired type. The resolved instance may be brand new or Factory may"},{"type":"text","text":" "},{"text":"return a cached value from the specified scope.","type":"text"}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"}],"languages":["swift"]}]},{"content":[{"anchor":"return-value","level":2,"text":"Return Value","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"An object or service of the desired type."}]}],"kind":"content"},{"kind":"content","content":[{"level":2,"anchor":"discussion","type":"heading","text":"Discussion"},{"inlineContent":[{"text":"To resolve the Factory one simply calls the Factory as a function. Here we use the ","type":"text"},{"type":"codeVoice","code":"shared"},{"type":"text","text":" container that’s provided for each"},{"text":" ","type":"text"},{"type":"text","text":"and every container type."}],"type":"paragraph"},{"code":["let service = Container.shared.service()"],"type":"codeListing","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","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true},{"text":".","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you’re passing an instance of a container around to your views or view models, just call it directly."}]},{"type":"codeListing","syntax":"swift","code":["let service = container.service()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Finally, you can also use the @Injected property wrapper and specify a keyPaths to the desired dependency."}]},{"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,"},{"text":" ","type":"text"},{"type":"text","text":"so the above example is functionally identical to the "},{"type":"codeVoice","code":"Container.shared.service()"},{"text":" example shown earlier. Here’s one pointing to","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"your own container."}],"type":"paragraph"},{"code":["@Injected(\\MyCustomContainer.service) var service: ServiceType"],"syntax":"swift","type":"codeListing"}]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/Factory/callAsFunction()":{"role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"text":"() -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"kind":"symbol","title":"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"},{"text":" ","type":"text"},{"text":"return a cached value from the specified scope.","type":"text"}],"url":"\/documentation\/factory\/factory\/callasfunction()","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","type":"topic"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"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 37a7ad90..37077f32 100644 --- a/docs/data/documentation/factory/factory/context(_:factory:).json +++ b/docs/data/documentation/factory/factory/context(_:factory:).json @@ -1 +1 @@ -{"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"context"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"contexts"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"FactoryContextType","preciseIdentifier":"s:7Factory0A11ContextTypeO","identifier":"doc:\/\/Factory\/documentation\/Factory\/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":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","text":"P","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]}],"kind":"declarations"},{"kind":"content","content":[{"type":"heading","anchor":"discussion","text":"Discussion","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"A context might be be when running in SwiftUI preview mode, or when running unit tests."}]},{"inlineContent":[{"text":"See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","isActive":true}],"type":"paragraph"}]}],"schemaVersion":{"major":0,"patch":0,"minor":3},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/context(_:factory:)"},"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"]]},"metadata":{"roleHeading":"Instance Method","modules":[{"name":"Factory"}],"role":"symbol","symbolKind":"method","extendedModule":"Factory","title":"context(_:factory:)","externalID":"s:7Factory0A9ModifyingPAAE7context_7factoryxAA0A11ContextTypeOd_1TQz1PQzYbctF::SYNTHESIZED::s:7FactoryAAV","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"context"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:7Factory0A11ContextTypeO","kind":"typeIdentifier","text":"FactoryContextType"},{"text":"..., ","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}]},"sections":[],"kind":"symbol","references":{"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"kind":"article","title":"FactoryModifying Implementations","role":"collectionGroup","type":"topic","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"},"doc://Factory/documentation/Factory/FactoryContextType":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontexttype","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"title":"FactoryContextType","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryContextType","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},"doc://Factory/documentation/Factory/Contexts":{"type":"topic","kind":"article","role":"article","url":"\/documentation\/factory\/contexts","title":"Contexts","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}]},"doc://Factory/documentation/Factory/Factory/context(_:factory:)":{"title":"context(_:factory:)","abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"context","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"FactoryContextType","preciseIdentifier":"s:7Factory0A11ContextTypeO"},{"text":"..., ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factory\/context(_:factory:)","kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/context(_:factory:)","type":"topic"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"}}} \ No newline at end of file +{"metadata":{"modules":[{"name":"Factory"}],"title":"context(_:factory:)","symbolKind":"method","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"context","kind":"identifier"},{"text":"(","kind":"text"},{"text":"FactoryContextType","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A11ContextTypeO"},{"kind":"text","text":"..., "},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"extendedModule":"Factory","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE7context_7factoryxAA0A11ContextTypeOd_1TQz1PQzYbctF::SYNTHESIZED::s:7FactoryAAV","roleHeading":"Instance Method"},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/context(_:factory:)","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"sections":[],"abstract":[{"text":"Registers a factory closure to be used only when running in a specific context.","type":"text"}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"context","kind":"identifier"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"contexts","kind":"internalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A11ContextTypeO","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","text":"FactoryContextType"},{"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","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]}],"kind":"declarations"},{"content":[{"text":"Discussion","anchor":"discussion","type":"heading","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"A context might be be when running in SwiftUI preview mode, or when running unit tests."}]},{"inlineContent":[{"text":"See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","isActive":true}],"type":"paragraph"}],"kind":"content"}],"schemaVersion":{"major":0,"patch":0,"minor":3},"variants":[{"paths":["\/documentation\/factory\/factory\/context(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/factory\/factorymodifying-implementations","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory/context(_: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"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"title":"context(_:factory:)","url":"\/documentation\/factory\/factory\/context(_:factory:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/context(_:factory:)","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory/Contexts":{"url":"\/documentation\/factory\/contexts","kind":"article","role":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","title":"Contexts","abstract":[{"text":"Changing injection results under special circumstances.","type":"text"}]},"doc://Factory/documentation/Factory/FactoryContextType":{"role":"symbol","url":"\/documentation\/factory\/factorycontexttype","title":"FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContextType"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"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 900ebf5f..83cc1a70 100644 --- a/docs/data/documentation/factory/factory/decorator(_:).json +++ b/docs/data/documentation/factory/factory/decorator(_:).json @@ -1 +1 @@ -{"metadata":{"externalID":"s:7Factory0A9ModifyingPAAE9decoratoryxy1TQzYbcF::SYNTHESIZED::s:7FactoryAAV","role":"symbol","title":"decorator(_:)","modules":[{"name":"Factory"}],"extendedModule":"Factory","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"decorator","kind":"identifier"},{"text":"((","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","roleHeading":"Instance Method"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/decorator(_:)"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"decorator","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"decorator","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:s4Voida","kind":"typeIdentifier","text":"Void"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"]}]},{"kind":"content","content":[{"level":2,"type":"heading","anchor":"discussion","text":"Discussion"},{"inlineContent":[{"type":"text","text":"This includes previously created items that may have been cached by a scope."}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["var decoratedService: Factory {"," self { ParentChildService() }"," .decorated {"," $0.child.parent = $0"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As shown, decorator can come in handy when you need to perform some operation or manipulation after the fact."}]}]}],"kind":"symbol","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":[{"text":"always","type":"text"}],"type":"emphasis"},{"type":"text","text":" be called with the resolved dependency"},{"type":"text","text":" "},{"type":"text","text":"for further examination or manipulation."}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/decorator(_:)"]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory/Factory/decorator(_:)":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/decorator(_:)","role":"symbol","title":"decorator(_:)","abstract":[{"text":"Adds a factory specific decorator. The decorator will be ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"always"}]},{"type":"text","text":" be called with the resolved dependency"},{"type":"text","text":" "},{"text":"for further examination or manipulation.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"text":"((","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/factory\/decorator(_:)","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"kind":"article","title":"FactoryModifying Implementations","role":"collectionGroup","type":"topic","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"}}} \ No newline at end of file +{"schemaVersion":{"minor":3,"patch":0,"major":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/decorator(_:)"},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"decorator","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"kind":"text","text":") -> "},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This includes previously created items that may have been cached by a scope."}]},{"type":"codeListing","code":["var decoratedService: Factory {"," self { ParentChildService() }"," .decorated {"," $0.child.parent = $0"," }","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As shown, decorator can come in handy when you need to perform some operation or manipulation after the fact."}]}]}],"metadata":{"extendedModule":"Factory","title":"decorator(_:)","externalID":"s:7Factory0A9ModifyingPAAE9decoratoryxy1TQzYbcF::SYNTHESIZED::s:7FactoryAAV","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"text":"((","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol","symbolKind":"method","roleHeading":"Instance Method","modules":[{"name":"Factory"}]},"kind":"symbol","abstract":[{"text":"Adds a factory specific decorator. The decorator will be ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"always"}]},{"type":"text","text":" be called with the resolved dependency"},{"type":"text","text":" "},{"text":"for further examination or manipulation.","type":"text"}],"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/decorator(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory/decorator(_:)":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"decorator","kind":"identifier"},{"kind":"text","text":"(("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"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":[{"type":"text","text":"always"}]},{"type":"text","text":" be called with the resolved dependency"},{"text":" ","type":"text"},{"text":"for further examination or manipulation.","type":"text"}],"title":"decorator(_:)","url":"\/documentation\/factory\/factory\/decorator(_:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/decorator(_:)","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/factory\/factorymodifying-implementations","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]}}} \ 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 867ad10f..9ab4e63d 100644 --- a/docs/data/documentation/factory/factory/factorymodifying-implementations.json +++ b/docs/data/documentation/factory/factory/factorymodifying-implementations.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"kind":"article","metadata":{"modules":[{"name":"Factory"}],"title":"FactoryModifying Implementations","roleHeading":"API Collection","role":"collectionGroup"},"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},{"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(_:)"],"generated":true}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/factory\/factory\/factorymodifying-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory/Factory/context(_:factory:)":{"title":"context(_:factory:)","abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"context","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"FactoryContextType","preciseIdentifier":"s:7Factory0A11ContextTypeO"},{"text":"..., ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factory\/context(_:factory:)","kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/context(_:factory:)","type":"topic"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"navigatorTitle":[{"text":"Cached","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/cached-swift.class","type":"topic","title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory/timeToLive(_:)":{"title":"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":" "},{"type":"text","text":"cached item will be discarded and a new instance created."}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"timeToLive","kind":"identifier"},{"text":"(","kind":"text"},{"preciseIdentifier":"c:@T@NSTimeInterval","kind":"typeIdentifier","text":"TimeInterval"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"kind":"symbol","url":"\/documentation\/factory\/factory\/timetolive(_:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/timeToLive(_:)","type":"topic"},"doc://Factory/documentation/Factory/Factory/singleton":{"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","isActive":true,"type":"reference"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/singleton","type":"topic","kind":"symbol","url":"\/documentation\/factory\/factory\/singleton","role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"title":"singleton"},"doc://Factory/documentation/Factory/Factory/scope(_:)":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/scope(_:)","role":"symbol","type":"topic","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"}],"title":"scope(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"scope","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/factory\/scope(_:)"},"doc://Factory/documentation/Factory/Factory/decorator(_:)":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/decorator(_:)","role":"symbol","title":"decorator(_:)","abstract":[{"text":"Adds a factory specific decorator. The decorator will be ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"always"}]},{"type":"text","text":" be called with the resolved dependency"},{"type":"text","text":" "},{"text":"for further examination or manipulation.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"text":"((","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/factory\/decorator(_:)","type":"topic"},"doc://Factory/documentation/Factory/Factory/cached":{"title":"cached","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"}],"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"cached","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factory\/cached","kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/cached","type":"topic"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"title":"Scope.Shared","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/scope\/shared-swift.class","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","navigatorTitle":[{"kind":"identifier","text":"Shared"}]},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/graph-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Factory/graph":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factory\/graph","title":"graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/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","type":"reference","isActive":true},{"type":"text","text":"."}],"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Factory/once()":{"title":"once()","abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"once","kind":"identifier"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"kind":"symbol","url":"\/documentation\/factory\/factory\/once()","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/once()","type":"topic"},"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory/Factory/shared":{"kind":"symbol","type":"topic","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"},{"text":".","type":"text"}],"role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"shared"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/shared","url":"\/documentation\/factory\/factory\/shared","title":"shared"},"doc://Factory/documentation/Factory/Factory/reset(_:)":{"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"}],"fragments":[{"text":"func","kind":"keyword"},{"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(_:)","kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/reset(_:)","type":"topic"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/Factory/unique":{"title":"unique","abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true},{"type":"text","text":"."}],"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"unique","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"kind":"symbol","url":"\/documentation\/factory\/factory\/unique","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/unique","type":"topic"},"doc://Factory/documentation/Factory/Factory/onPreview(factory:)":{"title":"onPreview(factory:)","abstract":[{"text":"Factory builder shortcut for context(.preview) { .. }","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onPreview","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factory\/onpreview(factory:)","kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onPreview(factory:)","type":"topic"},"doc://Factory/documentation/Factory/Factory/onArgs(_:factory:)":{"title":"onArgs(_:factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onArgs","kind":"identifier"},{"kind":"text","text":"(["},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"], ","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"kind":"symbol","url":"\/documentation\/factory\/factory\/onargs(_:factory:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArgs(_:factory:)","type":"topic"},"doc://Factory/documentation/Factory/Factory/onTest(factory:)":{"title":"onTest(factory:)","abstract":[{"text":"Factory builder shortcut for context(.test) { .. }","type":"text"}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"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","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"kind":"symbol","url":"\/documentation\/factory\/factory\/ontest(factory:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onTest(factory:)","type":"topic"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Singleton"}],"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/Factory/onDebug(factory:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDebug(factory:)","title":"onDebug(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"kind":"symbol","type":"topic","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onDebug","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factory\/ondebug(factory:)"},"doc://Factory/documentation/Factory/Factory/onSimulator(factory:)":{"title":"onSimulator(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onSimulator"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"kind":"symbol","url":"\/documentation\/factory\/factory\/onsimulator(factory:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onSimulator(factory:)","type":"topic"},"doc://Factory/documentation/Factory/Factory/onArg(_:factory:)":{"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onArg","kind":"identifier"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":", "},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"onArg(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArg(_:factory:)","role":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/onarg(_:factory:)"},"doc://Factory/documentation/Factory/Factory/onDevice(factory:)":{"type":"topic","kind":"symbol","abstract":[{"text":"Factory builder shortcut for context(.device) { .. }","type":"text"}],"title":"onDevice(factory:)","url":"\/documentation\/factory\/factory\/ondevice(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDevice(factory:)","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}]}}} \ No newline at end of file +{"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},{"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"]}],"metadata":{"roleHeading":"API Collection","title":"FactoryModifying Implementations","role":"collectionGroup","modules":[{"name":"Factory"}]},"sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","interfaceLanguage":"swift"},"kind":"article","references":{"doc://Factory/documentation/Factory/Factory/shared":{"url":"\/documentation\/factory\/factory\/shared","role":"symbol","type":"topic","kind":"symbol","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"}],"title":"shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/shared","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory/Factory/unique":{"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"unique","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true},{"type":"text","text":"."}],"title":"unique","url":"\/documentation\/factory\/factory\/unique","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/unique","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory/cached":{"kind":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"cached","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"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"},{"text":".","type":"text"}],"title":"cached","url":"\/documentation\/factory\/factory\/cached","role":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/cached"},"doc://Factory/documentation/Factory/Factory/decorator(_:)":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"decorator","kind":"identifier"},{"kind":"text","text":"(("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"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":[{"type":"text","text":"always"}]},{"type":"text","text":" be called with the resolved dependency"},{"text":" ","type":"text"},{"text":"for further examination or manipulation.","type":"text"}],"title":"decorator(_:)","url":"\/documentation\/factory\/factory\/decorator(_:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/decorator(_:)","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Factory/timeToLive(_:)":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"timeToLive"},{"text":"(","kind":"text"},{"text":"TimeInterval","kind":"typeIdentifier","preciseIdentifier":"c:@T@NSTimeInterval"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"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."}],"title":"timeToLive(_:)","url":"\/documentation\/factory\/factory\/timetolive(_:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/timeToLive(_:)","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Factory/onSimulator(factory:)":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onSimulator"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"url":"\/documentation\/factory\/factory\/onsimulator(factory:)","kind":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onSimulator(factory:)","role":"symbol","title":"onSimulator(factory:)"},"doc://Factory/documentation/Factory/Factory/context(_: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"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"title":"context(_:factory:)","url":"\/documentation\/factory\/factory\/context(_:factory:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/context(_:factory:)","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Factory/scope(_:)":{"url":"\/documentation\/factory\/factory\/scope(_:)","type":"topic","abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"reference"},{"text":".","type":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/scope(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"scope","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","title":"scope(_:)"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory/onDebug(factory:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDebug(factory:)","role":"symbol","type":"topic","title":"onDebug(factory:)","url":"\/documentation\/factory\/factory\/ondebug(factory:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onDebug","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"text":"Factory builder shortcut for context(.debug) { .. }","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory/onTest(factory:)":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onTest","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"title":"onTest(factory:)","url":"\/documentation\/factory\/factory\/ontest(factory:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onTest(factory:)","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Factory/once()":{"role":"symbol","abstract":[{"text":"Adds ability to mutate Factory on first instantiation only.","type":"text"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"text":"() -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"kind":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/once()","title":"once()","url":"\/documentation\/factory\/factory\/once()"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/cached-swift.class","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory/singleton":{"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"singleton"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"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","isActive":true,"type":"reference"},{"text":".","type":"text"}],"title":"singleton","url":"\/documentation\/factory\/factory\/singleton","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/singleton","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Factory/onDevice(factory:)":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onDevice","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"text":"Factory builder shortcut for context(.device) { .. }","type":"text"}],"title":"onDevice(factory:)","url":"\/documentation\/factory\/factory\/ondevice(factory:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDevice(factory:)","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Factory/onArg(_:factory:)":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onArg","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"text":"Factory builder shortcut for context(.arg(“test”) { .. }","type":"text"}],"title":"onArg(_:factory:)","url":"\/documentation\/factory\/factory\/onarg(_:factory:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArg(_:factory:)","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Factory/onPreview(factory:)":{"url":"\/documentation\/factory\/factory\/onpreview(factory:)","type":"topic","abstract":[{"text":"Factory builder shortcut for context(.preview) { .. }","type":"text"}],"title":"onPreview(factory:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onPreview","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onPreview(factory:)"},"doc://Factory/documentation/Factory/Factory/onArgs(_:factory:)":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onArgs","kind":"identifier"},{"kind":"text","text":"(["},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"], ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol","url":"\/documentation\/factory\/factory\/onargs(_:factory:)","kind":"symbol","abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArgs(_:factory:)","title":"onArgs(_:factory:)","type":"topic"},"doc://Factory/documentation/Factory/Factory/reset(_:)":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"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"}],"title":"reset(_:)","url":"\/documentation\/factory\/factory\/reset(_:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/reset(_:)","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory/graph":{"kind":"symbol","title":"graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/graph","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"},{"type":"text","text":"."}],"role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"type":"topic","url":"\/documentation\/factory\/factory\/graph"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","type":"topic","abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"}}} \ 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 7258e958..dc71cef0 100644 --- a/docs/data/documentation/factory/factory/graph.json +++ b/docs/data/documentation/factory/factory/graph.json @@ -1 +1 @@ -{"kind":"symbol","sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"graph","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}]},{"content":[{"type":"heading","level":2,"text":"Discussion","anchor":"discussion"},{"type":"codeListing","code":["var service: Factory {"," factory { MyService() }"," .graph","}"],"syntax":"swift"}],"kind":"content"}],"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"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/graph"]}],"metadata":{"extendedModule":"Factory","roleHeading":"Instance Property","title":"graph","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"graph"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"externalID":"s:7Factory0A9ModifyingPAAE5graphxvp::SYNTHESIZED::s:7FactoryAAV","modules":[{"name":"Factory"}],"role":"symbol","symbolKind":"property"},"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"}],"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/graph-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"kind":"article","title":"FactoryModifying Implementations","role":"collectionGroup","type":"topic","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"},"doc://Factory/documentation/Factory/Factory/graph":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factory\/graph","title":"graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/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","type":"reference","isActive":true},{"type":"text","text":"."}],"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/graph"]}],"metadata":{"symbolKind":"property","title":"graph","modules":[{"name":"Factory"}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"graph","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"roleHeading":"Instance Property","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE5graphxvp::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/graph"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}]}],"kind":"declarations"},{"kind":"content","content":[{"type":"heading","level":2,"anchor":"discussion","text":"Discussion"},{"syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .graph","}"],"type":"codeListing"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See ","type":"text"},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","type":"reference"},{"text":".","type":"text"}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"sections":[],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/factory\/factorymodifying-implementations","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory/Factory/graph":{"kind":"symbol","title":"graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/graph","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"},{"type":"text","text":"."}],"role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"type":"topic","url":"\/documentation\/factory\/factory\/graph"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","type":"topic","abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"}}} \ 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 eda4e445..01ddff45 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":[{"tokens":[{"text":"init","kind":"keyword"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"container","kind":"internalParam"},{"kind":"text","text":": any "},{"preciseIdentifier":"s:7Factory16ManagedContainerP","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"typeIdentifier","text":"ManagedContainer"},{"kind":"text","text":", "},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"text":" = ","kind":"text"},{"kind":"keyword","text":"#function"},{"text":", ","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"factory","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" () -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":")","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}]},{"parameters":[{"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"}],"name":"container"},{"name":"key","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Hidden value used to differentiate different instances of the same type in the same container."}]}]},{"name":"factory","content":[{"type":"paragraph","inlineContent":[{"text":"A factory closure that produces an object of the desired type when required.","type":"text"}]}]}],"kind":"parameters"}],"metadata":{"roleHeading":"Initializer","externalID":"s:7FactoryAAV_3key_AByxGAA16ManagedContainer_p_s12StaticStringVxyYbctcfc","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"(any "},{"kind":"typeIdentifier","text":"ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP"},{"kind":"text","text":", "},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s12StaticStringV","text":"StaticString","kind":"typeIdentifier"},{"kind":"text","text":", () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":")"}],"role":"symbol","symbolKind":"init","modules":[{"name":"Factory"}],"title":"init(_:key:_:)"},"schemaVersion":{"patch":0,"minor":3,"major":0},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/init(_:key:_:)"},"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"}]}],"sections":[],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Factory/init(_:key:_:)":{"url":"\/documentation\/factory\/factory\/init(_:key:_:)","kind":"symbol","fragments":[{"kind":"identifier","text":"init"},{"text":"(any ","kind":"text"},{"text":"ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"StaticString","preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier"},{"text":", () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":")"}],"title":"init(_:key:_:)","type":"topic","abstract":[{"type":"text","text":"Public initializer creates a Factory capable of managing dependencies of the desired type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/init(_:key:_:)","role":"symbol"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"ManagedContainer","kind":"identifier"}],"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"title":"ManagedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","type":"topic","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}]}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"container","kind":"internalParam"},{"text":": any ","kind":"text"},{"kind":"typeIdentifier","text":"ManagedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP"},{"text":", ","kind":"text"},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s12StaticStringV","text":"StaticString","kind":"typeIdentifier"},{"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"},{"text":")","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}]},{"kind":"parameters","parameters":[{"content":[{"inlineContent":[{"text":"The bound container that manages registrations and scope caching for this Factory. The scope helper functions bind the","type":"text"},{"type":"text","text":" "},{"type":"text","text":"current container as well defining the scope."}],"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":[{"type":"text","text":"A factory closure that produces an object of the desired type when required."}]}]}]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"kind":"symbol","abstract":[{"type":"text","text":"Public initializer creates a Factory capable of managing dependencies of the desired type."}],"sections":[],"metadata":{"fragments":[{"text":"init","kind":"identifier"},{"text":"(any ","kind":"text"},{"text":"ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"text":", () -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":")"}],"externalID":"s:7FactoryAAV_3key_AByxGAA16ManagedContainer_p_s12StaticStringVxyYbctcfc","roleHeading":"Initializer","title":"init(_:key:_:)","symbolKind":"init","role":"symbol","modules":[{"name":"Factory"}]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/init(_:key:_:)","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/init(_:key:_:)"]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory/init(_:key:_:)":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"(any "},{"kind":"typeIdentifier","text":"ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP"},{"text":", ","kind":"text"},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s12StaticStringV","text":"StaticString","kind":"typeIdentifier"},{"kind":"text","text":", () -> "},{"text":"T","kind":"typeIdentifier"},{"text":")","kind":"text"}],"kind":"symbol","type":"topic","title":"init(_:key:_:)","url":"\/documentation\/factory\/factory\/init(_:key:_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/init(_:key:_:)","role":"symbol","abstract":[{"text":"Public initializer creates a Factory capable of managing dependencies of the desired type.","type":"text"}]},"doc://Factory/documentation/Factory/ManagedContainer":{"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","role":"symbol","navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ManagedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer"}}} \ 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 f73d2ea1..e18b50fb 100644 --- a/docs/data/documentation/factory/factory/onarg(_:factory:).json +++ b/docs/data/documentation/factory/factory/onarg(_:factory:).json @@ -1 +1 @@ -{"metadata":{"modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE5onArg_7factoryxSS_1TQz1PQzYbctF::SYNTHESIZED::s:7FactoryAAV","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArg"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","extendedModule":"Factory","title":"onArg(_:factory:)","roleHeading":"Instance Method","symbolKind":"method"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onArg","kind":"identifier"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"argument","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"kind":"symbol","schemaVersion":{"patch":0,"minor":3,"major":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArg(_:factory:)","interfaceLanguage":"swift"},"abstract":[{"text":"Factory builder shortcut for context(.arg(“test”) { .. }","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/onarg(_:factory:)"]}],"sections":[],"references":{"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"kind":"article","title":"FactoryModifying Implementations","role":"collectionGroup","type":"topic","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/Factory/onArg(_:factory:)":{"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onArg","kind":"identifier"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":", "},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"onArg(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArg(_:factory:)","role":"symbol","type":"topic","url":"\/documentation\/factory\/factory\/onarg(_:factory:)"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"}}} \ No newline at end of file +{"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/onarg(_:factory:)"]}],"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArg(_:factory:)","interfaceLanguage":"swift"},"schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE5onArg_7factoryxSS_1TQz1PQzYbctF::SYNTHESIZED::s:7FactoryAAV","title":"onArg(_:factory:)","roleHeading":"Instance Method","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":", "},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","modules":[{"name":"Factory"}],"extendedModule":"Factory"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onArg","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"argument","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}]}],"kind":"declarations"}],"sections":[],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/factory\/factorymodifying-implementations","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory/Factory/onArg(_:factory:)":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onArg","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"text":"Factory builder shortcut for context(.arg(“test”) { .. }","type":"text"}],"title":"onArg(_:factory:)","url":"\/documentation\/factory\/factory\/onarg(_:factory:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArg(_:factory:)","role":"symbol","kind":"symbol"}}} \ 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 cea14f7b..bc6100b7 100644 --- a/docs/data/documentation/factory/factory/onargs(_:factory:).json +++ b/docs/data/documentation/factory/factory/onargs(_:factory:).json @@ -1 +1 @@ -{"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":"], ","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"roleHeading":"Instance Method","role":"symbol","modules":[{"name":"Factory"}],"title":"onArgs(_:factory:)","extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE6onArgs_7factoryxSaySSG_1TQz1PQzYbctF::SYNTHESIZED::s:7FactoryAAV","symbolKind":"method"},"sections":[],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"args","kind":"internalParam"},{"text":": [","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","kind":"typeIdentifier","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"],"platforms":["macOS"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/onargs(_:factory:)"]}],"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"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory/Factory/onArgs(_:factory:)":{"title":"onArgs(_:factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onArgs","kind":"identifier"},{"kind":"text","text":"(["},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"], ","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"kind":"symbol","url":"\/documentation\/factory\/factory\/onargs(_:factory:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArgs(_:factory:)","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"kind":"article","title":"FactoryModifying Implementations","role":"collectionGroup","type":"topic","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"}}} \ No newline at end of file +{"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"schemaVersion":{"major":0,"patch":0,"minor":3},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArgs(_:factory:)"},"metadata":{"title":"onArgs(_:factory:)","roleHeading":"Instance Method","modules":[{"name":"Factory"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onArgs","kind":"identifier"},{"kind":"text","text":"(["},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","role":"symbol","extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE6onArgs_7factoryxSaySSG_1TQz1PQzYbctF::SYNTHESIZED::s:7FactoryAAV"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"kind":"symbol","primaryContentSections":[{"declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArgs"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"args","kind":"internalParam"},{"text":": [","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"], ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/onargs(_:factory:)"]}],"references":{"doc://Factory/documentation/Factory/Factory/onArgs(_:factory:)":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onArgs","kind":"identifier"},{"kind":"text","text":"(["},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"], ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol","url":"\/documentation\/factory\/factory\/onargs(_:factory:)","kind":"symbol","abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onArgs(_:factory:)","title":"onArgs(_:factory:)","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/factory\/factorymodifying-implementations","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]}}} \ 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 032a6f5a..bb0b3ced 100644 --- a/docs/data/documentation/factory/factory/once().json +++ b/docs/data/documentation/factory/factory/once().json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"metadata":{"modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE4oncexyF::SYNTHESIZED::s:7FactoryAAV","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"once"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol","extendedModule":"Factory","title":"once()","roleHeading":"Instance Method","symbolKind":"method"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/once()","interfaceLanguage":"swift"},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/once()"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"]}],"kind":"declarations"}],"kind":"symbol","abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/Factory/once()":{"title":"once()","abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"once","kind":"identifier"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"kind":"symbol","url":"\/documentation\/factory\/factory\/once()","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/once()","type":"topic"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"kind":"article","title":"FactoryModifying Implementations","role":"collectionGroup","type":"topic","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"metadata":{"roleHeading":"Instance Method","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE4oncexyF::SYNTHESIZED::s:7FactoryAAV","modules":[{"name":"Factory"}],"extendedModule":"Factory","title":"once()","role":"symbol"},"kind":"symbol","schemaVersion":{"minor":3,"major":0,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"once","kind":"identifier"},{"text":"() -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"platforms":["macOS"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/once()"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/once()","interfaceLanguage":"swift"},"sections":[],"references":{"doc://Factory/documentation/Factory/Factory/once()":{"role":"symbol","abstract":[{"text":"Adds ability to mutate Factory on first instantiation only.","type":"text"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"text":"() -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"kind":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/once()","title":"once()","url":"\/documentation\/factory\/factory\/once()"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/factory\/factorymodifying-implementations","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"}}} \ 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 ad831594..82091271 100644 --- a/docs/data/documentation/factory/factory/ondebug(factory:).json +++ b/docs/data/documentation/factory/factory/ondebug(factory:).json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/factory\/ondebug(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDebug(factory:)"},"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onDebug","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"roleHeading":"Instance Method","title":"onDebug(factory:)","extendedModule":"Factory","symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE7onDebug7factoryx1TQz1PQzYbc_tF::SYNTHESIZED::s:7FactoryAAV","modules":[{"name":"Factory"}],"role":"symbol"},"schemaVersion":{"major":0,"patch":0,"minor":3},"sections":[],"abstract":[{"text":"Factory builder shortcut for context(.debug) { .. }","type":"text"}],"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"},"doc://Factory/documentation/Factory/Factory/onDebug(factory:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDebug(factory:)","title":"onDebug(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"kind":"symbol","type":"topic","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onDebug","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factory\/ondebug(factory:)"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"kind":"article","title":"FactoryModifying Implementations","role":"collectionGroup","type":"topic","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"}}} \ No newline at end of file +{"metadata":{"symbolKind":"method","modules":[{"name":"Factory"}],"extendedModule":"Factory","title":"onDebug(factory:)","externalID":"s:7Factory0A9ModifyingPAAE7onDebug7factoryx1TQz1PQzYbc_tF::SYNTHESIZED::s:7FactoryAAV","role":"symbol","roleHeading":"Instance Method","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"},{"text":".","kind":"text"},{"text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]},"sections":[],"abstract":[{"text":"Factory builder shortcut for context(.debug) { .. }","type":"text"}],"schemaVersion":{"minor":3,"major":0,"patch":0},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onDebug","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"platforms":["macOS"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/ondebug(factory:)"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDebug(factory:)","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/Factory/onDebug(factory:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDebug(factory:)","role":"symbol","type":"topic","title":"onDebug(factory:)","url":"\/documentation\/factory\/factory\/ondebug(factory:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onDebug","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"text":"Factory builder shortcut for context(.debug) { .. }","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/factory\/factorymodifying-implementations","abstract":[],"kind":"article"}}} \ 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 15b9555b..e79d10b5 100644 --- a/docs/data/documentation/factory/factory/ondevice(factory:).json +++ b/docs/data/documentation/factory/factory/ondevice(factory:).json @@ -1 +1 @@ -{"schemaVersion":{"patch":0,"minor":3,"major":0},"sections":[],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"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","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"]}]}],"metadata":{"modules":[{"name":"Factory"}],"symbolKind":"method","roleHeading":"Instance Method","title":"onDevice(factory:)","extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE8onDevice7factoryx1TQz1PQzYbc_tF::SYNTHESIZED::s:7FactoryAAV","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onDevice","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDevice(factory:)","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/factory\/factory\/ondevice(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"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/FactoryModifying-Implementations":{"kind":"article","title":"FactoryModifying Implementations","role":"collectionGroup","type":"topic","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"},"doc://Factory/documentation/Factory/Factory/onDevice(factory:)":{"type":"topic","kind":"symbol","abstract":[{"text":"Factory builder shortcut for context(.device) { .. }","type":"text"}],"title":"onDevice(factory:)","url":"\/documentation\/factory\/factory\/ondevice(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDevice(factory:)","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"}}} \ No newline at end of file +{"metadata":{"modules":[{"name":"Factory"}],"title":"onDevice(factory:)","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onDevice","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"externalID":"s:7Factory0A9ModifyingPAAE8onDevice7factoryx1TQz1PQzYbc_tF::SYNTHESIZED::s:7FactoryAAV","role":"symbol","roleHeading":"Instance Method","extendedModule":"Factory"},"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},"kind":"symbol","primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onDevice"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier","text":"T","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"]}],"kind":"declarations"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDevice(factory:)"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/ondevice(factory:)"]}],"references":{"doc://Factory/documentation/Factory/Factory/onDevice(factory:)":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onDevice","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"text":"Factory builder shortcut for context(.device) { .. }","type":"text"}],"title":"onDevice(factory:)","url":"\/documentation\/factory\/factory\/ondevice(factory:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onDevice(factory:)","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/factory\/factorymodifying-implementations","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]}}} \ 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 43cbc343..a92620ed 100644 --- a/docs/data/documentation/factory/factory/onpreview(factory:).json +++ b/docs/data/documentation/factory/factory/onpreview(factory:).json @@ -1 +1 @@ -{"metadata":{"roleHeading":"Instance Method","title":"onPreview(factory:)","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE9onPreview7factoryx1TQz1PQzYbc_tF::SYNTHESIZED::s:7FactoryAAV","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onPreview","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"extendedModule":"Factory","modules":[{"name":"Factory"}],"symbolKind":"method"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/onpreview(factory:)"]}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onPreview","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}]}]}],"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\/onPreview(factory:)","interfaceLanguage":"swift"},"schemaVersion":{"patch":0,"minor":3,"major":0},"abstract":[{"text":"Factory builder shortcut for context(.preview) { .. }","type":"text"}],"sections":[],"references":{"doc://Factory/documentation/Factory/Factory/onPreview(factory:)":{"title":"onPreview(factory:)","abstract":[{"text":"Factory builder shortcut for context(.preview) { .. }","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onPreview","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factory\/onpreview(factory:)","kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onPreview(factory:)","type":"topic"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"kind":"article","title":"FactoryModifying Implementations","role":"collectionGroup","type":"topic","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"}}} \ No newline at end of file +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onPreview(factory:)"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/onpreview(factory:)"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onPreview"},{"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","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"sections":[],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"modules":[{"name":"Factory"}],"title":"onPreview(factory:)","extendedModule":"Factory","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":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"symbolKind":"method","role":"symbol","roleHeading":"Instance Method","externalID":"s:7Factory0A9ModifyingPAAE9onPreview7factoryx1TQz1PQzYbc_tF::SYNTHESIZED::s:7FactoryAAV"},"kind":"symbol","references":{"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory/onPreview(factory:)":{"url":"\/documentation\/factory\/factory\/onpreview(factory:)","type":"topic","abstract":[{"text":"Factory builder shortcut for context(.preview) { .. }","type":"text"}],"title":"onPreview(factory:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onPreview","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onPreview(factory:)"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/factory\/factorymodifying-implementations","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]}}} \ 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 19cc4e2e..062fdbf6 100644 --- a/docs/data/documentation/factory/factory/onsimulator(factory:).json +++ b/docs/data/documentation/factory/factory/onsimulator(factory:).json @@ -1 +1 @@ -{"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onSimulator","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"platforms":["macOS"]}],"kind":"declarations"}],"metadata":{"extendedModule":"Factory","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE11onSimulator7factoryx1TQz1PQzYbc_tF::SYNTHESIZED::s:7FactoryAAV","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","roleHeading":"Instance Method","title":"onSimulator(factory:)","modules":[{"name":"Factory"}]},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/onsimulator(factory:)"]}],"sections":[],"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\/onSimulator(factory:)","interfaceLanguage":"swift"},"kind":"symbol","references":{"doc://Factory/documentation/Factory/Factory/onSimulator(factory:)":{"title":"onSimulator(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onSimulator"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"kind":"symbol","url":"\/documentation\/factory\/factory\/onsimulator(factory:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onSimulator(factory:)","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"kind":"article","title":"FactoryModifying Implementations","role":"collectionGroup","type":"topic","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"}}} \ No newline at end of file +{"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onSimulator","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]}],"kind":"declarations"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/onsimulator(factory:)"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onSimulator(factory:)"},"sections":[],"kind":"symbol","metadata":{"externalID":"s:7Factory0A9ModifyingPAAE11onSimulator7factoryx1TQz1PQzYbc_tF::SYNTHESIZED::s:7FactoryAAV","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onSimulator","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"extendedModule":"Factory","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","modules":[{"name":"Factory"}],"title":"onSimulator(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":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/factory\/factorymodifying-implementations","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory/Factory/onSimulator(factory:)":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onSimulator"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"url":"\/documentation\/factory\/factory\/onsimulator(factory:)","kind":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onSimulator(factory:)","role":"symbol","title":"onSimulator(factory:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factory/ontest(factory:).json b/docs/data/documentation/factory/factory/ontest(factory:).json index 86c891f9..07eeb382 100644 --- a/docs/data/documentation/factory/factory/ontest(factory:).json +++ b/docs/data/documentation/factory/factory/ontest(factory:).json @@ -1 +1 @@ -{"abstract":[{"text":"Factory builder shortcut for context(.test) { .. }","type":"text"}],"metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"roleHeading":"Instance Method","role":"symbol","modules":[{"name":"Factory"}],"title":"onTest(factory:)","extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE6onTest7factoryx1TQz1PQzYbc_tF::SYNTHESIZED::s:7FactoryAAV","symbolKind":"method"},"sections":[],"kind":"symbol","primaryContentSections":[{"declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/ontest(factory:)"]}],"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"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"},"doc://Factory/documentation/Factory/Factory/onTest(factory:)":{"title":"onTest(factory:)","abstract":[{"text":"Factory builder shortcut for context(.test) { .. }","type":"text"}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"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","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"kind":"symbol","url":"\/documentation\/factory\/factory\/ontest(factory:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onTest(factory:)","type":"topic"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"kind":"article","title":"FactoryModifying Implementations","role":"collectionGroup","type":"topic","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onTest","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"]}]}],"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/ontest(factory:)"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"sections":[],"metadata":{"role":"symbol","extendedModule":"Factory","modules":[{"name":"Factory"}],"roleHeading":"Instance Method","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onTest","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"title":"onTest(factory:)","externalID":"s:7Factory0A9ModifyingPAAE6onTest7factoryx1TQz1PQzYbc_tF::SYNTHESIZED::s:7FactoryAAV"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onTest(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/factory\/factorymodifying-implementations","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory/onTest(factory:)":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onTest","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"title":"onTest(factory:)","url":"\/documentation\/factory\/factory\/ontest(factory:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/onTest(factory:)","role":"symbol","kind":"symbol"}}} \ 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 9a2791bc..e242467d 100644 --- a/docs/data/documentation/factory/factory/register(factory:).json +++ b/docs/data/documentation/factory/factory/register(factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"register","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" () -> "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","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":"content","content":[{"text":"Discussion","anchor":"discussion","type":"heading","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"This factory overrides the original factory closure and clears the associated scope so that the next time this factory is resolved"},{"type":"text","text":" "},{"type":"text","text":"Factory will evaluate the new closure and return an instance of the newly registered object instead."}]},{"inlineContent":[{"type":"text","text":"Here’s an example of registering a new Factory closure."}],"type":"paragraph"},{"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"},{"text":" ","type":"text"},{"text":"used to provide mocks and testing doubles.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"Registration “overrides” are stored in the associated container. If the container ever goes our of scope, so","type":"text"},{"text":" ","type":"text"},{"text":"will all of its registrations.","type":"text"}]},{"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."},{"type":"text","text":" "},{"type":"text","text":"Allows updating registered factory and scope."}]}]}]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/register(factory:)","interfaceLanguage":"swift"},"metadata":{"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"register","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": () -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"roleHeading":"Instance Method","title":"register(factory:)","modules":[{"name":"Factory"}],"externalID":"s:7FactoryAAV8register7factoryAByxGxyYbc_tF","symbolKind":"method"},"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factory\/register(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"abstract":[{"type":"text","text":"Registers a new factory closure capable of producing an object or service of the desired type."}],"kind":"symbol","references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/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"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"register","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/register(factory:)","title":"register(factory:)","url":"\/documentation\/factory\/factory\/register(factory:)","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"abstract":[{"type":"text","text":"Registers a new factory closure capable of producing an object or service of the desired type."}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/register(factory:)"},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" () -> "},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}]}],"kind":"declarations"},{"kind":"content","content":[{"type":"heading","level":2,"text":"Discussion","anchor":"discussion"},{"inlineContent":[{"type":"text","text":"This factory overrides the original factory closure and clears the associated scope so that the next time this factory is resolved"},{"type":"text","text":" "},{"type":"text","text":"Factory will evaluate the new closure and return an instance of the newly registered object instead."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s an example of registering a new Factory closure."}]},{"code":["container.service.register {"," SomeService()","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"This is how default functionality is overridden in order to change the nature of the system at runtime, and is the primary mechanism","type":"text"},{"text":" ","type":"text"},{"text":"used to provide mocks and testing doubles.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Registration “overrides” are stored in the associated container. If the container ever goes our of scope, so"},{"type":"text","text":" "},{"text":"will all of its registrations.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"The original factory closure is preserved, and may be restored by resetting the Factory to its original state.","type":"text"}]},{"items":[{"content":[{"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."}],"type":"paragraph"}]}],"type":"unorderedList"}]}],"variants":[{"paths":["\/documentation\/factory\/factory\/register(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"roleHeading":"Instance Method","title":"register(factory:)","modules":[{"name":"Factory"}],"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"register","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": () -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"symbolKind":"method","externalID":"s:7FactoryAAV8register7factoryAByxGxyYbc_tF"},"sections":[],"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory/register(factory:)":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/register(factory:)","kind":"symbol","abstract":[{"type":"text","text":"Registers a new factory closure capable of producing an object or service of the desired type."}],"role":"symbol","title":"register(factory:)","url":"\/documentation\/factory\/factory\/register(factory:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"register"},{"text":"(","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":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 177d3aac..adf13ab4 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,"},{"text":" ","type":"text"},{"text":"and others.","type":"text"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/registration","interfaceLanguage":"swift"},"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"text":"FactoryRegistration","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"languages":["swift"]}]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"paths":["\/documentation\/factory\/factory\/registration"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"roleHeading":"Instance Property","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"registration","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A12RegistrationV","text":"FactoryRegistration","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"text":", ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"symbolKind":"property","title":"registration","externalID":"s:7FactoryAAV12registrationAA0A12RegistrationVyytxGvp","modules":[{"name":"Factory"}],"role":"symbol"},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/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":" "},{"text":"and others.","type":"text"}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"registration","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12RegistrationV","text":"FactoryRegistration"},{"text":"<","kind":"text"},{"preciseIdentifier":"s:s4Voida","text":"Void","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/registration","title":"registration","url":"\/documentation\/factory\/factory\/registration","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/FactoryRegistration":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"FactoryRegistration","kind":"identifier"}],"title":"FactoryRegistration","abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"url":"\/documentation\/factory\/factoryregistration","kind":"symbol","role":"symbol"}}} \ No newline at end of file +{"metadata":{"roleHeading":"Instance Property","externalID":"s:7FactoryAAV12registrationAA0A12RegistrationVyytxGvp","symbolKind":"property","role":"symbol","title":"registration","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"text":": ","kind":"text"},{"text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/registration"},"schemaVersion":{"minor":3,"major":0,"patch":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/registration"]}],"abstract":[{"type":"text","text":"Internal parameters for this Factory including id, container, the factory closure itself, the scope,"},{"text":" ","type":"text"},{"type":"text","text":"and others."}],"sections":[],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"registration","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A12RegistrationV","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","text":"FactoryRegistration","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory/registration":{"url":"\/documentation\/factory\/factory\/registration","kind":"symbol","type":"topic","role":"symbol","title":"registration","abstract":[{"type":"text","text":"Internal parameters for this Factory including id, container, the factory closure itself, the scope,"},{"text":" ","type":"text"},{"text":"and others.","type":"text"}],"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"registration","kind":"identifier"},{"text":": ","kind":"text"},{"text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/registration"},"doc://Factory/documentation/Factory/FactoryRegistration":{"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryregistration","role":"symbol","title":"FactoryRegistration","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"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 6f00ab40..6d29ca20 100644 --- a/docs/data/documentation/factory/factory/reset(_:).json +++ b/docs/data/documentation/factory/factory/reset(_:).json @@ -1 +1 @@ -{"metadata":{"roleHeading":"Instance Method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"title":"reset(_:)","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE5resetyxAA0A12ResetOptionsOF::SYNTHESIZED::s:7FactoryAAV","modules":[{"name":"Factory"}],"extendedModule":"Factory","symbolKind":"method"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"reset","kind":"identifier"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"options","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"},{"kind":"text","text":" = .all) -> "},{"kind":"typeIdentifier","text":"Self"}],"platforms":["macOS"],"languages":["swift"]}]},{"kind":"parameters","parameters":[{"content":[{"type":"paragraph","inlineContent":[{"text":"options description","type":"text"}]}],"name":"options"}]}],"schemaVersion":{"patch":0,"minor":3,"major":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/reset(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope."}],"variants":[{"paths":["\/documentation\/factory\/factory\/reset(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","sections":[],"references":{"doc://Factory/documentation/Factory/Factory/reset(_:)":{"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"}],"fragments":[{"text":"func","kind":"keyword"},{"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(_:)","kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/reset(_:)","type":"topic"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"title":"FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}]},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"kind":"article","title":"FactoryModifying Implementations","role":"collectionGroup","type":"topic","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"}}} \ No newline at end of file +{"metadata":{"externalID":"s:7Factory0A9ModifyingPAAE5resetyxAA0A12ResetOptionsOF::SYNTHESIZED::s:7FactoryAAV","roleHeading":"Instance Method","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"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"}],"extendedModule":"Factory","role":"symbol","title":"reset(_:)"},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/reset(_:)","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"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"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"text":" = .all) -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"kind":"parameters","parameters":[{"content":[{"inlineContent":[{"type":"text","text":"options description"}],"type":"paragraph"}],"name":"options"}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/reset(_:)"]}],"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"]]},"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"}],"references":{"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory/reset(_:)":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"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"}],"title":"reset(_:)","url":"\/documentation\/factory\/factory\/reset(_:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/reset(_:)","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/factory\/factorymodifying-implementations","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"title":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","type":"topic","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol"}}} \ 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 71103977..fdf83df3 100644 --- a/docs/data/documentation/factory/factory/resolve().json +++ b/docs/data/documentation/factory/factory/resolve().json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"sections":[],"kind":"symbol","primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}]}],"kind":"declarations"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/resolve()"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/resolve()"]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"externalID":"s:7FactoryAAV7resolvexyF","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"() -> "},{"text":"T","kind":"typeIdentifier"}],"symbolKind":"method","title":"resolve()","roleHeading":"Instance Method","modules":[{"name":"Factory"}]},"abstract":[{"type":"text","text":"Unsugared resolution function."}],"references":{"doc://Factory/documentation/Factory/Factory/resolve()":{"abstract":[{"type":"text","text":"Unsugared resolution function."}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"() -> "},{"text":"T","kind":"typeIdentifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/resolve()","title":"resolve()","url":"\/documentation\/factory\/factory\/resolve()","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"}}} \ No newline at end of file +{"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory"]]},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/resolve()"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/resolve()"},"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"title":"resolve()","roleHeading":"Instance Method","modules":[{"name":"Factory"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"() -> "},{"text":"T","kind":"typeIdentifier"}],"symbolKind":"method","role":"symbol","externalID":"s:7FactoryAAV7resolvexyF"},"abstract":[{"type":"text","text":"Unsugared resolution function."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"}],"languages":["swift"]}]}],"references":{"doc://Factory/documentation/Factory/Factory/resolve()":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/resolve()","title":"resolve()","url":"\/documentation\/factory\/factory\/resolve()","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"() -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"abstract":[{"text":"Unsugared resolution function.","type":"text"}],"role":"symbol","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 aa977e6d..1e94695f 100644 --- a/docs/data/documentation/factory/factory/scope(_:).json +++ b/docs/data/documentation/factory/factory/scope(_:).json @@ -1 +1 @@ -{"abstract":[{"text":"Defines a dependency scope for this Factory. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"reference","isActive":true},{"type":"text","text":"."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"scope","kind":"identifier"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"scope"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"platforms":["macOS"]}]},{"content":[{"type":"heading","level":2,"anchor":"discussion","text":"Discussion"},{"syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .scope(.session)","}"],"type":"codeListing"}],"kind":"content"}],"metadata":{"roleHeading":"Instance Method","externalID":"s:7Factory0A9ModifyingPAAE5scopeyxAA5ScopeCF::SYNTHESIZED::s:7FactoryAAV","role":"symbol","extendedModule":"Factory","title":"scope(_:)","symbolKind":"method","modules":[{"name":"Factory"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"scope","kind":"identifier"},{"text":"(","kind":"text"},{"text":"Scope","preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/scope(_:)","interfaceLanguage":"swift"},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/scope(_:)"]}],"references":{"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"kind":"article","title":"FactoryModifying Implementations","role":"collectionGroup","type":"topic","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/Factory/scope(_:)":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/scope(_:)","role":"symbol","type":"topic","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"}],"title":"scope(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"scope","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/factory\/scope(_:)"}}} \ No newline at end of file +{"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"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"},{"text":"scope","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}]}],"kind":"declarations"},{"kind":"content","content":[{"type":"heading","level":2,"text":"Discussion","anchor":"discussion"},{"syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .scope(.session)","}"],"type":"codeListing"}]}],"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/scope(_:)"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"metadata":{"externalID":"s:7Factory0A9ModifyingPAAE5scopeyxAA5ScopeCF::SYNTHESIZED::s:7FactoryAAV","roleHeading":"Instance Method","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"scope","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"modules":[{"name":"Factory"}],"extendedModule":"Factory","role":"symbol","title":"scope(_:)"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/scope(_:)"},"kind":"symbol","schemaVersion":{"minor":3,"patch":0,"major":0},"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":"."}],"references":{"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/factory\/factorymodifying-implementations","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory/scope(_:)":{"url":"\/documentation\/factory\/factory\/scope(_:)","type":"topic","abstract":[{"type":"text","text":"Defines a dependency scope for this Factory. See "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"reference"},{"text":".","type":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/scope(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"scope","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","title":"scope(_:)"}}} \ 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 9133a689..b9a1bfd8 100644 --- a/docs/data/documentation/factory/factory/shared.json +++ b/docs/data/documentation/factory/factory/shared.json @@ -1 +1 @@ -{"abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class"},{"type":"text","text":"."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/shared","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"type":"heading","level":2,"anchor":"discussion","text":"Discussion"},{"code":["var service: Factory {"," self { MyService() }"," .shared","}"],"type":"codeListing","syntax":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"symbolKind":"property","roleHeading":"Instance Property","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE6sharedxvp::SYNTHESIZED::s:7FactoryAAV","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"shared"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"extendedModule":"Factory","modules":[{"name":"Factory"}],"title":"shared"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/shared"]}],"sections":[],"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/Factory/shared":{"kind":"symbol","type":"topic","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"},{"text":".","type":"text"}],"role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"shared"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/shared","url":"\/documentation\/factory\/factory\/shared","title":"shared"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"title":"Scope.Shared","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/scope\/shared-swift.class","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","navigatorTitle":[{"kind":"identifier","text":"Shared"}]},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"kind":"article","title":"FactoryModifying Implementations","role":"collectionGroup","type":"topic","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"metadata":{"role":"symbol","roleHeading":"Instance Property","symbolKind":"property","title":"shared","modules":[{"name":"Factory"}],"extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE6sharedxvp::SYNTHESIZED::s:7FactoryAAV","fragments":[{"kind":"keyword","text":"var"},{"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 "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","isActive":true},{"type":"text","text":"."}],"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/shared"},"variants":[{"paths":["\/documentation\/factory\/factory\/shared"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"kind":"text","text":" }"}],"languages":["swift"]}],"kind":"declarations"},{"kind":"content","content":[{"type":"heading","level":2,"anchor":"discussion","text":"Discussion"},{"type":"codeListing","code":["var service: Factory {"," self { MyService() }"," .shared","}"],"syntax":"swift"}]}],"references":{"doc://Factory/documentation/Factory/Factory/shared":{"url":"\/documentation\/factory\/factory\/shared","role":"symbol","type":"topic","kind":"symbol","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"}],"title":"shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/shared","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/factory\/factorymodifying-implementations","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"}}} \ 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 32925e90..13476006 100644 --- a/docs/data/documentation/factory/factory/singleton.json +++ b/docs/data/documentation/factory/factory/singleton.json @@ -1 +1 @@ -{"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/singleton"},"metadata":{"title":"singleton","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"singleton","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"roleHeading":"Instance Property","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE9singletonxvp::SYNTHESIZED::s:7FactoryAAV","role":"symbol","extendedModule":"Factory","symbolKind":"property"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}]}]},{"content":[{"type":"heading","anchor":"discussion","level":2,"text":"Discussion"},{"syntax":"swift","type":"codeListing","code":["var service: Factory {"," self { MyService() }"," .singleton","}"]}],"kind":"content"}],"variants":[{"paths":["\/documentation\/factory\/factory\/singleton"],"traits":[{"interfaceLanguage":"swift"}]}],"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":"."}],"kind":"symbol","schemaVersion":{"patch":0,"minor":3,"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/Factory/singleton":{"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","isActive":true,"type":"reference"},{"type":"text","text":"."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/singleton","type":"topic","kind":"symbol","url":"\/documentation\/factory\/factory\/singleton","role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"title":"singleton"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"kind":"article","title":"FactoryModifying Implementations","role":"collectionGroup","type":"topic","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Singleton"}],"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.class"}}} \ No newline at end of file +{"schemaVersion":{"major":0,"patch":0,"minor":3},"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}]},{"kind":"content","content":[{"text":"Discussion","level":2,"anchor":"discussion","type":"heading"},{"syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .singleton","}"],"type":"codeListing"}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/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"}],"sections":[],"metadata":{"title":"singleton","roleHeading":"Instance Property","role":"symbol","modules":[{"name":"Factory"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE9singletonxvp::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}]},"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\/singleton"},"references":{"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/factory\/factorymodifying-implementations","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory/Factory/singleton":{"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"singleton"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"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","isActive":true,"type":"reference"},{"text":".","type":"text"}],"title":"singleton","url":"\/documentation\/factory\/factory\/singleton","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/singleton","role":"symbol","kind":"symbol"}}} \ 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 aee5466d..199cb4bd 100644 --- a/docs/data/documentation/factory/factory/timetolive(_:).json +++ b/docs/data/documentation/factory/factory/timetolive(_:).json @@ -1 +1 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/timeToLive(_:)","interfaceLanguage":"swift"},"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":" "},{"text":"cached item will be discarded and a new instance created.","type":"text"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"symbol","metadata":{"roleHeading":"Instance Method","externalID":"s:7Factory0A9ModifyingPAAE10timeToLiveyxSdF::SYNTHESIZED::s:7FactoryAAV","title":"timeToLive(_:)","symbolKind":"method","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"}],"role":"symbol","extendedModule":"Factory","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"seconds","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"c:@T@NSTimeInterval","text":"TimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"platforms":["macOS"],"languages":["swift"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/timetolive(_:)"]}],"sections":[],"references":{"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"kind":"article","title":"FactoryModifying Implementations","role":"collectionGroup","type":"topic","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Factory/timeToLive(_:)":{"title":"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":" "},{"type":"text","text":"cached item will be discarded and a new instance created."}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"timeToLive","kind":"identifier"},{"text":"(","kind":"text"},{"preciseIdentifier":"c:@T@NSTimeInterval","kind":"typeIdentifier","text":"TimeInterval"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"kind":"symbol","url":"\/documentation\/factory\/factory\/timetolive(_:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/timeToLive(_:)","type":"topic"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"}}} \ No newline at end of file +{"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"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/timeToLive(_:)","interfaceLanguage":"swift"},"sections":[],"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"}],"metadata":{"role":"symbol","extendedModule":"Factory","modules":[{"name":"Factory"}],"roleHeading":"Instance Method","symbolKind":"method","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"timeToLive","kind":"identifier"},{"kind":"text","text":"("},{"preciseIdentifier":"c:@T@NSTimeInterval","text":"TimeInterval","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"title":"timeToLive(_:)","externalID":"s:7Factory0A9ModifyingPAAE10timeToLiveyxSdF::SYNTHESIZED::s:7FactoryAAV"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"seconds"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"c:@T@NSTimeInterval","text":"TimeInterval"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"],"platforms":["macOS"]}]}],"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/factory\/timetolive(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/Factory/timeToLive(_:)":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"timeToLive"},{"text":"(","kind":"text"},{"text":"TimeInterval","kind":"typeIdentifier","preciseIdentifier":"c:@T@NSTimeInterval"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"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."}],"title":"timeToLive(_:)","url":"\/documentation\/factory\/factory\/timetolive(_:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/timeToLive(_:)","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/factory\/factorymodifying-implementations","abstract":[],"kind":"article"}}} \ 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 6b30674b..228e34be 100644 --- a/docs/data/documentation/factory/factory/unique.json +++ b/docs/data/documentation/factory/factory/unique.json @@ -1 +1 @@ -{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/unique"},"abstract":[{"text":"Syntactic sugar defines defines unique scope. See ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"text":".","type":"text"}],"schemaVersion":{"minor":3,"patch":0,"major":0},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"]]},"metadata":{"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"roleHeading":"Instance Property","role":"symbol","modules":[{"name":"Factory"}],"title":"unique","extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE6uniquexvp::SYNTHESIZED::s:7FactoryAAV","symbolKind":"property"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"unique","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"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":[{"text":"While you can add the modifier, Factory’s are unique by default.","type":"text"}],"type":"paragraph"}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factory\/unique"]}],"sections":[],"references":{"doc://Factory/documentation/Factory/Factory/unique":{"title":"unique","abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true},{"type":"text","text":"."}],"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"unique","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"kind":"symbol","url":"\/documentation\/factory\/factory\/unique","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/unique","type":"topic"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"kind":"article","title":"FactoryModifying Implementations","role":"collectionGroup","type":"topic","abstract":[],"url":"\/documentation\/factory\/factory\/factorymodifying-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations"},"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"}}} \ No newline at end of file +{"kind":"symbol","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},"abstract":[{"text":"Syntactic sugar defines defines unique scope. See ","type":"text"},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"reference"},{"type":"text","text":"."}],"metadata":{"title":"unique","roleHeading":"Instance Property","role":"symbol","modules":[{"name":"Factory"}],"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE6uniquexvp::SYNTHESIZED::s:7FactoryAAV","extendedModule":"Factory","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"unique","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Factory\/unique"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"unique","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}],"languages":["swift"]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"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"}]}],"variants":[{"paths":["\/documentation\/factory\/factory\/unique"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"references":{"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/Factory/unique":{"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"unique","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true},{"type":"text","text":"."}],"title":"unique","url":"\/documentation\/factory\/factory\/unique","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/unique","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory/FactoryModifying-Implementations":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","title":"FactoryModifying Implementations","url":"\/documentation\/factory\/factory\/factorymodifying-implementations","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factoryautoregistering.json b/docs/data/documentation/factory/factoryautoregistering.json index 58e615f5..a27e35e8 100644 --- a/docs/data/documentation/factory/factoryautoregistering.json +++ b/docs/data/documentation/factory/factoryautoregistering.json @@ -1 +1 @@ -{"metadata":{"modules":[{"name":"Factory"}],"navigatorTitle":[{"text":"FactoryAutoRegistering","kind":"identifier"}],"externalID":"s:7Factory0A15AutoRegisteringa","title":"FactoryAutoRegistering","symbolKind":"typealias","role":"symbol","roleHeading":"Type Alias","fragments":[{"text":"typealias","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryAutoRegistering"}]},"variants":[{"paths":["\/documentation\/factory\/factoryautoregistering"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"typealias"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryAutoRegistering"},{"kind":"text","text":" = "},{"kind":"typeIdentifier","text":"AutoRegistering","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","preciseIdentifier":"s:7Factory15AutoRegisteringP"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryAutoRegistering","interfaceLanguage":"swift"},"kind":"symbol","references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/AutoRegistering":{"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"AutoRegistering","kind":"identifier"}],"type":"topic","role":"symbol","title":"AutoRegistering","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","navigatorTitle":[{"text":"AutoRegistering","kind":"identifier"}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"code":"Container","type":"codeVoice"},{"type":"text","text":"."}],"url":"\/documentation\/factory\/autoregistering","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryAutoRegistering":{"url":"\/documentation\/factory\/factoryautoregistering","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryAutoRegistering","kind":"symbol","type":"topic","navigatorTitle":[{"text":"FactoryAutoRegistering","kind":"identifier"}],"title":"FactoryAutoRegistering","fragments":[{"text":"typealias","kind":"keyword"},{"text":" ","kind":"text"},{"text":"FactoryAutoRegistering","kind":"identifier"}],"role":"symbol","abstract":[]}}} \ No newline at end of file +{"primaryContentSections":[{"declarations":[{"tokens":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryAutoRegistering","kind":"identifier"},{"text":" = ","kind":"text"},{"text":"AutoRegistering","preciseIdentifier":"s:7Factory15AutoRegisteringP","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","kind":"typeIdentifier"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"metadata":{"fragments":[{"text":"typealias","kind":"keyword"},{"text":" ","kind":"text"},{"text":"FactoryAutoRegistering","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryAutoRegistering"}],"role":"symbol","roleHeading":"Type Alias","externalID":"s:7Factory0A15AutoRegisteringa","symbolKind":"typealias","title":"FactoryAutoRegistering","modules":[{"name":"Factory"}]},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryautoregistering"]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryAutoRegistering","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/AutoRegistering":{"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AutoRegistering","kind":"identifier"}],"kind":"symbol","type":"topic","title":"AutoRegistering","url":"\/documentation\/factory\/autoregistering","identifier":"doc:\/\/Factory\/documentation\/Factory\/AutoRegistering","role":"symbol","navigatorTitle":[{"text":"AutoRegistering","kind":"identifier"}],"abstract":[{"type":"text","text":"Adds an registration “hook” to a "},{"type":"codeVoice","code":"Container"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryAutoRegistering":{"navigatorTitle":[{"kind":"identifier","text":"FactoryAutoRegistering"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryAutoRegistering","kind":"symbol","abstract":[],"role":"symbol","title":"FactoryAutoRegistering","url":"\/documentation\/factory\/factoryautoregistering","fragments":[{"text":"typealias","kind":"keyword"},{"text":" ","kind":"text"},{"text":"FactoryAutoRegistering","kind":"identifier"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontainer.json b/docs/data/documentation/factory/factorycontainer.json index 136bdab1..5d953990 100644 --- a/docs/data/documentation/factory/factorycontainer.json +++ b/docs/data/documentation/factory/factorycontainer.json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"text":"FactoryContainer","kind":"identifier"},{"kind":"text","text":" = "},{"preciseIdentifier":"s:7Factory9ContainerC","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","text":"Container","kind":"typeIdentifier"}]}],"kind":"declarations"}],"sections":[],"metadata":{"roleHeading":"Type Alias","fragments":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContainer"}],"symbolKind":"typealias","title":"FactoryContainer","navigatorTitle":[{"kind":"identifier","text":"FactoryContainer"}],"role":"symbol","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9Containera"},"variants":[{"paths":["\/documentation\/factory\/factorycontainer"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContainer","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryContainer":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContainer","type":"topic","fragments":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryContainer","kind":"identifier"}],"title":"FactoryContainer","abstract":[],"navigatorTitle":[{"kind":"identifier","text":"FactoryContainer"}],"url":"\/documentation\/factory\/factorycontainer","kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","navigatorTitle":[{"text":"Container","kind":"identifier"}],"title":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"role":"symbol","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"}}} \ No newline at end of file +{"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContainer","interfaceLanguage":"swift"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"typealias"},{"kind":"text","text":" "},{"text":"FactoryContainer","kind":"identifier"},{"kind":"text","text":" = "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"}]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontainer"]}],"kind":"symbol","metadata":{"symbolKind":"typealias","roleHeading":"Type Alias","title":"FactoryContainer","fragments":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContainer"}],"externalID":"s:7Factory0A9Containera","navigatorTitle":[{"text":"FactoryContainer","kind":"identifier"}],"modules":[{"name":"Factory"}],"role":"symbol"},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Container":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","title":"Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"url":"\/documentation\/factory\/container","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}],"navigatorTitle":[{"text":"Container","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryContainer":{"fragments":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContainer"}],"kind":"symbol","type":"topic","title":"FactoryContainer","url":"\/documentation\/factory\/factorycontainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContainer","role":"symbol","navigatorTitle":[{"text":"FactoryContainer","kind":"identifier"}],"abstract":[]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontainermanager.json b/docs/data/documentation/factory/factorycontainermanager.json index 2fafaad1..c979bd16 100644 --- a/docs/data/documentation/factory/factorycontainermanager.json +++ b/docs/data/documentation/factory/factorycontainermanager.json @@ -1 +1 @@ -{"variants":[{"paths":["\/documentation\/factory\/factorycontainermanager"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"typealias"},{"kind":"text","text":" "},{"text":"FactoryContainerManager","kind":"identifier"},{"kind":"text","text":" = "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","kind":"typeIdentifier","text":"ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC"}]}],"kind":"declarations"}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"metadata":{"title":"FactoryContainerManager","role":"symbol","externalID":"s:7Factory0A16ContainerManagera","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"typealias"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContainerManager"}],"roleHeading":"Type Alias","navigatorTitle":[{"text":"FactoryContainerManager","kind":"identifier"}],"symbolKind":"typealias"},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContainerManager","interfaceLanguage":"swift"},"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"kind":"symbol","url":"\/documentation\/factory\/containermanager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","title":"ContainerManager","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"role":"symbol","type":"topic"},"doc://Factory/documentation/Factory/FactoryContainerManager":{"type":"topic","abstract":[],"title":"FactoryContainerManager","role":"symbol","fragments":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryContainerManager","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContainerManager","kind":"symbol","navigatorTitle":[{"text":"FactoryContainerManager","kind":"identifier"}],"url":"\/documentation\/factory\/factorycontainermanager"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"typealias","kind":"keyword"},{"text":" ","kind":"text"},{"text":"FactoryContainerManager","kind":"identifier"},{"kind":"text","text":" = "},{"preciseIdentifier":"s:7Factory16ContainerManagerC","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","text":"ContainerManager"}],"languages":["swift"],"platforms":["macOS"]}]}],"sections":[],"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/factorycontainermanager"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"patch":0,"minor":3,"major":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContainerManager","interfaceLanguage":"swift"},"metadata":{"symbolKind":"typealias","modules":[{"name":"Factory"}],"navigatorTitle":[{"text":"FactoryContainerManager","kind":"identifier"}],"title":"FactoryContainerManager","role":"symbol","externalID":"s:7Factory0A16ContainerManagera","roleHeading":"Type Alias","fragments":[{"text":"typealias","kind":"keyword"},{"text":" ","kind":"text"},{"text":"FactoryContainerManager","kind":"identifier"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"references":{"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"url":"\/documentation\/factory\/containermanager","navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContainerManager":{"title":"FactoryContainerManager","url":"\/documentation\/factory\/factorycontainermanager","role":"symbol","type":"topic","abstract":[],"kind":"symbol","fragments":[{"kind":"keyword","text":"typealias"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContainerManager"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContainerManager","navigatorTitle":[{"text":"FactoryContainerManager","kind":"identifier"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontext.json b/docs/data/documentation/factory/factorycontext.json index ddd56266..cb4567ea 100644 --- a/docs/data/documentation/factory/factorycontext.json +++ b/docs/data/documentation/factory/factorycontext.json @@ -1 +1 @@ -{"metadata":{"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"roleHeading":"Structure","role":"symbol","modules":[{"name":"Factory"}],"navigatorTitle":[{"text":"FactoryContext","kind":"identifier"}],"title":"FactoryContext","externalID":"s:7Factory0A7ContextV","symbolKind":"struct"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"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":"Instance Properties"},{"title":"Type Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/current"]},{"title":"Type Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/removeArg(forKey:)","doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/setArg(_:forKey:)"]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontext"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","interfaceLanguage":"swift"},"kind":"symbol","primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"references":{"doc://Factory/documentation/Factory/FactoryContext/runtimeArguments":{"abstract":[{"type":"text","text":"Runtime arguments"}],"title":"runtimeArguments","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"runtimeArguments","kind":"identifier"},{"text":": [","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":"]","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/runtimeArguments","url":"\/documentation\/factory\/factorycontext\/runtimearguments"},"doc://Factory/documentation/Factory/FactoryContext/isTest":{"abstract":[{"type":"text","text":"Proxy check for application running in test mode."}],"type":"topic","title":"isTest","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"isTest","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isTest","kind":"symbol","url":"\/documentation\/factory\/factorycontext\/istest"},"doc://Factory/documentation/Factory/FactoryContext/isPreview":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontext\/ispreview","title":"isPreview","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isPreview","abstract":[{"type":"text","text":"Proxy check for application running in preview mode."}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"isPreview","kind":"identifier"},{"kind":"text","text":": "},{"text":"Bool","preciseIdentifier":"s:Sb","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory/FactoryContext/isDebug":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontext\/isdebug","title":"isDebug","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isDebug","abstract":[{"text":"Proxy checks for application running in DEBUG mode.","type":"text"}],"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"isDebug"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"}]},"doc://Factory/documentation/Factory/FactoryContext/current":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontext\/current","title":"current","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/current","abstract":[{"type":"text","text":"Global current context."}],"fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"current","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A7ContextV","kind":"typeIdentifier","text":"FactoryContext"}]},"doc://Factory/documentation/Factory/FactoryContext/removeArg(forKey:)":{"type":"topic","kind":"symbol","abstract":[{"text":"Add argument to global context.","type":"text"}],"title":"removeArg(forKey:)","url":"\/documentation\/factory\/factorycontext\/removearg(forkey:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/removeArg(forKey:)","role":"symbol","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"removeArg","kind":"identifier"},{"kind":"text","text":"("},{"text":"forKey","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":")","kind":"text"}]},"doc://Factory/documentation/Factory/FactoryContext/setArg(_:forKey:)":{"url":"\/documentation\/factory\/factorycontext\/setarg(_:forkey:)","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/setArg(_:forKey:)","abstract":[{"type":"text","text":"Add argument to global context."}],"title":"setArg(_:forKey:)","type":"topic","role":"symbol","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"setArg","kind":"identifier"},{"kind":"text","text":"("},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"forKey","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"text":")","kind":"text"}]},"doc://Factory/documentation/Factory/FactoryContext/isSimulator":{"kind":"symbol","url":"\/documentation\/factory\/factorycontext\/issimulator","role":"symbol","abstract":[{"type":"text","text":"Proxy check for application running in simulator."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isSimulator","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"isSimulator","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"}],"type":"topic","title":"isSimulator"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryContext/arguments":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontext\/arguments","title":"arguments","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/arguments","abstract":[{"text":"Proxy for application arguments.","type":"text"}],"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"arguments"},{"text":": [","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":"]","kind":"text"}]},"doc://Factory/documentation/Factory/FactoryContext":{"navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","abstract":[],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContext"}],"kind":"symbol","type":"topic","title":"FactoryContext","url":"\/documentation\/factory\/factorycontext","role":"symbol"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"schemaVersion":{"patch":0,"minor":3,"major":0},"topicSections":[{"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":"Instance Properties"},{"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:)"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontext"]}],"kind":"symbol","sections":[],"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Structure","symbolKind":"struct","title":"FactoryContext","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryContext","kind":"identifier"}],"externalID":"s:7Factory0A7ContextV","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}]},"references":{"doc://Factory/documentation/Factory/FactoryContext/removeArg(forKey:)":{"type":"topic","title":"removeArg(forKey:)","kind":"symbol","abstract":[{"type":"text","text":"Add argument to global context."}],"url":"\/documentation\/factory\/factorycontext\/removearg(forkey:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/removeArg(forKey:)","role":"symbol","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"removeArg"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"forKey"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":")","kind":"text"}]},"doc://Factory/documentation/Factory/FactoryContext/current":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/current","url":"\/documentation\/factory\/factorycontext\/current","title":"current","type":"topic","abstract":[{"type":"text","text":"Global current context."}],"fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"current"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A7ContextV","text":"FactoryContext"}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/FactoryContext/runtimeArguments":{"role":"symbol","abstract":[{"type":"text","text":"Runtime arguments"}],"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"runtimeArguments","kind":"identifier"},{"kind":"text","text":": ["},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":" : ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":"]"}],"kind":"symbol","url":"\/documentation\/factory\/factorycontext\/runtimearguments","title":"runtimeArguments","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/runtimeArguments"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContext/isTest":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isTest","title":"isTest","type":"topic","url":"\/documentation\/factory\/factorycontext\/istest","abstract":[{"type":"text","text":"Proxy check for application running in test mode."}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"isTest","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/FactoryContext/setArg(_:forKey:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/setArg(_:forKey:)","url":"\/documentation\/factory\/factorycontext\/setarg(_:forkey:)","title":"setArg(_:forKey:)","type":"topic","abstract":[{"type":"text","text":"Add argument to global context."}],"fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"setArg"},{"text":"(","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"forKey"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"text":")","kind":"text"}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/FactoryContext/isPreview":{"abstract":[{"text":"Proxy check for application running in preview mode.","type":"text"}],"role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"isPreview"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isPreview","title":"isPreview","url":"\/documentation\/factory\/factorycontext\/ispreview","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContext/isSimulator":{"kind":"symbol","url":"\/documentation\/factory\/factorycontext\/issimulator","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isSimulator","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"isSimulator"},{"text":": ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"abstract":[{"text":"Proxy check for application running in simulator.","type":"text"}],"title":"isSimulator","role":"symbol","type":"topic"},"doc://Factory/documentation/Factory/FactoryContext":{"abstract":[],"role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","title":"FactoryContext","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContext/arguments":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/arguments","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"arguments","kind":"identifier"},{"text":": [","kind":"text"},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"text":"]","kind":"text"}],"url":"\/documentation\/factory\/factorycontext\/arguments","abstract":[{"type":"text","text":"Proxy for application arguments."}],"title":"arguments"},"doc://Factory/documentation/Factory/FactoryContext/isDebug":{"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"isDebug","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"kind":"symbol","type":"topic","title":"isDebug","url":"\/documentation\/factory\/factorycontext\/isdebug","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isDebug","role":"symbol","abstract":[{"type":"text","text":"Proxy checks for application running in DEBUG mode."}]}}} \ 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 233fa35f..a8290161 100644 --- a/docs/data/documentation/factory/factorycontext/arguments.json +++ b/docs/data/documentation/factory/factorycontext/arguments.json @@ -1 +1 @@ -{"metadata":{"title":"arguments","roleHeading":"Instance Property","externalID":"s:7Factory0A7ContextV9argumentsSaySSGvp","symbolKind":"property","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"arguments","kind":"identifier"},{"text":": [","kind":"text"},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"text":"]","kind":"text"}],"role":"symbol"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"abstract":[{"type":"text","text":"Proxy for application arguments."}],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/arguments"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/arguments"},"kind":"symbol","primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"arguments"},{"kind":"text","text":": ["},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"kind":"text","text":"]"}],"languages":["swift"]}],"kind":"declarations"}],"sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory/FactoryContext":{"navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","abstract":[],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContext"}],"kind":"symbol","type":"topic","title":"FactoryContext","url":"\/documentation\/factory\/factorycontext","role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryContext/arguments":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontext\/arguments","title":"arguments","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/arguments","abstract":[{"text":"Proxy for application arguments.","type":"text"}],"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"arguments"},{"text":": [","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":"]","kind":"text"}]}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"arguments","kind":"identifier"},{"text":": [","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":"]","kind":"text"}],"platforms":["macOS"]}]}],"abstract":[{"type":"text","text":"Proxy for application arguments."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/arguments","interfaceLanguage":"swift"},"metadata":{"role":"symbol","modules":[{"name":"Factory"}],"symbolKind":"property","roleHeading":"Instance Property","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"arguments"},{"text":": [","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":"]","kind":"text"}],"title":"arguments","externalID":"s:7Factory0A7ContextV9argumentsSaySSGvp"},"sections":[],"kind":"symbol","schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontext\/arguments"]}],"references":{"doc://Factory/documentation/Factory/FactoryContext/arguments":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/arguments","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"arguments","kind":"identifier"},{"text":": [","kind":"text"},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"text":"]","kind":"text"}],"url":"\/documentation\/factory\/factorycontext\/arguments","abstract":[{"type":"text","text":"Proxy for application arguments."}],"title":"arguments"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContext":{"abstract":[],"role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","title":"FactoryContext","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext","type":"topic","kind":"symbol"}}} \ 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 09faf868..de05b240 100644 --- a/docs/data/documentation/factory/factorycontext/current.json +++ b/docs/data/documentation/factory/factorycontext/current.json @@ -1 +1 @@ -{"sections":[],"abstract":[{"type":"text","text":"Global current context."}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"nonisolated","kind":"attribute"},{"kind":"text","text":"(unsafe) "},{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"current"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","preciseIdentifier":"s:7Factory0A7ContextV","text":"FactoryContext"}],"languages":["swift"]}],"kind":"declarations"}],"metadata":{"role":"symbol","title":"current","symbolKind":"property","modules":[{"name":"Factory"}],"roleHeading":"Type Property","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"current","kind":"identifier"},{"kind":"text","text":": "},{"text":"FactoryContext","preciseIdentifier":"s:7Factory0A7ContextV","kind":"typeIdentifier"}],"externalID":"s:7Factory0A7ContextV7currentACvpZ","extendedModule":"Factory"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/current"},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"schemaVersion":{"major":0,"patch":0,"minor":3},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontext\/current"]}],"references":{"doc://Factory/documentation/Factory/FactoryContext/current":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontext\/current","title":"current","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/current","abstract":[{"type":"text","text":"Global current context."}],"fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"current","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A7ContextV","kind":"typeIdentifier","text":"FactoryContext"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryContext":{"navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","abstract":[],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContext"}],"kind":"symbol","type":"topic","title":"FactoryContext","url":"\/documentation\/factory\/factorycontext","role":"symbol"}}} \ No newline at end of file +{"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"nonisolated"},{"text":"(unsafe) ","kind":"text"},{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"current","kind":"identifier"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","preciseIdentifier":"s:7Factory0A7ContextV","text":"FactoryContext","kind":"typeIdentifier"}],"languages":["swift"]}],"kind":"declarations"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"paths":["\/documentation\/factory\/factorycontext\/current"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/current"},"sections":[],"kind":"symbol","metadata":{"externalID":"s:7Factory0A7ContextV7currentACvpZ","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"current"},{"kind":"text","text":": "},{"text":"FactoryContext","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A7ContextV"}],"extendedModule":"Factory","roleHeading":"Type Property","role":"symbol","symbolKind":"property","modules":[{"name":"Factory"}],"title":"current"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"abstract":[{"type":"text","text":"Global current context."}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContext/current":{"fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"current","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A7ContextV","text":"FactoryContext"}],"abstract":[{"type":"text","text":"Global current context."}],"url":"\/documentation\/factory\/factorycontext\/current","kind":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/current","role":"symbol","title":"current"},"doc://Factory/documentation/Factory/FactoryContext":{"abstract":[],"role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","title":"FactoryContext","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext","type":"topic","kind":"symbol"}}} \ 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 4006f47e..64b39be5 100644 --- a/docs/data/documentation/factory/factorycontext/isdebug.json +++ b/docs/data/documentation/factory/factorycontext/isdebug.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"abstract":[{"text":"Proxy checks for application running in DEBUG mode.","type":"text"}],"schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontext\/isdebug"]}],"kind":"symbol","sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isDebug","interfaceLanguage":"swift"},"metadata":{"roleHeading":"Instance Property","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"isDebug","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"symbolKind":"property","title":"isDebug","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A7ContextV7isDebugSbvp"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"isDebug","kind":"identifier"},{"kind":"text","text":": "},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"languages":["swift"]}]}],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryContext":{"navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","abstract":[],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContext"}],"kind":"symbol","type":"topic","title":"FactoryContext","url":"\/documentation\/factory\/factorycontext","role":"symbol"},"doc://Factory/documentation/Factory/FactoryContext/isDebug":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontext\/isdebug","title":"isDebug","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isDebug","abstract":[{"text":"Proxy checks for application running in DEBUG mode.","type":"text"}],"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"isDebug"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"}]}}} \ No newline at end of file +{"schemaVersion":{"minor":3,"patch":0,"major":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isDebug"},"abstract":[{"text":"Proxy checks for application running in DEBUG mode.","type":"text"}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"isDebug"},{"kind":"text","text":": "},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}]}],"kind":"declarations"}],"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontext\/isdebug"]}],"metadata":{"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"isDebug","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"externalID":"s:7Factory0A7ContextV7isDebugSbvp","roleHeading":"Instance Property","title":"isDebug","symbolKind":"property","role":"symbol","modules":[{"name":"Factory"}]},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory/FactoryContext/isDebug":{"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"isDebug","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"kind":"symbol","type":"topic","title":"isDebug","url":"\/documentation\/factory\/factorycontext\/isdebug","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isDebug","role":"symbol","abstract":[{"type":"text","text":"Proxy checks for application running in DEBUG mode."}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContext":{"abstract":[],"role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","title":"FactoryContext","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext","type":"topic","kind":"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 e67ea24c..a1c1602c 100644 --- a/docs/data/documentation/factory/factorycontext/ispreview.json +++ b/docs/data/documentation/factory/factorycontext/ispreview.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"isPreview"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isPreview","interfaceLanguage":"swift"},"sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"type":"text","text":"Proxy check for application running in preview mode."}],"kind":"symbol","metadata":{"roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"isPreview"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"symbolKind":"property","title":"isPreview","externalID":"s:7Factory0A7ContextV9isPreviewSbvp","role":"symbol","modules":[{"name":"Factory"}]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontext\/ispreview"]}],"references":{"doc://Factory/documentation/Factory/FactoryContext":{"navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","abstract":[],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContext"}],"kind":"symbol","type":"topic","title":"FactoryContext","url":"\/documentation\/factory\/factorycontext","role":"symbol"},"doc://Factory/documentation/Factory/FactoryContext/isPreview":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontext\/ispreview","title":"isPreview","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isPreview","abstract":[{"type":"text","text":"Proxy check for application running in preview mode."}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"isPreview","kind":"identifier"},{"kind":"text","text":": "},{"text":"Bool","preciseIdentifier":"s:Sb","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"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","externalID":"s:7Factory0A7ContextV9isPreviewSbvp","role":"symbol","symbolKind":"property","roleHeading":"Instance Property","modules":[{"name":"Factory"}]},"schemaVersion":{"patch":0,"minor":3,"major":0},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontext\/ispreview"]}],"abstract":[{"type":"text","text":"Proxy check for application running in preview mode."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isPreview","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"isPreview"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"languages":["swift"]}]}],"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContext/isPreview":{"abstract":[{"text":"Proxy check for application running in preview mode.","type":"text"}],"role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"isPreview"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isPreview","title":"isPreview","url":"\/documentation\/factory\/factorycontext\/ispreview","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContext":{"abstract":[],"role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","title":"FactoryContext","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext","type":"topic","kind":"symbol"}}} \ 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 981f412c..7b0f37cb 100644 --- a/docs/data/documentation/factory/factorycontext/issimulator.json +++ b/docs/data/documentation/factory/factorycontext/issimulator.json @@ -1 +1 @@ -{"metadata":{"externalID":"s:7Factory0A7ContextV11isSimulatorSbvp","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"isSimulator","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"symbolKind":"property","roleHeading":"Instance Property","modules":[{"name":"Factory"}],"title":"isSimulator"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"isSimulator"},{"kind":"text","text":": "},{"text":"Bool","preciseIdentifier":"s:Sb","kind":"typeIdentifier"}],"languages":["swift"]}],"kind":"declarations"}],"abstract":[{"type":"text","text":"Proxy check for application running in simulator."}],"variants":[{"paths":["\/documentation\/factory\/factorycontext\/issimulator"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isSimulator"},"kind":"symbol","references":{"doc://Factory/documentation/Factory/FactoryContext":{"navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","abstract":[],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContext"}],"kind":"symbol","type":"topic","title":"FactoryContext","url":"\/documentation\/factory\/factorycontext","role":"symbol"},"doc://Factory/documentation/Factory/FactoryContext/isSimulator":{"kind":"symbol","url":"\/documentation\/factory\/factorycontext\/issimulator","role":"symbol","abstract":[{"type":"text","text":"Proxy check for application running in simulator."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isSimulator","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"isSimulator","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"}],"type":"topic","title":"isSimulator"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"abstract":[{"type":"text","text":"Proxy check for application running in simulator."}],"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontext\/issimulator"]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"isSimulator","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}]}]}],"kind":"symbol","metadata":{"externalID":"s:7Factory0A7ContextV11isSimulatorSbvp","modules":[{"name":"Factory"}],"symbolKind":"property","roleHeading":"Instance Property","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"isSimulator"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Sb","kind":"typeIdentifier","text":"Bool"}],"title":"isSimulator","role":"symbol"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isSimulator","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContext/isSimulator":{"kind":"symbol","url":"\/documentation\/factory\/factorycontext\/issimulator","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isSimulator","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"isSimulator"},{"text":": ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"abstract":[{"text":"Proxy check for application running in simulator.","type":"text"}],"title":"isSimulator","role":"symbol","type":"topic"},"doc://Factory/documentation/Factory/FactoryContext":{"abstract":[],"role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","title":"FactoryContext","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext","type":"topic","kind":"symbol"}}} \ 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 8b70af72..53c21be8 100644 --- a/docs/data/documentation/factory/factorycontext/istest.json +++ b/docs/data/documentation/factory/factorycontext/istest.json @@ -1 +1 @@ -{"abstract":[{"type":"text","text":"Proxy check for application running in test mode."}],"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"variants":[{"paths":["\/documentation\/factory\/factorycontext\/istest"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"isTest","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"languages":["swift"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"title":"isTest","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A7ContextV6isTestSbvp","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"isTest"},{"kind":"text","text":": "},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"roleHeading":"Instance Property","symbolKind":"property"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isTest","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/FactoryContext/isTest":{"abstract":[{"type":"text","text":"Proxy check for application running in test mode."}],"type":"topic","title":"isTest","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"isTest","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isTest","kind":"symbol","url":"\/documentation\/factory\/factorycontext\/istest"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryContext":{"navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","abstract":[],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContext"}],"kind":"symbol","type":"topic","title":"FactoryContext","url":"\/documentation\/factory\/factorycontext","role":"symbol"}}} \ No newline at end of file +{"abstract":[{"type":"text","text":"Proxy check for application running in test mode."}],"schemaVersion":{"minor":3,"patch":0,"major":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"isTest","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"languages":["swift"]}],"kind":"declarations"}],"kind":"symbol","metadata":{"title":"isTest","externalID":"s:7Factory0A7ContextV6isTestSbvp","role":"symbol","modules":[{"name":"Factory"}],"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"isTest"},{"kind":"text","text":": "},{"text":"Bool","preciseIdentifier":"s:Sb","kind":"typeIdentifier"}],"roleHeading":"Instance Property","symbolKind":"property"},"variants":[{"paths":["\/documentation\/factory\/factorycontext\/istest"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isTest","interfaceLanguage":"swift"},"sections":[],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContext":{"abstract":[],"role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","title":"FactoryContext","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContext/isTest":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/isTest","title":"isTest","type":"topic","url":"\/documentation\/factory\/factorycontext\/istest","abstract":[{"type":"text","text":"Proxy check for application running in test mode."}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"isTest","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"kind":"symbol","role":"symbol"}}} \ 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 36559078..7de92604 100644 --- a/docs/data/documentation/factory/factorycontext/removearg(forkey:).json +++ b/docs/data/documentation/factory/factorycontext/removearg(forkey:).json @@ -1 +1 @@ -{"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"removeArg"},{"kind":"text","text":"("},{"text":"forKey","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"key"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"languages":["swift"]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/removeArg(forKey:)","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/factory\/factorycontext\/removearg(forkey:)"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"kind":"symbol","metadata":{"extendedModule":"Factory","roleHeading":"Type Method","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A7ContextV9removeArg6forKeyySS_tFZ","title":"removeArg(forKey:)","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"removeArg"},{"text":"(","kind":"text"},{"text":"forKey","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":")","kind":"text"}],"symbolKind":"method","role":"symbol"},"abstract":[{"text":"Add argument to global context.","type":"text"}],"references":{"doc://Factory/documentation/Factory/FactoryContext/removeArg(forKey:)":{"type":"topic","kind":"symbol","abstract":[{"text":"Add argument to global context.","type":"text"}],"title":"removeArg(forKey:)","url":"\/documentation\/factory\/factorycontext\/removearg(forkey:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/removeArg(forKey:)","role":"symbol","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"removeArg","kind":"identifier"},{"kind":"text","text":"("},{"text":"forKey","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":")","kind":"text"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryContext":{"navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","abstract":[],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContext"}],"kind":"symbol","type":"topic","title":"FactoryContext","url":"\/documentation\/factory\/factorycontext","role":"symbol"}}} \ No newline at end of file +{"variants":[{"paths":["\/documentation\/factory\/factorycontext\/removearg(forkey:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/removeArg(forKey:)","interfaceLanguage":"swift"},"metadata":{"modules":[{"name":"Factory"}],"externalID":"s:7Factory0A7ContextV9removeArg6forKeyySS_tFZ","extendedModule":"Factory","title":"removeArg(forKey:)","symbolKind":"method","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"removeArg","kind":"identifier"},{"kind":"text","text":"("},{"text":"forKey","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"role":"symbol","roleHeading":"Type Method"},"schemaVersion":{"patch":0,"major":0,"minor":3},"sections":[],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"removeArg","kind":"identifier"},{"text":"(","kind":"text"},{"text":"forKey","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"key","kind":"internalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":")"}],"languages":["swift"]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"kind":"symbol","abstract":[{"type":"text","text":"Add argument to global context."}],"references":{"doc://Factory/documentation/Factory/FactoryContext/removeArg(forKey:)":{"type":"topic","title":"removeArg(forKey:)","kind":"symbol","abstract":[{"type":"text","text":"Add argument to global context."}],"url":"\/documentation\/factory\/factorycontext\/removearg(forkey:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/removeArg(forKey:)","role":"symbol","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"removeArg"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"forKey"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":")","kind":"text"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContext":{"abstract":[],"role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","title":"FactoryContext","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext","type":"topic","kind":"symbol"}}} \ 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 5f79326d..355ee304 100644 --- a/docs/data/documentation/factory/factorycontext/runtimearguments.json +++ b/docs/data/documentation/factory/factorycontext/runtimearguments.json @@ -1 +1 @@ -{"abstract":[{"type":"text","text":"Runtime arguments"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"metadata":{"symbolKind":"property","modules":[{"name":"Factory"}],"roleHeading":"Instance Property","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"runtimeArguments"},{"text":": [","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":" : ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":"]"}],"role":"symbol","title":"runtimeArguments","externalID":"s:7Factory0A7ContextV16runtimeArgumentsSDyS2SGvp"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"runtimeArguments"},{"kind":"text","text":": ["},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":" : "},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"]","kind":"text"}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/runtimeArguments"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontext\/runtimearguments"]}],"kind":"symbol","sections":[],"references":{"doc://Factory/documentation/Factory/FactoryContext/runtimeArguments":{"abstract":[{"type":"text","text":"Runtime arguments"}],"title":"runtimeArguments","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"runtimeArguments","kind":"identifier"},{"text":": [","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":"]","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/runtimeArguments","url":"\/documentation\/factory\/factorycontext\/runtimearguments"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryContext":{"navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","abstract":[],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContext"}],"kind":"symbol","type":"topic","title":"FactoryContext","url":"\/documentation\/factory\/factorycontext","role":"symbol"}}} \ No newline at end of file +{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/runtimeArguments","interfaceLanguage":"swift"},"kind":"symbol","abstract":[{"text":"Runtime arguments","type":"text"}],"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"runtimeArguments"},{"kind":"text","text":": ["},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":" : ","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":"]"}],"languages":["swift"],"platforms":["macOS"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontext\/runtimearguments"]}],"metadata":{"role":"symbol","externalID":"s:7Factory0A7ContextV16runtimeArgumentsSDyS2SGvp","symbolKind":"property","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"runtimeArguments","kind":"identifier"},{"text":": [","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":" : ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":"]","kind":"text"}],"modules":[{"name":"Factory"}],"roleHeading":"Instance Property","title":"runtimeArguments"},"schemaVersion":{"patch":0,"minor":3,"major":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"references":{"doc://Factory/documentation/Factory/FactoryContext":{"abstract":[],"role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","title":"FactoryContext","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContext/runtimeArguments":{"role":"symbol","abstract":[{"type":"text","text":"Runtime arguments"}],"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"runtimeArguments","kind":"identifier"},{"kind":"text","text":": ["},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":" : ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":"]"}],"kind":"symbol","url":"\/documentation\/factory\/factorycontext\/runtimearguments","title":"runtimeArguments","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/runtimeArguments"}}} \ 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 9c12109f..c52e0ff8 100644 --- a/docs/data/documentation/factory/factorycontext/setarg(_:forkey:).json +++ b/docs/data/documentation/factory/factorycontext/setarg(_:forkey:).json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"sections":[],"kind":"symbol","abstract":[{"type":"text","text":"Add argument to global context."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"setArg","kind":"identifier"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"arg","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"forKey"},{"kind":"text","text":" "},{"text":"key","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"languages":["swift"],"platforms":["macOS"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontext\/setarg(_:forkey:)"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/setArg(_:forKey:)"},"schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"externalID":"s:7Factory0A7ContextV6setArg_6forKeyySS_SStFZ","modules":[{"name":"Factory"}],"fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"setArg","kind":"identifier"},{"kind":"text","text":"("},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"externalParam","text":"forKey"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":")","kind":"text"}],"extendedModule":"Factory","symbolKind":"method","title":"setArg(_:forKey:)","roleHeading":"Type Method","role":"symbol"},"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryContext":{"navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","abstract":[],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContext"}],"kind":"symbol","type":"topic","title":"FactoryContext","url":"\/documentation\/factory\/factorycontext","role":"symbol"},"doc://Factory/documentation/Factory/FactoryContext/setArg(_:forKey:)":{"url":"\/documentation\/factory\/factorycontext\/setarg(_:forkey:)","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/setArg(_:forKey:)","abstract":[{"type":"text","text":"Add argument to global context."}],"title":"setArg(_:forKey:)","type":"topic","role":"symbol","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"setArg","kind":"identifier"},{"kind":"text","text":"("},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"forKey","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"text":")","kind":"text"}]}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"setArg","kind":"identifier"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"arg"},{"kind":"text","text":": "},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"externalParam","text":"forKey"},{"text":" ","kind":"text"},{"text":"key","kind":"internalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"text":")","kind":"text"}],"languages":["swift"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontext\/setarg(_:forkey:)"]}],"metadata":{"title":"setArg(_:forKey:)","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"setArg","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":", "},{"text":"forKey","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":")","kind":"text"}],"roleHeading":"Type Method","externalID":"s:7Factory0A7ContextV6setArg_6forKeyySS_SStFZ","modules":[{"name":"Factory"}],"symbolKind":"method","role":"symbol","extendedModule":"Factory"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/setArg(_:forKey:)"},"sections":[],"kind":"symbol","schemaVersion":{"patch":0,"minor":3,"major":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContext"]]},"abstract":[{"type":"text","text":"Add argument to global context."}],"references":{"doc://Factory/documentation/Factory/FactoryContext":{"abstract":[],"role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryContext"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext","title":"FactoryContext","navigatorTitle":[{"kind":"identifier","text":"FactoryContext"}],"url":"\/documentation\/factory\/factorycontext","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContext/setArg(_:forKey:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContext\/setArg(_:forKey:)","url":"\/documentation\/factory\/factorycontext\/setarg(_:forkey:)","title":"setArg(_:forKey:)","type":"topic","abstract":[{"type":"text","text":"Add argument to global context."}],"fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"setArg"},{"text":"(","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"forKey"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"text":")","kind":"text"}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontexttype.json b/docs/data/documentation/factory/factorycontexttype.json index d40cc02a..ad96c0b0 100644 --- a/docs/data/documentation/factory/factorycontexttype.json +++ b/docs/data/documentation/factory/factorycontexttype.json @@ -1 +1 @@ -{"schemaVersion":{"major":0,"patch":0,"minor":3},"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/factorycontexttype"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"title":"Enumeration Cases","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":"Default Implementations","generated":true,"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/Equatable-Implementations"]}],"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Enumeration","role":"symbol","title":"FactoryContextType","externalID":"s:7Factory0A11ContextTypeO","symbolKind":"enum","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}]},"relationshipsSections":[{"type":"conformsTo","identifiers":["doc:\/\/Factory\/SQ"],"kind":"relationships","title":"Conforms To"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"},"abstract":[{"text":"Context types available for special purpose factory registrations.","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"platforms":["macOS"]}]}],"references":{"doc://Factory/documentation/Factory/FactoryContextType/args(_:)":{"url":"\/documentation\/factory\/factorycontexttype\/args(_:)","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/args(_:)","abstract":[{"text":"Context used when application is launched with a particular argument or arguments.","type":"text"}],"title":"FactoryContextType.args(_:)","type":"topic","role":"symbol","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"args","kind":"identifier"},{"kind":"text","text":"(["},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":"])"}]},"doc://Factory/documentation/Factory/FactoryContextType/simulator":{"type":"topic","kind":"symbol","abstract":[{"text":"Context used when application is running within an Xcode simulator.","type":"text"}],"title":"FactoryContextType.simulator","url":"\/documentation\/factory\/factorycontexttype\/simulator","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/simulator","role":"symbol","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"simulator","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryContextType/Equatable-Implementations":{"abstract":[],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/Equatable-Implementations","kind":"article","url":"\/documentation\/factory\/factorycontexttype\/equatable-implementations","title":"Equatable Implementations","role":"collectionGroup"},"doc://Factory/documentation/Factory/FactoryContextType/preview":{"abstract":[{"type":"text","text":"Context used when application is running in Xcode Preview mode."}],"url":"\/documentation\/factory\/factorycontexttype\/preview","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/preview","type":"topic","kind":"symbol","title":"FactoryContextType.preview","role":"symbol","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"preview","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryContextType":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontexttype","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"title":"FactoryContextType","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryContextType","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryContextType/debug":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/debug","title":"FactoryContextType.debug","type":"topic","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"debug","kind":"identifier"}],"role":"symbol","url":"\/documentation\/factory\/factorycontexttype\/debug","abstract":[{"text":"Context used when application is running in Xcode DEBUG mode.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContextType/test":{"type":"topic","title":"FactoryContextType.test","abstract":[{"text":"Context used when application is running in Xcode Unit Test mode.","type":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/test","url":"\/documentation\/factory\/factorycontexttype\/test","role":"symbol","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"test"}]},"doc://Factory/documentation/Factory/FactoryContextType/arg(_:)":{"abstract":[{"text":"Context used when application is launched with a particular argument.","type":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/arg(_:)","kind":"symbol","url":"\/documentation\/factory\/factorycontexttype\/arg(_:)","title":"FactoryContextType.arg(_:)","role":"symbol","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"arg"},{"kind":"text","text":"("},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":")","kind":"text"}]},"doc://Factory/documentation/Factory/FactoryContextType/device":{"abstract":[{"type":"text","text":"Context used when application is running on an actual device."}],"url":"\/documentation\/factory\/factorycontexttype\/device","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/device","type":"topic","kind":"symbol","title":"FactoryContextType.device","role":"symbol","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"device"}]},"doc://Factory/SQ":{"title":"Swift.Equatable","type":"unresolvable","identifier":"doc:\/\/Factory\/SQ"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","interfaceLanguage":"swift"},"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"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/Equatable-Implementations"],"title":"Default Implementations","generated":true}],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/factorycontexttype"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"FactoryContextType","kind":"identifier"}],"externalID":"s:7Factory0A11ContextTypeO","roleHeading":"Enumeration","title":"FactoryContextType","symbolKind":"enum","role":"symbol","navigatorTitle":[{"text":"FactoryContextType","kind":"identifier"}],"modules":[{"name":"Factory"}]},"kind":"symbol","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"sections":[],"relationshipsSections":[{"kind":"relationships","identifiers":["doc:\/\/Factory\/SQ"],"title":"Conforms To","type":"conformsTo"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/FactoryContextType/simulator":{"url":"\/documentation\/factory\/factorycontexttype\/simulator","abstract":[{"type":"text","text":"Context used when application is running within an Xcode simulator."}],"type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/simulator","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"simulator","kind":"identifier"}],"role":"symbol","title":"FactoryContextType.simulator"},"doc://Factory/documentation/Factory/FactoryContextType/arg(_:)":{"role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"arg"},{"kind":"text","text":"("},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"title":"FactoryContextType.arg(_:)","url":"\/documentation\/factory\/factorycontexttype\/arg(_:)","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/arg(_:)","abstract":[{"type":"text","text":"Context used when application is launched with a particular argument."}]},"doc://Factory/documentation/Factory/FactoryContextType/Equatable-Implementations":{"title":"Equatable Implementations","url":"\/documentation\/factory\/factorycontexttype\/equatable-implementations","abstract":[],"role":"collectionGroup","type":"topic","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/Equatable-Implementations"},"doc://Factory/documentation/Factory/FactoryContextType/device":{"kind":"symbol","title":"FactoryContextType.device","url":"\/documentation\/factory\/factorycontexttype\/device","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"device","kind":"identifier"}],"role":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/device","abstract":[{"text":"Context used when application is running on an actual device.","type":"text"}]},"doc://Factory/documentation/Factory/FactoryContextType/preview":{"role":"symbol","url":"\/documentation\/factory\/factorycontexttype\/preview","abstract":[{"type":"text","text":"Context used when application is running in Xcode Preview mode."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/preview","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"preview"}],"type":"topic","kind":"symbol","title":"FactoryContextType.preview"},"doc://Factory/documentation/Factory/FactoryContextType":{"role":"symbol","url":"\/documentation\/factory\/factorycontexttype","title":"FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContextType"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContextType/test":{"url":"\/documentation\/factory\/factorycontexttype\/test","abstract":[{"type":"text","text":"Context used when application is running in Xcode Unit Test mode."}],"type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/test","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"test"}],"role":"symbol","title":"FactoryContextType.test"},"doc://Factory/SQ":{"type":"unresolvable","title":"Swift.Equatable","identifier":"doc:\/\/Factory\/SQ"},"doc://Factory/documentation/Factory/FactoryContextType/args(_:)":{"url":"\/documentation\/factory\/factorycontexttype\/args(_:)","abstract":[{"type":"text","text":"Context used when application is launched with a particular argument or arguments."}],"type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/args(_:)","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"args","kind":"identifier"},{"kind":"text","text":"(["},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":"])","kind":"text"}],"role":"symbol","title":"FactoryContextType.args(_:)"},"doc://Factory/documentation/Factory/FactoryContextType/debug":{"url":"\/documentation\/factory\/factorycontexttype\/debug","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/debug","type":"topic","role":"symbol","title":"FactoryContextType.debug","kind":"symbol","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"debug"}],"abstract":[{"type":"text","text":"Context used when application is running in Xcode DEBUG mode."}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorycontexttype/!=(_:_:).json b/docs/data/documentation/factory/factorycontexttype/!=(_:_:).json index a153a7ba..89b3349c 100644 --- a/docs/data/documentation/factory/factorycontexttype/!=(_:_:).json +++ b/docs/data/documentation/factory/factorycontexttype/!=(_:_:).json @@ -1 +1 @@ -{"abstract":[{"type":"text","text":"Inherited from "},{"type":"codeVoice","code":"Equatable.!=(_:_:)"},{"type":"text","text":"."}],"metadata":{"title":"!=(_:_:)","externalID":"s:SQsE2neoiySbx_xtFZ::SYNTHESIZED::s:7Factory0A11ContextTypeO","roleHeading":"Operator","extendedModule":"Swift","modules":[{"name":"Factory","relatedModules":["Swift"]}],"symbolKind":"op","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"text":" ","kind":"text"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"role":"symbol"},"sections":[],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"text":" ","kind":"text"},{"kind":"text","text":"("},{"kind":"internalParam","text":"lhs"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"internalParam","text":"rhs"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontexttype\/!=(_:_:)"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/!=(_:_:)"},"schemaVersion":{"minor":3,"patch":0,"major":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/Equatable-Implementations"]]},"references":{"doc://Factory/documentation/Factory/FactoryContextType":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontexttype","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"title":"FactoryContextType","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryContextType","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryContextType/!=(_:_:)":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontexttype\/!=(_:_:)","title":"!=(_:_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/!=(_:_:)","abstract":[],"fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"!=","kind":"identifier"},{"kind":"text","text":" "},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}]},"doc://Factory/documentation/Factory/FactoryContextType/Equatable-Implementations":{"abstract":[],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/Equatable-Implementations","kind":"article","url":"\/documentation\/factory\/factorycontexttype\/equatable-implementations","title":"Equatable Implementations","role":"collectionGroup"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/!=(_:_:)","interfaceLanguage":"swift"},"abstract":[{"text":"Inherited from ","type":"text"},{"type":"codeVoice","code":"Equatable.!=(_:_:)"},{"type":"text","text":"."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"!=","kind":"identifier"},{"kind":"text","text":" "},{"text":"(","kind":"text"},{"text":"lhs","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"rhs","kind":"internalParam"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"languages":["swift"],"platforms":["macOS"]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/Equatable-Implementations"]]},"kind":"symbol","metadata":{"title":"!=(_:_:)","externalID":"s:SQsE2neoiySbx_xtFZ::SYNTHESIZED::s:7Factory0A11ContextTypeO","extendedModule":"Swift","symbolKind":"op","roleHeading":"Operator","role":"symbol","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"text":"(","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"modules":[{"relatedModules":["Swift"],"name":"Factory"}]},"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontexttype\/!=(_:_:)"]}],"schemaVersion":{"patch":0,"minor":3,"major":0},"references":{"doc://Factory/documentation/Factory/FactoryContextType":{"role":"symbol","url":"\/documentation\/factory\/factorycontexttype","title":"FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContextType"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContextType/!=(_:_:)":{"role":"symbol","url":"\/documentation\/factory\/factorycontexttype\/!=(_:_:)","title":"!=(_:_:)","abstract":[],"fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"!="},{"text":" ","kind":"text"},{"text":"(","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/!=(_:_:)","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContextType/Equatable-Implementations":{"title":"Equatable Implementations","url":"\/documentation\/factory\/factorycontexttype\/equatable-implementations","abstract":[],"role":"collectionGroup","type":"topic","kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/Equatable-Implementations"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 f110a345..65c5897e 100644 --- a/docs/data/documentation/factory/factorycontexttype/arg(_:).json +++ b/docs/data/documentation/factory/factorycontexttype/arg(_:).json @@ -1 +1 @@ -{"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/arg(_:)","interfaceLanguage":"swift"},"schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"symbolKind":"case","externalID":"s:7Factory0A11ContextTypeO3argyACSScACmF","roleHeading":"Case","role":"symbol","modules":[{"name":"Factory"}],"fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"arg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":")"}],"title":"FactoryContextType.arg(_:)"},"abstract":[{"type":"text","text":"Context used when application is launched with a particular argument."}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontexttype\/arg(_:)"]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"arg","kind":"identifier"},{"kind":"text","text":"("},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"languages":["swift"]}]}],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryContextType/arg(_:)":{"abstract":[{"text":"Context used when application is launched with a particular argument.","type":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/arg(_:)","kind":"symbol","url":"\/documentation\/factory\/factorycontexttype\/arg(_:)","title":"FactoryContextType.arg(_:)","role":"symbol","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"arg"},{"kind":"text","text":"("},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":")","kind":"text"}]},"doc://Factory/documentation/Factory/FactoryContextType":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontexttype","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"title":"FactoryContextType","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryContextType","kind":"identifier"}]}}} \ No newline at end of file +{"metadata":{"modules":[{"name":"Factory"}],"role":"symbol","roleHeading":"Case","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"text":"arg","kind":"identifier"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"text":")","kind":"text"}],"symbolKind":"case","title":"FactoryContextType.arg(_:)","externalID":"s:7Factory0A11ContextTypeO3argyACSScACmF"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/arg(_:)","interfaceLanguage":"swift"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"arg","kind":"identifier"},{"kind":"text","text":"("},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"text":")","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}]}],"schemaVersion":{"major":0,"patch":0,"minor":3},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontexttype\/arg(_:)"]}],"abstract":[{"type":"text","text":"Context used when application is launched with a particular argument."}],"references":{"doc://Factory/documentation/Factory/FactoryContextType/arg(_:)":{"role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"arg"},{"kind":"text","text":"("},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":")"}],"title":"FactoryContextType.arg(_:)","url":"\/documentation\/factory\/factorycontexttype\/arg(_:)","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/arg(_:)","abstract":[{"type":"text","text":"Context used when application is launched with a particular argument."}]},"doc://Factory/documentation/Factory/FactoryContextType":{"role":"symbol","url":"\/documentation\/factory\/factorycontexttype","title":"FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContextType"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 485abfe2..1039a284 100644 --- a/docs/data/documentation/factory/factorycontexttype/args(_:).json +++ b/docs/data/documentation/factory/factorycontexttype/args(_:).json @@ -1 +1 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/args(_:)","interfaceLanguage":"swift"},"metadata":{"modules":[{"name":"Factory"}],"externalID":"s:7Factory0A11ContextTypeO4argsyACSaySSGcACmF","symbolKind":"case","role":"symbol","title":"FactoryContextType.args(_:)","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"args","kind":"identifier"},{"text":"([","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":"])"}],"roleHeading":"Case"},"sections":[],"abstract":[{"text":"Context used when application is launched with a particular argument or arguments.","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontexttype\/args(_:)"]}],"kind":"symbol","primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"args"},{"text":"([","kind":"text"},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"text":"])","kind":"text"}],"languages":["swift"]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory/FactoryContextType/args(_:)":{"url":"\/documentation\/factory\/factorycontexttype\/args(_:)","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/args(_:)","abstract":[{"text":"Context used when application is launched with a particular argument or arguments.","type":"text"}],"title":"FactoryContextType.args(_:)","type":"topic","role":"symbol","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"args","kind":"identifier"},{"kind":"text","text":"(["},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":"])"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryContextType":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontexttype","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"title":"FactoryContextType","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryContextType","kind":"identifier"}]}}} \ No newline at end of file +{"kind":"symbol","metadata":{"role":"symbol","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"text":"args","kind":"identifier"},{"kind":"text","text":"(["},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":"])"}],"title":"FactoryContextType.args(_:)","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A11ContextTypeO4argsyACSaySSGcACmF","roleHeading":"Case","symbolKind":"case"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/args(_:)","interfaceLanguage":"swift"},"sections":[],"schemaVersion":{"major":0,"patch":0,"minor":3},"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":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontexttype\/args(_:)"]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"args","kind":"identifier"},{"kind":"text","text":"(["},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":"])"}],"platforms":["macOS"],"languages":["swift"]}]}],"references":{"doc://Factory/documentation/Factory/FactoryContextType/args(_:)":{"url":"\/documentation\/factory\/factorycontexttype\/args(_:)","abstract":[{"type":"text","text":"Context used when application is launched with a particular argument or arguments."}],"type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/args(_:)","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"args","kind":"identifier"},{"kind":"text","text":"(["},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":"])","kind":"text"}],"role":"symbol","title":"FactoryContextType.args(_:)"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContextType":{"role":"symbol","url":"\/documentation\/factory\/factorycontexttype","title":"FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContextType"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"type":"topic","kind":"symbol"}}} \ 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 da36a2ac..3f6c5447 100644 --- a/docs/data/documentation/factory/factorycontexttype/debug.json +++ b/docs/data/documentation/factory/factorycontexttype/debug.json @@ -1 +1 @@ -{"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/factorycontexttype\/debug"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"text":"debug","kind":"identifier"}]}]}],"metadata":{"externalID":"s:7Factory0A11ContextTypeO5debugyA2CmF","title":"FactoryContextType.debug","modules":[{"name":"Factory"}],"fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"debug","kind":"identifier"}],"role":"symbol","symbolKind":"case","roleHeading":"Case"},"abstract":[{"type":"text","text":"Context used when application is running in Xcode DEBUG mode."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/debug","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/FactoryContextType":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontexttype","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"title":"FactoryContextType","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryContextType","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryContextType/debug":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/debug","title":"FactoryContextType.debug","type":"topic","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"debug","kind":"identifier"}],"role":"symbol","url":"\/documentation\/factory\/factorycontexttype\/debug","abstract":[{"text":"Context used when application is running in Xcode DEBUG mode.","type":"text"}],"kind":"symbol"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontexttype\/debug"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/debug","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Context used when application is running in Xcode DEBUG mode."}],"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"debug"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"symbolKind":"case","role":"symbol","externalID":"s:7Factory0A11ContextTypeO5debugyA2CmF","roleHeading":"Case","title":"FactoryContextType.debug","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"debug"}]},"kind":"symbol","references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContextType/debug":{"url":"\/documentation\/factory\/factorycontexttype\/debug","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/debug","type":"topic","role":"symbol","title":"FactoryContextType.debug","kind":"symbol","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"debug"}],"abstract":[{"type":"text","text":"Context used when application is running in Xcode DEBUG mode."}]},"doc://Factory/documentation/Factory/FactoryContextType":{"role":"symbol","url":"\/documentation\/factory\/factorycontexttype","title":"FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContextType"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"type":"topic","kind":"symbol"}}} \ 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 11d8c704..22bb59da 100644 --- a/docs/data/documentation/factory/factorycontexttype/device.json +++ b/docs/data/documentation/factory/factorycontexttype/device.json @@ -1 +1 @@ -{"abstract":[{"type":"text","text":"Context used when application is running on an actual device."}],"metadata":{"modules":[{"name":"Factory"}],"externalID":"s:7Factory0A11ContextTypeO6deviceyA2CmF","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"device"}],"role":"symbol","title":"FactoryContextType.device","roleHeading":"Case","symbolKind":"case"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"device"}]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorycontexttype\/device"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/device","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/FactoryContextType/device":{"abstract":[{"type":"text","text":"Context used when application is running on an actual device."}],"url":"\/documentation\/factory\/factorycontexttype\/device","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/device","type":"topic","kind":"symbol","title":"FactoryContextType.device","role":"symbol","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"device"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryContextType":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontexttype","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"title":"FactoryContextType","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryContextType","kind":"identifier"}]}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontexttype\/device"]}],"kind":"symbol","metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Case","title":"FactoryContextType.device","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"device"}],"role":"symbol","symbolKind":"case","externalID":"s:7Factory0A11ContextTypeO6deviceyA2CmF"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/device","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"patch":0,"minor":3},"abstract":[{"type":"text","text":"Context used when application is running on an actual device."}],"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"device","kind":"identifier"}],"languages":["swift"]}]}],"references":{"doc://Factory/documentation/Factory/FactoryContextType/device":{"kind":"symbol","title":"FactoryContextType.device","url":"\/documentation\/factory\/factorycontexttype\/device","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"device","kind":"identifier"}],"role":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/device","abstract":[{"text":"Context used when application is running on an actual device.","type":"text"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContextType":{"role":"symbol","url":"\/documentation\/factory\/factorycontexttype","title":"FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContextType"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"type":"topic","kind":"symbol"}}} \ 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 50ee39e1..e59768c7 100644 --- a/docs/data/documentation/factory/factorycontexttype/equatable-implementations.json +++ b/docs/data/documentation/factory/factorycontexttype/equatable-implementations.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"kind":"article","metadata":{"role":"collectionGroup","modules":[{"name":"Factory"}],"roleHeading":"API Collection","title":"Equatable Implementations"},"topicSections":[{"generated":true,"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/!=(_:_:)"],"title":"Operators"}],"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/Equatable-Implementations"},"variants":[{"paths":["\/documentation\/factory\/factorycontexttype\/equatable-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory/FactoryContextType":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontexttype","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"title":"FactoryContextType","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryContextType","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryContextType/!=(_:_:)":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontexttype\/!=(_:_:)","title":"!=(_:_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/!=(_:_:)","abstract":[],"fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"!=","kind":"identifier"},{"kind":"text","text":" "},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"schemaVersion":{"patch":0,"minor":3,"major":0},"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/!=(_:_:)"],"title":"Operators","generated":true}],"variants":[{"paths":["\/documentation\/factory\/factorycontexttype\/equatable-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"article","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/Equatable-Implementations","interfaceLanguage":"swift"},"sections":[],"metadata":{"role":"collectionGroup","title":"Equatable Implementations","modules":[{"name":"Factory"}],"roleHeading":"API Collection"},"references":{"doc://Factory/documentation/Factory/FactoryContextType/!=(_:_:)":{"role":"symbol","url":"\/documentation\/factory\/factorycontexttype\/!=(_:_:)","title":"!=(_:_:)","abstract":[],"fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"!="},{"text":" ","kind":"text"},{"text":"(","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/!=(_:_:)","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContextType":{"role":"symbol","url":"\/documentation\/factory\/factorycontexttype","title":"FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContextType"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 76987817..b837d3ef 100644 --- a/docs/data/documentation/factory/factorycontexttype/preview.json +++ b/docs/data/documentation/factory/factorycontexttype/preview.json @@ -1 +1 @@ -{"schemaVersion":{"minor":3,"patch":0,"major":0},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"preview"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"metadata":{"role":"symbol","externalID":"s:7Factory0A11ContextTypeO7previewyA2CmF","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"preview"}],"symbolKind":"case","modules":[{"name":"Factory"}],"roleHeading":"Case","title":"FactoryContextType.preview"},"abstract":[{"text":"Context used when application is running in Xcode Preview mode.","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontexttype\/preview"]}],"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/preview"},"kind":"symbol","references":{"doc://Factory/documentation/Factory/FactoryContextType":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontexttype","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"title":"FactoryContextType","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryContextType","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryContextType/preview":{"abstract":[{"type":"text","text":"Context used when application is running in Xcode Preview mode."}],"url":"\/documentation\/factory\/factorycontexttype\/preview","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/preview","type":"topic","kind":"symbol","title":"FactoryContextType.preview","role":"symbol","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"preview","kind":"identifier"}]}}} \ No newline at end of file +{"schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"role":"symbol","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"preview"}],"title":"FactoryContextType.preview","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A11ContextTypeO7previewyA2CmF","roleHeading":"Case","symbolKind":"case"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/preview","interfaceLanguage":"swift"},"sections":[],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"preview"}],"languages":["swift"]}],"kind":"declarations"}],"abstract":[{"type":"text","text":"Context used when application is running in Xcode Preview mode."}],"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontexttype\/preview"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContextType":{"role":"symbol","url":"\/documentation\/factory\/factorycontexttype","title":"FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContextType"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContextType/preview":{"role":"symbol","url":"\/documentation\/factory\/factorycontexttype\/preview","abstract":[{"type":"text","text":"Context used when application is running in Xcode Preview mode."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/preview","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"preview"}],"type":"topic","kind":"symbol","title":"FactoryContextType.preview"}}} \ 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 7b668b71..5d64e769 100644 --- a/docs/data/documentation/factory/factorycontexttype/simulator.json +++ b/docs/data/documentation/factory/factorycontexttype/simulator.json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"tokens":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"simulator"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"paths":["\/documentation\/factory\/factorycontexttype\/simulator"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/simulator","interfaceLanguage":"swift"},"sections":[],"metadata":{"roleHeading":"Case","externalID":"s:7Factory0A11ContextTypeO9simulatoryA2CmF","title":"FactoryContextType.simulator","modules":[{"name":"Factory"}],"fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"simulator"}],"symbolKind":"case","role":"symbol"},"abstract":[{"text":"Context used when application is running within an Xcode simulator.","type":"text"}],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryContextType":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontexttype","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"title":"FactoryContextType","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryContextType","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryContextType/simulator":{"type":"topic","kind":"symbol","abstract":[{"text":"Context used when application is running within an Xcode simulator.","type":"text"}],"title":"FactoryContextType.simulator","url":"\/documentation\/factory\/factorycontexttype\/simulator","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/simulator","role":"symbol","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"simulator","kind":"identifier"}]}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"schemaVersion":{"patch":0,"minor":3,"major":0},"kind":"symbol","abstract":[{"type":"text","text":"Context used when application is running within an Xcode simulator."}],"metadata":{"externalID":"s:7Factory0A11ContextTypeO9simulatoryA2CmF","roleHeading":"Case","symbolKind":"case","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"text":"simulator","kind":"identifier"}],"modules":[{"name":"Factory"}],"role":"symbol","title":"FactoryContextType.simulator"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"simulator"}],"languages":["swift"]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontexttype\/simulator"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/simulator","interfaceLanguage":"swift"},"sections":[],"references":{"doc://Factory/documentation/Factory/FactoryContextType":{"role":"symbol","url":"\/documentation\/factory\/factorycontexttype","title":"FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContextType"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContextType/simulator":{"url":"\/documentation\/factory\/factorycontexttype\/simulator","abstract":[{"type":"text","text":"Context used when application is running within an Xcode simulator."}],"type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/simulator","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"simulator","kind":"identifier"}],"role":"symbol","title":"FactoryContextType.simulator"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 89fa0df0..7dc3abda 100644 --- a/docs/data/documentation/factory/factorycontexttype/test.json +++ b/docs/data/documentation/factory/factorycontexttype/test.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"test","kind":"identifier"}],"languages":["swift"]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/test","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontexttype\/test"]}],"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"sections":[],"abstract":[{"type":"text","text":"Context used when application is running in Xcode Unit Test mode."}],"metadata":{"roleHeading":"Case","externalID":"s:7Factory0A11ContextTypeO4testyA2CmF","title":"FactoryContextType.test","modules":[{"name":"Factory"}],"fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"test"}],"symbolKind":"case","role":"symbol"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryContextType":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontexttype","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"title":"FactoryContextType","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryContextType","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryContextType/test":{"type":"topic","title":"FactoryContextType.test","abstract":[{"text":"Context used when application is running in Xcode Unit Test mode.","type":"text"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/test","url":"\/documentation\/factory\/factorycontexttype\/test","role":"symbol","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"test"}]}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorycontexttype\/test"]}],"metadata":{"externalID":"s:7Factory0A11ContextTypeO4testyA2CmF","roleHeading":"Case","symbolKind":"case","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"test","kind":"identifier"}],"modules":[{"name":"Factory"}],"role":"symbol","title":"FactoryContextType.test"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryContextType"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"test"}],"platforms":["macOS"]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/test","interfaceLanguage":"swift"},"abstract":[{"text":"Context used when application is running in Xcode Unit Test mode.","type":"text"}],"sections":[],"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContextType":{"role":"symbol","url":"\/documentation\/factory\/factorycontexttype","title":"FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContextType"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContextType/test":{"url":"\/documentation\/factory\/factorycontexttype\/test","abstract":[{"type":"text","text":"Context used when application is running in Xcode Unit Test mode."}],"type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType\/test","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"test"}],"role":"symbol","title":"FactoryContextType.test"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymanagedcontainer.json b/docs/data/documentation/factory/factorymanagedcontainer.json index 24b7a461..c00776be 100644 --- a/docs/data/documentation/factory/factorymanagedcontainer.json +++ b/docs/data/documentation/factory/factorymanagedcontainer.json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"tokens":[{"text":"typealias","kind":"keyword"},{"text":" ","kind":"text"},{"text":"FactoryManagedContainer","kind":"identifier"},{"text":" = ","kind":"text"},{"text":"ManagedContainer","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"schemaVersion":{"patch":0,"minor":3,"major":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryManagedContainer","interfaceLanguage":"swift"},"metadata":{"title":"FactoryManagedContainer","roleHeading":"Type Alias","symbolKind":"typealias","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A16ManagedContainera","role":"symbol","fragments":[{"kind":"keyword","text":"typealias"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryManagedContainer"}],"navigatorTitle":[{"text":"FactoryManagedContainer","kind":"identifier"}]},"sections":[],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"variants":[{"paths":["\/documentation\/factory\/factorymanagedcontainer"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"ManagedContainer","kind":"identifier"}],"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"title":"ManagedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","type":"topic","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryManagedContainer":{"title":"FactoryManagedContainer","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryManagedContainer","role":"symbol","url":"\/documentation\/factory\/factorymanagedcontainer","abstract":[],"type":"topic","fragments":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryManagedContainer"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryManagedContainer"}]}}} \ No newline at end of file +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryManagedContainer"},"variants":[{"paths":["\/documentation\/factory\/factorymanagedcontainer"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryManagedContainer","kind":"identifier"},{"text":" = ","kind":"text"},{"kind":"typeIdentifier","text":"ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"}],"languages":["swift"]}],"kind":"declarations"}],"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"symbolKind":"typealias","title":"FactoryManagedContainer","roleHeading":"Type Alias","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A16ManagedContainera","role":"symbol","fragments":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryManagedContainer"}],"navigatorTitle":[{"text":"FactoryManagedContainer","kind":"identifier"}]},"kind":"symbol","references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer":{"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","role":"symbol","navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ManagedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer"},"doc://Factory/documentation/Factory/FactoryManagedContainer":{"fragments":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryManagedContainer"}],"kind":"symbol","type":"topic","title":"FactoryManagedContainer","url":"\/documentation\/factory\/factorymanagedcontainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryManagedContainer","role":"symbol","navigatorTitle":[{"text":"FactoryManagedContainer","kind":"identifier"}],"abstract":[]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying.json b/docs/data/documentation/factory/factorymodifying.json index 5d317a2b..7d944c9e 100644 --- a/docs/data/documentation/factory/factorymodifying.json +++ b/docs/data/documentation/factory/factorymodifying.json @@ -1 +1 @@ -{"abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying"]}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T"],"title":"Associated Types"},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/cached","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/graph","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/registration","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/shared","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/singleton","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/unique"]},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/context(_:factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/decorator(_:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArg(_:factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArgs(_:factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDebug(factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDevice(factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onPreview(factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onSimulator(factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onTest(factory:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/once()","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/reset(_:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/scope(_:)","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/timeToLive(_:)"]}],"schemaVersion":{"major":0,"patch":0,"minor":3},"metadata":{"modules":[{"name":"Factory"}],"navigatorTitle":[{"text":"FactoryModifying","kind":"identifier"}],"title":"FactoryModifying","externalID":"s:7Factory0A9ModifyingP","symbolKind":"protocol","role":"symbol","roleHeading":"Protocol","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}]},"sections":[],"relationshipsSections":[{"type":"conformingTypes","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"],"title":"Conforming Types","kind":"relationships"}],"references":{"doc://Factory/documentation/Factory/FactoryModifying/onSimulator(factory:)":{"title":"onSimulator(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onSimulator(factory:)","abstract":[{"text":"Factory builder shortcut for context(.simulator) { .. }","type":"text"}],"type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onSimulator","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying\/onsimulator(factory:)"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"navigatorTitle":[{"text":"Cached","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/cached-swift.class","type":"topic","title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}]},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"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"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/timeToLive(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/timetolive(_:)","role":"symbol","title":"timeToLive(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"preciseIdentifier":"c:@T@NSTimeInterval","kind":"typeIdentifier","text":"TimeInterval"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory/FactoryModifying/onPreview(factory:)":{"type":"topic","url":"\/documentation\/factory\/factorymodifying\/onpreview(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onPreview(factory:)","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onPreview","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"kind":"symbol","title":"onPreview(factory:)"},"doc://Factory/documentation/Factory/FactoryModifying/onArgs(_:factory:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArgs(_:factory:)","abstract":[{"text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }","type":"text"}],"type":"topic","url":"\/documentation\/factory\/factorymodifying\/onargs(_:factory:)","kind":"symbol","title":"onArgs(_:factory:)","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onArgs","kind":"identifier"},{"kind":"text","text":"(["},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":"], ","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory/FactoryModifying/graph":{"role":"symbol","type":"topic","title":"graph","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","type":"reference"},{"type":"text","text":"."}],"url":"\/documentation\/factory\/factorymodifying\/graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/graph","kind":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"graph","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory/FactoryModifying/reset(_:)":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol","type":"topic","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\/factorymodifying\/reset(_:)","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/reset(_:)","title":"reset(_:)"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"title":"Scope.Shared","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/scope\/shared-swift.class","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","navigatorTitle":[{"kind":"identifier","text":"Shared"}]},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/graph-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/once()":{"abstract":[{"text":"Adds ability to mutate Factory on first instantiation only.","type":"text"}],"kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"title":"once()","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/once()","role":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/once()"},"doc://Factory/documentation/Factory/FactoryModifying/scope(_:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/scope(_:)","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"scope"},{"text":"(","kind":"text"},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"type":"topic","url":"\/documentation\/factory\/factorymodifying\/scope(_:)","role":"symbol","title":"scope(_:)","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"}]},"doc://Factory/documentation/Factory/FactoryModifying/unique":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/unique","role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"unique","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"type":"topic","title":"unique","abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true,"type":"reference"},{"type":"text","text":"."}],"kind":"symbol","url":"\/documentation\/factory\/factorymodifying\/unique"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying/registration":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/registration","required":true,"url":"\/documentation\/factory\/factorymodifying\/registration","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"registration"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"text":"<","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":", ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"kind":"text","text":">"}],"role":"symbol","title":"registration","kind":"symbol","abstract":[{"type":"text","text":"Internal information that describes this Factory."}]},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Singleton"}],"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"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."}],"type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/context(_:factory:)":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorymodifying\/context(_:factory:)","title":"context(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/context(_:factory:)","abstract":[{"text":"Registers a factory closure to be used only when running in a specific context.","type":"text"}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"context","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A11ContextTypeO","text":"FactoryContextType"},{"kind":"text","text":"..., "},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory/FactoryModifying/decorator(_:)":{"title":"decorator(_:)","kind":"symbol","url":"\/documentation\/factory\/factorymodifying\/decorator(_:)","type":"topic","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/decorator(_:)","abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"type":"emphasis","inlineContent":[{"type":"text","text":"always"}]},{"type":"text","text":" be called with the resolved dependency"},{"text":" ","type":"text"},{"type":"text","text":"for further examination or manipulation."}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory/FactoryModifying/singleton":{"title":"singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/singleton","role":"symbol","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},{"type":"text","text":"."}],"url":"\/documentation\/factory\/factorymodifying\/singleton","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"singleton"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/FactoryModifying/cached":{"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"},{"text":".","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/factorymodifying\/cached","type":"topic","title":"cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/cached","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"cached"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/onArg(_:factory:)":{"title":"onArg(_:factory:)","kind":"symbol","url":"\/documentation\/factory\/factorymodifying\/onarg(_:factory:)","type":"topic","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArg(_:factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onArg","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory/FactoryModifying/shared":{"title":"shared","kind":"symbol","url":"\/documentation\/factory\/factorymodifying\/shared","type":"topic","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/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","isActive":true,"type":"reference"},{"type":"text","text":"."}],"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory/FactoryModifying/onDebug(factory:)":{"abstract":[{"text":"Factory builder shortcut for context(.debug) { .. }","type":"text"}],"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onDebug","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"title":"onDebug(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDebug(factory:)","role":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/ondebug(factory:)"},"doc://Factory/documentation/Factory/FactoryModifying/onTest(factory:)":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorymodifying\/ontest(factory:)","title":"onTest(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onTest(factory:)","abstract":[{"text":"Factory builder shortcut for context(.test) { .. }","type":"text"}],"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","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory/FactoryModifying/onDevice(factory:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDevice(factory:)","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onDevice","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"title":"onDevice(factory:)","kind":"symbol","url":"\/documentation\/factory\/factorymodifying\/ondevice(factory:)","role":"symbol"}}} \ No newline at end of file +{"kind":"symbol","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"patch":0,"minor":3},"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T"],"title":"Associated Types"},{"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":[],"relationshipsSections":[{"title":"Conforming Types","kind":"relationships","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"],"type":"conformingTypes"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"platforms":["macOS"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying"]}],"metadata":{"fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryModifying"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"modules":[{"name":"Factory"}],"title":"FactoryModifying","roleHeading":"Protocol","symbolKind":"protocol","role":"symbol","externalID":"s:7Factory0A9ModifyingP"},"references":{"doc://Factory/documentation/Factory/FactoryModifying/onPreview(factory:)":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onPreview(factory:)","url":"\/documentation\/factory\/factorymodifying\/onpreview(factory:)","abstract":[{"text":"Factory builder shortcut for context(.preview) { .. }","type":"text"}],"title":"onPreview(factory:)","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onPreview","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","type":"topic","abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory/FactoryModifying/timeToLive(_:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/timeToLive(_:)","kind":"symbol","title":"timeToLive(_:)","url":"\/documentation\/factory\/factorymodifying\/timetolive(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"timeToLive","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"type":"topic","role":"symbol","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."}]},"doc://Factory/documentation/Factory/FactoryModifying/unique":{"title":"unique","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/unique","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorymodifying\/unique","abstract":[{"text":"Syntactic sugar defines defines unique scope. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true,"type":"reference"},{"text":".","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/FactoryModifying/once()":{"title":"once()","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/once()","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"once","kind":"identifier"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/factorymodifying\/once()","abstract":[{"text":"Adds ability to mutate Factory on first instantiation only.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/cached-swift.class","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/registration":{"title":"registration","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/registration","role":"symbol","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A12RegistrationV","kind":"typeIdentifier","text":"FactoryRegistration"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"text":">","kind":"text"}],"url":"\/documentation\/factory\/factorymodifying\/registration","abstract":[{"text":"Internal information that describes this Factory.","type":"text"}],"kind":"symbol","required":true},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory/FactoryModifying/onArg(_:factory:)":{"title":"onArg(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArg(_:factory:)","role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onArg","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorymodifying\/onarg(_:factory:)","abstract":[{"text":"Factory builder shortcut for context(.arg(“test”) { .. }","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/decorator(_:)":{"url":"\/documentation\/factory\/factorymodifying\/decorator(_:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"text":"((","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Void","preciseIdentifier":"s:s4Voida","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"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":" "},{"text":"for further examination or manipulation.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/decorator(_:)","role":"symbol","kind":"symbol","type":"topic","title":"decorator(_:)"},"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"},{"text":"([","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArgs(_:factory:)","role":"symbol","kind":"symbol","type":"topic","title":"onArgs(_:factory:)"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/context(_:factory:)":{"title":"context(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/context(_:factory:)","role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A11ContextTypeO","text":"FactoryContextType"},{"text":"..., ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorymodifying\/context(_:factory:)","abstract":[{"text":"Registers a factory closure to be used only when running in a specific context.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/onDebug(factory:)":{"title":"onDebug(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDebug(factory:)","role":"symbol","type":"topic","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":"."},{"text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/factorymodifying\/ondebug(factory:)","abstract":[{"text":"Factory builder shortcut for context(.debug) { .. }","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/scope(_:)":{"title":"scope(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/scope(_:)","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"scope"},{"text":"(","kind":"text"},{"text":"Scope","preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorymodifying\/scope(_:)","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"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/onDevice(factory:)":{"title":"onDevice(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDevice(factory:)","role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"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","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorymodifying\/ondevice(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/shared":{"title":"shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/shared","role":"symbol","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"shared"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/factorymodifying\/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"},{"type":"text","text":"."}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/onTest(factory:)":{"title":"onTest(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onTest(factory:)","role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorymodifying\/ontest(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/onSimulator(factory:)":{"title":"onSimulator(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onSimulator(factory:)","role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorymodifying\/onsimulator(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/graph":{"title":"graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/graph","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"graph"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorymodifying\/graph","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/cached":{"title":"cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/cached","role":"symbol","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"cached"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/factorymodifying\/cached","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"type":"text","text":"."}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/reset(_:)":{"title":"reset(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/reset(_:)","role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier","text":"FactoryResetOptions"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorymodifying\/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."}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/singleton":{"title":"singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/singleton","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorymodifying\/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},{"type":"text","text":"."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"kind":"symbol"}}} \ 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 47bd26da..1b42bda5 100644 --- a/docs/data/documentation/factory/factorymodifying/cached.json +++ b/docs/data/documentation/factory/factorymodifying/cached.json @@ -1 +1 @@ -{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/cached"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"metadata":{"symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE6cachedxvp","title":"cached","roleHeading":"Instance Property","modules":[{"name":"Factory"}],"role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"cached","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"extendedModule":"Factory"},"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"cached","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}],"platforms":["macOS"]}],"kind":"declarations"},{"kind":"content","content":[{"type":"heading","level":2,"text":"Discussion","anchor":"discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .cached","}"]}]}],"abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See ","type":"text"},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","type":"reference"},{"text":".","type":"text"}],"sections":[],"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/cached"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/FactoryModifying/cached":{"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"},{"text":".","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/factorymodifying\/cached","type":"topic","title":"cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/cached","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"cached"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"navigatorTitle":[{"text":"Cached","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/cached-swift.class","type":"topic","title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"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."}],"type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying"}}} \ No newline at end of file +{"primaryContentSections":[{"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":"declarations"},{"kind":"content","content":[{"type":"heading","anchor":"discussion","text":"Discussion","level":2},{"syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .cached","}"],"type":"codeListing"}]}],"abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"text":".","type":"text"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"kind":"symbol","metadata":{"extendedModule":"Factory","title":"cached","roleHeading":"Instance Property","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE6cachedxvp","symbolKind":"property","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"modules":[{"name":"Factory"}]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/cached"},"sections":[],"schemaVersion":{"patch":0,"minor":3,"major":0},"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/cached"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/cached":{"title":"cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/cached","role":"symbol","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"cached"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/factorymodifying\/cached","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"type":"text","text":"."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/cached-swift.class","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"kind":"symbol"}}} \ 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 bf5f27be..d56fbdea 100644 --- a/docs/data/documentation/factory/factorymodifying/context(_:factory:).json +++ b/docs/data/documentation/factory/factorymodifying/context(_:factory:).json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"context","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"contexts"},{"kind":"text","text":": "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","text":"FactoryContextType","preciseIdentifier":"s:7Factory0A11ContextTypeO","kind":"typeIdentifier"},{"text":"..., ","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"]}]},{"content":[{"level":2,"anchor":"discussion","text":"Discussion","type":"heading"},{"type":"paragraph","inlineContent":[{"text":"A context might be be when running in SwiftUI preview mode, or when running unit tests.","type":"text"}]},{"inlineContent":[{"text":"See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","isActive":true}],"type":"paragraph"}],"kind":"content"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/context(_:factory:)","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"abstract":[{"text":"Registers a factory closure to be used only when running in a specific context.","type":"text"}],"metadata":{"roleHeading":"Instance Method","title":"context(_:factory:)","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE7context_7factoryxAA0A11ContextTypeOd_1TQz1PQzYbctF","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A11ContextTypeO","text":"FactoryContextType"},{"kind":"text","text":"..., "},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"extendedModule":"Factory","modules":[{"name":"Factory"}],"symbolKind":"method"},"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/context(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"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."}],"type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"},"doc://Factory/documentation/Factory/Contexts":{"type":"topic","kind":"article","role":"article","url":"\/documentation\/factory\/contexts","title":"Contexts","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}]},"doc://Factory/documentation/Factory/FactoryContextType":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontexttype","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"title":"FactoryContextType","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryContextType","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying/context(_:factory:)":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorymodifying\/context(_:factory:)","title":"context(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/context(_:factory:)","abstract":[{"text":"Registers a factory closure to be used only when running in a specific context.","type":"text"}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"context","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A11ContextTypeO","text":"FactoryContextType"},{"kind":"text","text":"..., "},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"sections":[],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"context","kind":"identifier"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"contexts","kind":"internalParam"},{"kind":"text","text":": "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","text":"FactoryContextType","preciseIdentifier":"s:7Factory0A11ContextTypeO","kind":"typeIdentifier"},{"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","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"content":[{"type":"heading","anchor":"discussion","level":2,"text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"A context might be be when running in SwiftUI preview mode, or when running unit tests."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","isActive":true,"type":"reference"}]}],"kind":"content"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/context(_:factory:)"},"metadata":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"context","kind":"identifier"},{"kind":"text","text":"("},{"text":"FactoryContextType","preciseIdentifier":"s:7Factory0A11ContextTypeO","kind":"typeIdentifier"},{"kind":"text","text":"..., "},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"symbolKind":"method","roleHeading":"Instance Method","title":"context(_:factory:)","externalID":"s:7Factory0A9ModifyingPAAE7context_7factoryxAA0A11ContextTypeOd_1TQz1PQzYbctF","extendedModule":"Factory","role":"symbol","modules":[{"name":"Factory"}]},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/context(_:factory:)"]}],"abstract":[{"type":"text","text":"Registers a factory closure to be used only when running in a specific context."}],"references":{"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/context(_:factory:)":{"title":"context(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/context(_:factory:)","role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A11ContextTypeO","text":"FactoryContextType"},{"text":"..., ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorymodifying\/context(_:factory:)","abstract":[{"text":"Registers a factory closure to be used only when running in a specific context.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryContextType":{"role":"symbol","url":"\/documentation\/factory\/factorycontexttype","title":"FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContextType"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Contexts":{"url":"\/documentation\/factory\/contexts","kind":"article","role":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","title":"Contexts","abstract":[{"text":"Changing injection results under special circumstances.","type":"text"}]},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]}}} \ 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 1c0b50e5..0d519d6b 100644 --- a/docs/data/documentation/factory/factorymodifying/decorator(_:).json +++ b/docs/data/documentation/factory/factorymodifying/decorator(_:).json @@ -1 +1 @@ -{"metadata":{"roleHeading":"Instance Method","title":"decorator(_:)","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE9decoratoryxy1TQzYbcF","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"decorator","kind":"identifier"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:s4Voida","text":"Void","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"extendedModule":"Factory","modules":[{"name":"Factory"}],"symbolKind":"method"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/decorator(_:)"]}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"decorator","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"decorator","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:s4Voida","kind":"typeIdentifier","text":"Void"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"platforms":["macOS"],"languages":["swift"]}]},{"kind":"content","content":[{"type":"heading","level":2,"anchor":"discussion","text":"Discussion"},{"type":"paragraph","inlineContent":[{"text":"This includes previously created items that may have been cached by a scope.","type":"text"}]},{"code":["var decoratedService: Factory {"," self { ParentChildService() }"," .decorated {"," $0.child.parent = $0"," }","}"],"type":"codeListing","syntax":"swift"},{"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"}]}],"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\/decorator(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"inlineContent":[{"text":"always","type":"text"}],"type":"emphasis"},{"type":"text","text":" be called with the resolved dependency"},{"type":"text","text":" "},{"type":"text","text":"for further examination or manipulation."}],"sections":[],"references":{"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"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."}],"type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying/decorator(_:)":{"title":"decorator(_:)","kind":"symbol","url":"\/documentation\/factory\/factorymodifying\/decorator(_:)","type":"topic","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/decorator(_:)","abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"type":"emphasis","inlineContent":[{"type":"text","text":"always"}]},{"type":"text","text":" be called with the resolved dependency"},{"text":" ","type":"text"},{"type":"text","text":"for further examination or manipulation."}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"}}} \ No newline at end of file +{"metadata":{"title":"decorator(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"text":"((","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"externalID":"s:7Factory0A9ModifyingPAAE9decoratoryxy1TQzYbcF","roleHeading":"Instance Method","modules":[{"name":"Factory"}],"symbolKind":"method","role":"symbol","extendedModule":"Factory"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"type":"emphasis","inlineContent":[{"text":"always","type":"text"}]},{"type":"text","text":" be called with the resolved dependency"},{"type":"text","text":" "},{"text":"for further examination or manipulation.","type":"text"}],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/decorator(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"decorator","kind":"identifier"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"decorator","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"type":"heading","level":2,"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"},{"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":{"patch":0,"major":0,"minor":3},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/decorator(_:)","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/FactoryModifying/decorator(_:)":{"url":"\/documentation\/factory\/factorymodifying\/decorator(_:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"text":"((","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Void","preciseIdentifier":"s:s4Voida","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"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":" "},{"text":"for further examination or manipulation.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/decorator(_:)","role":"symbol","kind":"symbol","type":"topic","title":"decorator(_:)"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"}}} \ 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 91f9d115..5403b993 100644 --- a/docs/data/documentation/factory/factorymodifying/graph.json +++ b/docs/data/documentation/factory/factorymodifying/graph.json @@ -1 +1 @@ -{"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"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"},{"text":".","type":"text"}],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/graph"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"modules":[{"name":"Factory"}],"role":"symbol","title":"graph","roleHeading":"Instance Property","symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE5graphxvp","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"graph","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"extendedModule":"Factory"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/graph"},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"content":[{"text":"Discussion","level":2,"type":"heading","anchor":"discussion"},{"syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .graph","}"],"type":"codeListing"}],"kind":"content"}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/graph-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"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."}],"type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying/graph":{"role":"symbol","type":"topic","title":"graph","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","type":"reference"},{"type":"text","text":"."}],"url":"\/documentation\/factory\/factorymodifying\/graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/graph","kind":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"graph","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]}}} \ No newline at end of file +{"schemaVersion":{"minor":3,"major":0,"patch":0},"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"}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"text":"get","kind":"keyword"},{"kind":"text","text":" }"}]}],"kind":"declarations"},{"content":[{"type":"heading","level":2,"text":"Discussion","anchor":"discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .graph","}"]}],"kind":"content"}],"metadata":{"externalID":"s:7Factory0A9ModifyingPAAE5graphxvp","title":"graph","extendedModule":"Factory","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"symbolKind":"property","role":"symbol","roleHeading":"Instance Property","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/graph"]}],"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/graph"},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","type":"topic","abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory/FactoryModifying/graph":{"title":"graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/graph","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"graph"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorymodifying\/graph","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be graph. See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},{"type":"text","text":"."}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"}}} \ 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 ad0cd53c..2ca20190 100644 --- a/docs/data/documentation/factory/factorymodifying/onarg(_:factory:).json +++ b/docs/data/documentation/factory/factorymodifying/onarg(_:factory:).json @@ -1 +1 @@ -{"metadata":{"role":"symbol","title":"onArg(_:factory:)","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE5onArg_7factoryxSS_1TQz1PQzYbctF","roleHeading":"Instance Method","symbolKind":"method","extendedModule":"Factory","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"text":"(","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"schemaVersion":{"patch":0,"minor":3,"major":0},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"argument","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}]}]}],"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArg(_:factory:)","interfaceLanguage":"swift"},"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/onarg(_:factory:)"]}],"references":{"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/onArg(_:factory:)":{"title":"onArg(_:factory:)","kind":"symbol","url":"\/documentation\/factory\/factorymodifying\/onarg(_:factory:)","type":"topic","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArg(_:factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onArg","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"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."}],"type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/onarg(_:factory:)"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArg(_:factory:)","interfaceLanguage":"swift"},"metadata":{"externalID":"s:7Factory0A9ModifyingPAAE5onArg_7factoryxSS_1TQz1PQzYbctF","title":"onArg(_:factory:)","roleHeading":"Instance Method","extendedModule":"Factory","role":"symbol","modules":[{"name":"Factory"}],"symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}]},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onArg","kind":"identifier"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"argument"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"sections":[],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/FactoryModifying/onArg(_:factory:)":{"title":"onArg(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArg(_:factory:)","role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onArg","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorymodifying\/onarg(_:factory:)","abstract":[{"text":"Factory builder shortcut for context(.arg(“test”) { .. }","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]}}} \ 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 e808e8c8..76d8b997 100644 --- a/docs/data/documentation/factory/factorymodifying/onargs(_:factory:).json +++ b/docs/data/documentation/factory/factorymodifying/onargs(_:factory:).json @@ -1 +1 @@ -{"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/onargs(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE6onArgs_7factoryxSaySSG_1TQz1PQzYbctF","modules":[{"name":"Factory"}],"title":"onArgs(_:factory:)","roleHeading":"Instance Method","symbolKind":"method","extendedModule":"Factory","fragments":[{"kind":"keyword","text":"func"},{"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":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"args","kind":"internalParam"},{"kind":"text","text":": ["},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]}],"kind":"declarations"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArgs(_:factory:)"},"references":{"doc://Factory/documentation/Factory/FactoryModifying/onArgs(_:factory:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArgs(_:factory:)","abstract":[{"text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }","type":"text"}],"type":"topic","url":"\/documentation\/factory\/factorymodifying\/onargs(_:factory:)","kind":"symbol","title":"onArgs(_:factory:)","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onArgs","kind":"identifier"},{"kind":"text","text":"(["},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":"], ","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"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."}],"type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"}}} \ No newline at end of file +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArgs(_:factory:)"},"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"args"},{"text":": [","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":"], "},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/onargs(_:factory:)"]}],"kind":"symbol","metadata":{"modules":[{"name":"Factory"}],"role":"symbol","extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE6onArgs_7factoryxSaySSG_1TQz1PQzYbctF","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onArgs","kind":"identifier"},{"kind":"text","text":"(["},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"title":"onArgs(_:factory:)","roleHeading":"Instance Method","symbolKind":"method"},"sections":[],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }"}],"references":{"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"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"},{"text":"([","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onArgs(_:factory:)","role":"symbol","kind":"symbol","type":"topic","title":"onArgs(_:factory:)"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorymodifying/once().json b/docs/data/documentation/factory/factorymodifying/once().json index 2c30dcf5..7c725473 100644 --- a/docs/data/documentation/factory/factorymodifying/once().json +++ b/docs/data/documentation/factory/factorymodifying/once().json @@ -1 +1 @@ -{"metadata":{"modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE4oncexyF","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol","extendedModule":"Factory","title":"once()","roleHeading":"Instance Method","symbolKind":"method"},"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/once()"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/once()","interfaceLanguage":"swift"},"abstract":[{"text":"Adds ability to mutate Factory on first instantiation only.","type":"text"}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"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."}],"type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/once()":{"abstract":[{"text":"Adds ability to mutate Factory on first instantiation only.","type":"text"}],"kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"title":"once()","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/once()","role":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/once()"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"schemaVersion":{"minor":3,"major":0,"patch":0},"abstract":[{"text":"Adds ability to mutate Factory on first instantiation only.","type":"text"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/once()","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/once()"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"once","kind":"identifier"},{"kind":"text","text":"() -> "},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"metadata":{"title":"once()","roleHeading":"Instance Method","modules":[{"name":"Factory"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","role":"symbol","extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE4oncexyF"},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/once()":{"title":"once()","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/once()","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"once","kind":"identifier"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/factorymodifying\/once()","abstract":[{"text":"Adds ability to mutate Factory on first instantiation only.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"}}} \ 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 3d6f3f05..594769c6 100644 --- a/docs/data/documentation/factory/factorymodifying/ondebug(factory:).json +++ b/docs/data/documentation/factory/factorymodifying/ondebug(factory:).json @@ -1 +1 @@ -{"metadata":{"modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE7onDebug7factoryx1TQz1PQzYbc_tF","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onDebug","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","extendedModule":"Factory","title":"onDebug(factory:)","roleHeading":"Instance Method","symbolKind":"method"},"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onDebug","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":"."},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"platforms":["macOS"]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDebug(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/ondebug(factory:)"]}],"sections":[],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"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."}],"type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},"doc://Factory/documentation/Factory/FactoryModifying/onDebug(factory:)":{"abstract":[{"text":"Factory builder shortcut for context(.debug) { .. }","type":"text"}],"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onDebug","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"title":"onDebug(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDebug(factory:)","role":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/ondebug(factory:)"}}} \ No newline at end of file +{"abstract":[{"text":"Factory builder shortcut for context(.debug) { .. }","type":"text"}],"schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"role":"symbol","title":"onDebug(factory:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onDebug"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"roleHeading":"Instance Method","extendedModule":"Factory","symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE7onDebug7factoryx1TQz1PQzYbc_tF","modules":[{"name":"Factory"}]},"kind":"symbol","sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onDebug","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/ondebug(factory:)"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDebug(factory:)"},"references":{"doc://Factory/documentation/Factory/FactoryModifying/onDebug(factory:)":{"title":"onDebug(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDebug(factory:)","role":"symbol","type":"topic","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":"."},{"text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/factorymodifying\/ondebug(factory:)","abstract":[{"text":"Factory builder shortcut for context(.debug) { .. }","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]}}} \ 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 e2b69142..c2616b56 100644 --- a/docs/data/documentation/factory/factorymodifying/ondevice(factory:).json +++ b/docs/data/documentation/factory/factorymodifying/ondevice(factory:).json @@ -1 +1 @@ -{"metadata":{"roleHeading":"Instance Method","extendedModule":"Factory","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","title":"onDevice(factory:)","externalID":"s:7Factory0A9ModifyingPAAE8onDevice7factoryx1TQz1PQzYbc_tF","modules":[{"name":"Factory"}],"role":"symbol"},"primaryContentSections":[{"declarations":[{"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":": "},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"abstract":[{"text":"Factory builder shortcut for context(.device) { .. }","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/ondevice(factory:)"]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDevice(factory:)","interfaceLanguage":"swift"},"sections":[],"kind":"symbol","references":{"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"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."}],"type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying/onDevice(factory:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDevice(factory:)","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onDevice","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"title":"onDevice(factory:)","kind":"symbol","url":"\/documentation\/factory\/factorymodifying\/ondevice(factory:)","role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"}}} \ No newline at end of file +{"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"metadata":{"role":"symbol","roleHeading":"Instance Method","symbolKind":"method","title":"onDevice(factory:)","modules":[{"name":"Factory"}],"extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE8onDevice7factoryx1TQz1PQzYbc_tF","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"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDevice(factory:)","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/ondevice(factory:)"]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onDevice"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"platforms":["macOS"]}]}],"references":{"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/onDevice(factory:)":{"title":"onDevice(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onDevice(factory:)","role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"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","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorymodifying\/ondevice(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"kind":"symbol"}}} \ 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 9d2d2afb..16b56665 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"},"sections":[],"metadata":{"modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onPreview","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"roleHeading":"Instance Method","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE9onPreview7factoryx1TQz1PQzYbc_tF","symbolKind":"method","title":"onPreview(factory:)","extendedModule":"Factory"},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/onpreview(factory:)"]}],"schemaVersion":{"patch":0,"minor":3,"major":0},"abstract":[{"text":"Factory builder shortcut for context(.preview) { .. }","type":"text"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onPreview","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory":{"type":"topic","kind":"symbol","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"title":"Factory","url":"\/documentation\/factory","identifier":"doc:\/\/Factory\/documentation\/Factory","role":"collection"},"doc://Factory/documentation/Factory/FactoryModifying":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","title":"FactoryModifying","kind":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryModifying"}],"url":"\/documentation\/factory\/factorymodifying","role":"symbol","navigatorTitle":[{"text":"FactoryModifying","kind":"identifier"}],"abstract":[{"text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory.","type":"text"}]},"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/onPreview(factory:)":{"type":"topic","url":"\/documentation\/factory\/factorymodifying\/onpreview(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onPreview(factory:)","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onPreview","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"kind":"symbol","title":"onPreview(factory:)"}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/onpreview(factory:)"]}],"metadata":{"role":"symbol","title":"onPreview(factory:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"roleHeading":"Instance Method","extendedModule":"Factory","symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE9onPreview7factoryx1TQz1PQzYbc_tF","modules":[{"name":"Factory"}]},"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onPreview","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"]}]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onPreview(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"references":{"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryModifying/onPreview(factory:)":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onPreview(factory:)","url":"\/documentation\/factory\/factorymodifying\/onpreview(factory:)","abstract":[{"text":"Factory builder shortcut for context(.preview) { .. }","type":"text"}],"title":"onPreview(factory:)","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onPreview","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]}}} \ 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 a7a6d851..6ac4cb7c 100644 --- a/docs/data/documentation/factory/factorymodifying/onsimulator(factory:).json +++ b/docs/data/documentation/factory/factorymodifying/onsimulator(factory:).json @@ -1 +1 @@ -{"metadata":{"extendedModule":"Factory","roleHeading":"Instance Method","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE11onSimulator7factoryx1TQz1PQzYbc_tF","modules":[{"name":"Factory"}],"title":"onSimulator(factory:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"symbolKind":"method"},"abstract":[{"text":"Factory builder shortcut for context(.simulator) { .. }","type":"text"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onSimulator(factory:)","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/onsimulator(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"kind":"symbol","references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"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."}],"type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/onSimulator(factory:)":{"title":"onSimulator(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onSimulator(factory:)","abstract":[{"text":"Factory builder shortcut for context(.simulator) { .. }","type":"text"}],"type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onSimulator","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying\/onsimulator(factory:)"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/onsimulator(factory:)"]}],"sections":[],"kind":"symbol","abstract":[{"text":"Factory builder shortcut for context(.simulator) { .. }","type":"text"}],"metadata":{"title":"onSimulator(factory:)","role":"symbol","roleHeading":"Instance Method","externalID":"s:7Factory0A9ModifyingPAAE11onSimulator7factoryx1TQz1PQzYbc_tF","extendedModule":"Factory","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onSimulator","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","modules":[{"name":"Factory"}]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onSimulator","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onSimulator(factory:)"},"schemaVersion":{"patch":0,"minor":3,"major":0},"references":{"doc://Factory/documentation/Factory/FactoryModifying/onSimulator(factory:)":{"title":"onSimulator(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onSimulator(factory:)","role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorymodifying\/onsimulator(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]}}} \ 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 e8008026..ddc372eb 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"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/ontest(factory:)"]}],"kind":"symbol","metadata":{"title":"onTest(factory:)","externalID":"s:7Factory0A9ModifyingPAAE6onTest7factoryx1TQz1PQzYbc_tF","modules":[{"name":"Factory"}],"extendedModule":"Factory","roleHeading":"Instance Method","symbolKind":"method","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onTest"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol"},"sections":[],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onTest","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"]}],"kind":"declarations"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onTest(factory:)"},"abstract":[{"text":"Factory builder shortcut for context(.test) { .. }","type":"text"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"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."}],"type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/onTest(factory:)":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorymodifying\/ontest(factory:)","title":"onTest(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onTest(factory:)","abstract":[{"text":"Factory builder shortcut for context(.test) { .. }","type":"text"}],"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","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"sections":[],"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onTest","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"platforms":["macOS"]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onTest(factory:)","interfaceLanguage":"swift"},"metadata":{"role":"symbol","roleHeading":"Instance Method","symbolKind":"method","modules":[{"name":"Factory"}],"title":"onTest(factory:)","extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE6onTest7factoryx1TQz1PQzYbc_tF","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onTest","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/ontest(factory:)"]}],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryModifying/onTest(factory:)":{"title":"onTest(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/onTest(factory:)","role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorymodifying\/ontest(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"}}} \ 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 9c4fcbd8..e184acd4 100644 --- a/docs/data/documentation/factory/factorymodifying/p.json +++ b/docs/data/documentation/factory/factorymodifying/p.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"text":"P","kind":"identifier"}]}]}],"kind":"symbol","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"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/p"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"metadata":{"externalID":"s:7Factory0A9ModifyingP1PQa","title":"P","symbolKind":"associatedtype","roleHeading":"Associated Type","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"text":"P","kind":"identifier"}],"required":true,"role":"symbol","modules":[{"name":"Factory"}]},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"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."}],"type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying"}}} \ No newline at end of file +{"metadata":{"externalID":"s:7Factory0A9ModifyingP1PQa","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"roleHeading":"Associated Type","required":true,"role":"symbol","symbolKind":"associatedtype","modules":[{"name":"Factory"}],"title":"P"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"languages":["swift"]}],"kind":"declarations"}],"kind":"symbol","schemaVersion":{"minor":3,"major":0,"patch":0},"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/p"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"type":"text","text":"The parameter type of the Factory, if any. Will be "},{"type":"codeVoice","code":"Void"},{"type":"text","text":" on the standard Factory."}],"references":{"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]}}} \ 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 709ef95c..0699047a 100644 --- a/docs/data/documentation/factory/factorymodifying/registration.json +++ b/docs/data/documentation/factory/factorymodifying/registration.json @@ -1 +1 @@ -{"metadata":{"symbolKind":"property","required":true,"externalID":"s:7Factory0A9ModifyingP12registrationAA0A12RegistrationVy1PQz1TQzGvp","roleHeading":"Instance Property","role":"symbol","modules":[{"name":"Factory"}],"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"registration","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":">","kind":"text"}],"title":"registration"},"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","text":"FactoryRegistration","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"text":"<","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},{"kind":"text","text":", "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":"> { ","kind":"text"},{"text":"get","kind":"keyword"},{"kind":"text","text":" "},{"text":"set","kind":"keyword"},{"text":" }","kind":"text"}],"languages":["swift"]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"kind":"symbol","schemaVersion":{"patch":0,"minor":3,"major":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/registration","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Internal information that describes this Factory."}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/registration"]}],"sections":[],"references":{"doc://Factory/documentation/Factory/FactoryRegistration":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"FactoryRegistration","kind":"identifier"}],"title":"FactoryRegistration","abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"url":"\/documentation\/factory\/factoryregistration","kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying/registration":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/registration","required":true,"url":"\/documentation\/factory\/factorymodifying\/registration","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"registration"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"text":"<","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":", ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"kind":"text","text":">"}],"role":"symbol","title":"registration","kind":"symbol","abstract":[{"type":"text","text":"Internal information that describes this Factory."}]},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"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."}],"type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"}}} \ No newline at end of file +{"schemaVersion":{"minor":3,"patch":0,"major":0},"abstract":[{"text":"Internal information that describes this Factory.","type":"text"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/registration"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/registration"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"kind":"symbol","primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"registration","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A12RegistrationV","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","kind":"typeIdentifier","text":"FactoryRegistration"},{"kind":"text","text":"<"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":"> { "},{"text":"get","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"platforms":["macOS"]}],"kind":"declarations"}],"sections":[],"metadata":{"externalID":"s:7Factory0A9ModifyingP12registrationAA0A12RegistrationVy1PQz1TQzGvp","roleHeading":"Instance Property","symbolKind":"property","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"registration","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":">","kind":"text"}],"modules":[{"name":"Factory"}],"required":true,"role":"symbol","title":"registration"},"references":{"doc://Factory/documentation/Factory/FactoryModifying/registration":{"title":"registration","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/registration","role":"symbol","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A12RegistrationV","kind":"typeIdentifier","text":"FactoryRegistration"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"text":">","kind":"text"}],"url":"\/documentation\/factory\/factorymodifying\/registration","abstract":[{"text":"Internal information that describes this Factory.","type":"text"}],"kind":"symbol","required":true},"doc://Factory/documentation/Factory/FactoryRegistration":{"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryregistration","role":"symbol","title":"FactoryRegistration","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 30ff6bfa..9fab4be6 100644 --- a/docs/data/documentation/factory/factorymodifying/reset(_:).json +++ b/docs/data/documentation/factory/factorymodifying/reset(_:).json @@ -1 +1 @@ -{"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/reset(_:)"]}],"metadata":{"roleHeading":"Instance Method","externalID":"s:7Factory0A9ModifyingPAAE5resetyxAA0A12ResetOptionsOF","extendedModule":"Factory","symbolKind":"method","title":"reset(_:)","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol"},"kind":"symbol","schemaVersion":{"minor":3,"patch":0,"major":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"reset","kind":"identifier"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"options"},{"kind":"text","text":": "},{"text":"FactoryResetOptions","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"text":" = .all) -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"platforms":["macOS"]}]},{"parameters":[{"name":"options","content":[{"inlineContent":[{"type":"text","text":"options description"}],"type":"paragraph"}]}],"kind":"parameters"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/reset(_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Resets the Factory’s behavior to its original state, removing any registrations and clearing any cached items from the specified scope."}],"references":{"doc://Factory/documentation/Factory/FactoryModifying/reset(_:)":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol","type":"topic","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\/factorymodifying\/reset(_:)","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/reset(_:)","title":"reset(_:)"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"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."}],"type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"title":"FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}]}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/reset(_:)"]}],"metadata":{"modules":[{"name":"Factory"}],"title":"reset(_:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"roleHeading":"Instance Method","extendedModule":"Factory","symbolKind":"method","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE5resetyxAA0A12ResetOptionsOF"},"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."}],"schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/reset(_:)","interfaceLanguage":"swift"},"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"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"options"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"text":" = .all) -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"]}]},{"kind":"parameters","parameters":[{"name":"options","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"options description"}]}]}]}],"kind":"symbol","references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/reset(_:)":{"title":"reset(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/reset(_:)","role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier","text":"FactoryResetOptions"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorymodifying\/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."}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"title":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","type":"topic","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol"}}} \ 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 1eb8aa57..7f538f36 100644 --- a/docs/data/documentation/factory/factorymodifying/scope(_:).json +++ b/docs/data/documentation/factory/factorymodifying/scope(_:).json @@ -1 +1 @@ -{"kind":"symbol","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":"."}],"sections":[],"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/scope(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"scope","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"scope","kind":"internalParam"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"],"platforms":["macOS"]}]},{"content":[{"type":"heading","level":2,"anchor":"discussion","text":"Discussion"},{"code":["var service: Factory {"," self { MyService() }"," .scope(.session)","}"],"type":"codeListing","syntax":"swift"}],"kind":"content"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/scope(_:)","interfaceLanguage":"swift"},"metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier","text":"Scope"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"title":"scope(_:)","roleHeading":"Instance Method","symbolKind":"method","extendedModule":"Factory","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE5scopeyxAA5ScopeCF","role":"symbol"},"references":{"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"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."}],"type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/scope(_:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/scope(_:)","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"scope"},{"text":"(","kind":"text"},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"type":"topic","url":"\/documentation\/factory\/factorymodifying\/scope(_:)","role":"symbol","title":"scope(_:)","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"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/scope(_:)"},"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/scope(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"scope"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier","text":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"]}],"kind":"declarations"},{"kind":"content","content":[{"level":2,"text":"Discussion","type":"heading","anchor":"discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .scope(.session)","}"]}]}],"sections":[],"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":"."}],"metadata":{"symbolKind":"method","title":"scope(_:)","roleHeading":"Instance Method","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE5scopeyxAA5ScopeCF","extendedModule":"Factory","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}]},"schemaVersion":{"minor":3,"major":0,"patch":0},"kind":"symbol","references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/scope(_:)":{"title":"scope(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/scope(_:)","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"scope"},{"text":"(","kind":"text"},{"text":"Scope","preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorymodifying\/scope(_:)","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"},"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"}}} \ 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 c3a3ef86..fc3b06d1 100644 --- a/docs/data/documentation/factory/factorymodifying/shared.json +++ b/docs/data/documentation/factory/factorymodifying/shared.json @@ -1 +1 @@ -{"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/shared"]}],"metadata":{"role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE6sharedxvp","modules":[{"name":"Factory"}],"title":"shared","roleHeading":"Instance Property","symbolKind":"property","extendedModule":"Factory","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class"},{"type":"text","text":"."}],"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"]}],"kind":"declarations"},{"content":[{"level":2,"text":"Discussion","anchor":"discussion","type":"heading"},{"syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .shared","}"],"type":"codeListing"}],"kind":"content"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/shared","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"title":"Scope.Shared","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/scope\/shared-swift.class","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","navigatorTitle":[{"kind":"identifier","text":"Shared"}]},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"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."}],"type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying/shared":{"title":"shared","kind":"symbol","url":"\/documentation\/factory\/factorymodifying\/shared","type":"topic","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/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","isActive":true,"type":"reference"},{"type":"text","text":"."}],"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}]}}} \ No newline at end of file +{"sections":[],"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},{"text":".","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/shared"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":" { "},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"syntax":"swift","type":"codeListing","code":["var service: Factory {"," self { MyService() }"," .shared","}"]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/shared","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"symbolKind":"property","roleHeading":"Instance Property","role":"symbol","modules":[{"name":"Factory"}],"extendedModule":"Factory","title":"shared","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"shared"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"externalID":"s:7Factory0A9ModifyingPAAE6sharedxvp"},"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/FactoryModifying/shared":{"title":"shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/shared","role":"symbol","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"shared"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/factorymodifying\/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"},{"type":"text","text":"."}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"}}} \ 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 8aee6c41..70fe91dc 100644 --- a/docs/data/documentation/factory/factorymodifying/singleton.json +++ b/docs/data/documentation/factory/factorymodifying/singleton.json @@ -1 +1 @@ -{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/singleton"]}],"metadata":{"extendedModule":"Factory","title":"singleton","role":"symbol","symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE9singletonxvp","roleHeading":"Instance Property","modules":[{"name":"Factory"}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}]},"schemaVersion":{"minor":3,"major":0,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"singleton"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"kind":"text","text":" }"}],"platforms":["macOS"],"languages":["swift"]}]},{"content":[{"level":2,"type":"heading","anchor":"discussion","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .singleton","}"]}],"kind":"content"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/singleton"},"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"},{"text":".","type":"text"}],"sections":[],"references":{"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Singleton"}],"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/FactoryModifying/singleton":{"title":"singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/singleton","role":"symbol","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},{"type":"text","text":"."}],"url":"\/documentation\/factory\/factorymodifying\/singleton","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"singleton"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"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."}],"type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/singleton","interfaceLanguage":"swift"},"sections":[],"abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be singleton. See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","isActive":true},{"type":"text","text":"."}],"metadata":{"externalID":"s:7Factory0A9ModifyingPAAE9singletonxvp","extendedModule":"Factory","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"singleton","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol","symbolKind":"property","title":"singleton","roleHeading":"Instance Property"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"singleton"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}],"languages":["swift"]}]},{"kind":"content","content":[{"type":"heading","text":"Discussion","level":2,"anchor":"discussion"},{"code":["var service: Factory {"," self { MyService() }"," .singleton","}"],"type":"codeListing","syntax":"swift"}]}],"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/factorymodifying\/singleton"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/FactoryModifying/singleton":{"title":"singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/singleton","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorymodifying\/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},{"type":"text","text":"."}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"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 25021439..72eb0d53 100644 --- a/docs/data/documentation/factory/factorymodifying/t.json +++ b/docs/data/documentation/factory/factorymodifying/t.json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"T","kind":"identifier"}]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"sections":[],"kind":"symbol","schemaVersion":{"minor":3,"patch":0,"major":0},"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"metadata":{"roleHeading":"Associated Type","title":"T","role":"symbol","externalID":"s:7Factory0A9ModifyingP1TQa","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"T","kind":"identifier"}],"modules":[{"name":"Factory"}],"symbolKind":"associatedtype"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/t"]}],"references":{"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"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."}],"type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/t"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","interfaceLanguage":"swift"},"kind":"symbol","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"schemaVersion":{"major":0,"patch":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"text":"T","kind":"identifier"}],"languages":["swift"],"platforms":["macOS"]}]}],"metadata":{"role":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"text":" ","kind":"text"},{"text":"T","kind":"identifier"}],"symbolKind":"associatedtype","title":"T","roleHeading":"Associated Type","externalID":"s:7Factory0A9ModifyingP1TQa","required":true,"modules":[{"name":"Factory"}]},"references":{"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"}}} \ 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 be1a294a..eecfc6ad 100644 --- a/docs/data/documentation/factory/factorymodifying/timetolive(_:).json +++ b/docs/data/documentation/factory/factorymodifying/timetolive(_:).json @@ -1 +1 @@ -{"variants":[{"paths":["\/documentation\/factory\/factorymodifying\/timetolive(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"patch":0,"minor":3,"major":0},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/timeToLive(_:)","interfaceLanguage":"swift"},"metadata":{"title":"timeToLive(_:)","modules":[{"name":"Factory"}],"roleHeading":"Instance Method","externalID":"s:7Factory0A9ModifyingPAAE10timeToLiveyxSdF","role":"symbol","symbolKind":"method","extendedModule":"Factory","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"timeToLive","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"c:@T@NSTimeInterval","text":"TimeInterval"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"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."}],"kind":"symbol","primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"timeToLive","kind":"identifier"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"seconds","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"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."}],"type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying"},"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"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/timeToLive(_:)","kind":"symbol","type":"topic","url":"\/documentation\/factory\/factorymodifying\/timetolive(_:)","role":"symbol","title":"timeToLive(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"preciseIdentifier":"c:@T@NSTimeInterval","kind":"typeIdentifier","text":"TimeInterval"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]}}} \ No newline at end of file +{"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Instance Method","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"timeToLive"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"title":"timeToLive(_:)","externalID":"s:7Factory0A9ModifyingPAAE10timeToLiveyxSdF","extendedModule":"Factory","role":"symbol"},"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."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"timeToLive","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"seconds","kind":"internalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"c:@T@NSTimeInterval","text":"TimeInterval","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"platforms":["macOS"],"languages":["swift"]}]}],"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/factorymodifying\/timetolive(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/timeToLive(_:)"},"schemaVersion":{"major":0,"patch":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/timeToLive(_:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/timeToLive(_:)","kind":"symbol","title":"timeToLive(_:)","url":"\/documentation\/factory\/factorymodifying\/timetolive(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"timeToLive","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"type":"topic","role":"symbol","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."}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 8e89f4f6..979dd223 100644 --- a/docs/data/documentation/factory/factorymodifying/unique.json +++ b/docs/data/documentation/factory/factorymodifying/unique.json @@ -1 +1 @@ -{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/unique"},"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"platforms":["macOS"],"languages":["swift"]}]},{"kind":"content","content":[{"type":"heading","level":2,"text":"Discussion","anchor":"discussion"},{"syntax":"swift","type":"codeListing","code":["var service: Factory {"," self { MyService() }"," .unique","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"While you can add the modifier, Factory’s are unique by default."}]}]}],"kind":"symbol","sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/unique"]}],"abstract":[{"text":"Syntactic sugar defines defines unique scope. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true,"type":"reference"},{"text":".","type":"text"}],"metadata":{"modules":[{"name":"Factory"}],"role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"roleHeading":"Instance Property","title":"unique","symbolKind":"property","externalID":"s:7Factory0A9ModifyingPAAE6uniquexvp","extendedModule":"Factory"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"references":{"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying/unique":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/unique","role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"unique","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"type":"topic","title":"unique","abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true,"type":"reference"},{"type":"text","text":"."}],"kind":"symbol","url":"\/documentation\/factory\/factorymodifying\/unique"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"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."}],"type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying"}}} \ No newline at end of file +{"primaryContentSections":[{"declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"content":[{"anchor":"discussion","type":"heading","level":2,"text":"Discussion"},{"code":["var service: Factory {"," self { MyService() }"," .unique","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"While you can add the modifier, Factory’s are unique by default."}]}],"kind":"content"}],"schemaVersion":{"patch":0,"minor":3,"major":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorymodifying\/unique"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/unique"},"sections":[],"kind":"symbol","metadata":{"extendedModule":"Factory","title":"unique","externalID":"s:7Factory0A9ModifyingPAAE6uniquexvp","modules":[{"name":"Factory"}],"role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"unique","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"roleHeading":"Instance Property","symbolKind":"property"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryModifying"]]},"abstract":[{"text":"Syntactic sugar defines defines unique scope. See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true},{"text":".","type":"text"}],"references":{"doc://Factory/documentation/Factory/FactoryModifying/unique":{"title":"unique","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/unique","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/factorymodifying\/unique","abstract":[{"text":"Syntactic sugar defines defines unique scope. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true,"type":"reference"},{"text":".","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factoryregistration.json b/docs/data/documentation/factory/factoryregistration.json index 9592f277..480e9530 100644 --- a/docs/data/documentation/factory/factoryregistration.json +++ b/docs/data/documentation/factory/factoryregistration.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/s8SendableP"],"title":"Conforms To","kind":"relationships","type":"conformsTo"}],"schemaVersion":{"major":0,"patch":0,"minor":3},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"},{"text":"<","kind":"text"},{"text":"P","kind":"genericParameter"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">","kind":"text"}]}]}],"sections":[],"variants":[{"paths":["\/documentation\/factory\/factoryregistration"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"symbolKind":"struct","modules":[{"name":"Factory"}],"title":"FactoryRegistration","roleHeading":"Structure","role":"symbol","externalID":"s:7Factory0A12RegistrationV","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryRegistration"}],"navigatorTitle":[{"text":"FactoryRegistration","kind":"identifier"}]},"kind":"symbol","references":{"doc://Factory/documentation/Factory/FactoryRegistration":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"FactoryRegistration","kind":"identifier"}],"title":"FactoryRegistration","abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"url":"\/documentation\/factory\/factoryregistration","kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/s8SendableP":{"identifier":"doc:\/\/Factory\/s8SendableP","type":"unresolvable","title":"Swift.Sendable"}}} \ No newline at end of file +{"sections":[],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"schemaVersion":{"major":0,"patch":0,"minor":3},"kind":"symbol","primaryContentSections":[{"declarations":[{"tokens":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryRegistration"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"text":"T","kind":"genericParameter"},{"text":">","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryregistration"]}],"metadata":{"title":"FactoryRegistration","role":"symbol","roleHeading":"Structure","modules":[{"name":"Factory"}],"symbolKind":"struct","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryRegistration","kind":"identifier"}],"externalID":"s:7Factory0A12RegistrationV","navigatorTitle":[{"text":"FactoryRegistration","kind":"identifier"}]},"relationshipsSections":[{"title":"Conforms To","type":"conformsTo","kind":"relationships","identifiers":["doc:\/\/Factory\/s8SendableP"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryRegistration":{"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryregistration","role":"symbol","title":"FactoryRegistration","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration"},"doc://Factory/s8SendableP":{"title":"Swift.Sendable","identifier":"doc:\/\/Factory\/s8SendableP","type":"unresolvable"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factoryresetoptions.json b/docs/data/documentation/factory/factoryresetoptions.json index f0edc57e..3d3c052f 100644 --- a/docs/data/documentation/factory/factoryresetoptions.json +++ b/docs/data/documentation/factory/factoryresetoptions.json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"tokens":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryResetOptions","kind":"identifier"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"topicSections":[{"title":"Enumeration Cases","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/all","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/context","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/none","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/registration","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/scope"]},{"title":"Default Implementations","generated":true,"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations"]}],"metadata":{"roleHeading":"Enumeration","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"title":"FactoryResetOptions","externalID":"s:7Factory0A12ResetOptionsO","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"symbolKind":"enum","role":"symbol"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","interfaceLanguage":"swift"},"relationshipsSections":[{"title":"Conforms To","type":"conformsTo","identifiers":["doc:\/\/Factory\/SQ","doc:\/\/Factory\/SH"],"kind":"relationships"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryresetoptions"]}],"kind":"symbol","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"title":"FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}]},"doc://Factory/documentation/Factory/FactoryResetOptions/all":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/all","role":"symbol","type":"topic","abstract":[{"text":"Resets registration and scope caches","type":"text"}],"title":"FactoryResetOptions.all","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"all","kind":"identifier"}],"url":"\/documentation\/factory\/factoryresetoptions\/all"},"doc://Factory/documentation/Factory/FactoryResetOptions/Equatable-Implementations":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations","url":"\/documentation\/factory\/factoryresetoptions\/equatable-implementations","role":"collectionGroup","title":"Equatable Implementations","kind":"article","abstract":[]},"doc://Factory/documentation/Factory/FactoryResetOptions/none":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/none","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"none"}],"role":"symbol","abstract":[{"text":"Performs no reset actions on this container","type":"text"}],"title":"FactoryResetOptions.none","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/none"},"doc://Factory/SQ":{"identifier":"doc:\/\/Factory\/SQ","title":"Swift.Equatable","type":"unresolvable"},"doc://Factory/documentation/Factory/FactoryResetOptions/scope":{"type":"topic","role":"symbol","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/scope","url":"\/documentation\/factory\/factoryresetoptions\/scope","title":"FactoryResetOptions.scope","kind":"symbol","abstract":[{"text":"Resets all scope caches on this container","type":"text"}]},"doc://Factory/SH":{"identifier":"doc:\/\/Factory\/SH","title":"Swift.Hashable","type":"unresolvable"},"doc://Factory/documentation/Factory/FactoryResetOptions/context":{"title":"FactoryResetOptions.context","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"context"}],"url":"\/documentation\/factory\/factoryresetoptions\/context","abstract":[{"type":"text","text":"Resets context-based registrations on this container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/context","type":"topic","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions/registration":{"type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"registration","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/registration","url":"\/documentation\/factory\/factoryresetoptions\/registration","title":"FactoryResetOptions.registration","kind":"symbol","abstract":[{"text":"Resets registrations on this container","type":"text"}]}}} \ No newline at end of file +{"metadata":{"fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}],"roleHeading":"Enumeration","title":"FactoryResetOptions","role":"symbol","externalID":"s:7Factory0A12ResetOptionsO","symbolKind":"enum","modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}]},"schemaVersion":{"major":0,"patch":0,"minor":3},"abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"sections":[],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/SQ","doc:\/\/Factory\/SH"],"kind":"relationships","type":"conformsTo","title":"Conforms To"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryresetoptions"]}],"kind":"symbol","primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"FactoryResetOptions","kind":"identifier"}],"platforms":["macOS"]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"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"},{"title":"Default Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations"],"generated":true}],"references":{"doc://Factory/documentation/Factory":{"title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","role":"collection","type":"topic","url":"\/documentation\/factory","abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"kind":"symbol"},"doc://Factory/SQ":{"identifier":"doc:\/\/Factory\/SQ","title":"Swift.Equatable","type":"unresolvable"},"doc://Factory/documentation/Factory/FactoryResetOptions/all":{"title":"FactoryResetOptions.all","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/all","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"all"}],"url":"\/documentation\/factory\/factoryresetoptions\/all","abstract":[{"text":"Resets registration and scope caches","type":"text"}],"kind":"symbol"},"doc://Factory/SH":{"identifier":"doc:\/\/Factory\/SH","title":"Swift.Hashable","type":"unresolvable"},"doc://Factory/documentation/Factory/FactoryResetOptions/scope":{"title":"FactoryResetOptions.scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/scope","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"scope"}],"url":"\/documentation\/factory\/factoryresetoptions\/scope","abstract":[{"text":"Resets all scope caches on this container","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions/Equatable-Implementations":{"title":"Equatable Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations","role":"collectionGroup","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/equatable-implementations","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"title":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","type":"topic","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions/none":{"title":"FactoryResetOptions.none","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/none","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"none"}],"url":"\/documentation\/factory\/factoryresetoptions\/none","abstract":[{"text":"Performs no reset actions on this container","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions/registration":{"title":"FactoryResetOptions.registration","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/registration","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"registration"}],"url":"\/documentation\/factory\/factoryresetoptions\/registration","abstract":[{"text":"Resets registrations on this container","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions/context":{"title":"FactoryResetOptions.context","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/context","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"context"}],"url":"\/documentation\/factory\/factoryresetoptions\/context","abstract":[{"text":"Resets context-based registrations on this container","type":"text"}],"kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factoryresetoptions/!=(_:_:).json b/docs/data/documentation/factory/factoryresetoptions/!=(_:_:).json index 89666ea2..4046b5da 100644 --- a/docs/data/documentation/factory/factoryresetoptions/!=(_:_:).json +++ b/docs/data/documentation/factory/factoryresetoptions/!=(_:_:).json @@ -1 +1 @@ -{"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations"]]},"abstract":[{"type":"text","text":"Inherited from "},{"code":"Equatable.!=(_:_:)","type":"codeVoice"},{"text":".","type":"text"}],"schemaVersion":{"major":0,"patch":0,"minor":3},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"!="},{"text":" ","kind":"text"},{"text":"(","kind":"text"},{"text":"lhs","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"text":", ","kind":"text"},{"text":"rhs","kind":"internalParam"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/!=(_:_:)","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions\/!=(_:_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"symbolKind":"op","extendedModule":"Swift","externalID":"s:SQsE2neoiySbx_xtFZ::SYNTHESIZED::s:7Factory0A12ResetOptionsO","roleHeading":"Operator","role":"symbol","modules":[{"name":"Factory","relatedModules":["Swift"]}],"fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"!="},{"text":" ","kind":"text"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"title":"!=(_:_:)"},"sections":[],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"title":"FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}]},"doc://Factory/documentation/Factory/FactoryResetOptions/Equatable-Implementations":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations","url":"\/documentation\/factory\/factoryresetoptions\/equatable-implementations","role":"collectionGroup","title":"Equatable Implementations","kind":"article","abstract":[]},"doc://Factory/documentation/Factory/FactoryResetOptions/!=(_:_:)":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/!=(_:_:)","url":"\/documentation\/factory\/factoryresetoptions\/!=(_:_:)","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"!=","kind":"identifier"},{"text":" ","kind":"text"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"text":"Bool","preciseIdentifier":"s:Sb","kind":"typeIdentifier"}],"role":"symbol","title":"!=(_:_:)","kind":"symbol","abstract":[]}}} \ No newline at end of file +{"abstract":[{"text":"Inherited from ","type":"text"},{"type":"codeVoice","code":"Equatable.!=(_:_:)"},{"text":".","type":"text"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/!=(_:_:)"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"text":" ","kind":"text"},{"kind":"text","text":"("},{"text":"lhs","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"internalParam","text":"rhs"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}]}]}],"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions\/!=(_:_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"modules":[{"name":"Factory","relatedModules":["Swift"]}],"roleHeading":"Operator","extendedModule":"Swift","symbolKind":"op","title":"!=(_:_:)","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"text":", ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"role":"symbol","externalID":"s:SQsE2neoiySbx_xtFZ::SYNTHESIZED::s:7Factory0A12ResetOptionsO"},"kind":"symbol","references":{"doc://Factory/documentation/Factory/FactoryResetOptions/Equatable-Implementations":{"title":"Equatable Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations","role":"collectionGroup","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/equatable-implementations","abstract":[],"kind":"article"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"title":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","type":"topic","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions/!=(_:_:)":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/!=(_:_:)","kind":"symbol","abstract":[],"url":"\/documentation\/factory\/factoryresetoptions\/!=(_:_:)","title":"!=(_:_:)","role":"symbol","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"!="},{"text":" ","kind":"text"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}]}}} \ 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 83740a65..b4129028 100644 --- a/docs/data/documentation/factory/factoryresetoptions/all.json +++ b/docs/data/documentation/factory/factoryresetoptions/all.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"text":"all","kind":"identifier"}],"platforms":["macOS"]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions\/all"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"patch":0,"minor":3},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/all","interfaceLanguage":"swift"},"sections":[],"metadata":{"roleHeading":"Case","externalID":"s:7Factory0A12ResetOptionsO3allyA2CmF","role":"symbol","symbolKind":"case","title":"FactoryResetOptions.all","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"all"}],"modules":[{"name":"Factory"}]},"abstract":[{"text":"Resets registration and scope caches","type":"text"}],"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"title":"FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}]},"doc://Factory/documentation/Factory/FactoryResetOptions/all":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/all","role":"symbol","type":"topic","abstract":[{"text":"Resets registration and scope caches","type":"text"}],"title":"FactoryResetOptions.all","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"all","kind":"identifier"}],"url":"\/documentation\/factory\/factoryresetoptions\/all"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"primaryContentSections":[{"declarations":[{"tokens":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"all","kind":"identifier"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryresetoptions\/all"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"sections":[],"metadata":{"role":"symbol","modules":[{"name":"Factory"}],"symbolKind":"case","roleHeading":"Case","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"all","kind":"identifier"}],"title":"FactoryResetOptions.all","externalID":"s:7Factory0A12ResetOptionsO3allyA2CmF"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/all","interfaceLanguage":"swift"},"abstract":[{"text":"Resets registration and scope caches","type":"text"}],"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory/FactoryResetOptions/all":{"title":"FactoryResetOptions.all","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/all","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"all"}],"url":"\/documentation\/factory\/factoryresetoptions\/all","abstract":[{"text":"Resets registration and scope caches","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"title":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","type":"topic","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 7839f1e8..9fd86131 100644 --- a/docs/data/documentation/factory/factoryresetoptions/context.json +++ b/docs/data/documentation/factory/factoryresetoptions/context.json @@ -1 +1 @@ -{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryresetoptions\/context"]}],"metadata":{"title":"FactoryResetOptions.context","externalID":"s:7Factory0A12ResetOptionsO7contextyA2CmF","modules":[{"name":"Factory"}],"fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"text":"context","kind":"identifier"}],"role":"symbol","symbolKind":"case","roleHeading":"Case"},"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/context"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"abstract":[{"text":"Resets context-based registrations on this container","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"context"}],"languages":["swift"]}]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryResetOptions/context":{"title":"FactoryResetOptions.context","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"context"}],"url":"\/documentation\/factory\/factoryresetoptions\/context","abstract":[{"type":"text","text":"Resets context-based registrations on this container"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/context","type":"topic","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"title":"FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}]}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"text":"context","kind":"identifier"}]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/context","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions\/context"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"text":"Resets context-based registrations on this container","type":"text"}],"kind":"symbol","sections":[],"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Case","symbolKind":"case","title":"FactoryResetOptions.context","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"context","kind":"identifier"}],"externalID":"s:7Factory0A12ResetOptionsO7contextyA2CmF","role":"symbol"},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions/context":{"title":"FactoryResetOptions.context","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/context","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"context"}],"url":"\/documentation\/factory\/factoryresetoptions\/context","abstract":[{"text":"Resets context-based registrations on this container","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"title":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","type":"topic","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol"}}} \ 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 51148c5e..c6c057d7 100644 --- a/docs/data/documentation/factory/factoryresetoptions/equatable-implementations.json +++ b/docs/data/documentation/factory/factoryresetoptions/equatable-implementations.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/!=(_:_:)"],"generated":true,"title":"Operators"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions\/equatable-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"article","sections":[],"metadata":{"title":"Equatable Implementations","roleHeading":"API Collection","role":"collectionGroup","modules":[{"name":"Factory"}]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryResetOptions/!=(_:_:)":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/!=(_:_:)","url":"\/documentation\/factory\/factoryresetoptions\/!=(_:_:)","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"!=","kind":"identifier"},{"text":" ","kind":"text"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"text":"Bool","preciseIdentifier":"s:Sb","kind":"typeIdentifier"}],"role":"symbol","title":"!=(_:_:)","kind":"symbol","abstract":[]},"doc://Factory/documentation/Factory/FactoryResetOptions":{"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"title":"FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}]}}} \ No newline at end of file +{"kind":"article","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryresetoptions\/equatable-implementations"]}],"sections":[],"metadata":{"modules":[{"name":"Factory"}],"title":"Equatable Implementations","role":"collectionGroup","roleHeading":"API Collection"},"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/Equatable-Implementations","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/!=(_:_:)"],"generated":true,"title":"Operators"}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions/!=(_:_:)":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/!=(_:_:)","kind":"symbol","abstract":[],"url":"\/documentation\/factory\/factoryresetoptions\/!=(_:_:)","title":"!=(_:_:)","role":"symbol","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"!="},{"text":" ","kind":"text"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}]},"doc://Factory/documentation/Factory/FactoryResetOptions":{"title":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","type":"topic","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol"}}} \ 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 45ef2101..4d5e2866 100644 --- a/docs/data/documentation/factory/factoryresetoptions/none.json +++ b/docs/data/documentation/factory/factoryresetoptions/none.json @@ -1 +1 @@ -{"metadata":{"fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"none","kind":"identifier"}],"symbolKind":"case","role":"symbol","title":"FactoryResetOptions.none","externalID":"s:7Factory0A12ResetOptionsO4noneyA2CmF","modules":[{"name":"Factory"}],"roleHeading":"Case"},"abstract":[{"type":"text","text":"Performs no reset actions on this container"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"none"}],"languages":["swift"]}],"kind":"declarations"}],"schemaVersion":{"patch":0,"minor":3,"major":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/none","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryresetoptions\/none"]}],"sections":[],"kind":"symbol","references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"title":"FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}]},"doc://Factory/documentation/Factory/FactoryResetOptions/none":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/none","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"none"}],"role":"symbol","abstract":[{"text":"Performs no reset actions on this container","type":"text"}],"title":"FactoryResetOptions.none","type":"topic","url":"\/documentation\/factory\/factoryresetoptions\/none"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/none","interfaceLanguage":"swift"},"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"none","kind":"identifier"}]}]}],"metadata":{"roleHeading":"Case","externalID":"s:7Factory0A12ResetOptionsO4noneyA2CmF","symbolKind":"case","role":"symbol","modules":[{"name":"Factory"}],"fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"none"}],"title":"FactoryResetOptions.none"},"sections":[],"abstract":[{"text":"Performs no reset actions on this container","type":"text"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryresetoptions\/none"]}],"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"title":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","type":"topic","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions/none":{"title":"FactoryResetOptions.none","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/none","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"none"}],"url":"\/documentation\/factory\/factoryresetoptions\/none","abstract":[{"text":"Performs no reset actions on this container","type":"text"}],"kind":"symbol"}}} \ 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 c9de2217..f16663c3 100644 --- a/docs/data/documentation/factory/factoryresetoptions/registration.json +++ b/docs/data/documentation/factory/factoryresetoptions/registration.json @@ -1 +1 @@ -{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/registration"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"registration"}],"languages":["swift"],"platforms":["macOS"]}]}],"kind":"symbol","sections":[],"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions\/registration"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"type":"text","text":"Resets registrations on this container"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"title":"FactoryResetOptions.registration","externalID":"s:7Factory0A12ResetOptionsO12registrationyA2CmF","role":"symbol","modules":[{"name":"Factory"}],"roleHeading":"Case","symbolKind":"case","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"text":"registration","kind":"identifier"}]},"references":{"doc://Factory/documentation/Factory/FactoryResetOptions/registration":{"type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"text":"registration","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/registration","url":"\/documentation\/factory\/factoryresetoptions\/registration","title":"FactoryResetOptions.registration","kind":"symbol","abstract":[{"text":"Resets registrations on this container","type":"text"}]},"doc://Factory/documentation/Factory/FactoryResetOptions":{"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"title":"FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryresetoptions\/registration"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/registration","interfaceLanguage":"swift"},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"roleHeading":"Case","modules":[{"name":"Factory"}],"symbolKind":"case","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"registration"}],"title":"FactoryResetOptions.registration","externalID":"s:7Factory0A12ResetOptionsO12registrationyA2CmF","role":"symbol"},"abstract":[{"text":"Resets registrations on this container","type":"text"}],"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"registration"}]}]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions/registration":{"title":"FactoryResetOptions.registration","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/registration","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"registration"}],"url":"\/documentation\/factory\/factoryresetoptions\/registration","abstract":[{"text":"Resets registrations on this container","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"title":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","type":"topic","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"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 e098230e..49073243 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"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"schemaVersion":{"patch":0,"minor":3,"major":0},"metadata":{"modules":[{"name":"Factory"}],"title":"FactoryResetOptions.scope","externalID":"s:7Factory0A12ResetOptionsO5scopeyA2CmF","symbolKind":"case","role":"symbol","roleHeading":"Case","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"scope"}]},"sections":[],"abstract":[{"type":"text","text":"Resets all scope caches on this container"}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"scope"}],"platforms":["macOS"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryresetoptions\/scope"]}],"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"title":"FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryResetOptions/scope":{"type":"topic","role":"symbol","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/scope","url":"\/documentation\/factory\/factoryresetoptions\/scope","title":"FactoryResetOptions.scope","kind":"symbol","abstract":[{"text":"Resets all scope caches on this container","type":"text"}]}}} \ No newline at end of file +{"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Case","title":"FactoryResetOptions.scope","role":"symbol","symbolKind":"case","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"scope","kind":"identifier"}],"externalID":"s:7Factory0A12ResetOptionsO5scopeyA2CmF"},"abstract":[{"text":"Resets all scope caches on this container","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"scope"}]}]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"paths":["\/documentation\/factory\/factoryresetoptions\/scope"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/scope"},"sections":[],"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"title":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","type":"topic","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions/scope":{"title":"FactoryResetOptions.scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions\/scope","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"scope"}],"url":"\/documentation\/factory\/factoryresetoptions\/scope","abstract":[{"text":"Resets all scope caches on this container","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factoryresolving.json b/docs/data/documentation/factory/factoryresolving.json index 10aef179..b884279e 100644 --- a/docs/data/documentation/factory/factoryresolving.json +++ b/docs/data/documentation/factory/factoryresolving.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"text":"FactoryResolving","kind":"identifier"},{"text":" = ","kind":"text"},{"preciseIdentifier":"s:7Factory9ResolvingP","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","kind":"typeIdentifier","text":"Resolving"}]}],"kind":"declarations"}],"schemaVersion":{"patch":0,"minor":3,"major":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResolving","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryresolving"]}],"sections":[],"metadata":{"roleHeading":"Type Alias","fragments":[{"kind":"keyword","text":"typealias"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResolving"}],"symbolKind":"typealias","title":"FactoryResolving","navigatorTitle":[{"text":"FactoryResolving","kind":"identifier"}],"externalID":"s:7Factory0A9Resolvinga","modules":[{"name":"Factory"}],"role":"symbol"},"kind":"symbol","references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Resolving":{"kind":"symbol","role":"symbol","url":"\/documentation\/factory\/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"},{"text":"Resolving","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"Resolving"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","title":"Resolving"},"doc://Factory/documentation/Factory/FactoryResolving":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResolving","type":"topic","fragments":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResolving"}],"title":"FactoryResolving","abstract":[],"navigatorTitle":[{"text":"FactoryResolving","kind":"identifier"}],"url":"\/documentation\/factory\/factoryresolving","kind":"symbol","role":"symbol"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"kind":"symbol","metadata":{"title":"FactoryResolving","externalID":"s:7Factory0A9Resolvinga","role":"symbol","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"text":"FactoryResolving","kind":"identifier"}],"roleHeading":"Type Alias","symbolKind":"typealias","navigatorTitle":[{"kind":"identifier","text":"FactoryResolving"}]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"typealias","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResolving"},{"kind":"text","text":" = "},{"text":"Resolving","kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ResolvingP","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving"}]}]}],"sections":[],"variants":[{"paths":["\/documentation\/factory\/factoryresolving"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryResolving","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/Resolving":{"title":"Resolving","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"Resolving","kind":"identifier"}],"url":"\/documentation\/factory\/resolving","navigatorTitle":[{"kind":"identifier","text":"Resolving"}],"abstract":[{"text":"When protocol is applied to a container it enables a typed registration\/resolution mode.","type":"text"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryResolving":{"type":"topic","fragments":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResolving"}],"navigatorTitle":[{"kind":"identifier","text":"FactoryResolving"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResolving","url":"\/documentation\/factory\/factoryresolving","role":"symbol","abstract":[],"title":"FactoryResolving"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factoryscope.json b/docs/data/documentation/factory/factoryscope.json index 5204edcc..448f13bd 100644 --- a/docs/data/documentation/factory/factoryscope.json +++ b/docs/data/documentation/factory/factoryscope.json @@ -1 +1 @@ -{"metadata":{"symbolKind":"typealias","roleHeading":"Type Alias","modules":[{"name":"Factory"}],"fragments":[{"text":"typealias","kind":"keyword"},{"text":" ","kind":"text"},{"text":"FactoryScope","kind":"identifier"}],"externalID":"s:7Factory0A5Scopea","role":"symbol","title":"FactoryScope","navigatorTitle":[{"kind":"identifier","text":"FactoryScope"}]},"schemaVersion":{"minor":3,"major":0,"patch":0},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"text":"FactoryScope","kind":"identifier"},{"text":" = ","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","text":"Scope","kind":"typeIdentifier"}]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/factoryscope"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"sections":[],"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactoryScope"},"references":{"doc://Factory/documentation/Factory/FactoryScope":{"fragments":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryScope","kind":"identifier"}],"abstract":[],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryScope","type":"topic","title":"FactoryScope","navigatorTitle":[{"text":"FactoryScope","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/factoryscope"},"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryScope"},{"kind":"text","text":" = "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope","kind":"typeIdentifier"}],"platforms":["macOS"]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"kind":"symbol","sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/FactoryScope","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factoryscope"]}],"metadata":{"title":"FactoryScope","role":"symbol","externalID":"s:7Factory0A5Scopea","navigatorTitle":[{"text":"FactoryScope","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryScope"}],"modules":[{"name":"Factory"}],"symbolKind":"typealias","roleHeading":"Type Alias"},"references":{"doc://Factory/documentation/Factory/FactoryScope":{"title":"FactoryScope","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryScope","role":"symbol","type":"topic","navigatorTitle":[{"text":"FactoryScope","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryScope"}],"url":"\/documentation\/factory\/factoryscope","abstract":[],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/factorysharedcontainer.json b/docs/data/documentation/factory/factorysharedcontainer.json index 3bfd394b..adc9ab6f 100644 --- a/docs/data/documentation/factory/factorysharedcontainer.json +++ b/docs/data/documentation/factory/factorysharedcontainer.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactorySharedContainer"},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactorySharedContainer","kind":"identifier"},{"text":" = ","kind":"text"},{"text":"SharedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","preciseIdentifier":"s:7Factory15SharedContainerP","kind":"typeIdentifier"}]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorysharedcontainer"]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"roleHeading":"Type Alias","fragments":[{"kind":"keyword","text":"typealias"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactorySharedContainer"}],"symbolKind":"typealias","title":"FactorySharedContainer","navigatorTitle":[{"kind":"identifier","text":"FactorySharedContainer"}],"role":"symbol","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A15SharedContainera"},"sections":[],"references":{"doc://Factory/documentation/Factory/FactorySharedContainer":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactorySharedContainer","type":"topic","fragments":[{"kind":"keyword","text":"typealias"},{"kind":"text","text":" "},{"text":"FactorySharedContainer","kind":"identifier"}],"abstract":[],"title":"FactorySharedContainer","navigatorTitle":[{"kind":"identifier","text":"FactorySharedContainer"}],"kind":"symbol","url":"\/documentation\/factory\/factorysharedcontainer","role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/SharedContainer":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/sharedcontainer","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"title":"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."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"SharedContainer","kind":"identifier"}]}}} \ No newline at end of file +{"schemaVersion":{"minor":3,"patch":0,"major":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/FactorySharedContainer"},"kind":"symbol","metadata":{"role":"symbol","navigatorTitle":[{"text":"FactorySharedContainer","kind":"identifier"}],"modules":[{"name":"Factory"}],"symbolKind":"typealias","roleHeading":"Type Alias","fragments":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactorySharedContainer","kind":"identifier"}],"title":"FactorySharedContainer","externalID":"s:7Factory0A15SharedContainera"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"typealias","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactorySharedContainer"},{"text":" = ","kind":"text"},{"kind":"typeIdentifier","text":"SharedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","preciseIdentifier":"s:7Factory15SharedContainerP"}],"platforms":["macOS"]}]}],"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/factorysharedcontainer"]}],"references":{"doc://Factory/documentation/Factory/FactorySharedContainer":{"fragments":[{"text":"typealias","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactorySharedContainer"}],"kind":"symbol","type":"topic","title":"FactorySharedContainer","url":"\/documentation\/factory\/factorysharedcontainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactorySharedContainer","role":"symbol","navigatorTitle":[{"text":"FactorySharedContainer","kind":"identifier"}],"abstract":[]},"doc://Factory/documentation/Factory/SharedContainer":{"url":"\/documentation\/factory\/sharedcontainer","type":"topic","abstract":[{"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.","type":"text"}],"title":"SharedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"SharedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/functional.json b/docs/data/documentation/factory/functional.json index 6ba2560e..85653246 100644 --- a/docs/data/documentation/factory/functional.json +++ b/docs/data/documentation/factory/functional.json @@ -1 +1 @@ -{"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Article","role":"article","title":"Functional Injection"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"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\/Tags"],"title":"Advanced Topics","generated":true}],"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Functional","interfaceLanguage":"swift"},"sections":[],"variants":[{"paths":["\/documentation\/factory\/functional"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"primaryContentSections":[{"kind":"content","content":[{"level":2,"anchor":"Overview","type":"heading","text":"Overview"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"anchor":"Example","text":"Example","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"text":"Consider the following typealias and Factory.","type":"text"}]},{"type":"codeListing","code":["typealias AccountProviding = () async throws -> [Account]","","extension Container {"," var accountProvider: Factory {"," self {{ try await Network.get(path: \"\/accounts\") }}"," }","}"],"syntax":"swift"},{"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"}]},{"inlineContent":[{"text":"Now, here’s the view model that uses it.","type":"text"}],"type":"paragraph"},{"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"},{"level":2,"text":"Testing","anchor":"Testing","type":"heading"},{"inlineContent":[{"text":"Now consider how easy it is to write a test with mock accounts…","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["func testAllAccounts() async {"," Container.shared.accountProvider.register {{ Account.mockAccounts }}"," do {"," let viewModel = AccountViewModel()"," try await viewModel.load()"," XCTAssert(viewModel.accounts.count == 5)"," } catch {"," XCTFail(\"Account load failed\")"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or test edge cases like no accounts found."}]},{"type":"codeListing","syntax":"swift","code":["func testEmptyAccounts() async {"," Container.shared.accountProvider.register {{ [] }}"," ...","}"]},{"type":"paragraph","inlineContent":[{"text":"Or test specific error cases.","type":"text"}]},{"syntax":"swift","code":["func testErrorLoadingAccounts() async {"," Container.shared.accountProvider.register {{ throw APIError.network }}"," ...","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s an article that goes into the technique in more detail: "},{"type":"reference","isActive":true,"identifier":"https:\/\/betterprogramming.pub\/factory-and-functional-dependency-injection-2d0a38042d05"}]}]}],"kind":"article","references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Tags":{"role":"article","title":"Tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","url":"\/documentation\/factory\/tags","kind":"article","type":"topic"},"doc://Factory/documentation/Factory/Modules":{"role":"article","title":"Modular Development","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","url":"\/documentation\/factory\/modules","kind":"article","type":"topic"},"doc://Factory/documentation/Factory/Cycle":{"type":"topic","kind":"article","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"title":"Resolution Cycles","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","url":"\/documentation\/factory\/cycle","role":"article"},"doc://Factory/documentation/Factory/Optionals":{"type":"topic","kind":"article","title":"Optionals and Dynamic Registration","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","url":"\/documentation\/factory\/optionals","role":"article"},"https://betterprogramming.pub/factory-and-functional-dependency-injection-2d0a38042d05":{"titleInlineContent":[{"text":"Factory and Functional Dependency Injection","type":"text"}],"url":"https:\/\/betterprogramming.pub\/factory-and-functional-dependency-injection-2d0a38042d05","title":"Factory and Functional Dependency Injection","identifier":"https:\/\/betterprogramming.pub\/factory-and-functional-dependency-injection-2d0a38042d05","type":"link"},"doc://Factory/documentation/Factory/Design":{"type":"topic","kind":"article","title":"Designing Factory","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","url":"\/documentation\/factory\/design","role":"article"},"doc://Factory/documentation/Factory/Modifiers":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","type":"topic","title":"Factory Modifiers","abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"url":"\/documentation\/factory\/modifiers","kind":"article","role":"article"}}} \ No newline at end of file +{"abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"primaryContentSections":[{"kind":"content","content":[{"type":"heading","level":2,"anchor":"Overview","text":"Overview"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"text":"Example","type":"heading","anchor":"Example","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"Consider the following typealias and Factory."}]},{"syntax":"swift","code":["typealias AccountProviding = () async throws -> [Account]","","extension Container {"," var accountProvider: Factory {"," self {{ try await Network.get(path: \"\/accounts\") }}"," }","}"],"type":"codeListing"},{"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"}],"type":"paragraph"},{"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"},{"level":2,"text":"Testing","type":"heading","anchor":"Testing"},{"inlineContent":[{"text":"Now consider how easy it is to write a test with mock accounts…","type":"text"}],"type":"paragraph"},{"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":[{"type":"text","text":"Or test edge cases like no accounts found."}],"type":"paragraph"},{"syntax":"swift","code":["func testEmptyAccounts() async {"," Container.shared.accountProvider.register {{ [] }}"," ...","}"],"type":"codeListing"},{"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 }}"," ...","}"]},{"inlineContent":[{"text":"Here’s an article that goes into the technique in more detail: ","type":"text"},{"type":"reference","identifier":"https:\/\/betterprogramming.pub\/factory-and-functional-dependency-injection-2d0a38042d05","isActive":true}],"type":"paragraph"}]}],"metadata":{"title":"Functional Injection","modules":[{"name":"Factory"}],"roleHeading":"Article","role":"article"},"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/functional"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Functional","interfaceLanguage":"swift"},"seeAlsoSections":[{"generated":true,"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"]}],"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"kind":"article","references":{"doc://Factory/documentation/Factory/Modifiers":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","kind":"article","role":"article","abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"url":"\/documentation\/factory\/modifiers","title":"Factory Modifiers","type":"topic"},"doc://Factory/documentation/Factory/Optionals":{"identifier":"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","url":"\/documentation\/factory\/optionals","role":"article"},"doc://Factory/documentation/Factory/Cycle":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","abstract":[{"text":"What’s a resolution cycle, and why should we care?","type":"text"}],"role":"article","title":"Resolution Cycles","url":"\/documentation\/factory\/cycle"},"doc://Factory/documentation/Factory/Modules":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","kind":"article","role":"article","abstract":[{"text":"Using Factory in a project with multiple modules.","type":"text"}],"url":"\/documentation\/factory\/modules","title":"Modular Development","type":"topic"},"https://betterprogramming.pub/factory-and-functional-dependency-injection-2d0a38042d05":{"url":"https:\/\/betterprogramming.pub\/factory-and-functional-dependency-injection-2d0a38042d05","title":"Factory and Functional Dependency Injection","type":"link","identifier":"https:\/\/betterprogramming.pub\/factory-and-functional-dependency-injection-2d0a38042d05","titleInlineContent":[{"text":"Factory and Functional Dependency Injection","type":"text"}]},"doc://Factory/documentation/Factory/Tags":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","kind":"article","role":"article","abstract":[{"text":"Obtaining a list of dependencies of a given type.","type":"text"}],"url":"\/documentation\/factory\/tags","title":"Tags","type":"topic"},"doc://Factory/documentation/Factory/Design":{"url":"\/documentation\/factory\/design","title":"Designing Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","kind":"article","role":"article","abstract":[{"text":"Rationale behind the design decisions made in Factory 1.0 and 2.0","type":"text"}],"type":"topic"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/gettingstarted.json b/docs/data/documentation/factory/gettingstarted.json index fc3884cb..cfc55565 100644 --- a/docs/data/documentation/factory/gettingstarted.json +++ b/docs/data/documentation/factory/gettingstarted.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"title":"The Basics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Containers","doc:\/\/Factory\/documentation\/Factory\/Scopes"],"generated":true}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/gettingstarted"]}],"kind":"article","metadata":{"modules":[{"name":"Factory"}],"title":"Getting Started","role":"collectionGroup"},"topicSections":[{"title":"Examples","abstract":[{"type":"text","text":"Some code samples demonstration various ways to register and resolve Factory’s."}],"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Registrations","doc:\/\/Factory\/documentation\/Factory\/Resolutions"]}],"sections":[],"primaryContentSections":[{"kind":"content","content":[{"type":"heading","level":2,"text":"Overview","anchor":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"A "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","isActive":true},{"text":" manages the dependency injection process for a specific object or service and produces an object of the desired type when required.","type":"text"}]},{"text":"Defining a Factory","level":2,"anchor":"Defining-a-Factory","type":"heading"},{"inlineContent":[{"type":"text","text":"Most container-based dependency injection systems require you to define that a dependency is available for injection and many require some sort of factory or mechanism that will provide a new instance of the service when needed."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"Factory, as you may have guessed from the name, is no exception."}],"type":"paragraph"},{"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."}]},{"syntax":"swift","type":"codeListing","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"There’s a few things going on here, so let’s break it down."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"First, we extended our container in order to define a new computed variable of type "},{"code":"Factory","type":"codeVoice"},{"type":"text","text":"."}]},{"code":["extension Container {"," var service: Factory {"," ..."," }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"codeVoice","code":"ServiceType"},{"text":" is the dependency type, and it’s often a protocol to which the returned dependency conforms.","type":"text"}]},{"inlineContent":[{"code":"Factory","type":"codeVoice"},{"text":" is the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"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"},{"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":[{"text":"As such, a complete, formal Factory definition would look like this…","type":"text"}],"type":"paragraph"},{"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 "},{"type":"codeVoice","code":"callAsFunction"},{"type":"text","text":" function on "},{"type":"codeVoice","code":"self"},{"text":".","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }","}"]},{"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"}],"type":"paragraph"},{"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"},{"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."}]},{"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":"paragraph"},{"type":"heading","anchor":"Resolving-a-Factory","text":"Resolving a Factory","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"To resolve a Factory and obtain an object or service of the desired type, one simply calls the Factory as a function. Here we use the "},{"type":"codeVoice","code":"shared"},{"type":"text","text":" container that’s provided for each and every container type."}]},{"code":["class ContentViewModel: ObservableObject {"," private let myService = Container.shared.service()"," ...","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The resolved instance may be brand new or Factory may return a cached value from the specified "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","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."}]},{"type":"codeListing","code":["private let service = container.service()"],"syntax":"swift"},{"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"},{"type":"codeListing","code":["@Injected(\\.service) var service"],"syntax":"swift"},{"inlineContent":[{"text":"Unless otherwise specified, the ","type":"text"},{"type":"codeVoice","code":"@Injected"},{"type":"text","text":" property wrapper looks for dependencies in the standard shared container provided by Factory, so the above is functionally identical to the "},{"type":"codeVoice","code":"Container.shared.service()"},{"text":" example shown earlier. Here’s one pointing to your own container.","type":"text"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["@Injected(\\MyCustomContainer.service) var service: ServiceType"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"For more examples see: "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","isActive":true},{"type":"text","text":"."}]},{"text":"Registering a new Factory closure","type":"heading","level":2,"anchor":"Registering-a-new-Factory-closure"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"inlineContent":[{"text":"It’s easy. Just register a new closure with the existing Factory.","type":"text"}],"type":"paragraph"},{"code":["container.service.register {"," MockService()","}"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"emphasis","inlineContent":[{"text":"This includes singletons, with a few caveats. See the Singleton section in ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","type":"reference","isActive":true}]}]},{"level":2,"text":"Mocking and Testing","type":"heading","anchor":"Mocking-and-Testing"},{"type":"paragraph","inlineContent":[{"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":"text"},{"type":"codeVoice","code":"let myService = MyService()"},{"text":" and be done with it?","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"Or keep the container idea, but write something similar to this…","type":"text"}]},{"code":["extension Container {"," static var myService: MyServiceType { MyService() }","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Well, the primary benefit one gains from using a container-based dependency injection system is that we’re able to change the behavior of the system as needed. Consider the following code:"}]},{"syntax":"swift","code":["struct ContentView: View {"," @StateObject var model = ContentViewModel()"," var body: some View {"," Text(model.text())"," .padding()"," }","}"],"type":"codeListing"},{"inlineContent":[{"type":"text","text":"Our ContentView uses our view model, which is assigned to a StateObject. Great. But now we want to preview our code. How do we change the behavior of "},{"code":"ContentViewModel","type":"codeVoice"},{"type":"text","text":" so that its "},{"type":"codeVoice","code":"MyService"},{"type":"text","text":" dependency isn’t making live API calls during development?"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"It’s easy. Just replace "},{"code":"MyService","type":"codeVoice"},{"type":"text","text":" with a mock that also conforms to "},{"type":"codeVoice","code":"MyServiceType"},{"type":"text","text":"."}]},{"type":"codeListing","code":["struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," let _ = Container.shared.myService.register { MockService2() }"," ContentView()"," }","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note the line in our preview code where we’re gone back to our container and registered a new closure on our factory. This function overrides the default factory closure."}]},{"type":"paragraph","inlineContent":[{"text":"Now when our preview is displayed ","type":"text"},{"code":"ContentView","type":"codeVoice"},{"type":"text","text":" creates a "},{"type":"codeVoice","code":"ContentViewModel"},{"text":" which in turn has a dependency on ","type":"text"},{"type":"codeVoice","code":"myService"},{"type":"text","text":" using shared container."}]},{"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"},{"text":" instead of the ","type":"text"},{"code":"MyService","type":"codeVoice"},{"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"},{"type":"paragraph","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"},{"type":"text","text":"."}]},{"type":"heading","level":2,"text":"Contexts","anchor":"Contexts"},{"type":"paragraph","inlineContent":[{"type":"text","text":"One powerful new feature in Factory 2.1 is contexts. Let’s say that for logistical reasons whenever your application runs in debug mode you never want it to make calls to your application’s analytics engine."}]},{"type":"paragraph","inlineContent":[{"text":"Factory makes it easy. Just register an override for that particular context.","type":"text"}]},{"code":["container.analytics.onDebug {"," StubAnalyticsEngine()","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"There are many contexts for testing, previews, and even UITesting. See ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"},{"type":"text","text":" for more."}]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted"},"abstract":[{"text":"Defining a Factory, resolving it, and changing the default behavior.","type":"text"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory/Scopes":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","title":"Scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"url":"\/documentation\/factory\/scopes","kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/Contexts":{"type":"topic","kind":"article","role":"article","url":"\/documentation\/factory\/contexts","title":"Contexts","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Registrations":{"type":"topic","kind":"article","role":"article","url":"\/documentation\/factory\/registrations","title":"Sample Registrations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Registrations","abstract":[{"type":"text","text":"There are many ways to register dependencies with Factory. Here are a few examples."}]},"doc://Factory/documentation/Factory/Resolutions":{"type":"topic","kind":"article","role":"article","url":"\/documentation\/factory\/resolutions","title":"Sample Resolutions","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","abstract":[{"type":"text","text":"There are many ways to use Factory to resolve dependencies. Here are a few examples."}]},"doc://Factory/documentation/Factory/Containers":{"kind":"article","abstract":[{"text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","title":"Containers","type":"topic","url":"\/documentation\/factory\/containers","role":"article"},"doc://Factory/documentation/Factory/Testing":{"type":"topic","kind":"article","role":"article","url":"\/documentation\/factory\/testing","title":"Testing","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}]}}} \ No newline at end of file +{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","interfaceLanguage":"swift"},"kind":"article","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"sections":[],"metadata":{"role":"collectionGroup","modules":[{"name":"Factory"}],"title":"Getting Started"},"abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"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"}],"seeAlsoSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Containers","doc:\/\/Factory\/documentation\/Factory\/Scopes"],"generated":true,"title":"The Basics"}],"primaryContentSections":[{"content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"type":"paragraph","inlineContent":[{"text":"A ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","type":"reference","isActive":true},{"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":"heading","level":2,"anchor":"Defining-a-Factory","text":"Defining a Factory"},{"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"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory, as you may have guessed from the name, is no exception."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s a simple registration that creates a "},{"code":"ServiceType","type":"codeVoice"},{"type":"text","text":" dependency for us when needed."}]},{"code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"There’s a few things going on here, so let’s break it down."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"First, we extended our container in order to define a new computed variable of type "},{"code":"Factory","type":"codeVoice"},{"text":".","type":"text"}]},{"code":["extension Container {"," var service: Factory {"," ..."," }","}"],"syntax":"swift","type":"codeListing"},{"inlineContent":[{"type":"codeVoice","code":"ServiceType"},{"text":" is the dependency type, and it’s often a protocol to which the returned dependency conforms.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"codeVoice","code":"Factory"},{"type":"text","text":" is the "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","isActive":true},{"text":" that controls how and when our ","type":"text"},{"code":"ServiceType","type":"codeVoice"},{"text":" dependency is made. It manages our dependency.","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."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As such, a complete, formal Factory definition would look like this…"}]},{"type":"codeListing","code":["var service: Factory {"," Factory(self, scope: .unique) { "," MyService()"," }","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"But we can do better. Factory also provides a bit of syntactic sugar that asks the enclosing container to make our factory for us using a ","type":"text"},{"type":"codeVoice","code":"callAsFunction"},{"text":" function on ","type":"text"},{"type":"codeVoice","code":"self"},{"type":"text","text":"."}]},{"syntax":"swift","type":"codeListing","code":["var service: Factory {"," self { MyService() }","}"]},{"inlineContent":[{"type":"text","text":"And we’re done. Either way, the Factory generated by the container is then returned directly to the caller, usually to be evaluated. See “Resolving a Factory” below."}],"type":"paragraph"},{"inlineContent":[{"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"},{"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":[{"text":"For more examples of Factory definitions that define scopes, use constructor injection, and do parameter passing, see: ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Registrations","isActive":true,"type":"reference"},{"text":".","type":"text"}]},{"type":"heading","anchor":"Resolving-a-Factory","level":2,"text":"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. Here we use the ","type":"text"},{"code":"shared","type":"codeVoice"},{"text":" container that’s provided for each and every container type.","type":"text"}]},{"code":["class ContentViewModel: ObservableObject {"," private let myService = Container.shared.service()"," ...","}"],"type":"codeListing","syntax":"swift"},{"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},{"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"},{"code":["private let service = container.service()"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Finally, we could have also used an "},{"code":"@Injected","type":"codeVoice"},{"text":" property wrapper and specified a keyPath to the desired dependency.","type":"text"}]},{"syntax":"swift","type":"codeListing","code":["@Injected(\\.service) var service"]},{"type":"paragraph","inlineContent":[{"text":"Unless otherwise specified, the ","type":"text"},{"code":"@Injected","type":"codeVoice"},{"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."}]},{"code":["@Injected(\\MyCustomContainer.service) var service: ServiceType"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"For more examples see: ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","isActive":true,"type":"reference"},{"text":".","type":"text"}]},{"anchor":"Registering-a-new-Factory-closure","level":2,"text":"Registering a new Factory closure","type":"heading"},{"inlineContent":[{"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":"text"}],"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":[{"text":"This includes singletons, with a few caveats. See the Singleton section in ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing"}]}]},{"anchor":"Mocking-and-Testing","text":"Mocking and Testing","type":"heading","level":2},{"type":"paragraph","inlineContent":[{"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":"text"},{"type":"codeVoice","code":"let myService = MyService()"},{"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"}]},{"syntax":"swift","type":"codeListing","code":["extension Container {"," static var myService: MyServiceType { MyService() }","}"]},{"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"}]},{"code":["struct ContentView: View {"," @StateObject var model = ContentViewModel()"," var body: some View {"," Text(model.text())"," .padding()"," }","}"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"type":"text","text":"Our ContentView uses our view model, which is assigned to a StateObject. Great. But now we want to preview our code. How do we change the behavior of "},{"type":"codeVoice","code":"ContentViewModel"},{"type":"text","text":" so that its "},{"type":"codeVoice","code":"MyService"},{"text":" dependency isn’t making live API calls during development?","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"It’s easy. Just replace ","type":"text"},{"code":"MyService","type":"codeVoice"},{"text":" with a mock that also conforms to ","type":"text"},{"type":"codeVoice","code":"MyServiceType"},{"type":"text","text":"."}],"type":"paragraph"},{"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"},{"inlineContent":[{"text":"Now when our preview is displayed ","type":"text"},{"type":"codeVoice","code":"ContentView"},{"type":"text","text":" creates a "},{"type":"codeVoice","code":"ContentViewModel"},{"text":" which in turn has a dependency on ","type":"text"},{"type":"codeVoice","code":"myService"},{"text":" using shared container.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"And when the wrapper asks the factory for an instance of "},{"type":"codeVoice","code":"MyServiceType"},{"type":"text","text":" it now gets a "},{"type":"codeVoice","code":"MockService2"},{"type":"text","text":" instead of the "},{"type":"codeVoice","code":"MyService"},{"text":" type originally defined.","type":"text"}]},{"type":"paragraph","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","isActive":true,"type":"reference"},{"type":"text","text":"."}]},{"type":"heading","level":2,"text":"Contexts","anchor":"Contexts"},{"type":"paragraph","inlineContent":[{"type":"text","text":"One powerful new feature in Factory 2.1 is contexts. Let’s say that for logistical reasons whenever your application runs in debug mode you never want it to make calls to your application’s analytics engine."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory makes it easy. Just register an override for that particular context."}]},{"type":"codeListing","syntax":"swift","code":["container.analytics.onDebug {"," StubAnalyticsEngine()","}"]},{"inlineContent":[{"text":"There are many contexts for testing, previews, and even UITesting. See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","isActive":true},{"type":"text","text":" for more."}],"type":"paragraph"}],"kind":"content"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/gettingstarted"]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory/Testing":{"abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"kind":"article","url":"\/documentation\/factory\/testing","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","role":"article","type":"topic","title":"Testing"},"doc://Factory/documentation/Factory/Contexts":{"url":"\/documentation\/factory\/contexts","kind":"article","role":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","title":"Contexts","abstract":[{"text":"Changing injection results under special circumstances.","type":"text"}]},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Resolutions":{"role":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","title":"Sample Resolutions","kind":"article","url":"\/documentation\/factory\/resolutions","abstract":[{"type":"text","text":"There are many ways to use Factory to resolve dependencies. Here are a few examples."}]},"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/Containers":{"kind":"article","type":"topic","title":"Containers","url":"\/documentation\/factory\/containers","identifier":"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?"}]},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}]},"doc://Factory/documentation/Factory/Registrations":{"abstract":[{"type":"text","text":"There are many ways to register dependencies with Factory. Here are a few examples."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Registrations","title":"Sample Registrations","role":"article","url":"\/documentation\/factory\/registrations","kind":"article"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injected.json b/docs/data/documentation/factory/injected.json index 2ded3159..2453fd0f 100644 --- a/docs/data/documentation/factory/injected.json +++ b/docs/data/documentation/factory/injected.json @@ -1 +1 @@ -{"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"metadata":{"navigatorTitle":[{"kind":"identifier","text":"Injected"}],"roleHeading":"Structure","role":"symbol","modules":[{"name":"Factory"}],"externalID":"s:7Factory8InjectedV","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Injected","kind":"identifier"}],"title":"Injected","symbolKind":"struct"},"schemaVersion":{"patch":0,"major":0,"minor":3},"abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injected"]}],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"@propertyWrapper","kind":"attribute"},{"kind":"text","text":" "},{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"},{"kind":"content","content":[{"anchor":"overview","type":"heading","text":"Overview","level":2},{"type":"paragraph","inlineContent":[{"text":"Property wrappers implement an annotation pattern to resolving dependencies, similar to using","type":"text"},{"type":"text","text":" "},{"type":"text","text":"EnvironmentObject in SwiftUI."}]},{"type":"codeListing","code":["class MyViewModel {"," @Injected(\\.myService) var service"," @Injected(\\MyCustomContainer.myService) var service","}"],"syntax":"swift"},{"type":"paragraph","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."},{"text":" ","type":"text"},{"text":"The short version of the keyPath resolves to the default container, while the expanded version","type":"text"},{"type":"text","text":" "},{"type":"text","text":"allows you to point an instance on your own customer container type."}]},{"name":"Note","content":[{"inlineContent":[{"type":"text","text":"The @Injected property wrapper will be resolved on "},{"inlineContent":[{"type":"text","text":"initialization"}],"type":"strong"},{"text":". In the above example","type":"text"},{"type":"text","text":" "},{"text":"the referenced dependencies will be acquired when the parent class is created.","type":"text"}],"type":"paragraph"}],"style":"note","type":"aside"}]}],"kind":"symbol","topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-7xpmb","doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-9sxzk"],"title":"Initializers"},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Injected\/factory","doc:\/\/Factory\/documentation\/Factory\/Injected\/projectedValue","doc:\/\/Factory\/documentation\/Factory\/Injected\/wrappedValue"]},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Injected\/resolve(reset:)"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Injected"},"references":{"doc://Factory/documentation/Factory/Injected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"title":"Injected","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]},"doc://Factory/documentation/Factory/Injected/init(_:)-7xpmb":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-7xpmb","type":"topic","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"KeyPath","preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"Container","kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC"},{"text":", ","kind":"text"},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"title":"init(_:)","abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on initialization.","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/injected\/init(_:)-7xpmb","role":"symbol"},"doc://Factory/documentation/Factory/Injected/wrappedValue":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/injected\/wrappedvalue","title":"wrappedValue","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/wrappedValue","abstract":[{"text":"Manages the wrapped dependency.","type":"text"}],"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"wrappedValue","kind":"identifier"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory/Injected/resolve(reset:)":{"title":"resolve(reset:)","kind":"symbol","url":"\/documentation\/factory\/injected\/resolve(reset:)","type":"topic","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/resolve(reset:)","abstract":[{"text":"Allows the user to force a Factory resolution at their discretion.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"text":"(","kind":"text"},{"text":"reset","kind":"externalParam"},{"kind":"text","text":": "},{"text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier"},{"text":")","kind":"text"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Injected/projectedValue":{"type":"topic","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"projectedValue","kind":"identifier"},{"kind":"text","text":": "},{"text":"Injected","preciseIdentifier":"s:7Factory8InjectedV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/projectedValue","url":"\/documentation\/factory\/injected\/projectedvalue","title":"projectedValue","kind":"symbol","abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}]},"doc://Factory/documentation/Factory/Injected/factory":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/injected\/factory","title":"factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/factory","abstract":[{"type":"text","text":"Grants access to the internal 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":">"}]},"doc://Factory/documentation/Factory/Injected/init(_:)-9sxzk":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/injected\/init(_:)-9sxzk","title":"init(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-9sxzk","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"fragments":[{"text":"init","kind":"identifier"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}]}}} \ No newline at end of file +{"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"navigatorTitle":[{"text":"Injected","kind":"identifier"}],"title":"Injected","role":"symbol","externalID":"s:7Factory8InjectedV","roleHeading":"Structure","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Injected"}],"modules":[{"name":"Factory"}],"symbolKind":"struct"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@propertyWrapper"},{"text":" ","kind":"text"},{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Injected","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">"}],"languages":["swift"],"platforms":["macOS"]}]},{"content":[{"text":"Overview","level":2,"type":"heading","anchor":"overview"},{"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 {"," @Injected(\\.myService) var service1"," @Injected(\\MyCustomContainer.myService) var service2","}"],"syntax":"swift","type":"codeListing"},{"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"},{"text":" ","type":"text"},{"text":"allows you to point an instance of your own custom container type.","type":"text"}],"type":"paragraph"},{"type":"aside","content":[{"inlineContent":[{"type":"text","text":"The @Injected property wrapper will be resolved on "},{"inlineContent":[{"type":"text","text":"initialization"}],"type":"strong"},{"text":". In the above example","type":"text"},{"text":" ","type":"text"},{"text":"the referenced dependencies will be acquired when the parent class is created.","type":"text"}],"type":"paragraph"}],"name":"Note","style":"note"}],"kind":"content"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injected"]}],"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-7xpmb","doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-9sxzk"]},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Injected\/factory","doc:\/\/Factory\/documentation\/Factory\/Injected\/projectedValue","doc:\/\/Factory\/documentation\/Factory\/Injected\/wrappedValue"]},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Injected\/resolve(reset:)"],"title":"Instance Methods"}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Injected/wrappedValue":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/wrappedValue","title":"wrappedValue","url":"\/documentation\/factory\/injected\/wrappedvalue","kind":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"wrappedValue","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"type":"topic","role":"symbol","abstract":[{"type":"text","text":"Manages the wrapped dependency."}]},"doc://Factory/documentation/Factory/Injected/init(_:)-9sxzk":{"type":"topic","title":"init(_:)","kind":"symbol","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"url":"\/documentation\/factory\/injected\/init(_:)-9sxzk","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-9sxzk","role":"symbol","fragments":[{"text":"init","kind":"identifier"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"text":">(","kind":"text"},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"kind":"text","text":", "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}]},"doc://Factory/documentation/Factory/Injected/init(_:)-7xpmb":{"type":"topic","title":"init(_:)","url":"\/documentation\/factory\/injected\/init(_:)-7xpmb","abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on initialization.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-7xpmb","kind":"symbol","role":"symbol","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"text":"<","kind":"text"},{"text":"Container","preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}]},"doc://Factory/documentation/Factory/Injected/projectedValue":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/projectedValue","kind":"symbol","abstract":[{"text":"Unwraps the property wrapper granting access to the resolve\/reset function.","type":"text"}],"role":"symbol","title":"projectedValue","url":"\/documentation\/factory\/injected\/projectedvalue","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"projectedValue"},{"text":": ","kind":"text"},{"text":"Injected","preciseIdentifier":"s:7Factory8InjectedV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}]},"doc://Factory/documentation/Factory/Injected/resolve(reset:)":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/resolve(reset:)","kind":"symbol","abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"role":"symbol","title":"resolve(reset:)","url":"\/documentation\/factory\/injected\/resolve(reset:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"reset"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","kind":"typeIdentifier"},{"text":")","kind":"text"}]},"doc://Factory/documentation/Factory/Injected":{"navigatorTitle":[{"text":"Injected","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"role":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}]},"doc://Factory/documentation/Factory/Injected/factory":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/factory","kind":"symbol","abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"role":"symbol","title":"factory","url":"\/documentation\/factory\/injected\/factory","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"factory","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}]}}} \ 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 02dc8bbc..44f9824b 100644 --- a/docs/data/documentation/factory/injected/factory.json +++ b/docs/data/documentation/factory/injected/factory.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"variants":[{"paths":["\/documentation\/factory\/injected\/factory"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","metadata":{"title":"factory","externalID":"s:7Factory8InjectedV7factoryA2AVyxGvp","symbolKind":"property","roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"role":"symbol","modules":[{"name":"Factory"}]},"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"factory","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"> { "},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}],"platforms":["macOS"]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/factory","interfaceLanguage":"swift"},"abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"schemaVersion":{"patch":0,"minor":3,"major":0},"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Injected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"title":"Injected","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]},"doc://Factory/documentation/Factory/Injected/factory":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/injected\/factory","title":"factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/factory","abstract":[{"type":"text","text":"Grants access to the internal 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":">"}]},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"factory"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"> { "},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/factory","interfaceLanguage":"swift"},"metadata":{"title":"factory","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"roleHeading":"Instance Property","externalID":"s:7Factory8InjectedV7factoryA2AVyxGvp","modules":[{"name":"Factory"}],"symbolKind":"property","role":"symbol"},"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"paths":["\/documentation\/factory\/injected\/factory"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"kind":"symbol","sections":[],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Injected/factory":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/factory","kind":"symbol","abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"role":"symbol","title":"factory","url":"\/documentation\/factory\/injected\/factory","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"factory","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}]},"doc://Factory/documentation/Factory/Injected":{"navigatorTitle":[{"text":"Injected","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"role":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}]},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"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 70c4b695..65c1631d 100644 --- a/docs/data/documentation/factory/injected/init(_:)-7xpmb.json +++ b/docs/data/documentation/factory/injected/init(_:)-7xpmb.json @@ -1 +1 @@ -{"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injected\/init(_:)-7xpmb"]}],"metadata":{"role":"symbol","externalID":"s:7Factory8InjectedVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc","modules":[{"name":"Factory"}],"title":"init(_:)","roleHeading":"Initializer","symbolKind":"init","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"init","kind":"keyword"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"keyPath","kind":"internalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier","text":"KeyPath"},{"text":"<","kind":"text"},{"text":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}]}]},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"inlineContent":[{"text":"KeyPath to a Factory on the default Container.","type":"text"}],"type":"paragraph"}]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-7xpmb","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","navigatorTitle":[{"text":"Container","kind":"identifier"}],"title":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"role":"symbol","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/Injected/init(_:)-7xpmb":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-7xpmb","type":"topic","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"KeyPath","preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"Container","kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC"},{"text":", ","kind":"text"},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"title":"init(_:)","abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on initialization.","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/injected\/init(_:)-7xpmb","role":"symbol"},"doc://Factory/documentation/Factory/Injected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"title":"Injected","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-7xpmb","interfaceLanguage":"swift"},"metadata":{"title":"init(_:)","roleHeading":"Initializer","modules":[{"name":"Factory"}],"fragments":[{"kind":"identifier","text":"init"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC","text":"Container"},{"text":", ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"symbolKind":"init","role":"symbol","externalID":"s:7Factory8InjectedVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"init","kind":"keyword"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"keyPath","kind":"internalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","text":"Container"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}]},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"type":"paragraph","inlineContent":[{"text":"KeyPath to a Factory on the default Container.","type":"text"}]}]}]}],"sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injected\/init(_:)-7xpmb"]}],"kind":"symbol","references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Injected/init(_:)-7xpmb":{"type":"topic","title":"init(_:)","url":"\/documentation\/factory\/injected\/init(_:)-7xpmb","abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on initialization.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-7xpmb","kind":"symbol","role":"symbol","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"text":"<","kind":"text"},{"text":"Container","preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}]},"doc://Factory/documentation/Factory/Container":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","title":"Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"url":"\/documentation\/factory\/container","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}],"navigatorTitle":[{"text":"Container","kind":"identifier"}]},"doc://Factory/documentation/Factory/Injected":{"navigatorTitle":[{"text":"Injected","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"role":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injected/init(_:)-9sxzk.json b/docs/data/documentation/factory/injected/init(_:)-9sxzk.json index 10a5a924..a60a2c93 100644 --- a/docs/data/documentation/factory/injected/init(_:)-9sxzk.json +++ b/docs/data/documentation/factory/injected/init(_:)-9sxzk.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"variants":[{"paths":["\/documentation\/factory\/injected\/init(_:)-9sxzk"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","metadata":{"title":"init(_:)","externalID":"s:7Factory8InjectedVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc","roleHeading":"Initializer","symbolKind":"init","fragments":[{"kind":"identifier","text":"init"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"text":">(","kind":"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"},{"kind":"text","text":">>)"}],"role":"symbol","modules":[{"name":"Factory"}]},"sections":[],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"<"},{"text":"C","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"keyPath","kind":"internalParam"},{"kind":"text","text":": "},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">>) ","kind":"text"},{"text":"where","kind":"keyword"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":" : "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","preciseIdentifier":"s:7Factory15SharedContainerP","text":"SharedContainer","kind":"typeIdentifier"}],"languages":["swift"]}],"kind":"declarations"},{"parameters":[{"content":[{"type":"paragraph","inlineContent":[{"text":"KeyPath to a Factory on the specified Container.","type":"text"}]}],"name":"keyPath"}],"kind":"parameters"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-9sxzk","interfaceLanguage":"swift"},"abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on initialization.","type":"text"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/Injected/init(_:)-9sxzk":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/injected\/init(_:)-9sxzk","title":"init(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-9sxzk","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"fragments":[{"text":"init","kind":"identifier"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}]},"doc://Factory/documentation/Factory/Injected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"title":"Injected","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]},"doc://Factory/documentation/Factory/SharedContainer":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/sharedcontainer","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"title":"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."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"SharedContainer","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"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":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"<"},{"text":"C","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"externalParam","text":"_"},{"kind":"text","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"},{"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"},{"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"]}]},{"parameters":[{"name":"keyPath","content":[{"inlineContent":[{"type":"text","text":"KeyPath to a Factory on the specified Container."}],"type":"paragraph"}]}],"kind":"parameters"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injected\/init(_:)-9sxzk"]}],"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Initializer","symbolKind":"init","title":"init(_:)","fragments":[{"kind":"identifier","text":"init"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}],"externalID":"s:7Factory8InjectedVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc","role":"symbol"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-9sxzk","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/Injected":{"navigatorTitle":[{"text":"Injected","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"role":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/SharedContainer":{"url":"\/documentation\/factory\/sharedcontainer","type":"topic","abstract":[{"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.","type":"text"}],"title":"SharedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"SharedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}]},"doc://Factory/documentation/Factory/Injected/init(_:)-9sxzk":{"type":"topic","title":"init(_:)","kind":"symbol","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"url":"\/documentation\/factory\/injected\/init(_:)-9sxzk","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/init(_:)-9sxzk","role":"symbol","fragments":[{"text":"init","kind":"identifier"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"text":">(","kind":"text"},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"kind":"text","text":", "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}]}}} \ 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 b44f34a1..c45e49be 100644 --- a/docs/data/documentation/factory/injected/projectedvalue.json +++ b/docs/data/documentation/factory/injected/projectedvalue.json @@ -1 +1 @@ -{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/projectedValue"},"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injected\/projectedvalue"]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"metadata":{"modules":[{"name":"Factory"}],"symbolKind":"property","title":"projectedValue","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"projectedValue","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Injected","preciseIdentifier":"s:7Factory8InjectedV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"roleHeading":"Instance Property","externalID":"s:7Factory8InjectedV14projectedValueACyxGvp","role":"symbol"},"sections":[],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"projectedValue","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","text":"Injected","preciseIdentifier":"s:7Factory8InjectedV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":"> { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"set"},{"text":" }","kind":"text"}]}],"kind":"declarations"}],"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Injected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"title":"Injected","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]},"doc://Factory/documentation/Factory/Injected/projectedValue":{"type":"topic","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"projectedValue","kind":"identifier"},{"kind":"text","text":": "},{"text":"Injected","preciseIdentifier":"s:7Factory8InjectedV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/projectedValue","url":"\/documentation\/factory\/injected\/projectedvalue","title":"projectedValue","kind":"symbol","abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}]}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"projectedValue"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","text":"Injected","preciseIdentifier":"s:7Factory8InjectedV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"> { ","kind":"text"},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"text":" }","kind":"text"}],"languages":["swift"]}],"kind":"declarations"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/projectedValue"},"metadata":{"roleHeading":"Instance Property","modules":[{"name":"Factory"}],"symbolKind":"property","externalID":"s:7Factory8InjectedV14projectedValueACyxGvp","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"projectedValue","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Injected","preciseIdentifier":"s:7Factory8InjectedV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"title":"projectedValue"},"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/injected\/projectedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"text":"Unwraps the property wrapper granting access to the resolve\/reset function.","type":"text"}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Injected/projectedValue":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/projectedValue","kind":"symbol","abstract":[{"text":"Unwraps the property wrapper granting access to the resolve\/reset function.","type":"text"}],"role":"symbol","title":"projectedValue","url":"\/documentation\/factory\/injected\/projectedvalue","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"projectedValue"},{"text":": ","kind":"text"},{"text":"Injected","preciseIdentifier":"s:7Factory8InjectedV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}]},"doc://Factory/documentation/Factory/Injected":{"navigatorTitle":[{"text":"Injected","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"role":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}]}}} \ 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 6331fa5d..cb268e47 100644 --- a/docs/data/documentation/factory/injected/resolve(reset:).json +++ b/docs/data/documentation/factory/injected/resolve(reset:).json @@ -1 +1 @@ -{"sections":[],"variants":[{"paths":["\/documentation\/factory\/injected\/resolve(reset:)"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"role":"symbol","externalID":"s:7Factory8InjectedV7resolve5resetyAA0A12ResetOptionsO_tF","modules":[{"name":"Factory"}],"title":"resolve(reset:)","roleHeading":"Instance Method","symbolKind":"method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"reset"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","kind":"typeIdentifier"},{"kind":"text","text":")"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"abstract":[{"text":"Allows the user to force a Factory resolution at their discretion.","type":"text"}],"schemaVersion":{"patch":0,"minor":3,"major":0},"kind":"symbol","primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"mutating","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"reset"},{"kind":"text","text":" "},{"text":"options","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier"},{"text":" = .none)","kind":"text"}]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/resolve(reset:)","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/Injected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"title":"Injected","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Injected/resolve(reset:)":{"title":"resolve(reset:)","kind":"symbol","url":"\/documentation\/factory\/injected\/resolve(reset:)","type":"topic","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/resolve(reset:)","abstract":[{"text":"Allows the user to force a Factory resolution at their discretion.","type":"text"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"text":"(","kind":"text"},{"text":"reset","kind":"externalParam"},{"kind":"text","text":": "},{"text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier"},{"text":")","kind":"text"}]},"doc://Factory/documentation/Factory/FactoryResetOptions":{"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"title":"FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}]}}} \ No newline at end of file +{"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/resolve(reset:)","interfaceLanguage":"swift"},"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/injected\/resolve(reset:)"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"sections":[],"metadata":{"role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"("},{"text":"reset","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":")"}],"title":"resolve(reset:)","modules":[{"name":"Factory"}],"externalID":"s:7Factory8InjectedV7resolve5resetyAA0A12ResetOptionsO_tF","roleHeading":"Instance Method","symbolKind":"method"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"mutating"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolve"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"reset"},{"text":" ","kind":"text"},{"text":"options","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":" = .none)"}]}]}],"references":{"doc://Factory/documentation/Factory/Injected/resolve(reset:)":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/resolve(reset:)","kind":"symbol","abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"role":"symbol","title":"resolve(reset:)","url":"\/documentation\/factory\/injected\/resolve(reset:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"reset"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","kind":"typeIdentifier"},{"text":")","kind":"text"}]},"doc://Factory/documentation/Factory/FactoryResetOptions":{"title":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","type":"topic","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Injected":{"navigatorTitle":[{"text":"Injected","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"role":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 3cfb0b2a..0fcc608b 100644 --- a/docs/data/documentation/factory/injected/wrappedvalue.json +++ b/docs/data/documentation/factory/injected/wrappedvalue.json @@ -1 +1 @@ -{"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injected\/wrappedvalue"]}],"abstract":[{"text":"Manages the wrapped dependency.","type":"text"}],"sections":[],"metadata":{"roleHeading":"Instance Property","title":"wrappedValue","role":"symbol","externalID":"s:7Factory8InjectedV12wrappedValuexvp","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"}],"modules":[{"name":"Factory"}],"symbolKind":"property"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/wrappedValue","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":" { "},{"text":"get","kind":"keyword"},{"text":" ","kind":"text"},{"text":"set","kind":"keyword"},{"text":" }","kind":"text"}],"languages":["swift"]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory/Injected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"title":"Injected","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]},"doc://Factory/documentation/Factory/Injected/wrappedValue":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/injected\/wrappedvalue","title":"wrappedValue","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/wrappedValue","abstract":[{"text":"Manages the wrapped dependency.","type":"text"}],"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"wrappedValue","kind":"identifier"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"variants":[{"paths":["\/documentation\/factory\/injected\/wrappedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"externalID":"s:7Factory8InjectedV12wrappedValuexvp","roleHeading":"Instance Property","symbolKind":"property","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"wrappedValue","kind":"identifier"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"}],"modules":[{"name":"Factory"}],"role":"symbol","title":"wrappedValue"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Injected"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"wrappedValue"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"text":" ","kind":"text"},{"text":"set","kind":"keyword"},{"text":" }","kind":"text"}],"platforms":["macOS"]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Injected\/wrappedValue"},"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"sections":[],"kind":"symbol","schemaVersion":{"minor":3,"major":0,"patch":0},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Injected":{"navigatorTitle":[{"text":"Injected","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"role":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}]},"doc://Factory/documentation/Factory/Injected/wrappedValue":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected\/wrappedValue","title":"wrappedValue","url":"\/documentation\/factory\/injected\/wrappedvalue","kind":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"wrappedValue","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"type":"topic","role":"symbol","abstract":[{"type":"text","text":"Manages the wrapped dependency."}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injectedobject.json b/docs/data/documentation/factory/injectedobject.json index a4baaf68..63fb4005 100644 --- a/docs/data/documentation/factory/injectedobject.json +++ b/docs/data/documentation/factory/injectedobject.json @@ -1 +1 @@ -{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject"},"abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"sections":[],"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"]},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations"],"title":"Default Implementations","generated":true}],"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","metadata":{"platforms":[{"name":"iOS","unavailable":false,"introducedAt":"14.0","beta":false,"deprecated":false},{"deprecated":false,"unavailable":false,"name":"macOS","beta":false,"introducedAt":"11.0"},{"beta":false,"name":"tvOS","deprecated":false,"introducedAt":"14.0","unavailable":false},{"unavailable":false,"name":"watchOS","beta":false,"introducedAt":"7.0","deprecated":false}],"roleHeading":"Structure","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"role":"symbol","title":"InjectedObject","modules":[{"name":"Factory"}],"externalID":"s:7Factory14InjectedObjectV","symbolKind":"struct","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"InjectedObject","kind":"identifier"}]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"@","kind":"attribute"},{"preciseIdentifier":"s:ScM","text":"MainActor","kind":"attribute"},{"kind":"text","text":" "},{"kind":"attribute","text":"@frozen"},{"text":" ","kind":"text"},{"kind":"attribute","text":"@propertyWrapper"},{"text":" ","kind":"text"},{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"InjectedObject","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":"> ","kind":"text"},{"text":"where","kind":"keyword"},{"text":" ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":" : ","kind":"text"},{"text":"ObservableObject","preciseIdentifier":"s:7Combine16ObservableObjectP","kind":"typeIdentifier"}],"languages":["swift"]}]},{"kind":"content","content":[{"type":"heading","anchor":"overview","level":2,"text":"Overview"},{"inlineContent":[{"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"},{"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. Updating object state will trigger view update."}],"type":"paragraph"},{"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"},{"syntax":"swift","type":"codeListing","code":["extension Container {"," var contentViewModel: Factory {"," self { ContentViewModel() }"," }","}"]}]}],"relationshipsSections":[{"kind":"relationships","title":"Conforms To","type":"conformsTo","identifiers":["doc:\/\/Factory\/s8SendableP","doc:\/\/Factory\/7SwiftUI15DynamicPropertyP"]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedobject"]}],"references":{"doc://Factory/documentation/Factory/InjectedObject/projectedValue":{"title":"projectedValue","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"projectedValue","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7SwiftUI14ObservedObjectV","text":"ObservedObject"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">."},{"preciseIdentifier":"s:7SwiftUI14ObservedObjectV7WrapperV","text":"Wrapper","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/injectedobject\/projectedvalue","abstract":[{"text":"Manages the wrapped dependency.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/projectedValue","type":"topic","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-8lxkh":{"abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on initialization.","type":"text"}],"title":"init(_:)","type":"topic","kind":"symbol","role":"symbol","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"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-8lxkh","url":"\/documentation\/factory\/injectedobject\/init(_:)-8lxkh"},"doc://Factory/documentation/Factory/InjectedObject":{"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","role":"symbol","title":"InjectedObject"},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-7dlth":{"abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on initialization.","type":"text"}],"title":"init(_:)","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"text":"<","kind":"text"},{"preciseIdentifier":"s:7Factory9ContainerC","text":"Container","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-7dlth","url":"\/documentation\/factory\/injectedobject\/init(_:)-7dlth"},"doc://Factory/documentation/Factory/InjectedObject/wrappedValue":{"kind":"symbol","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/injectedobject\/wrappedvalue","abstract":[{"text":"Manages the wrapped dependency.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/wrappedValue","role":"symbol","title":"wrappedValue"},"doc://Factory/7SwiftUI15DynamicPropertyP":{"identifier":"doc:\/\/Factory\/7SwiftUI15DynamicPropertyP","title":"SwiftUI.DynamicProperty","type":"unresolvable"},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-4awwf":{"fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":")"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-4awwf","role":"symbol","conformance":{"availabilityPrefix":[{"text":"Available when","type":"text"}],"conformancePrefix":[{"text":"Conforms when","type":"text"}],"constraints":[{"code":"T","type":"codeVoice"},{"text":" conforms to ","type":"text"},{"type":"codeVoice","code":"ObservableObject"},{"type":"text","text":"."}]},"kind":"symbol","title":"init(_:)","abstract":[{"type":"text","text":"Simple initializer with passed parameter bypassing injection."}],"url":"\/documentation\/factory\/injectedobject\/init(_:)-4awwf"},"doc://Factory/s8SendableP":{"identifier":"doc:\/\/Factory\/s8SendableP","title":"Swift.Sendable","type":"unresolvable"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/InjectedObject/DynamicProperty-Implementations":{"type":"topic","title":"DynamicProperty Implementations","abstract":[],"role":"collectionGroup","kind":"article","url":"\/documentation\/factory\/injectedobject\/dynamicproperty-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations"}}} \ No newline at end of file +{"metadata":{"externalID":"s:7Factory14InjectedObjectV","title":"InjectedObject","role":"symbol","platforms":[{"introducedAt":"14.0","unavailable":false,"beta":false,"deprecated":false,"name":"iOS"},{"deprecated":false,"name":"macOS","introducedAt":"11.0","unavailable":false,"beta":false},{"introducedAt":"14.0","beta":false,"unavailable":false,"name":"tvOS","deprecated":false},{"deprecated":false,"unavailable":false,"beta":false,"name":"watchOS","introducedAt":"7.0"}],"roleHeading":"Structure","symbolKind":"struct","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"InjectedObject","kind":"identifier"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"modules":[{"name":"Factory"}]},"abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"relationshipsSections":[{"title":"Conforms To","identifiers":["doc:\/\/Factory\/s8SendableP","doc:\/\/Factory\/7SwiftUI15DynamicPropertyP"],"kind":"relationships","type":"conformsTo"}],"variants":[{"paths":["\/documentation\/factory\/injectedobject"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"patch":0,"minor":3,"major":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"@","kind":"attribute"},{"preciseIdentifier":"s:ScM","kind":"attribute","text":"MainActor"},{"text":" ","kind":"text"},{"kind":"attribute","text":"@frozen"},{"text":" ","kind":"text"},{"kind":"attribute","text":"@propertyWrapper"},{"text":" ","kind":"text"},{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"InjectedObject","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"text":"> ","kind":"text"},{"text":"where","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":" : ","kind":"text"},{"preciseIdentifier":"s:7Combine16ObservableObjectP","text":"ObservableObject","kind":"typeIdentifier"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"type":"heading","level":2,"text":"Overview","anchor":"overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This wrapper is meant for use in SwiftUI Views and exposes bindable objects similar to that of SwiftUI @StateObject"},{"type":"text","text":" "},{"type":"text","text":"and @EnvironmentObject."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Like the other Injected property wrappers, InjectedObject wraps obtains the dependency from the Factory keypath"},{"text":" ","type":"text"},{"type":"text","text":"and provides it to a wrapped instance of StateObject. Updating object state will trigger view update."}]},{"code":["struct ContentView: View {"," @InjectedObject(\\.contentViewModel) var model"," var body: some View {"," ..."," }","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"code":["extension Container {"," var contentViewModel: Factory {"," self { ContentViewModel() }"," }","}"],"syntax":"swift","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"]},{"generated":true,"title":"Default Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations"]}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","interfaceLanguage":"swift"},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"references":{"doc://Factory/documentation/Factory/InjectedObject/projectedValue":{"role":"symbol","abstract":[{"text":"Manages the wrapped dependency.","type":"text"}],"url":"\/documentation\/factory\/injectedobject\/projectedvalue","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/projectedValue","title":"projectedValue","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"projectedValue","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ObservedObject","preciseIdentifier":"s:7SwiftUI14ObservedObjectV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">.","kind":"text"},{"preciseIdentifier":"s:7SwiftUI14ObservedObjectV7WrapperV","kind":"typeIdentifier","text":"Wrapper"}]},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-7dlth":{"fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier","text":"Container"},{"kind":"text","text":", "},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"kind":"symbol","type":"topic","title":"init(_:)","url":"\/documentation\/factory\/injectedobject\/init(_:)-7dlth","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-7dlth","role":"symbol","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}]},"doc://Factory/7SwiftUI15DynamicPropertyP":{"identifier":"doc:\/\/Factory\/7SwiftUI15DynamicPropertyP","type":"unresolvable","title":"SwiftUI.DynamicProperty"},"doc://Factory/documentation/Factory/InjectedObject/DynamicProperty-Implementations":{"kind":"article","type":"topic","title":"DynamicProperty Implementations","url":"\/documentation\/factory\/injectedobject\/dynamicproperty-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations","role":"collectionGroup","abstract":[]},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","title":"InjectedObject","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}]},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-8lxkh":{"fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"<"},{"text":"C","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}],"kind":"symbol","type":"topic","title":"init(_:)","url":"\/documentation\/factory\/injectedobject\/init(_:)-8lxkh","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-8lxkh","role":"symbol","abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on initialization.","type":"text"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/InjectedObject/wrappedValue":{"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"wrappedValue","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"T"}],"kind":"symbol","type":"topic","title":"wrappedValue","url":"\/documentation\/factory\/injectedobject\/wrappedvalue","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/wrappedValue","role":"symbol","abstract":[{"text":"Manages the wrapped dependency.","type":"text"}]},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-4awwf":{"fragments":[{"kind":"identifier","text":"init"},{"text":"(","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":")","kind":"text"}],"kind":"symbol","type":"topic","title":"init(_:)","url":"\/documentation\/factory\/injectedobject\/init(_:)-4awwf","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-4awwf","conformance":{"constraints":[{"type":"codeVoice","code":"T"},{"text":" conforms to ","type":"text"},{"code":"ObservableObject","type":"codeVoice"},{"text":".","type":"text"}],"availabilityPrefix":[{"type":"text","text":"Available when"}],"conformancePrefix":[{"type":"text","text":"Conforms when"}]},"role":"symbol","abstract":[{"text":"Simple initializer with passed parameter bypassing injection.","type":"text"}]},"doc://Factory/s8SendableP":{"identifier":"doc:\/\/Factory\/s8SendableP","title":"Swift.Sendable","type":"unresolvable"}}} \ 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 9f812ead..33da62fa 100644 --- a/docs/data/documentation/factory/injectedobject/dynamicproperty-implementations.json +++ b/docs/data/documentation/factory/injectedobject/dynamicproperty-implementations.json @@ -1 +1 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations","interfaceLanguage":"swift"},"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedobject\/dynamicproperty-implementations"]}],"kind":"article","sections":[],"topicSections":[{"generated":true,"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/update()"]}],"metadata":{"role":"collectionGroup","roleHeading":"API Collection","modules":[{"name":"Factory"}],"title":"DynamicProperty Implementations"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/InjectedObject":{"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","role":"symbol","title":"InjectedObject"},"doc://Factory/documentation/Factory/InjectedObject/update()":{"title":"update()","abstract":[],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"update","kind":"identifier"},{"text":"()","kind":"text"}],"kind":"symbol","url":"\/documentation\/factory\/injectedobject\/update()","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/update()","type":"topic"}}} \ No newline at end of file +{"metadata":{"roleHeading":"API Collection","modules":[{"name":"Factory"}],"role":"collectionGroup","title":"DynamicProperty Implementations"},"topicSections":[{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/update()"],"generated":true}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"kind":"article","schemaVersion":{"minor":3,"major":0,"patch":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedobject\/dynamicproperty-implementations"]}],"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations"},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","title":"InjectedObject","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}]},"doc://Factory/documentation/Factory/InjectedObject/update()":{"abstract":[],"role":"symbol","title":"update()","url":"\/documentation\/factory\/injectedobject\/update()","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/update()","type":"topic","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"update"},{"text":"()","kind":"text"}]}}} \ 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 9566cd9b..6eb098d3 100644 --- a/docs/data/documentation/factory/injectedobject/init(_:)-4awwf.json +++ b/docs/data/documentation/factory/injectedobject/init(_:)-4awwf.json @@ -1 +1 @@ -{"abstract":[{"type":"text","text":"Simple initializer with passed parameter bypassing injection."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"wrappedValue","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":")"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"type":"heading","anchor":"discussion","text":"Discussion","level":2},{"inlineContent":[{"text":"Still has issue with attempting to pass dependency into existing view when existing InjectedObject has keyPath.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"https:\/\/forums.swift.org\/t\/allow-property-wrappers-with-multiple-arguments-to-defer-initialization-when-wrappedvalue-is-not-specified"}],"type":"paragraph"}]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedobject\/init(_:)-4awwf"]}],"kind":"symbol","metadata":{"modules":[{"name":"Factory"}],"extendedModule":"Factory","platforms":[{"name":"iOS","unavailable":false,"introducedAt":"14.0","beta":false,"deprecated":false},{"deprecated":false,"name":"macOS","introducedAt":"11.0","beta":false,"unavailable":false},{"introducedAt":"14.0","name":"tvOS","unavailable":false,"beta":false,"deprecated":false},{"introducedAt":"7.0","unavailable":false,"beta":false,"name":"watchOS","deprecated":false}],"roleHeading":"Initializer","role":"symbol","externalID":"s:7Factory14InjectedObjectVyACyxGxcfc","conformance":{"availabilityPrefix":[{"type":"text","text":"Available when"}],"constraints":[{"type":"codeVoice","code":"T"},{"text":" conforms to ","type":"text"},{"code":"ObservableObject","type":"codeVoice"},{"type":"text","text":"."}],"conformancePrefix":[{"text":"Conforms when","type":"text"}]},"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"text":"T","kind":"typeIdentifier"},{"text":")","kind":"text"}],"title":"init(_:)","symbolKind":"init"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-4awwf","interfaceLanguage":"swift"},"sections":[],"references":{"doc://Factory/documentation/Factory/InjectedObject/init(_:)-4awwf":{"fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":")"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-4awwf","role":"symbol","conformance":{"availabilityPrefix":[{"text":"Available when","type":"text"}],"conformancePrefix":[{"text":"Conforms when","type":"text"}],"constraints":[{"code":"T","type":"codeVoice"},{"text":" conforms to ","type":"text"},{"type":"codeVoice","code":"ObservableObject"},{"type":"text","text":"."}]},"kind":"symbol","title":"init(_:)","abstract":[{"type":"text","text":"Simple initializer with passed parameter bypassing injection."}],"url":"\/documentation\/factory\/injectedobject\/init(_:)-4awwf"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/InjectedObject":{"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","role":"symbol","title":"InjectedObject"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"metadata":{"externalID":"s:7Factory14InjectedObjectVyACyxGxcfc","role":"symbol","platforms":[{"name":"iOS","introducedAt":"14.0","deprecated":false,"unavailable":false,"beta":false},{"deprecated":false,"beta":false,"name":"macOS","unavailable":false,"introducedAt":"11.0"},{"deprecated":false,"name":"tvOS","unavailable":false,"beta":false,"introducedAt":"14.0"},{"unavailable":false,"name":"watchOS","beta":false,"introducedAt":"7.0","deprecated":false}],"roleHeading":"Initializer","conformance":{"conformancePrefix":[{"type":"text","text":"Conforms when"}],"availabilityPrefix":[{"type":"text","text":"Available when"}],"constraints":[{"code":"T","type":"codeVoice"},{"text":" conforms to ","type":"text"},{"type":"codeVoice","code":"ObservableObject"},{"type":"text","text":"."}]},"fragments":[{"kind":"identifier","text":"init"},{"text":"(","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":")"}],"extendedModule":"Factory","modules":[{"name":"Factory"}],"symbolKind":"init","title":"init(_:)"},"abstract":[{"text":"Simple initializer with passed parameter bypassing injection.","type":"text"}],"kind":"symbol","sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedobject\/init(_:)-4awwf"]}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"init","kind":"keyword"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":")"}]}],"kind":"declarations"},{"kind":"content","content":[{"level":2,"anchor":"discussion","text":"Discussion","type":"heading"},{"type":"paragraph","inlineContent":[{"text":"Still has issue with attempting to pass dependency into existing view when existing InjectedObject has keyPath.","type":"text"},{"text":" ","type":"text"},{"text":"https:\/\/forums.swift.org\/t\/allow-property-wrappers-with-multiple-arguments-to-defer-initialization-when-wrappedvalue-is-not-specified","type":"text"}]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-4awwf","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","title":"InjectedObject","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}]},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-4awwf":{"fragments":[{"kind":"identifier","text":"init"},{"text":"(","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":")","kind":"text"}],"kind":"symbol","type":"topic","title":"init(_:)","url":"\/documentation\/factory\/injectedobject\/init(_:)-4awwf","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-4awwf","conformance":{"constraints":[{"type":"codeVoice","code":"T"},{"text":" conforms to ","type":"text"},{"code":"ObservableObject","type":"codeVoice"},{"text":".","type":"text"}],"availabilityPrefix":[{"type":"text","text":"Available when"}],"conformancePrefix":[{"type":"text","text":"Conforms when"}]},"role":"symbol","abstract":[{"text":"Simple initializer with passed parameter bypassing injection.","type":"text"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 7e7393e6..a7b28416 100644 --- a/docs/data/documentation/factory/injectedobject/init(_:)-7dlth.json +++ b/docs/data/documentation/factory/injectedobject/init(_:)-7dlth.json @@ -1 +1 @@ -{"variants":[{"paths":["\/documentation\/factory\/injectedobject\/init(_:)-7dlth"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-7dlth","interfaceLanguage":"swift"},"kind":"symbol","schemaVersion":{"minor":3,"patch":0,"major":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"init","kind":"keyword"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"keyPath"},{"text":": ","kind":"text"},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","text":"Container"},{"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"}],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"inlineContent":[{"type":"text","text":"KeyPath to a Factory on the default Container."}],"type":"paragraph"}]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on initialization.","type":"text"}],"sections":[],"metadata":{"role":"symbol","symbolKind":"init","roleHeading":"Initializer","title":"init(_:)","modules":[{"name":"Factory"}],"externalID":"s:7Factory14InjectedObjectVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier","text":"KeyPath"},{"kind":"text","text":"<"},{"preciseIdentifier":"s:7Factory9ContainerC","text":"Container","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}],"platforms":[{"deprecated":false,"introducedAt":"14.0","beta":false,"unavailable":false,"name":"iOS"},{"beta":false,"introducedAt":"11.0","deprecated":false,"unavailable":false,"name":"macOS"},{"introducedAt":"14.0","name":"tvOS","unavailable":false,"beta":false,"deprecated":false},{"deprecated":false,"introducedAt":"7.0","unavailable":false,"beta":false,"name":"watchOS"}]},"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/InjectedObject":{"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","role":"symbol","title":"InjectedObject"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-7dlth":{"abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on initialization.","type":"text"}],"title":"init(_:)","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"text":"<","kind":"text"},{"preciseIdentifier":"s:7Factory9ContainerC","text":"Container","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-7dlth","url":"\/documentation\/factory\/injectedobject\/init(_:)-7dlth"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","navigatorTitle":[{"text":"Container","kind":"identifier"}],"title":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"role":"symbol","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"}}} \ No newline at end of file +{"abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on initialization.","type":"text"}],"schemaVersion":{"major":0,"patch":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-7dlth","interfaceLanguage":"swift"},"sections":[],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"init","kind":"keyword"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"keyPath","kind":"internalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"Container","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"text":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}],"languages":["swift"]}],"kind":"declarations"},{"kind":"parameters","parameters":[{"content":[{"inlineContent":[{"text":"KeyPath to a Factory on the default Container.","type":"text"}],"type":"paragraph"}],"name":"keyPath"}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedobject\/init(_:)-7dlth"]}],"metadata":{"modules":[{"name":"Factory"}],"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"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}],"role":"symbol","symbolKind":"init","title":"init(_:)","roleHeading":"Initializer","externalID":"s:7Factory14InjectedObjectVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc","platforms":[{"unavailable":false,"introducedAt":"14.0","beta":false,"name":"iOS","deprecated":false},{"name":"macOS","beta":false,"deprecated":false,"introducedAt":"11.0","unavailable":false},{"beta":false,"introducedAt":"14.0","name":"tvOS","deprecated":false,"unavailable":false},{"introducedAt":"7.0","deprecated":false,"unavailable":false,"name":"watchOS","beta":false}]},"kind":"symbol","references":{"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","title":"InjectedObject","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}]},"doc://Factory/documentation/Factory/Container":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","title":"Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"url":"\/documentation\/factory\/container","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}],"navigatorTitle":[{"text":"Container","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-7dlth":{"fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier","text":"Container"},{"kind":"text","text":", "},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"kind":"symbol","type":"topic","title":"init(_:)","url":"\/documentation\/factory\/injectedobject\/init(_:)-7dlth","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-7dlth","role":"symbol","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}]}}} \ 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 20771200..640f7b49 100644 --- a/docs/data/documentation/factory/injectedobject/init(_:)-8lxkh.json +++ b/docs/data/documentation/factory/injectedobject/init(_:)-8lxkh.json @@ -1 +1 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-8lxkh","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedobject\/init(_:)-8lxkh"]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"sections":[],"metadata":{"fragments":[{"kind":"identifier","text":"init"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"text":">(","kind":"text"},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"symbolKind":"init","role":"symbol","title":"init(_:)","modules":[{"name":"Factory"}],"roleHeading":"Initializer","platforms":[{"beta":false,"deprecated":false,"unavailable":false,"introducedAt":"14.0","name":"iOS"},{"unavailable":false,"beta":false,"deprecated":false,"introducedAt":"11.0","name":"macOS"},{"unavailable":false,"introducedAt":"14.0","name":"tvOS","beta":false,"deprecated":false},{"beta":false,"unavailable":false,"deprecated":false,"name":"watchOS","introducedAt":"7.0"}],"externalID":"s:7Factory14InjectedObjectVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"init"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"C"},{"text":">(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"keyPath","kind":"internalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"C","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">>) ","kind":"text"},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"kind":"typeIdentifier","text":"C"},{"text":" : ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory15SharedContainerP","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","text":"SharedContainer"}],"languages":["swift"]}],"kind":"declarations"},{"kind":"parameters","parameters":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"KeyPath to a Factory on the specified Container."}]}],"name":"keyPath"}]}],"references":{"doc://Factory/documentation/Factory/InjectedObject":{"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","role":"symbol","title":"InjectedObject"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/SharedContainer":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/sharedcontainer","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"title":"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."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"SharedContainer","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-8lxkh":{"abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on initialization.","type":"text"}],"title":"init(_:)","type":"topic","kind":"symbol","role":"symbol","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"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-8lxkh","url":"\/documentation\/factory\/injectedobject\/init(_:)-8lxkh"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"init","kind":"keyword"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"C"},{"text":">(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"keyPath","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"KeyPath","preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"C"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>) "},{"text":"where","kind":"keyword"},{"text":" ","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"kind":"text","text":" : "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","preciseIdentifier":"s:7Factory15SharedContainerP","kind":"typeIdentifier","text":"SharedContainer"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"parameters":[{"name":"keyPath","content":[{"inlineContent":[{"text":"KeyPath to a Factory on the specified Container.","type":"text"}],"type":"paragraph"}]}],"kind":"parameters"}],"variants":[{"paths":["\/documentation\/factory\/injectedobject\/init(_:)-8lxkh"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-8lxkh","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"externalID":"s:7Factory14InjectedObjectVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc","symbolKind":"init","platforms":[{"name":"iOS","unavailable":false,"introducedAt":"14.0","deprecated":false,"beta":false},{"introducedAt":"11.0","deprecated":false,"unavailable":false,"beta":false,"name":"macOS"},{"beta":false,"introducedAt":"14.0","deprecated":false,"name":"tvOS","unavailable":false},{"name":"watchOS","introducedAt":"7.0","deprecated":false,"unavailable":false,"beta":false}],"title":"init(_:)","roleHeading":"Initializer","fragments":[{"kind":"identifier","text":"init"},{"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"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}],"modules":[{"name":"Factory"}],"role":"symbol"},"sections":[],"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency is resolved on initialization."}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/InjectedObject/init(_:)-8lxkh":{"fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"<"},{"text":"C","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}],"kind":"symbol","type":"topic","title":"init(_:)","url":"\/documentation\/factory\/injectedobject\/init(_:)-8lxkh","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/init(_:)-8lxkh","role":"symbol","abstract":[{"text":"Initializes the property wrapper. The dependency is resolved on initialization.","type":"text"}]},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","title":"InjectedObject","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}]},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/SharedContainer":{"url":"\/documentation\/factory\/sharedcontainer","type":"topic","abstract":[{"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.","type":"text"}],"title":"SharedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"SharedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}]}}} \ 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 11041fce..e0eac04c 100644 --- a/docs/data/documentation/factory/injectedobject/projectedvalue.json +++ b/docs/data/documentation/factory/injectedobject/projectedvalue.json @@ -1 +1 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/projectedValue","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedobject\/projectedvalue"]}],"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"schemaVersion":{"minor":3,"major":0,"patch":0},"kind":"symbol","metadata":{"platforms":[{"deprecated":false,"name":"iOS","beta":false,"unavailable":false,"introducedAt":"14.0"},{"deprecated":false,"unavailable":false,"name":"macOS","beta":false,"introducedAt":"11.0"},{"name":"tvOS","deprecated":false,"introducedAt":"14.0","unavailable":false,"beta":false},{"introducedAt":"7.0","name":"watchOS","deprecated":false,"unavailable":false,"beta":false}],"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7SwiftUI14ObservedObjectV","kind":"typeIdentifier","text":"ObservedObject"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">.","kind":"text"},{"text":"Wrapper","kind":"typeIdentifier","preciseIdentifier":"s:7SwiftUI14ObservedObjectV7WrapperV"}],"roleHeading":"Instance Property","modules":[{"name":"Factory"}],"title":"projectedValue","externalID":"s:7Factory14InjectedObjectV14projectedValue7SwiftUI08ObservedC0V7WrapperVyx_Gvp","role":"symbol","symbolKind":"property"},"sections":[],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"projectedValue","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7SwiftUI14ObservedObjectV","kind":"typeIdentifier","text":"ObservedObject"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">.","kind":"text"},{"text":"Wrapper","preciseIdentifier":"s:7SwiftUI14ObservedObjectV7WrapperV","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}],"languages":["swift"]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/InjectedObject/projectedValue":{"title":"projectedValue","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"projectedValue","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7SwiftUI14ObservedObjectV","text":"ObservedObject"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">."},{"preciseIdentifier":"s:7SwiftUI14ObservedObjectV7WrapperV","text":"Wrapper","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/injectedobject\/projectedvalue","abstract":[{"text":"Manages the wrapped dependency.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/projectedValue","type":"topic","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/InjectedObject":{"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","role":"symbol","title":"InjectedObject"}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedobject\/projectedvalue"]}],"metadata":{"externalID":"s:7Factory14InjectedObjectV14projectedValue7SwiftUI08ObservedC0V7WrapperVyx_Gvp","roleHeading":"Instance Property","role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"projectedValue","kind":"identifier"},{"text":": ","kind":"text"},{"text":"ObservedObject","kind":"typeIdentifier","preciseIdentifier":"s:7SwiftUI14ObservedObjectV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">.","kind":"text"},{"preciseIdentifier":"s:7SwiftUI14ObservedObjectV7WrapperV","text":"Wrapper","kind":"typeIdentifier"}],"platforms":[{"unavailable":false,"beta":false,"name":"iOS","deprecated":false,"introducedAt":"14.0"},{"beta":false,"deprecated":false,"name":"macOS","introducedAt":"11.0","unavailable":false},{"introducedAt":"14.0","deprecated":false,"name":"tvOS","beta":false,"unavailable":false},{"beta":false,"deprecated":false,"unavailable":false,"name":"watchOS","introducedAt":"7.0"}],"title":"projectedValue","modules":[{"name":"Factory"}],"symbolKind":"property"},"sections":[],"abstract":[{"text":"Manages the wrapped dependency.","type":"text"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/projectedValue","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"projectedValue","kind":"identifier"},{"kind":"text","text":": "},{"text":"ObservedObject","preciseIdentifier":"s:7SwiftUI14ObservedObjectV","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">.","kind":"text"},{"text":"Wrapper","preciseIdentifier":"s:7SwiftUI14ObservedObjectV7WrapperV","kind":"typeIdentifier"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}]}]}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","title":"InjectedObject","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/InjectedObject/projectedValue":{"role":"symbol","abstract":[{"text":"Manages the wrapped dependency.","type":"text"}],"url":"\/documentation\/factory\/injectedobject\/projectedvalue","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/projectedValue","title":"projectedValue","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"projectedValue","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"ObservedObject","preciseIdentifier":"s:7SwiftUI14ObservedObjectV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">.","kind":"text"},{"preciseIdentifier":"s:7SwiftUI14ObservedObjectV7WrapperV","kind":"typeIdentifier","text":"Wrapper"}]}}} \ 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 ebb00a8a..075b8e19 100644 --- a/docs/data/documentation/factory/injectedobject/update().json +++ b/docs/data/documentation/factory/injectedobject/update().json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject","doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/update()"},"abstract":[{"type":"text","text":"Inherited from "},{"type":"codeVoice","code":"DynamicProperty.update()"},{"type":"text","text":"."}],"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"mutating"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"update"},{"text":"()","kind":"text"}]}],"kind":"declarations"}],"metadata":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"update","kind":"identifier"},{"text":"()","kind":"text"}],"title":"update()","role":"symbol","platforms":[{"unavailable":false,"beta":false,"name":"iOS","deprecated":false,"introducedAt":"13.0"},{"introducedAt":"10.15","deprecated":false,"unavailable":false,"beta":false,"name":"macOS"},{"name":"tvOS","introducedAt":"13.0","unavailable":false,"beta":false,"deprecated":false},{"name":"watchOS","introducedAt":"6.0","unavailable":false,"beta":false,"deprecated":false}],"externalID":"s:7SwiftUI15DynamicPropertyPAAE6updateyyF::SYNTHESIZED::s:7Factory14InjectedObjectV","extendedModule":"SwiftUI","modules":[{"name":"Factory","relatedModules":["SwiftUI"]}],"roleHeading":"Instance Method","symbolKind":"method"},"sections":[],"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/injectedobject\/update()"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/InjectedObject/DynamicProperty-Implementations":{"type":"topic","title":"DynamicProperty Implementations","abstract":[],"role":"collectionGroup","kind":"article","url":"\/documentation\/factory\/injectedobject\/dynamicproperty-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations"},"doc://Factory/documentation/Factory/InjectedObject":{"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","role":"symbol","title":"InjectedObject"},"doc://Factory/documentation/Factory/InjectedObject/update()":{"title":"update()","abstract":[],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"update","kind":"identifier"},{"text":"()","kind":"text"}],"kind":"symbol","url":"\/documentation\/factory\/injectedobject\/update()","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/update()","type":"topic"}}} \ No newline at end of file +{"schemaVersion":{"minor":3,"major":0,"patch":0},"abstract":[{"type":"text","text":"Inherited from "},{"code":"DynamicProperty.update()","type":"codeVoice"},{"type":"text","text":"."}],"variants":[{"paths":["\/documentation\/factory\/injectedobject\/update()"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject","doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/update()","interfaceLanguage":"swift"},"sections":[],"metadata":{"symbolKind":"method","platforms":[{"unavailable":false,"beta":false,"name":"iOS","deprecated":false,"introducedAt":"13.0"},{"name":"macOS","introducedAt":"10.15","deprecated":false,"beta":false,"unavailable":false},{"deprecated":false,"name":"tvOS","unavailable":false,"introducedAt":"13.0","beta":false},{"name":"watchOS","beta":false,"introducedAt":"6.0","unavailable":false,"deprecated":false}],"title":"update()","externalID":"s:7SwiftUI15DynamicPropertyPAAE6updateyyF::SYNTHESIZED::s:7Factory14InjectedObjectV","roleHeading":"Instance Method","role":"symbol","extendedModule":"SwiftUI","modules":[{"relatedModules":["SwiftUI"],"name":"Factory"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"update","kind":"identifier"},{"text":"()","kind":"text"}]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"mutating","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"update"},{"text":"()","kind":"text"}],"languages":["swift"]}]}],"references":{"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","title":"InjectedObject","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}]},"doc://Factory/documentation/Factory/InjectedObject/DynamicProperty-Implementations":{"kind":"article","type":"topic","title":"DynamicProperty Implementations","url":"\/documentation\/factory\/injectedobject\/dynamicproperty-implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/DynamicProperty-Implementations","role":"collectionGroup","abstract":[]},"doc://Factory/documentation/Factory/InjectedObject/update()":{"abstract":[],"role":"symbol","title":"update()","url":"\/documentation\/factory\/injectedobject\/update()","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/update()","type":"topic","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"update"},{"text":"()","kind":"text"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 fe87cb9a..e2da77d7 100644 --- a/docs/data/documentation/factory/injectedobject/wrappedvalue.json +++ b/docs/data/documentation/factory/injectedobject/wrappedvalue.json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"wrappedValue"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":" { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/wrappedValue"},"variants":[{"paths":["\/documentation\/factory\/injectedobject\/wrappedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"patch":0,"minor":3,"major":0},"kind":"symbol","metadata":{"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"}],"roleHeading":"Instance Property","symbolKind":"property","modules":[{"name":"Factory"}],"externalID":"s:7Factory14InjectedObjectV12wrappedValuexvp","role":"symbol","platforms":[{"unavailable":false,"deprecated":false,"name":"iOS","introducedAt":"14.0","beta":false},{"name":"macOS","unavailable":false,"deprecated":false,"beta":false,"introducedAt":"11.0"},{"name":"tvOS","unavailable":false,"introducedAt":"14.0","beta":false,"deprecated":false},{"beta":false,"introducedAt":"7.0","deprecated":false,"unavailable":false,"name":"watchOS"}],"title":"wrappedValue"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"abstract":[{"text":"Manages the wrapped dependency.","type":"text"}],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/InjectedObject":{"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","role":"symbol","title":"InjectedObject"},"doc://Factory/documentation/Factory/InjectedObject/wrappedValue":{"kind":"symbol","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/injectedobject\/wrappedvalue","abstract":[{"text":"Manages the wrapped dependency.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/wrappedValue","role":"symbol","title":"wrappedValue"}}} \ No newline at end of file +{"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"schemaVersion":{"minor":3,"patch":0,"major":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedObject"]]},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"wrappedValue","kind":"identifier"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"kind":"symbol","metadata":{"title":"wrappedValue","roleHeading":"Instance Property","symbolKind":"property","role":"symbol","platforms":[{"name":"iOS","deprecated":false,"unavailable":false,"introducedAt":"14.0","beta":false},{"deprecated":false,"unavailable":false,"introducedAt":"11.0","name":"macOS","beta":false},{"unavailable":false,"deprecated":false,"introducedAt":"14.0","beta":false,"name":"tvOS"},{"introducedAt":"7.0","deprecated":false,"unavailable":false,"name":"watchOS","beta":false}],"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"wrappedValue","kind":"identifier"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"modules":[{"name":"Factory"}],"externalID":"s:7Factory14InjectedObjectV12wrappedValuexvp"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedobject\/wrappedvalue"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/wrappedValue","interfaceLanguage":"swift"},"sections":[],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/InjectedObject/wrappedValue":{"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"wrappedValue","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"T"}],"kind":"symbol","type":"topic","title":"wrappedValue","url":"\/documentation\/factory\/injectedobject\/wrappedvalue","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject\/wrappedValue","role":"symbol","abstract":[{"text":"Manages the wrapped dependency.","type":"text"}]},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","title":"InjectedObject","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/injectedtype.json b/docs/data/documentation/factory/injectedtype.json index c465abe2..68f2217c 100644 --- a/docs/data/documentation/factory/injectedtype.json +++ b/docs/data/documentation/factory/injectedtype.json @@ -1 +1 @@ -{"metadata":{"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"InjectedType"}],"symbolKind":"struct","role":"symbol","title":"InjectedType","modules":[{"name":"Factory"}],"roleHeading":"Structure","externalID":"s:7Factory12InjectedTypeV","navigatorTitle":[{"kind":"identifier","text":"InjectedType"}]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedtype"]}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"@propertyWrapper","kind":"attribute"},{"kind":"text","text":" "},{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedType"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">","kind":"text"}]}]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedType","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"abstract":[{"type":"text","text":"Basic property wrapper for optional injected types"}],"sections":[],"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init()","doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init(_:)"]},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedType\/wrappedValue"]}],"references":{"doc://Factory/documentation/Factory/InjectedType/init()":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init()","url":"\/documentation\/factory\/injectedtype\/init()","fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"role":"symbol","title":"init()","kind":"symbol","abstract":[{"text":"Initializes the property wrapper from the default Container. The dependency is resolved on initialization.","type":"text"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/InjectedType/wrappedValue":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/wrappedValue","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"title":"wrappedValue","abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"url":"\/documentation\/factory\/injectedtype\/wrappedvalue","kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/InjectedType/init(_:)":{"abstract":[{"type":"text","text":"Initializes the property wrapper from the default Container. The dependency is resolved on initialization."}],"kind":"symbol","fragments":[{"text":"init","kind":"identifier"},{"text":"(any ","kind":"text"},{"preciseIdentifier":"s:7Factory16ManagedContainerP","kind":"typeIdentifier","text":"ManagedContainer"},{"text":")","kind":"text"}],"title":"init(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init(_:)","role":"symbol","type":"topic","url":"\/documentation\/factory\/injectedtype\/init(_:)"},"doc://Factory/documentation/Factory/InjectedType":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"InjectedType"}],"abstract":[{"type":"text","text":"Basic property wrapper for optional injected types"}],"title":"InjectedType","navigatorTitle":[{"kind":"identifier","text":"InjectedType"}],"kind":"symbol","url":"\/documentation\/factory\/injectedtype","role":"symbol"}}} \ No newline at end of file +{"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"abstract":[{"type":"text","text":"Basic property wrapper for optional injected types"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedType","interfaceLanguage":"swift"},"metadata":{"title":"InjectedType","externalID":"s:7Factory12InjectedTypeV","modules":[{"name":"Factory"}],"role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedType"}],"roleHeading":"Structure","symbolKind":"struct","navigatorTitle":[{"text":"InjectedType","kind":"identifier"}]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@propertyWrapper"},{"kind":"text","text":" "},{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"InjectedType","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}]}],"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init()","doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init(_:)"],"title":"Initializers"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/InjectedType\/wrappedValue"],"title":"Instance Properties"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedtype"]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"sections":[],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/InjectedType/wrappedValue":{"title":"wrappedValue","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/wrappedValue","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"wrappedValue","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"url":"\/documentation\/factory\/injectedtype\/wrappedvalue","abstract":[{"type":"text","text":"Manages the wrapped dependency."}]},"doc://Factory/documentation/Factory/InjectedType/init()":{"title":"init()","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init()","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"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/InjectedType/init(_:)":{"title":"init(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init(_:)","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"identifier","text":"init"},{"text":"(any ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ManagedContainerP","text":"ManagedContainer"},{"text":")","kind":"text"}],"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/InjectedType":{"title":"InjectedType","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"InjectedType","kind":"identifier"}],"url":"\/documentation\/factory\/injectedtype","navigatorTitle":[{"kind":"identifier","text":"InjectedType"}],"abstract":[{"type":"text","text":"Basic property wrapper for optional injected types"}]}}} \ 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 2b8ba44f..13668c01 100644 --- a/docs/data/documentation/factory/injectedtype/init().json +++ b/docs/data/documentation/factory/injectedtype/init().json @@ -1 +1 @@ -{"kind":"symbol","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"}],"schemaVersion":{"patch":0,"minor":3,"major":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"init"},{"text":"()","kind":"text"}],"languages":["swift"]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init()"},"variants":[{"paths":["\/documentation\/factory\/injectedtype\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"symbolKind":"init","externalID":"s:7Factory12InjectedTypeVACyxGycfc","modules":[{"name":"Factory"}],"role":"symbol","roleHeading":"Initializer","fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"title":"init()"},"sections":[],"references":{"doc://Factory/documentation/Factory/InjectedType/init()":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init()","url":"\/documentation\/factory\/injectedtype\/init()","fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"role":"symbol","title":"init()","kind":"symbol","abstract":[{"text":"Initializes the property wrapper from the default Container. The dependency is resolved on initialization.","type":"text"}]},"doc://Factory/documentation/Factory/InjectedType":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"InjectedType"}],"abstract":[{"type":"text","text":"Basic property wrapper for optional injected types"}],"title":"InjectedType","navigatorTitle":[{"kind":"identifier","text":"InjectedType"}],"kind":"symbol","url":"\/documentation\/factory\/injectedtype","role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedtype\/init()"]}],"metadata":{"externalID":"s:7Factory12InjectedTypeVACyxGycfc","title":"init()","symbolKind":"init","role":"symbol","roleHeading":"Initializer","fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"modules":[{"name":"Factory"}]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init()","interfaceLanguage":"swift"},"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"init","kind":"keyword"},{"text":"()","kind":"text"}]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedType"]]},"abstract":[{"type":"text","text":"Initializes the property wrapper from the default Container. The dependency is resolved on initialization."}],"kind":"symbol","references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/InjectedType/init()":{"title":"init()","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init()","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"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/InjectedType":{"title":"InjectedType","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"InjectedType","kind":"identifier"}],"url":"\/documentation\/factory\/injectedtype","navigatorTitle":[{"kind":"identifier","text":"InjectedType"}],"abstract":[{"type":"text","text":"Basic property wrapper for optional injected types"}]}}} \ 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 b22be1f4..dbb5b3dc 100644 --- a/docs/data/documentation/factory/injectedtype/init(_:).json +++ b/docs/data/documentation/factory/injectedtype/init(_:).json @@ -1 +1 @@ -{"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"modules":[{"name":"Factory"}],"externalID":"s:7Factory12InjectedTypeVyACyxGAA16ManagedContainer_pcfc","fragments":[{"kind":"identifier","text":"init"},{"text":"(any ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ManagedContainerP","text":"ManagedContainer"},{"text":")","kind":"text"}],"role":"symbol","title":"init(_:)","roleHeading":"Initializer","symbolKind":"init"},"abstract":[{"type":"text","text":"Initializes the property wrapper from the default Container. The dependency is resolved on initialization."}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedtype\/init(_:)"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedType"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init(_:)"},"sections":[],"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"text":"init","kind":"keyword"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"container","kind":"internalParam"},{"kind":"text","text":": any "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","text":"ManagedContainer","kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ManagedContainerP"},{"text":")","kind":"text"}],"platforms":["macOS"]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/InjectedType":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"InjectedType"}],"abstract":[{"type":"text","text":"Basic property wrapper for optional injected types"}],"title":"InjectedType","navigatorTitle":[{"kind":"identifier","text":"InjectedType"}],"kind":"symbol","url":"\/documentation\/factory\/injectedtype","role":"symbol"},"doc://Factory/documentation/Factory/InjectedType/init(_:)":{"abstract":[{"type":"text","text":"Initializes the property wrapper from the default Container. The dependency is resolved on initialization."}],"kind":"symbol","fragments":[{"text":"init","kind":"identifier"},{"text":"(any ","kind":"text"},{"preciseIdentifier":"s:7Factory16ManagedContainerP","kind":"typeIdentifier","text":"ManagedContainer"},{"text":")","kind":"text"}],"title":"init(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init(_:)","role":"symbol","type":"topic","url":"\/documentation\/factory\/injectedtype\/init(_:)"},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"ManagedContainer","kind":"identifier"}],"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"title":"ManagedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","type":"topic","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}]}}} \ No newline at end of file +{"schemaVersion":{"minor":3,"patch":0,"major":0},"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(_:)"]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedType"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init(_:)","interfaceLanguage":"swift"},"sections":[],"metadata":{"role":"symbol","symbolKind":"init","externalID":"s:7Factory12InjectedTypeVyACyxGAA16ManagedContainer_pcfc","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"(any "},{"text":"ManagedContainer","kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ManagedContainerP"},{"text":")","kind":"text"}],"roleHeading":"Initializer","title":"init(_:)","modules":[{"name":"Factory"}]},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"init","kind":"keyword"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"container","kind":"internalParam"},{"text":": any ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ManagedContainerP","text":"ManagedContainer"},{"kind":"text","text":")"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory/InjectedType":{"title":"InjectedType","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"InjectedType","kind":"identifier"}],"url":"\/documentation\/factory\/injectedtype","navigatorTitle":[{"kind":"identifier","text":"InjectedType"}],"abstract":[{"type":"text","text":"Basic property wrapper for optional injected types"}]},"doc://Factory/documentation/Factory/InjectedType/init(_:)":{"title":"init(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/init(_:)","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"identifier","text":"init"},{"text":"(any ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ManagedContainerP","text":"ManagedContainer"},{"text":")","kind":"text"}],"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":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer":{"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","role":"symbol","navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ManagedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","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 8b0a0ff2..70a4e8b6 100644 --- a/docs/data/documentation/factory/injectedtype/wrappedvalue.json +++ b/docs/data/documentation/factory/injectedtype/wrappedvalue.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedType"]]},"schemaVersion":{"minor":3,"major":0,"patch":0},"abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"metadata":{"roleHeading":"Instance Property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"symbolKind":"property","title":"wrappedValue","role":"symbol","modules":[{"name":"Factory"}],"externalID":"s:7Factory12InjectedTypeV12wrappedValuexSgvp"},"kind":"symbol","primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"wrappedValue"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"? { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" ","kind":"text"},{"text":"set","kind":"keyword"},{"kind":"text","text":" }"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/injectedtype\/wrappedvalue"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/wrappedValue","interfaceLanguage":"swift"},"sections":[],"references":{"doc://Factory/documentation/Factory/InjectedType/wrappedValue":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/wrappedValue","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"title":"wrappedValue","abstract":[{"type":"text","text":"Manages the wrapped dependency."}],"url":"\/documentation\/factory\/injectedtype\/wrappedvalue","kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/InjectedType":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"InjectedType"}],"abstract":[{"type":"text","text":"Basic property wrapper for optional injected types"}],"title":"InjectedType","navigatorTitle":[{"kind":"identifier","text":"InjectedType"}],"kind":"symbol","url":"\/documentation\/factory\/injectedtype","role":"symbol"}}} \ No newline at end of file +{"metadata":{"externalID":"s:7Factory12InjectedTypeV12wrappedValuexSgvp","roleHeading":"Instance Property","symbolKind":"property","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"wrappedValue"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?"}],"modules":[{"name":"Factory"}],"role":"symbol","title":"wrappedValue"},"kind":"symbol","schemaVersion":{"major":0,"patch":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/InjectedType"]]},"abstract":[{"text":"Manages the wrapped dependency.","type":"text"}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"wrappedValue","kind":"identifier"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"? { "},{"text":"get","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"set"},{"text":" }","kind":"text"}],"platforms":["macOS"]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/injectedtype\/wrappedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/wrappedValue","interfaceLanguage":"swift"},"sections":[],"references":{"doc://Factory/documentation/Factory/InjectedType":{"title":"InjectedType","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"InjectedType","kind":"identifier"}],"url":"\/documentation\/factory\/injectedtype","navigatorTitle":[{"kind":"identifier","text":"InjectedType"}],"abstract":[{"type":"text","text":"Basic property wrapper for optional injected types"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/InjectedType/wrappedValue":{"title":"wrappedValue","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedType\/wrappedValue","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"wrappedValue","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"url":"\/documentation\/factory\/injectedtype\/wrappedvalue","abstract":[{"type":"text","text":"Manages the wrapped dependency."}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/lazyinjected.json b/docs/data/documentation/factory/lazyinjected.json index 8de28185..90800750 100644 --- a/docs/data/documentation/factory/lazyinjected.json +++ b/docs/data/documentation/factory/lazyinjected.json @@ -1 +1 @@ -{"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/lazyinjected"]}],"metadata":{"role":"symbol","externalID":"s:7Factory12LazyInjectedV","modules":[{"name":"Factory"}],"title":"LazyInjected","roleHeading":"Structure","symbolKind":"struct","navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"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."}],"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"@propertyWrapper","kind":"attribute"},{"text":" ","kind":"text"},{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"LazyInjected"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"text":">","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"overview","text":"Overview","level":2,"type":"heading"},{"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"},{"type":"codeListing","syntax":"swift","code":["class MyViewModel {"," @LazyInjected(\\.myService) var service"," @LazyInjected(\\MyCustomContainer.myService) var service","}"]},{"type":"paragraph","inlineContent":[{"text":"The provided keypath resolves to a Factory definition on the ","type":"text"},{"type":"codeVoice","code":"shared"},{"text":" container required for each Container type.","type":"text"},{"type":"text","text":" "},{"text":"The short version of the keyPath resolves to the default container, while the expanded version","type":"text"},{"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":[{"text":"Lazy injection is resolved the first time the dependency is referenced by the code, and ","type":"text"},{"inlineContent":[{"type":"text","text":"not"}],"type":"strong"},{"type":"text","text":" on initialization."}]}]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","interfaceLanguage":"swift"},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-1mer0","doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-8np9u"]},{"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"}],"references":{"doc://Factory/documentation/Factory/LazyInjected/resolve(reset:)":{"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolve(reset:)","kind":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"text":"reset","kind":"externalParam"},{"kind":"text","text":": "},{"text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"url":"\/documentation\/factory\/lazyinjected\/resolve(reset:)","title":"resolve(reset:)","role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/LazyInjected/init(_:)-1mer0":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-1mer0","title":"init(_:)","role":"symbol","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier","text":"Container"},{"kind":"text","text":", "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}],"url":"\/documentation\/factory\/lazyinjected\/init(_:)-1mer0","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","kind":"symbol"},"doc://Factory/documentation/Factory/LazyInjected/resolvedOrNil()":{"type":"topic","kind":"symbol","abstract":[{"type":"text","text":"Projected function returns resolved instance if it exists."}],"title":"resolvedOrNil()","url":"\/documentation\/factory\/lazyinjected\/resolvedornil()","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolvedOrNil()","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolvedOrNil"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}]},"doc://Factory/documentation/Factory/LazyInjected/init(_:)-8np9u":{"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","fragments":[{"text":"init","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"text":"KeyPath","preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"C"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}],"title":"init(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-8np9u","role":"symbol","type":"topic","url":"\/documentation\/factory\/lazyinjected\/init(_:)-8np9u"},"doc://Factory/documentation/Factory/LazyInjected/factory":{"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"factory"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"url":"\/documentation\/factory\/lazyinjected\/factory","type":"topic","role":"symbol","kind":"symbol","abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"title":"factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/factory"},"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}]},"doc://Factory/documentation/Factory/LazyInjected/wrappedValue":{"title":"wrappedValue","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/wrappedValue","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"wrappedValue"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"role":"symbol","abstract":[{"text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time.","type":"text"}],"url":"\/documentation\/factory\/lazyinjected\/wrappedvalue"},"doc://Factory/documentation/Factory/LazyInjected/projectedValue":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/lazyinjected\/projectedvalue","title":"projectedValue","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/projectedValue","abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory12LazyInjectedV","kind":"typeIdentifier","text":"LazyInjected"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}]}}} \ No newline at end of file +{"abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/lazyinjected"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","interfaceLanguage":"swift"},"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"},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolve(reset:)","doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolvedOrNil()"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"@propertyWrapper","kind":"attribute"},{"text":" ","kind":"text"},{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"LazyInjected","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}]},{"content":[{"anchor":"overview","level":2,"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"}]},{"code":["class MyViewModel {"," @LazyInjected(\\.myService) var service1"," @LazyInjected(\\MyCustomContainer.myService) var service2","}"],"type":"codeListing","syntax":"swift"},{"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":" "},{"text":"The short version of the keyPath resolves to the default container, while the expanded version","type":"text"},{"type":"text","text":" "},{"type":"text","text":"allows you to point an instance of your own custom container type."}],"type":"paragraph"},{"name":"Note","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"}]},{"text":" on initialization.","type":"text"}],"type":"paragraph"}],"type":"aside","style":"note"}],"kind":"content"}],"metadata":{"roleHeading":"Structure","externalID":"s:7Factory12LazyInjectedV","role":"symbol","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"modules":[{"name":"Factory"}],"title":"LazyInjected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"LazyInjected","kind":"identifier"}],"symbolKind":"struct"},"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"kind":"symbol","references":{"doc://Factory/documentation/Factory/LazyInjected/init(_:)-1mer0":{"title":"init(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-1mer0","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"identifier","text":"init"},{"text":"(","kind":"text"},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"preciseIdentifier":"s:7Factory9ContainerC","text":"Container","kind":"typeIdentifier"},{"kind":"text","text":", "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"url":"\/documentation\/factory\/lazyinjected\/init(_:)-1mer0","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/factory":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/factory","title":"factory","abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"type":"topic","url":"\/documentation\/factory\/lazyinjected\/factory"},"doc://Factory/documentation/Factory/LazyInjected/init(_:)-8np9u":{"url":"\/documentation\/factory\/lazyinjected\/init(_:)-8np9u","type":"topic","abstract":[{"text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time.","type":"text"}],"role":"symbol","title":"init(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-8np9u","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"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}],"kind":"symbol"},"doc://Factory/documentation/Factory/LazyInjected/projectedValue":{"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory12LazyInjectedV","text":"LazyInjected","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"kind":"symbol","url":"\/documentation\/factory\/lazyinjected\/projectedvalue","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/projectedValue","role":"symbol","title":"projectedValue"},"doc://Factory/documentation/Factory/LazyInjected/resolve(reset:)":{"type":"topic","title":"resolve(reset:)","abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolve(reset:)","url":"\/documentation\/factory\/lazyinjected\/resolve(reset:)","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"("},{"text":"reset","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"text":")","kind":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/LazyInjected/wrappedValue":{"abstract":[{"type":"text","text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/wrappedValue","title":"wrappedValue","role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/lazyinjected\/wrappedvalue","kind":"symbol"},"doc://Factory/documentation/Factory/LazyInjected/resolvedOrNil()":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolvedOrNil"},{"kind":"text","text":"() -> "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?"}],"type":"topic","title":"resolvedOrNil()","kind":"symbol","role":"symbol","abstract":[{"type":"text","text":"Projected function returns resolved instance if it exists."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolvedOrNil()","url":"\/documentation\/factory\/lazyinjected\/resolvedornil()"}}} \ 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 6ecad1e5..5c7a65c3 100644 --- a/docs/data/documentation/factory/lazyinjected/factory.json +++ b/docs/data/documentation/factory/lazyinjected/factory.json @@ -1 +1 @@ -{"metadata":{"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"factory","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"roleHeading":"Instance Property","role":"symbol","modules":[{"name":"Factory"}],"title":"factory","externalID":"s:7Factory12LazyInjectedV7factoryA2AVyxGvp","symbolKind":"property"},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/lazyinjected\/factory"]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/factory","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"factory","kind":"identifier"},{"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":"> { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"references":{"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}]},"doc://Factory/documentation/Factory/LazyInjected/factory":{"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"factory"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"url":"\/documentation\/factory\/lazyinjected\/factory","type":"topic","role":"symbol","kind":"symbol","abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"title":"factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/factory"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"}}} \ No newline at end of file +{"sections":[],"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Instance Property","symbolKind":"property","title":"factory","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"factory","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"externalID":"s:7Factory12LazyInjectedV7factoryA2AVyxGvp","role":"symbol"},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"factory","kind":"identifier"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":"> { ","kind":"text"},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"platforms":["macOS"]}]}],"abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"variants":[{"paths":["\/documentation\/factory\/lazyinjected\/factory"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/factory","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/LazyInjected/factory":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/factory","title":"factory","abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"type":"topic","url":"\/documentation\/factory\/lazyinjected\/factory"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol"}}} \ 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 b6462c6d..63931bf8 100644 --- a/docs/data/documentation/factory/lazyinjected/init(_:)-1mer0.json +++ b/docs/data/documentation/factory/lazyinjected/init(_:)-1mer0.json @@ -1 +1 @@ -{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-1mer0"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/lazyinjected\/init(_:)-1mer0"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"sections":[],"metadata":{"symbolKind":"init","roleHeading":"Initializer","role":"symbol","modules":[{"name":"Factory"}],"title":"init(_:)","externalID":"s:7Factory12LazyInjectedVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"kind":"text","text":"<"},{"preciseIdentifier":"s:7Factory9ContainerC","text":"Container","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"keyPath"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","text":"Container","preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"languages":["swift"]}],"kind":"declarations"},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"inlineContent":[{"text":"KeyPath to a Factory on the default Container.","type":"text"}],"type":"paragraph"}]}]}],"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}]},"doc://Factory/documentation/Factory/LazyInjected/init(_:)-1mer0":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-1mer0","title":"init(_:)","role":"symbol","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier","text":"Container"},{"kind":"text","text":", "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}],"url":"\/documentation\/factory\/lazyinjected\/init(_:)-1mer0","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","kind":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","navigatorTitle":[{"text":"Container","kind":"identifier"}],"title":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"role":"symbol","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"}}} \ No newline at end of file +{"abstract":[{"text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time.","type":"text"}],"schemaVersion":{"minor":3,"major":0,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","preciseIdentifier":"s:7Factory9ContainerC","text":"Container","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}]},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"inlineContent":[{"type":"text","text":"KeyPath to a Factory on the default Container."}],"type":"paragraph"}]}]}],"kind":"symbol","metadata":{"title":"init(_:)","externalID":"s:7Factory12LazyInjectedVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc","role":"symbol","modules":[{"name":"Factory"}],"fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"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":">>)"}],"roleHeading":"Initializer","symbolKind":"init"},"variants":[{"paths":["\/documentation\/factory\/lazyinjected\/init(_:)-1mer0"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-1mer0"},"sections":[],"references":{"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Container":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","title":"Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"url":"\/documentation\/factory\/container","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}],"navigatorTitle":[{"text":"Container","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/LazyInjected/init(_:)-1mer0":{"title":"init(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-1mer0","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"identifier","text":"init"},{"text":"(","kind":"text"},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"preciseIdentifier":"s:7Factory9ContainerC","text":"Container","kind":"typeIdentifier"},{"kind":"text","text":", "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"url":"\/documentation\/factory\/lazyinjected\/init(_:)-1mer0","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}]}}} \ 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 78b89120..d239f767 100644 --- a/docs/data/documentation/factory/lazyinjected/init(_:)-8np9u.json +++ b/docs/data/documentation/factory/lazyinjected/init(_:)-8np9u.json @@ -1 +1 @@ -{"metadata":{"modules":[{"name":"Factory"}],"externalID":"s:7Factory12LazyInjectedVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc","fragments":[{"kind":"identifier","text":"init"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"text":">(","kind":"text"},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"C","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"role":"symbol","title":"init(_:)","roleHeading":"Initializer","symbolKind":"init"},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"init","kind":"keyword"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"C"},{"text":">(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"text":": ","kind":"text"},{"text":"KeyPath","preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"C","kind":"typeIdentifier"},{"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"},{"text":"where","kind":"keyword"},{"text":" ","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"SharedContainer","preciseIdentifier":"s:7Factory15SharedContainerP","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"parameters":[{"content":[{"type":"paragraph","inlineContent":[{"text":"KeyPath to a Factory on the specified Container.","type":"text"}]}],"name":"keyPath"}],"kind":"parameters"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"kind":"symbol","schemaVersion":{"major":0,"patch":0,"minor":3},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-8np9u","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/lazyinjected\/init(_:)-8np9u"]}],"sections":[],"references":{"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}]},"doc://Factory/documentation/Factory/LazyInjected/init(_:)-8np9u":{"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","fragments":[{"text":"init","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"text":"KeyPath","preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"C"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}],"title":"init(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-8np9u","role":"symbol","type":"topic","url":"\/documentation\/factory\/lazyinjected\/init(_:)-8np9u"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/SharedContainer":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/sharedcontainer","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"title":"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."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"SharedContainer","kind":"identifier"}]}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"init","kind":"keyword"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier","text":"KeyPath"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"C"},{"text":", ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">>) ","kind":"text"},{"text":"where","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","text":"C"},{"text":" : ","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","preciseIdentifier":"s:7Factory15SharedContainerP","text":"SharedContainer"}]}]},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"type":"paragraph","inlineContent":[{"text":"KeyPath to a Factory on the specified Container.","type":"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","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-8np9u"},"metadata":{"roleHeading":"Initializer","symbolKind":"init","role":"symbol","modules":[{"name":"Factory"}],"title":"init(_:)","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"<"},{"text":"C","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"kind":"text","text":", "},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}],"externalID":"s:7Factory12LazyInjectedVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc"},"variants":[{"paths":["\/documentation\/factory\/lazyinjected\/init(_:)-8np9u"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"sections":[],"references":{"doc://Factory/documentation/Factory/LazyInjected/init(_:)-8np9u":{"url":"\/documentation\/factory\/lazyinjected\/init(_:)-8np9u","type":"topic","abstract":[{"text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time.","type":"text"}],"role":"symbol","title":"init(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/init(_:)-8np9u","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"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/SharedContainer":{"url":"\/documentation\/factory\/sharedcontainer","type":"topic","abstract":[{"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.","type":"text"}],"title":"SharedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"SharedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}]}}} \ 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 03010da1..e2bc9336 100644 --- a/docs/data/documentation/factory/lazyinjected/projectedvalue.json +++ b/docs/data/documentation/factory/lazyinjected/projectedvalue.json @@ -1 +1 @@ -{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/projectedValue"},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"projectedValue","kind":"identifier"},{"text":": ","kind":"text"},{"text":"LazyInjected","preciseIdentifier":"s:7Factory12LazyInjectedV","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"> { "},{"text":"get","kind":"keyword"},{"kind":"text","text":" "},{"text":"set","kind":"keyword"},{"text":" }","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/lazyinjected\/projectedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"title":"projectedValue","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"projectedValue","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"LazyInjected","preciseIdentifier":"s:7Factory12LazyInjectedV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"role":"symbol","roleHeading":"Instance Property","symbolKind":"property","externalID":"s:7Factory12LazyInjectedV14projectedValueACyxGvp"},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"schemaVersion":{"minor":3,"major":0,"patch":0},"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"sections":[],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/LazyInjected/projectedValue":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/lazyinjected\/projectedvalue","title":"projectedValue","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/projectedValue","abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory12LazyInjectedV","kind":"typeIdentifier","text":"LazyInjected"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}]},"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}]}}} \ No newline at end of file +{"kind":"symbol","metadata":{"externalID":"s:7Factory12LazyInjectedV14projectedValueACyxGvp","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"projectedValue","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory12LazyInjectedV","kind":"typeIdentifier","text":"LazyInjected"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"roleHeading":"Instance Property","role":"symbol","symbolKind":"property","modules":[{"name":"Factory"}],"title":"projectedValue"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/projectedValue","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/factory\/lazyinjected\/projectedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"text":"Unwraps the property wrapper granting access to the resolve\/reset function.","type":"text"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"projectedValue","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","preciseIdentifier":"s:7Factory12LazyInjectedV","text":"LazyInjected"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":"> { ","kind":"text"},{"text":"get","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"references":{"doc://Factory/documentation/Factory/LazyInjected/projectedValue":{"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory12LazyInjectedV","text":"LazyInjected","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"kind":"symbol","url":"\/documentation\/factory\/lazyinjected\/projectedvalue","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/projectedValue","role":"symbol","title":"projectedValue"},"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","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 bc513ce5..26d2635b 100644 --- a/docs/data/documentation/factory/lazyinjected/resolve(reset:).json +++ b/docs/data/documentation/factory/lazyinjected/resolve(reset:).json @@ -1 +1 @@ -{"sections":[],"metadata":{"symbolKind":"method","externalID":"s:7Factory12LazyInjectedV7resolve5resetyAA0A12ResetOptionsO_tF","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"text":"reset","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"text":")","kind":"text"}],"modules":[{"name":"Factory"}],"role":"symbol","title":"resolve(reset:)","roleHeading":"Instance Method"},"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"mutating","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"reset"},{"text":" ","kind":"text"},{"text":"options","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":" = .none)"}]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolve(reset:)","interfaceLanguage":"swift"},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"variants":[{"paths":["\/documentation\/factory\/lazyinjected\/resolve(reset:)"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory/LazyInjected/resolve(reset:)":{"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolve(reset:)","kind":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"("},{"text":"reset","kind":"externalParam"},{"kind":"text","text":": "},{"text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"url":"\/documentation\/factory\/lazyinjected\/resolve(reset:)","title":"resolve(reset:)","role":"symbol"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"title":"FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}]},"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolve(reset:)"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/lazyinjected\/resolve(reset:)"]}],"kind":"symbol","sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"mutating","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolve"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"reset"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"options"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","text":"FactoryResetOptions"},{"kind":"text","text":" = .none)"}]}],"kind":"declarations"}],"metadata":{"symbolKind":"method","title":"resolve(reset:)","roleHeading":"Instance Method","modules":[{"name":"Factory"}],"externalID":"s:7Factory12LazyInjectedV7resolve5resetyAA0A12ResetOptionsO_tF","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"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"}]},"references":{"doc://Factory/documentation/Factory/FactoryResetOptions":{"title":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","type":"topic","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/LazyInjected/resolve(reset:)":{"type":"topic","title":"resolve(reset:)","abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolve(reset:)","url":"\/documentation\/factory\/lazyinjected\/resolve(reset:)","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"("},{"text":"reset","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"text":")","kind":"text"}],"kind":"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 b624492a..6a7b817b 100644 --- a/docs/data/documentation/factory/lazyinjected/resolvedornil().json +++ b/docs/data/documentation/factory/lazyinjected/resolvedornil().json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"metadata":{"symbolKind":"method","externalID":"s:7Factory12LazyInjectedV13resolvedOrNilxSgyF","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolvedOrNil"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"title":"resolvedOrNil()","roleHeading":"Instance Method","modules":[{"name":"Factory"}],"role":"symbol"},"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"text":"Projected function returns resolved instance if it exists.","type":"text"}],"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolvedOrNil()"},"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/lazyinjected\/resolvedornil()"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"resolvedOrNil","kind":"identifier"},{"text":"() -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?"}],"platforms":["macOS"],"languages":["swift"]}]},{"kind":"content","content":[{"type":"heading","text":"Discussion","anchor":"discussion","level":2},{"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"},{"text":" ","type":"text"},{"type":"text","text":"the property wrapper instance if it hasn’t already been resolved."}]},{"type":"codeListing","code":["deinit {"," $myService.resolvedOrNil()?.cleanup()","}"],"syntax":"swift"}]}],"references":{"doc://Factory/documentation/Factory/LazyInjected/resolvedOrNil()":{"type":"topic","kind":"symbol","abstract":[{"type":"text","text":"Projected function returns resolved instance if it exists."}],"title":"resolvedOrNil()","url":"\/documentation\/factory\/lazyinjected\/resolvedornil()","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolvedOrNil()","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolvedOrNil"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}]}}} \ No newline at end of file +{"schemaVersion":{"patch":0,"minor":3,"major":0},"abstract":[{"type":"text","text":"Projected function returns resolved instance if it exists."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolvedOrNil()","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/factory\/lazyinjected\/resolvedornil()"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"kind":"symbol","primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"resolvedOrNil","kind":"identifier"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}]}],"kind":"declarations"},{"kind":"content","content":[{"text":"Discussion","anchor":"discussion","level":2,"type":"heading"},{"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."}],"type":"paragraph"},{"code":["deinit {"," $myService.resolvedOrNil()?.cleanup()","}"],"syntax":"swift","type":"codeListing"}]}],"sections":[],"metadata":{"title":"resolvedOrNil()","modules":[{"name":"Factory"}],"symbolKind":"method","role":"symbol","externalID":"s:7Factory12LazyInjectedV13resolvedOrNilxSgyF","roleHeading":"Instance Method","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolvedOrNil"},{"kind":"text","text":"() -> "},{"text":"T","kind":"typeIdentifier"},{"text":"?","kind":"text"}]},"references":{"doc://Factory/documentation/Factory/LazyInjected/resolvedOrNil()":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolvedOrNil"},{"kind":"text","text":"() -> "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?"}],"type":"topic","title":"resolvedOrNil()","kind":"symbol","role":"symbol","abstract":[{"type":"text","text":"Projected function returns resolved instance if it exists."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/resolvedOrNil()","url":"\/documentation\/factory\/lazyinjected\/resolvedornil()"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LazyInjected","kind":"identifier"}],"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 e811968b..96baeabf 100644 --- a/docs/data/documentation/factory/lazyinjected/wrappedvalue.json +++ b/docs/data/documentation/factory/lazyinjected/wrappedvalue.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/LazyInjected"]]},"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"paths":["\/documentation\/factory\/lazyinjected\/wrappedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"type":"text","text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time."}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"wrappedValue","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":" { "},{"kind":"keyword","text":"mutating"},{"kind":"text","text":" "},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"languages":["swift"]}],"kind":"declarations"}],"metadata":{"title":"wrappedValue","externalID":"s:7Factory12LazyInjectedV12wrappedValuexvp","symbolKind":"property","roleHeading":"Instance Property","modules":[{"name":"Factory"}],"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"wrappedValue"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"role":"symbol"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/wrappedValue","interfaceLanguage":"swift"},"sections":[],"references":{"doc://Factory/documentation/Factory/LazyInjected/wrappedValue":{"title":"wrappedValue","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/wrappedValue","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"wrappedValue"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"role":"symbol","abstract":[{"text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time.","type":"text"}],"url":"\/documentation\/factory\/lazyinjected\/wrappedvalue"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}]}}} \ 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."}],"metadata":{"modules":[{"name":"Factory"}],"title":"wrappedValue","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"wrappedValue","kind":"identifier"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"}],"role":"symbol","symbolKind":"property","roleHeading":"Instance Property","externalID":"s:7Factory12LazyInjectedV12wrappedValuexvp"},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/wrappedValue","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"wrappedValue","kind":"identifier"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"mutating"},{"text":" ","kind":"text"},{"text":"get","kind":"keyword"},{"kind":"text","text":" "},{"text":"set","kind":"keyword"},{"kind":"text","text":" }"}]}]}],"kind":"symbol","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\/wrappedvalue"]}],"references":{"doc://Factory/documentation/Factory/LazyInjected/wrappedValue":{"abstract":[{"type":"text","text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected\/wrappedValue","title":"wrappedValue","role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/lazyinjected\/wrappedvalue","kind":"symbol"},"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","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 22883cdf..5f4931f4 100644 --- a/docs/data/documentation/factory/managedcontainer.json +++ b/docs/data/documentation/factory/managedcontainer.json @@ -1 +1 @@ -{"metadata":{"externalID":"s:7Factory16ManagedContainerP","symbolKind":"protocol","roleHeading":"Protocol","navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"role":"symbol","modules":[{"name":"Factory"}],"title":"ManagedContainer","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"ManagedContainer"}]},"schemaVersion":{"minor":3,"major":0,"patch":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"kind":"symbol","primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"text":"ManagedContainer","kind":"identifier"},{"text":" : AnyObject, ","kind":"text"},{"text":"Sendable","preciseIdentifier":"s:s8SendableP","kind":"typeIdentifier"}]}],"kind":"declarations"},{"kind":"content","content":[{"level":2,"anchor":"overview","text":"Overview","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If a container only supports ManagedContainer then the container must be instantiated and passed as an instance. Here’s"},{"text":" ","type":"text"},{"text":"an example of passing such a container to a view model for dependency resolution.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["class ContentViewModel {"," let service: MyServiceType"," init(container: Container) {"," service = container.service()"," }","}"]},{"inlineContent":[{"text":"See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","isActive":true},{"text":" for more information.","type":"text"}],"type":"paragraph"}]}],"abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/manager"],"title":"Instance Properties"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-6ql8v","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-8rljq","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"}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/s8SendableP"],"type":"inheritsFrom","title":"Inherits From","kind":"relationships"},{"type":"inheritedBy","title":"Inherited By","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolving","doc:\/\/Factory\/documentation\/Factory\/SharedContainer"],"kind":"relationships"},{"title":"Conforming Types","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container"],"type":"conformingTypes","kind":"relationships"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/managedcontainer"]}],"sections":[],"references":{"doc://Factory/documentation/Factory/ManagedContainer/decorator(_:)":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"text":"(((","kind":"text"},{"text":"Any","kind":"keyword"},{"kind":"text","text":") -> ())?)"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/decorator(_:)","kind":"symbol","abstract":[{"type":"text","text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container."}],"title":"decorator(_:)","role":"symbol","url":"\/documentation\/factory\/managedcontainer\/decorator(_:)"},"doc://Factory/documentation/Factory/Resolving":{"kind":"symbol","role":"symbol","url":"\/documentation\/factory\/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"},{"text":"Resolving","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"Resolving"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","title":"Resolving"},"doc://Factory/documentation/Factory/ManagedContainer/promised(key:)-33ecn":{"type":"topic","title":"promised(key:)","kind":"symbol","abstract":[{"text":"Syntactic sugar allows container to create a parameter factory whose optional registration is promised before resolution.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-33ecn","url":"\/documentation\/factory\/managedcontainer\/promised(key:)-33ecn","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"promised","kind":"identifier"},{"text":"<","kind":"text"},{"text":"P","kind":"genericParameter"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"StaticString","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory"},{"text":"<","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}]},"doc://Factory/documentation/Factory/Container":{"kind":"symbol","navigatorTitle":[{"text":"Container","kind":"identifier"}],"title":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"role":"symbol","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/Containers":{"kind":"article","abstract":[{"text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","title":"Containers","type":"topic","url":"\/documentation\/factory\/containers","role":"article"},"doc://Factory/documentation/Factory/ManagedContainer/callAsFunction(key:_:)-6ql8v":{"fragments":[{"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"},{"preciseIdentifier":"s:s12StaticStringV","text":"StaticString","kind":"typeIdentifier"},{"text":", () -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-6ql8v","kind":"symbol","abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound Factory."}],"title":"callAsFunction(key:_:)","role":"symbol","url":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-6ql8v"},"doc://Factory/documentation/Factory/ManagedContainer/promised(key:)-1ucr5":{"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"},{"text":": ","kind":"text"},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":") -> "},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?>","kind":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-1ucr5","kind":"symbol","abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory whose optional registration is promised before resolution."}],"title":"promised(key:)","role":"symbol","url":"\/documentation\/factory\/managedcontainer\/promised(key:)-1ucr5"},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"ManagedContainer","kind":"identifier"}],"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"title":"ManagedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","type":"topic","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ManagedContainer/manager":{"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"manager","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory16ContainerManagerC","kind":"typeIdentifier","text":"ContainerManager"}],"kind":"symbol","url":"\/documentation\/factory\/managedcontainer\/manager","required":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/manager","title":"manager","role":"symbol","type":"topic","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"},{"type":"text","text":"this fashion makes creating and using your own custom containers much simpler."}]},"doc://Factory/documentation/Factory/ManagedContainer/with(_:)":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"with","kind":"identifier"},{"text":"((","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:s4Voida","text":"Void","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/with(_:)","kind":"symbol","abstract":[{"type":"text","text":"Defines a with function to allow container transformation on assignment."}],"title":"with(_:)","role":"symbol","url":"\/documentation\/factory\/managedcontainer\/with(_:)"},"doc://Factory/s8SendableP":{"type":"unresolvable","identifier":"doc:\/\/Factory\/s8SendableP","title":"Swift.Sendable"},"doc://Factory/documentation/Factory/ManagedContainer/reset(options:)":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"options"},{"text":": ","kind":"text"},{"text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/reset(options:)","kind":"symbol","abstract":[{"type":"text","text":"Defines a thread safe access mechanism to reset the container."}],"title":"reset(options:)","role":"symbol","url":"\/documentation\/factory\/managedcontainer\/reset(options:)"},"doc://Factory/documentation/Factory/SharedContainer":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/sharedcontainer","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"title":"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."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"SharedContainer","kind":"identifier"}]},"doc://Factory/documentation/Factory/ManagedContainer/callAsFunction(key:_:)-8rljq":{"type":"topic","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":", ("},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-8rljq","url":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-8rljq","title":"callAsFunction(key:_:)","kind":"symbol","abstract":[{"text":"Syntactic sugar allows container to create a properly bound ParameterFactory.","type":"text"}]}}} \ No newline at end of file +{"topicSections":[{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/manager"]},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-6ql8v","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-8rljq","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"}],"schemaVersion":{"minor":3,"patch":0,"major":0},"abstract":[{"type":"text","text":"ManagedContainer defines the core protocol all Containers must adopt."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/managedcontainer"]}],"kind":"symbol","sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ManagedContainer"},{"kind":"text","text":" : AnyObject, "},{"text":"Sendable","kind":"typeIdentifier","preciseIdentifier":"s:s8SendableP"}]}],"kind":"declarations"},{"kind":"content","content":[{"level":2,"text":"Overview","type":"heading","anchor":"overview"},{"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"},{"text":"an example of passing such a container to a view model for dependency resolution.","type":"text"}]},{"code":["class ContentViewModel {"," let service: MyServiceType"," init(container: Container) {"," service = container.service()"," }","}"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"type":"text","text":"See "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","type":"reference"},{"type":"text","text":" for more information."}],"type":"paragraph"}]}],"metadata":{"role":"symbol","roleHeading":"Protocol","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ManagedContainer"}],"externalID":"s:7Factory16ManagedContainerP","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"title":"ManagedContainer","symbolKind":"protocol","modules":[{"name":"Factory"}]},"relationshipsSections":[{"type":"inheritsFrom","identifiers":["doc:\/\/Factory\/s8SendableP"],"kind":"relationships","title":"Inherits From"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolving","doc:\/\/Factory\/documentation\/Factory\/SharedContainer"],"kind":"relationships","title":"Inherited By","type":"inheritedBy"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container"],"type":"conformingTypes","title":"Conforming Types","kind":"relationships"}],"references":{"doc://Factory/documentation/Factory/ManagedContainer/decorator(_:)":{"kind":"symbol","title":"decorator(_:)","abstract":[{"type":"text","text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/decorator(_:)","url":"\/documentation\/factory\/managedcontainer\/decorator(_:)","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"((("},{"kind":"keyword","text":"Any"},{"text":") -> ())?)","kind":"text"}]},"doc://Factory/documentation/Factory/Resolving":{"title":"Resolving","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"Resolving","kind":"identifier"}],"url":"\/documentation\/factory\/resolving","navigatorTitle":[{"kind":"identifier","text":"Resolving"}],"abstract":[{"text":"When protocol is applied to a container it enables a typed registration\/resolution mode.","type":"text"}]},"doc://Factory/s8SendableP":{"title":"Swift.Sendable","type":"unresolvable","identifier":"doc:\/\/Factory\/s8SendableP"},"doc://Factory/documentation/Factory/ManagedContainer/promised(key:)-1ucr5":{"url":"\/documentation\/factory\/managedcontainer\/promised(key:)-1ucr5","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-1ucr5","type":"topic","role":"symbol","title":"promised(key:)","kind":"symbol","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"},{"text":": ","kind":"text"},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?>"}],"abstract":[{"text":"Syntactic sugar allows container to create a factory whose optional registration is promised before resolution.","type":"text"}]},"doc://Factory/documentation/Factory/Containers":{"kind":"article","type":"topic","title":"Containers","url":"\/documentation\/factory\/containers","identifier":"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?"}]},"doc://Factory/documentation/Factory/ManagedContainer/callAsFunction(key:_:)-8rljq":{"title":"callAsFunction(key:_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-8rljq","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"StaticString","preciseIdentifier":"s:s12StaticStringV"},{"text":", (","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"url":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-8rljq","abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound ParameterFactory."}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Container":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","title":"Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"url":"\/documentation\/factory\/container","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}],"navigatorTitle":[{"text":"Container","kind":"identifier"}]},"doc://Factory/documentation/Factory/ManagedContainer":{"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","role":"symbol","navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ManagedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer"},"doc://Factory/documentation/Factory/SharedContainer":{"url":"\/documentation\/factory\/sharedcontainer","type":"topic","abstract":[{"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.","type":"text"}],"title":"SharedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"SharedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}]},"doc://Factory/documentation/Factory/ManagedContainer/manager":{"url":"\/documentation\/factory\/managedcontainer\/manager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/manager","type":"topic","required":true,"role":"symbol","title":"manager","kind":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"manager","kind":"identifier"},{"text":": ","kind":"text"},{"text":"ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC","kind":"typeIdentifier"}],"abstract":[{"text":"Defines the ContainerManager used to manage registrations, resolutions, and scope caching for that container. Encapsulating the code in","type":"text"},{"type":"text","text":" "},{"text":"this fashion makes creating and using your own custom containers much simpler.","type":"text"}]},"doc://Factory/documentation/Factory/ManagedContainer/callAsFunction(key:_:)-6ql8v":{"url":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-6ql8v","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-6ql8v","type":"topic","role":"symbol","title":"callAsFunction(key:_:)","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier","text":"StaticString"},{"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"}],"abstract":[{"text":"Syntactic sugar allows container to create a properly bound Factory.","type":"text"}]},"doc://Factory/documentation/Factory/ManagedContainer/promised(key:)-33ecn":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-33ecn","abstract":[{"type":"text","text":"Syntactic sugar allows container to create a parameter factory whose optional registration is promised before resolution."}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"promised","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"url":"\/documentation\/factory\/managedcontainer\/promised(key:)-33ecn","type":"topic","kind":"symbol","role":"symbol","title":"promised(key:)"},"doc://Factory/documentation/Factory/ManagedContainer/reset(options:)":{"url":"\/documentation\/factory\/managedcontainer\/reset(options:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/reset(options:)","type":"topic","role":"symbol","title":"reset(options:)","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"options"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":")"}],"abstract":[{"text":"Defines a thread safe access mechanism to reset the container.","type":"text"}]},"doc://Factory/documentation/Factory/ManagedContainer/with(_:)":{"url":"\/documentation\/factory\/managedcontainer\/with(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/with(_:)","type":"topic","role":"symbol","title":"with(_:)","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"with","kind":"identifier"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:s4Voida","kind":"typeIdentifier","text":"Void"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"text":"Defines a with function to allow container transformation on assignment.","type":"text"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/managedcontainer/callasfunction(key:_:)-6ql8v.json b/docs/data/documentation/factory/managedcontainer/callasfunction(key:_:)-6ql8v.json index 728a4fe8..e6550571 100644 --- a/docs/data/documentation/factory/managedcontainer/callasfunction(key:_:)-6ql8v.json +++ b/docs/data/documentation/factory/managedcontainer/callasfunction(key:_:)-6ql8v.json @@ -1 +1 @@ -{"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-6ql8v"]}],"metadata":{"title":"callAsFunction(key:_:)","externalID":"s:7Factory16ManagedContainerPAAE14callAsFunction3key_A2AVyqd__Gs12StaticStringV_qd__yYbctlF","role":"symbol","modules":[{"name":"Factory"}],"roleHeading":"Instance Method","symbolKind":"method","extendedModule":"Factory","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","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":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound Factory."}],"kind":"symbol","schemaVersion":{"patch":0,"minor":3,"major":0},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":" = "},{"kind":"keyword","text":"#function"},{"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","text":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"languages":["swift"]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-6ql8v","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"ManagedContainer","kind":"identifier"}],"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"title":"ManagedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","type":"topic","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}]},"doc://Factory/documentation/Factory/ManagedContainer/callAsFunction(key:_:)-6ql8v":{"fragments":[{"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"},{"preciseIdentifier":"s:s12StaticStringV","text":"StaticString","kind":"typeIdentifier"},{"text":", () -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-6ql8v","kind":"symbol","abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound Factory."}],"title":"callAsFunction(key:_:)","role":"symbol","url":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-6ql8v"}}} \ No newline at end of file +{"schemaVersion":{"minor":3,"patch":0,"major":0},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"text":"<","kind":"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":" = "},{"kind":"keyword","text":"#function"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"factory"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"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":">"}],"languages":["swift"]}],"kind":"declarations"}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-6ql8v"]}],"metadata":{"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"text":"<","kind":"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":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"symbolKind":"method","title":"callAsFunction(key:_:)","roleHeading":"Instance Method","modules":[{"name":"Factory"}],"externalID":"s:7Factory16ManagedContainerPAAE14callAsFunction3key_A2AVyqd__Gs12StaticStringV_qd__yYbctlF","extendedModule":"Factory"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-6ql8v"},"sections":[],"abstract":[{"text":"Syntactic sugar allows container to create a properly bound Factory.","type":"text"}],"references":{"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer":{"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","role":"symbol","navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ManagedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer/callAsFunction(key:_:)-6ql8v":{"url":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-6ql8v","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-6ql8v","type":"topic","role":"symbol","title":"callAsFunction(key:_:)","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier","text":"StaticString"},{"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"}],"abstract":[{"text":"Syntactic sugar allows container to create a properly bound Factory.","type":"text"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/managedcontainer/callasfunction(key:_:)-8rljq.json b/docs/data/documentation/factory/managedcontainer/callasfunction(key:_:)-8rljq.json index be3b968b..f1116e22 100644 --- a/docs/data/documentation/factory/managedcontainer/callasfunction(key:_:)-8rljq.json +++ b/docs/data/documentation/factory/managedcontainer/callasfunction(key:_:)-8rljq.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"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"},{"kind":"externalParam","text":"key"},{"text":": ","kind":"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"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"languages":["swift"]}]}],"metadata":{"title":"callAsFunction(key:_:)","symbolKind":"method","extendedModule":"Factory","externalID":"s:7Factory16ManagedContainerPAAE14callAsFunction3key_AA09ParameterA0Vyqd__qd_0_Gs12StaticStringV_qd_0_qd__Ybctr0_lF","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"key"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"StaticString","preciseIdentifier":"s:s12StaticStringV"},{"text":", (","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","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"}],"roleHeading":"Instance Method","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-8rljq"},"variants":[{"paths":["\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-8rljq"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","abstract":[{"text":"Syntactic sugar allows container to create a properly bound ParameterFactory.","type":"text"}],"references":{"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"ManagedContainer","kind":"identifier"}],"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"title":"ManagedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","type":"topic","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}]},"doc://Factory/documentation/Factory/ManagedContainer/callAsFunction(key:_:)-8rljq":{"type":"topic","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":", ("},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-8rljq","url":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-8rljq","title":"callAsFunction(key:_:)","kind":"symbol","abstract":[{"text":"Syntactic sugar allows container to create a properly bound ParameterFactory.","type":"text"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"}}} \ No newline at end of file +{"metadata":{"extendedModule":"Factory","title":"callAsFunction(key:_:)","roleHeading":"Instance Method","externalID":"s:7Factory16ManagedContainerPAAE14callAsFunction3key_AA09ParameterA0Vyqd__qd_0_Gs12StaticStringV_qd_0_qd__Ybctr0_lF","modules":[{"name":"Factory"}],"symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"text":"<","kind":"text"},{"text":"P","kind":"genericParameter"},{"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":", ("},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"role":"symbol"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-8rljq"},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound ParameterFactory."}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","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"},{"text":": ","kind":"text"},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"text":" = ","kind":"text"},{"kind":"keyword","text":"#function"},{"kind":"text","text":", "},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"factory","kind":"internalParam"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}]}],"kind":"declarations"}],"schemaVersion":{"major":0,"patch":0,"minor":3},"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-8rljq"]}],"references":{"doc://Factory/documentation/Factory/ManagedContainer":{"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","role":"symbol","navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ManagedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer"},"doc://Factory/documentation/Factory/ManagedContainer/callAsFunction(key:_:)-8rljq":{"title":"callAsFunction(key:_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/callAsFunction(key:_:)-8rljq","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"StaticString","preciseIdentifier":"s:s12StaticStringV"},{"text":", (","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"url":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-8rljq","abstract":[{"type":"text","text":"Syntactic sugar allows container to create a properly bound ParameterFactory."}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]}}} \ 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 03b4ad2d..85fd2a38 100644 --- a/docs/data/documentation/factory/managedcontainer/decorator(_:).json +++ b/docs/data/documentation/factory/managedcontainer/decorator(_:).json @@ -1 +1 @@ -{"abstract":[{"type":"text","text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container."}],"metadata":{"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","role":"symbol","modules":[{"name":"Factory"}],"title":"decorator(_:)","extendedModule":"Factory","externalID":"s:7Factory16ManagedContainerPAAE9decoratoryyyypcSgF","symbolKind":"method"},"sections":[],"kind":"symbol","primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"decorator","kind":"internalParam"},{"kind":"text","text":": (("},{"kind":"keyword","text":"Any"},{"text":") -> ())?)","kind":"text"}]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/managedcontainer\/decorator(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/decorator(_:)"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory/ManagedContainer/decorator(_:)":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"text":"(((","kind":"text"},{"text":"Any","kind":"keyword"},{"kind":"text","text":") -> ())?)"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/decorator(_:)","kind":"symbol","abstract":[{"type":"text","text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container."}],"title":"decorator(_:)","role":"symbol","url":"\/documentation\/factory\/managedcontainer\/decorator(_:)"},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"ManagedContainer","kind":"identifier"}],"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"title":"ManagedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","type":"topic","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"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"},{"kind":"text","text":") -> ())?)"}]}]}],"sections":[],"metadata":{"roleHeading":"Instance Method","title":"decorator(_:)","symbolKind":"method","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"decorator","kind":"identifier"},{"text":"(((","kind":"text"},{"text":"Any","kind":"keyword"},{"kind":"text","text":") -> ())?)"}],"modules":[{"name":"Factory"}],"externalID":"s:7Factory16ManagedContainerPAAE9decoratoryyyypcSgF","extendedModule":"Factory"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/decorator(_:)","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/managedcontainer\/decorator(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"type":"text","text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container."}],"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer/decorator(_:)":{"kind":"symbol","title":"decorator(_:)","abstract":[{"type":"text","text":"Defines a decorator for the container. This decorator will see every dependency resolved by this container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/decorator(_:)","url":"\/documentation\/factory\/managedcontainer\/decorator(_:)","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"((("},{"kind":"keyword","text":"Any"},{"text":") -> ())?)","kind":"text"}]},"doc://Factory/documentation/Factory/ManagedContainer":{"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","role":"symbol","navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ManagedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer"}}} \ 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 cf3f8fb3..17ef2678 100644 --- a/docs/data/documentation/factory/managedcontainer/manager.json +++ b/docs/data/documentation/factory/managedcontainer/manager.json @@ -1 +1 @@ -{"metadata":{"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"manager","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory16ContainerManagerC","kind":"typeIdentifier","text":"ContainerManager"}],"externalID":"s:7Factory16ManagedContainerP7managerAA0C7ManagerCvp","required":true,"modules":[{"name":"Factory"}],"title":"manager","role":"symbol","symbolKind":"property","roleHeading":"Instance Property"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/manager","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"manager"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ContainerManagerC","text":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/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","sections":[],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"ManagedContainer","kind":"identifier"}],"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"title":"ManagedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","type":"topic","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}]},"doc://Factory/documentation/Factory/ContainerManager":{"navigatorTitle":[{"kind":"identifier","text":"ContainerManager"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"ContainerManager"}],"kind":"symbol","url":"\/documentation\/factory\/containermanager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","title":"ContainerManager","abstract":[{"type":"text","text":"ContainerManager manages the registration and scope caching storage mechanisms for a given container."}],"role":"symbol","type":"topic"},"doc://Factory/documentation/Factory/ManagedContainer/manager":{"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"manager","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory16ContainerManagerC","kind":"typeIdentifier","text":"ContainerManager"}],"kind":"symbol","url":"\/documentation\/factory\/managedcontainer\/manager","required":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/manager","title":"manager","role":"symbol","type":"topic","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"},{"type":"text","text":"this fashion makes creating and using your own custom containers much simpler."}]}}} \ No newline at end of file +{"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/manager","interfaceLanguage":"swift"},"metadata":{"role":"symbol","modules":[{"name":"Factory"}],"roleHeading":"Instance Property","required":true,"symbolKind":"property","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"manager","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory16ContainerManagerC","text":"ContainerManager","kind":"typeIdentifier"}],"title":"manager","externalID":"s:7Factory16ManagedContainerP7managerAA0C7ManagerCvp"},"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"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."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"manager","kind":"identifier"},{"kind":"text","text":": "},{"text":"ContainerManager","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"kind":"text","text":" }"}],"languages":["swift"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/managedcontainer\/manager"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"references":{"doc://Factory/documentation/Factory/ManagedContainer/manager":{"url":"\/documentation\/factory\/managedcontainer\/manager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/manager","type":"topic","required":true,"role":"symbol","title":"manager","kind":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"manager","kind":"identifier"},{"text":": ","kind":"text"},{"text":"ContainerManager","preciseIdentifier":"s:7Factory16ContainerManagerC","kind":"typeIdentifier"}],"abstract":[{"text":"Defines the ContainerManager used to manage registrations, resolutions, and scope caching for that container. Encapsulating the code in","type":"text"},{"type":"text","text":" "},{"text":"this fashion makes creating and using your own custom containers much simpler.","type":"text"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer":{"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","role":"symbol","navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ManagedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer"},"doc://Factory/documentation/Factory/ContainerManager":{"title":"ContainerManager","identifier":"doc:\/\/Factory\/documentation\/Factory\/ContainerManager","type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"ContainerManager","kind":"identifier"}],"url":"\/documentation\/factory\/containermanager","navigatorTitle":[{"text":"ContainerManager","kind":"identifier"}],"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 60b357d8..cff3bb8b 100644 --- a/docs/data/documentation/factory/managedcontainer/promised(key:)-1ucr5.json +++ b/docs/data/documentation/factory/managedcontainer/promised(key:)-1ucr5.json @@ -1 +1 @@ -{"variants":[{"paths":["\/documentation\/factory\/managedcontainer\/promised(key:)-1ucr5"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","sections":[],"schemaVersion":{"minor":3,"major":0,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"metadata":{"roleHeading":"Instance Method","extendedModule":"Factory","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"promised"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"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"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"symbolKind":"method","title":"promised(key:)","externalID":"s:7Factory16ManagedContainerPAAE8promised3keyA2AVyqd__SgGs12StaticStringV_tlF","modules":[{"name":"Factory"}],"role":"symbol"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-1ucr5"},"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory whose optional registration is promised before resolution."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"promised","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier","text":"StaticString"},{"text":" = ","kind":"text"},{"text":"#function","kind":"keyword"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?>","kind":"text"}],"platforms":["macOS"]}]},{"content":[{"level":2,"type":"heading","anchor":"discussion","text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public var accountLoader: Factory { promised() }","}"]},{"inlineContent":[{"text":"When run in debug mode and the application attempts to resolve an unregistered accountLoader, ","type":"text"},{"code":"promised()","type":"codeVoice"},{"text":" will trigger a fatalError to","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"inform you of the mistake. But in a released application, "},{"type":"codeVoice","code":"promised()"},{"type":"text","text":" simply returns nil and your application can continue on."}],"type":"paragraph"}],"kind":"content"}],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ManagedContainer/promised(key:)-1ucr5":{"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"},{"text":": ","kind":"text"},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":") -> "},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?>","kind":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-1ucr5","kind":"symbol","abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory whose optional registration is promised before resolution."}],"title":"promised(key:)","role":"symbol","url":"\/documentation\/factory\/managedcontainer\/promised(key:)-1ucr5"},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"ManagedContainer","kind":"identifier"}],"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"title":"ManagedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","type":"topic","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}]},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"}}} \ No newline at end of file +{"metadata":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"promised","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"extendedModule":"Factory","role":"symbol","roleHeading":"Instance Method","externalID":"s:7Factory16ManagedContainerPAAE8promised3keyA2AVyqd__SgGs12StaticStringV_tlF","title":"promised(key:)","symbolKind":"method","modules":[{"name":"Factory"}]},"abstract":[{"type":"text","text":"Syntactic sugar allows container to create a factory whose optional registration is promised before resolution."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-1ucr5","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"promised","kind":"identifier"},{"text":"<","kind":"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"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?>"}],"platforms":["macOS"]}]},{"kind":"content","content":[{"level":2,"anchor":"discussion","text":"Discussion","type":"heading"},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public var accountLoader: Factory { promised() }","}"]},{"inlineContent":[{"text":"When run in debug mode and the application attempts to resolve an unregistered accountLoader, ","type":"text"},{"code":"promised()","type":"codeVoice"},{"type":"text","text":" will trigger a fatalError to"},{"type":"text","text":" "},{"type":"text","text":"inform you of the mistake. But in a released application, "},{"type":"codeVoice","code":"promised()"},{"text":" simply returns nil and your application can continue on.","type":"text"}],"type":"paragraph"}]}],"sections":[],"variants":[{"paths":["\/documentation\/factory\/managedcontainer\/promised(key:)-1ucr5"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"kind":"symbol","references":{"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer/promised(key:)-1ucr5":{"url":"\/documentation\/factory\/managedcontainer\/promised(key:)-1ucr5","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-1ucr5","type":"topic","role":"symbol","title":"promised(key:)","kind":"symbol","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"},{"text":": ","kind":"text"},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?>"}],"abstract":[{"text":"Syntactic sugar allows container to create a factory whose optional registration is promised before resolution.","type":"text"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer":{"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","role":"symbol","navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ManagedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer"}}} \ 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 18c36e5a..a43ba13b 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"]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"abstract":[{"text":"Syntactic sugar allows container to create a parameter factory whose optional registration is promised before resolution.","type":"text"}],"metadata":{"externalID":"s:7Factory16ManagedContainerPAAE8promised3keyAA09ParameterA0Vyqd__qd_0_SgGs12StaticStringV_tr0_lF","title":"promised(key:)","role":"symbol","roleHeading":"Instance Method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"promised","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:s12StaticStringV","text":"StaticString","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7Factory09ParameterA0V","kind":"typeIdentifier","text":"ParameterFactory"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?>"}],"extendedModule":"Factory","modules":[{"name":"Factory"}],"symbolKind":"method"},"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"P"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":" = "},{"kind":"keyword","text":"#function"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"platforms":["macOS"],"languages":["swift"]}]},{"kind":"content","content":[{"text":"Discussion","level":2,"type":"heading","anchor":"discussion"},{"syntax":"swift","type":"codeListing","code":["extension Container {"," public var accountLoader: Factory { _ in promised() }","}"]},{"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","type":"text"},{"type":"text","text":" "},{"text":"inform you of the mistake. But in a released application, ","type":"text"},{"code":"promised()","type":"codeVoice"},{"text":" simply returns nil and your application can continue on.","type":"text"}]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-33ecn"},"sections":[],"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ManagedContainer/promised(key:)-33ecn":{"type":"topic","title":"promised(key:)","kind":"symbol","abstract":[{"text":"Syntactic sugar allows container to create a parameter factory whose optional registration is promised before resolution.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-33ecn","url":"\/documentation\/factory\/managedcontainer\/promised(key:)-33ecn","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"promised","kind":"identifier"},{"text":"<","kind":"text"},{"text":"P","kind":"genericParameter"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"StaticString","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory"},{"text":"<","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}]},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"ManagedContainer","kind":"identifier"}],"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"title":"ManagedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","type":"topic","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"metadata":{"role":"symbol","externalID":"s:7Factory16ManagedContainerPAAE8promised3keyAA09ParameterA0Vyqd__qd_0_SgGs12StaticStringV_tr0_lF","roleHeading":"Instance Method","extendedModule":"Factory","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"promised"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"P"},{"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","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?>"}],"modules":[{"name":"Factory"}],"title":"promised(key:)","symbolKind":"method"},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"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":": "},{"text":"StaticString","preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier"},{"kind":"text","text":" = "},{"text":"#function","kind":"keyword"},{"text":") -> ","kind":"text"},{"text":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","preciseIdentifier":"s:7Factory09ParameterA0V","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?>","kind":"text"}]}],"kind":"declarations"},{"kind":"content","content":[{"type":"heading","text":"Discussion","level":2,"anchor":"discussion"},{"code":["extension Container {"," public var accountLoader: Factory { _ in promised() }","}"],"type":"codeListing","syntax":"swift"},{"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","type":"text"},{"text":" ","type":"text"},{"text":"inform you of the mistake. But in a released application, ","type":"text"},{"type":"codeVoice","code":"promised()"},{"text":" simply returns nil and your application can continue on.","type":"text"}],"type":"paragraph"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"variants":[{"paths":["\/documentation\/factory\/managedcontainer\/promised(key:)-33ecn"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-33ecn","interfaceLanguage":"swift"},"abstract":[{"text":"Syntactic sugar allows container to create a parameter factory whose optional registration is promised before resolution.","type":"text"}],"schemaVersion":{"patch":0,"minor":3,"major":0},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer/promised(key:)-33ecn":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/promised(key:)-33ecn","abstract":[{"type":"text","text":"Syntactic sugar allows container to create a parameter factory whose optional registration is promised before resolution."}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"promised","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"P"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?>"}],"url":"\/documentation\/factory\/managedcontainer\/promised(key:)-33ecn","type":"topic","kind":"symbol","role":"symbol","title":"promised(key:)"},"doc://Factory/documentation/Factory/ManagedContainer":{"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","role":"symbol","navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ManagedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer"}}} \ 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 09193c5b..69558133 100644 --- a/docs/data/documentation/factory/managedcontainer/reset(options:).json +++ b/docs/data/documentation/factory/managedcontainer/reset(options:).json @@ -1 +1 @@ -{"abstract":[{"type":"text","text":"Defines a thread safe access mechanism to reset the container."}],"kind":"symbol","metadata":{"title":"reset(options:)","externalID":"s:7Factory16ManagedContainerPAAE5reset7optionsyAA0A12ResetOptionsO_tF","modules":[{"name":"Factory"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"options"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"text":")","kind":"text"}],"extendedModule":"Factory","role":"symbol","symbolKind":"method","roleHeading":"Instance Method"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/managedcontainer\/reset(options:)"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/reset(options:)","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"options"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":" = .all)"}]}]}],"references":{"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"ManagedContainer","kind":"identifier"}],"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"title":"ManagedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","type":"topic","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ManagedContainer/reset(options:)":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"options"},{"text":": ","kind":"text"},{"text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":")"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/reset(options:)","kind":"symbol","abstract":[{"type":"text","text":"Defines a thread safe access mechanism to reset the container."}],"title":"reset(options:)","role":"symbol","url":"\/documentation\/factory\/managedcontainer\/reset(options:)"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"title":"FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}]}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"text":"(","kind":"text"},{"text":"options","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","text":"FactoryResetOptions","kind":"typeIdentifier"},{"text":" = .all)","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/reset(options:)","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/factory\/managedcontainer\/reset(options:)"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"text":"Defines a thread safe access mechanism to reset the container.","type":"text"}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"text":"options","kind":"externalParam"},{"kind":"text","text":": "},{"text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"text":")","kind":"text"}],"role":"symbol","title":"reset(options:)","extendedModule":"Factory","modules":[{"name":"Factory"}],"roleHeading":"Instance Method","externalID":"s:7Factory16ManagedContainerPAAE5reset7optionsyAA0A12ResetOptionsO_tF","symbolKind":"method"},"sections":[],"references":{"doc://Factory/documentation/Factory/ManagedContainer/reset(options:)":{"url":"\/documentation\/factory\/managedcontainer\/reset(options:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/reset(options:)","type":"topic","role":"symbol","title":"reset(options:)","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"kind":"externalParam","text":"options"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":")"}],"abstract":[{"text":"Defines a thread safe access mechanism to reset the container.","type":"text"}]},"doc://Factory/documentation/Factory/FactoryResetOptions":{"title":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","type":"topic","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer":{"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","role":"symbol","navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ManagedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/managedcontainer/with(_:).json b/docs/data/documentation/factory/managedcontainer/with(_:).json index e4575d4b..735c597d 100644 --- a/docs/data/documentation/factory/managedcontainer/with(_:).json +++ b/docs/data/documentation/factory/managedcontainer/with(_:).json @@ -1 +1 @@ -{"abstract":[{"text":"Defines a with function to allow container transformation on assignment.","type":"text"}],"kind":"symbol","metadata":{"title":"with(_:)","externalID":"s:7Factory16ManagedContainerPAAE4withyxyxXEF","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"with","kind":"identifier"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"text":"Void","preciseIdentifier":"s:s4Voida","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"extendedModule":"Factory","role":"symbol","symbolKind":"method","roleHeading":"Instance Method"},"variants":[{"paths":["\/documentation\/factory\/managedcontainer\/with(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/with(_:)","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"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":"with"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"transform"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]}]}],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ManagedContainer/with(_:)":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"with","kind":"identifier"},{"text":"((","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:s4Voida","text":"Void","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/with(_:)","kind":"symbol","abstract":[{"type":"text","text":"Defines a with function to allow container transformation on assignment."}],"title":"with(_:)","role":"symbol","url":"\/documentation\/factory\/managedcontainer\/with(_:)"},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"ManagedContainer","kind":"identifier"}],"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"title":"ManagedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","type":"topic","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}]}}} \ No newline at end of file +{"schemaVersion":{"minor":3,"major":0,"patch":0},"abstract":[{"text":"Defines a with function to allow container transformation on assignment.","type":"text"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/with(_:)"},"variants":[{"paths":["\/documentation\/factory\/managedcontainer\/with(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"]]},"sections":[],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"with"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"transform","kind":"internalParam"},{"text":": (","kind":"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"}],"metadata":{"modules":[{"name":"Factory"}],"title":"with(_:)","extendedModule":"Factory","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"with","kind":"identifier"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","role":"symbol","roleHeading":"Instance Method","externalID":"s:7Factory16ManagedContainerPAAE4withyxyxXEF"},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ManagedContainer":{"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","role":"symbol","navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ManagedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer"},"doc://Factory/documentation/Factory/ManagedContainer/with(_:)":{"url":"\/documentation\/factory\/managedcontainer\/with(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer\/with(_:)","type":"topic","role":"symbol","title":"with(_:)","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"with","kind":"identifier"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:s4Voida","kind":"typeIdentifier","text":"Void"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"text":"Defines a with function to allow container transformation on assignment.","type":"text"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/migration.json b/docs/data/documentation/factory/migration.json index 1937d4d5..389086a1 100644 --- a/docs/data/documentation/factory/migration.json +++ b/docs/data/documentation/factory/migration.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"abstract":[{"type":"text","text":"Moving from 1.x to 2.0"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"paths":["\/documentation\/factory\/migration"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"article","sections":[],"metadata":{"modules":[{"name":"Factory"}],"role":"article","roleHeading":"Article","title":"Migration"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Migration","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"content","content":[{"text":"Overview","level":2,"type":"heading","anchor":"Overview"},{"inlineContent":[{"type":"text","text":"Factory 2.0 is planning for the future, and as such it needs to break from the past."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"Containers in Factory 1.X were essentially namespaces, and not actual object instances that could be passed around. That made the overall syntax slightly cleaner, but the tradeoff resulted in a lack of functionality and the static class definitions prevented Factory from being used in anything other than a Service Locator role."}],"type":"paragraph"},{"inlineContent":[{"text":"That wasn’t good.","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 and shared as needed."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Let’s take a look.","type":"text"}]},{"type":"heading","anchor":"Defining-a-Factory","level":2,"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":[{"text":"Factory, as you may have guessed from the name, is no exception. Here’s a simple registration that returns a ","type":"text"},{"code":"ServiceType","type":"codeVoice"},{"type":"text","text":" dependency."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"]},{"inlineContent":[{"text":"We extended a Factory ","type":"text"},{"code":"Container","type":"codeVoice"},{"type":"text","text":" and within that container we defined a new computed variable of type "},{"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"},{"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"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As such, a complete, formal Factory definition would look like this…"}]},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," Factory(self, scope: .unique) { "," MyService()"," }","}"]},{"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"},{"code":["var service: Factory {"," self { MyService() }","}"],"syntax":"swift","type":"codeListing"},{"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"},{"text":"). Every time we resolve this factory we’ll get a new, unique instance of our object.","type":"text"}]},{"inlineContent":[{"type":"text","text":"Just for reference, here’s are the Factory 1.x and 2.0 registration definitions side by side."}],"type":"paragraph"},{"code":["extension Container {"," \/\/ Factory 1.x"," static var service = Factory { MyService() }"," "," \/\/ Factory 2.0"," var service: Factory { self { MyService() } }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The new version is one character longer. Hey. I tried… ;)"}]},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"See the ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers"},{"text":" page for a lot more on the subject.","type":"text"}],"type":"paragraph"},{"text":"Resolving a Factory","type":"heading","level":2,"anchor":"Resolving-a-Factory"},{"type":"paragraph","inlineContent":[{"type":"text","text":"To resolve a Factory and obtain an object or service of the desired type, one simply calls the Factory as a function. If you’re passing an instance of a container around to your views or view models, just call it directly."}]},{"code":["let service = container.service()"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"text":"The resolved instance may be brand new or Factory may return a cached value from the specified ","type":"text"},{"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"},{"type":"text","text":" container that’s provided for each and every container type."}]},{"syntax":"swift","code":["let service = Container.shared.service()"],"type":"codeListing"},{"inlineContent":[{"type":"text","text":"Note that this is fundamentally the same as the Service Locator pattern used in Factory 1.0."}],"type":"paragraph"},{"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","code":["@Injected(\\.service) var service: ServiceType"],"syntax":"swift"},{"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"},{"inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected"},{"type":"text","text":", "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected"},{"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"},{"type":"text","text":" for more."}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["\/\/ Factory 1.0 version for reference","@Injected(Container.service) var service: ServiceType"]},{"level":2,"text":"Registering a new Factory closure","anchor":"Registering-a-new-Factory-closure","type":"heading"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"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."}]},{"syntax":"swift","type":"codeListing","code":["container.service.register {"," MockService()","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This new factory closure overrides the original factory closure and clears the associated scope so that the next time this factory is resolved Factory will evaluate the new closure and return an instance of the newly registered object instead."}]},{"type":"aside","content":[{"type":"paragraph","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"}]}],"style":"note","name":"Note"},{"inlineContent":[{"type":"text","text":"Again, see the "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","isActive":true},{"text":" page for a lot more on the subject.","type":"text"}],"type":"paragraph"},{"level":2,"type":"heading","anchor":"Scopes","text":"Scopes"},{"inlineContent":[{"text":"Scopes behave exactly as they did before, although they’re now defined using a modifier syntax on the Factory.","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var singletonService: Factory {"," self { MyService() }.singleton"," }"," var decoratedSharedService: Factory {"," self { MyService() }"," .shared"," .decorator { print(\"DECORATING \\($0.id)\") }"," }","}"]},{"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."}],"type":"paragraph"},{"type":"heading","level":2,"anchor":"Resetting","text":"Resetting"},{"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"},{"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)"]},{"inlineContent":[{"type":"text","text":"You can also reset a specific scope cache while leaving the others intact."}],"type":"paragraph"},{"type":"codeListing","code":["Container.shared.manager.reset(scope: .cached)"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"Resetting a container only affects that container.","type":"text"}]},{"text":"Creating Custom Containers and Scopes","type":"heading","level":2,"anchor":"Creating-Custom-Containers-and-Scopes"},{"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"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","type":"reference","isActive":true},{"type":"text","text":" or "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes"},{"text":" documentation.","type":"text"}]}]}],"references":{"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory/Injected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"title":"Injected","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}]},"doc://Factory/documentation/Factory/Containers":{"kind":"article","abstract":[{"text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","title":"Containers","type":"topic","url":"\/documentation\/factory\/containers","role":"article"},"doc://Factory/documentation/Factory/InjectedObject":{"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","role":"symbol","title":"InjectedObject"},"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"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"callAsFunction","kind":"identifier"},{"kind":"text","text":"() -> "},{"text":"T","kind":"typeIdentifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","title":"callAsFunction()","url":"\/documentation\/factory\/factory\/callasfunction()","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","title":"Scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"url":"\/documentation\/factory\/scopes","kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/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"},{"text":" ","kind":"text"},{"kind":"identifier","text":"WeakLazyInjected"}]}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"schemaVersion":{"patch":0,"minor":3,"major":0},"sections":[],"primaryContentSections":[{"kind":"content","content":[{"text":"Overview","level":2,"anchor":"Overview","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory 2.0 is planning for the future, and as such it needs to break from the past."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Containers in Factory 1.X were essentially namespaces, and not actual object instances that could be passed around. That made the overall syntax slightly cleaner, but the tradeoff resulted in a lack of functionality and the static class definitions prevented Factory from being used in anything other than a Service Locator role."}]},{"type":"paragraph","inlineContent":[{"text":"That wasn’t good.","type":"text"}]},{"inlineContent":[{"type":"text","text":"So that changed in Factory 2.0. Instead of defining Factory’s as static variables on a class, they’re now defined and returned as computed variables on the container itself. And instances of a given container can be created and shared as needed."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Let’s take a look.","type":"text"}]},{"level":2,"text":"Defining a Factory","anchor":"Defining-a-Factory","type":"heading"},{"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":[{"text":"Factory, as you may have guessed from the name, is no exception. Here’s a simple registration that returns a ","type":"text"},{"code":"ServiceType","type":"codeVoice"},{"text":" dependency.","type":"text"}],"type":"paragraph"},{"code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"We extended a Factory ","type":"text"},{"code":"Container","type":"codeVoice"},{"text":" and within that container we defined a new computed variable of type ","type":"text"},{"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":"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"}]},{"code":["var service: Factory {"," Factory(self, scope: .unique) { "," MyService()"," }","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","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":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }","}"]},{"inlineContent":[{"type":"text","text":"That Factory is then returned to the caller, usually to be evaluated (see "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()"},{"type":"text","text":"). Every time we resolve this factory we’ll get a new, unique instance of our object."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Just for reference, here’s are the Factory 1.x and 2.0 registration definitions side by side.","type":"text"}]},{"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"}]},{"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"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","type":"reference","isActive":true},{"text":" page for a lot more on the subject.","type":"text"}]},{"type":"heading","level":2,"anchor":"Resolving-a-Factory","text":"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"},{"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":[{"type":"text","text":"We can also use the "},{"code":"shared","type":"codeVoice"},{"type":"text","text":" container that’s provided for each and every container type."}],"type":"paragraph"},{"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"},{"code":["\/\/ Factory 1.0 resolution","let service = Container.service()"],"syntax":"swift","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"]},{"type":"paragraph","inlineContent":[{"text":"The @Injected property wrapper looks for dependencies in the shared container, so this example is functionally identical to the ","type":"text"},{"code":"Container.shared.service()","type":"codeVoice"},{"text":" version shown above.","type":"text"}]},{"inlineContent":[{"type":"text","text":"See "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected"},{"text":", ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected"},{"type":"text","text":", "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","type":"reference","isActive":true},{"type":"text","text":", "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected","type":"reference"},{"text":" and ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","isActive":true,"type":"reference"},{"text":" for more.","type":"text"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["\/\/ Factory 1.0 version for reference","@Injected(Container.service) var service: ServiceType"]},{"type":"heading","anchor":"Registering-a-new-Factory-closure","text":"Registering a new Factory closure","level":2},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"It’s easy, and works pretty much the same as it did before. Just register a new closure with the Factory from its container."}]},{"type":"codeListing","syntax":"swift","code":["container.service.register {"," MockService()","}"]},{"type":"paragraph","inlineContent":[{"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"}]},{"name":"Note","content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"text":"Warning","type":"text"}],"type":"strong"},{"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"}]}],"style":"note","type":"aside"},{"inlineContent":[{"text":"Again, see the ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers"},{"type":"text","text":" page for a lot more on the subject."}],"type":"paragraph"},{"level":2,"type":"heading","anchor":"Scopes","text":"Scopes"},{"type":"paragraph","inlineContent":[{"text":"Scopes behave exactly as they did before, although they’re now defined using a modifier syntax on the Factory.","type":"text"}]},{"code":["extension Container {"," var singletonService: Factory {"," self { MyService() }.singleton"," }"," var decoratedSharedService: Factory {"," self { MyService() }"," .shared"," .decorator { print(\"DECORATING \\($0.id)\") }"," }","}"],"type":"codeListing","syntax":"swift"},{"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","type":"heading","level":2,"text":"Resetting"},{"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":[{"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":"text"}]},{"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)"],"syntax":"swift","type":"codeListing"},{"inlineContent":[{"text":"You can also reset a specific scope cache while leaving the others intact.","type":"text"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["Container.shared.manager.reset(scope: .cached)"]},{"inlineContent":[{"type":"text","text":"Resetting a container only affects that container."}],"type":"paragraph"},{"anchor":"Creating-Custom-Containers-and-Scopes","type":"heading","text":"Creating Custom Containers and Scopes","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"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","isActive":true},{"type":"text","text":" or "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"reference"},{"type":"text","text":" documentation."}]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Migration"},"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Article","role":"article","title":"Migration"},"kind":"article","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/migration"]}],"abstract":[{"text":"Moving from 1.x to 2.0","type":"text"}],"references":{"doc://Factory/documentation/Factory/WeakLazyInjected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"title":"WeakLazyInjected","url":"\/documentation\/factory\/weaklazyinjected","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"text":"WeakLazyInjected","kind":"identifier"}]},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}]},"doc://Factory/documentation/Factory/Containers":{"kind":"article","type":"topic","title":"Containers","url":"\/documentation\/factory\/containers","identifier":"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?"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Injected":{"navigatorTitle":[{"text":"Injected","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"role":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}]},"doc://Factory/documentation/Factory/Factory/callAsFunction()":{"role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"text":"() -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"kind":"symbol","title":"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"},{"text":" ","type":"text"},{"text":"return a cached value from the specified scope.","type":"text"}],"url":"\/documentation\/factory\/factory\/callasfunction()","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory\/callAsFunction()","type":"topic"},"doc://Factory/documentation/Factory/DynamicInjected":{"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"DynamicInjected"}],"navigatorTitle":[{"text":"DynamicInjected","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected","kind":"symbol","type":"topic","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"title":"DynamicInjected","role":"symbol","url":"\/documentation\/factory\/dynamicinjected"},"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","title":"InjectedObject","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/modifiers.json b/docs/data/documentation/factory/modifiers.json index 12f10f89..4b6e1992 100644 --- a/docs/data/documentation/factory/modifiers.json +++ b/docs/data/documentation/factory/modifiers.json @@ -1 +1 @@ -{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/modifiers"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"schemaVersion":{"minor":3,"major":0,"patch":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Modifiers"},"primaryContentSections":[{"content":[{"anchor":"Overview","text":"Overview","level":2,"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":[{"type":"text","text":"Modifiers make it easy to define a Factory’s options in the Factory registration…"}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public func myService: Factory() {"," self { MyService() }"," .singleton"," .onTest { MockAnalyticsEngine() }"," }","}"]},{"type":"paragraph","inlineContent":[{"text":"After the fact, when the application runs…","type":"text"}]},{"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":[{"text":"Or even under direct program control…","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["func logout() {"," ..."," Container.shared.userProviding.register { nil }"," ...","}"]},{"level":2,"text":"Modifiers","anchor":"Modifiers","type":"heading"},{"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:"}]},{"items":[{"content":[{"inlineContent":[{"type":"text","text":"Scopes: Defines just how long a particular dependency persists."}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"text":"Registrations: Updating or changing the dependency to be provided.","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Contexts: Defines Factory overrides that should occur when the app is running is a specific context."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Decorators: Defines code to be run whenever a dependency is resolved."}]}]},{"content":[{"inlineContent":[{"type":"text","text":"Resets: Reseting a Factory’s registrations or scope cache."}],"type":"paragraph"}]}],"type":"unorderedList"},{"type":"paragraph","inlineContent":[{"text":"Plus a few more, but that covers most of them.","type":"text"}]},{"anchor":"Resolving-a-Factory","text":"Resolving a Factory","level":2,"type":"heading"},{"inlineContent":[{"type":"text","text":"As mentioned in "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","isActive":true,"type":"reference"},{"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."}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["let myService = Container.shared.myService()"]},{"inlineContent":[{"type":"text","text":"This code asks "},{"code":"Container.shared.myService","type":"codeVoice"},{"type":"text","text":" for a Factory, and then asks the Factory to resolve itself using its "},{"code":"callAsFunction","type":"codeVoice"},{"type":"text","text":" resolution shortcut."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"But consider the original definition."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public func myService: Factory() {"," self { MyService() }"," .singleton"," .onTest { MockAnalyticsEngine() }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"code":"myService","type":"codeVoice"},{"type":"text","text":" variable is a computed function."}]},{"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"}]},{"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."}]},{"level":2,"text":"The Factory Wins","type":"heading","anchor":"The-Factory-Wins"},{"inlineContent":[{"type":"text","text":"Let’s say, for example, that we run the following code to change the factory context during a unit test."}],"type":"paragraph"},{"code":["Container.shared.myService.onTest { NullAnalyticsEngine() }"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"text":"And then a bit further down we resolve our service.","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["let myService = Container.shared.myService()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now the question is: Do we now have an instance of "},{"code":"NullAnalyticsEngine","type":"codeVoice"},{"text":", or ","type":"text"},{"type":"codeVoice","code":"MockAnalyticsEngine"},{"text":"?","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As may be apparent from the section title, we actually have an instance of "},{"type":"codeVoice","code":"MockAnalyticsEngine"},{"type":"text","text":". But why? Didn’t we just change it?"}]},{"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"},{"type":"paragraph","inlineContent":[{"text":"Second is that when we resolved ","type":"text"},{"type":"codeVoice","code":"myService"},{"type":"text","text":" we called "},{"type":"codeVoice","code":"Container.shared.myService"},{"type":"text","text":" again, which built a new Factory, which defined a scope, "},{"type":"strong","inlineContent":[{"text":"and which once more defined ","type":"text"},{"code":"onTest","type":"codeVoice"}]},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And so Factory went with its most recent definition."}]},{"anchor":"SwiftUI","text":"SwiftUI","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"text":"Similar behavior can be seen in SwiftUI itself.","type":"text"}]},{"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":[{"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","inlineContent":[{"type":"text","text":"So what can we do?"}]},{"text":"External Setup","anchor":"External-Setup","type":"heading","level":2},{"inlineContent":[{"type":"text","text":"One solution is to be careful what we put inside our factory definition."}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public func myService: Factory() {"," self { MyService() }"," .singleton"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And then we add anything we might want to change later as an externally defined option."}]},{"syntax":"swift","type":"codeListing","code":["extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," myService"," .onTest { MockAnalyticsEngine() }"," #endif"," }","}"]},{"level":2,"text":"Reset","anchor":"Reset","type":"heading"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"syntax":"swift","code":["public func myService: Factory() {"," self { MyService() }"," .singleton"," .onTest { MockAnalyticsEngine() }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"We’d probably want to add a reset modifier to our test code.","type":"text"}]},{"syntax":"swift","code":["Container.shared.myService"," .onTest { NullAnalyticsEngine() }"," .reset(.scope)"],"type":"codeListing"},{"name":"Warning","style":"warning","type":"aside","content":[{"inlineContent":[{"text":"With ","type":"text"},{"type":"codeVoice","code":"reset"},{"text":" make sure you specify that you only want to clear the scope. Calling ","type":"text"},{"type":"codeVoice","code":"reset"},{"text":" without a parameter clears everything, including contexts like the one you just set!","type":"text"}],"type":"paragraph"}]},{"type":"heading","level":2,"text":"Chaining","anchor":"Chaining"},{"inlineContent":[{"type":"text","text":"Another solution that might work in some circumstances is chaining."}],"type":"paragraph"},{"type":"codeListing","code":["let myService = Container.shared.myService"," .onTest { NullAnalyticsEngine() }"," .()"],"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"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Or we can use a new modifier added to Factory 2.1."}]},{"anchor":"Once","level":2,"text":"Once","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"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":[{"type":"text","text":"once"}]}]},{"syntax":"swift","code":["extension Container {"," public func myService: Factory() {"," self { MyService() }"," .singleton"," .onTest { MockAnalyticsEngine() }"," .once()"," }","}"],"type":"codeListing"},{"inlineContent":[{"type":"text","text":"So when we do:"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["Container.shared.myService.onTest { NullAnalyticsEngine() }"]},{"inlineContent":[{"text":"Our Factory is constructed, the singleton is applied, the internal onTest is applied, and then the new onTest is applied.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"And then later, when we resolve our service.","type":"text"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["let myService = Container.shared.myService()"]},{"inlineContent":[{"type":"text","text":"Our Factory is constructed, but the internal singleton modifier has already occurred once, so it’s ignored, keeping the current value. Similarly, the internal onTest has already occurred once, so it too is ignored, again maintaining the current value."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"Which means that we get our "},{"type":"codeVoice","code":"NullAnalyticsEngine"},{"type":"text","text":", just like we wanted."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"paragraph","inlineContent":[{"text":"Contexts, in particular, should probably be defined in the Container’s autoRegister function.","type":"text"}]}],"kind":"content"}],"sections":[],"abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"metadata":{"title":"Factory Modifiers","modules":[{"name":"Factory"}],"role":"article","roleHeading":"Article"},"kind":"article","seeAlsoSections":[{"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,"title":"Advanced Topics"}],"references":{"doc://Factory/documentation/Factory/Cycle":{"type":"topic","kind":"article","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"title":"Resolution Cycles","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","url":"\/documentation\/factory\/cycle","role":"article"},"doc://Factory/documentation/Factory/Modules":{"role":"article","title":"Modular Development","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","url":"\/documentation\/factory\/modules","kind":"article","type":"topic"},"doc://Factory/documentation/Factory/Functional":{"type":"topic","kind":"article","title":"Functional Injection","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"url":"\/documentation\/factory\/functional","identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","role":"article"},"doc://Factory/documentation/Factory/Tags":{"role":"article","title":"Tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","url":"\/documentation\/factory\/tags","kind":"article","type":"topic"},"doc://Factory/documentation/Factory/Optionals":{"type":"topic","kind":"article","title":"Optionals and Dynamic Registration","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","url":"\/documentation\/factory\/optionals","role":"article"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/GettingStarted":{"type":"topic","title":"Getting Started","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","url":"\/documentation\/factory\/gettingstarted","role":"collectionGroup"},"doc://Factory/documentation/Factory/Design":{"type":"topic","kind":"article","title":"Designing Factory","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","url":"\/documentation\/factory\/design","role":"article"}}} \ No newline at end of file +{"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}],"metadata":{"title":"Factory Modifiers","roleHeading":"Article","role":"article","modules":[{"name":"Factory"}]},"abstract":[{"type":"text","text":"Considerations when defining and redefining a Factory’s behavior."}],"kind":"article","primaryContentSections":[{"kind":"content","content":[{"level":2,"anchor":"Overview","text":"Overview","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"When Factory was redesigned for Factory 2.0 the decision was made to provide many of Factory’s configuration options using a modifier syntax similar to that of SwiftUI."}]},{"inlineContent":[{"type":"text","text":"Modifiers make it easy to define a Factory’s options in the Factory registration…"}],"type":"paragraph"},{"syntax":"swift","code":["extension Container {"," public func myService: Factory() {"," self { MyService() }"," .singleton"," .onTest { MockAnalyticsEngine() }"," }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"After the fact, when the application runs…","type":"text"}]},{"syntax":"swift","code":["extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," myService"," .onArg(\"mock0\") { EmptyService() }"," .onArg(\"mock1\") { MockServiceN(1) }"," .onArg(\"error\") { MockError(404) }"," #endif"," }","}"],"type":"codeListing"},{"inlineContent":[{"text":"Or even under direct program control…","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["func logout() {"," ..."," Container.shared.userProviding.register { nil }"," ...","}"]},{"type":"heading","anchor":"Modifiers","text":"Modifiers","level":2},{"inlineContent":[{"type":"text","text":"Factory provides quite a few modifiers for your use, but they basically break down into a few different categories:"}],"type":"paragraph"},{"items":[{"content":[{"inlineContent":[{"text":"Scopes: Defines just how long a particular dependency persists.","type":"text"}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Registrations: Updating or changing the dependency to be provided."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Contexts: Defines Factory overrides that should occur when the app is running is a specific context."}]}]},{"content":[{"inlineContent":[{"type":"text","text":"Decorators: Defines code to be run whenever a dependency is resolved."}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"text":"Resets: Reseting a Factory’s registrations or scope cache.","type":"text"}],"type":"paragraph"}]}],"type":"unorderedList"},{"type":"paragraph","inlineContent":[{"text":"Plus a few more, but that covers most of them.","type":"text"}]},{"text":"Resolving a Factory","anchor":"Resolving-a-Factory","level":2,"type":"heading"},{"inlineContent":[{"type":"text","text":"As mentioned in "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted"},{"type":"text","text":", there are many ways to resolve a Factory. Here’s a simple example that resolves the "},{"code":"myService","type":"codeVoice"},{"text":" Factory we defined above.","type":"text"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["let myService = Container.shared.myService()"]},{"inlineContent":[{"type":"text","text":"This code asks "},{"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"},{"text":" resolution shortcut.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"But consider the original definition."}],"type":"paragraph"},{"type":"codeListing","code":["extension Container {"," public func myService: Factory() {"," self { MyService() }"," .singleton"," .onTest { MockAnalyticsEngine() }"," }","}"],"syntax":"swift"},{"inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"myService"},{"type":"text","text":" variable is a computed function."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"When it’s ’called, the ","type":"text"},{"code":"self { MyService() }","type":"codeVoice"},{"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."}]},{"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"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"That may seem like a lot of overhead, but it actually isn’t. As we’ve mentioned elsewhere, Factory’s are like SwiftUI Views. Its structs and modifiers are lightweight and transitory value types, created when needed and then immediately discarded once their purpose has been served."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"There are, however, several things we need to consider."}],"type":"paragraph"},{"type":"heading","level":2,"text":"The Factory Wins","anchor":"The-Factory-Wins"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s say, for example, that we run the following code to change the factory context during a unit test."}]},{"type":"codeListing","syntax":"swift","code":["Container.shared.myService.onTest { NullAnalyticsEngine() }"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And then a bit further down we resolve our service."}]},{"type":"codeListing","syntax":"swift","code":["let myService = Container.shared.myService()"]},{"type":"paragraph","inlineContent":[{"text":"Now the question is: Do we now have an instance of ","type":"text"},{"code":"NullAnalyticsEngine","type":"codeVoice"},{"text":", or ","type":"text"},{"type":"codeVoice","code":"MockAnalyticsEngine"},{"text":"?","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As may be apparent from the section title, we actually have an instance of "},{"type":"codeVoice","code":"MockAnalyticsEngine"},{"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"}]},{"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"},{"text":" we called ","type":"text"},{"type":"codeVoice","code":"Container.shared.myService"},{"text":" again, which built a new Factory, which defined a scope, ","type":"text"},{"inlineContent":[{"type":"text","text":"and which once more defined "},{"code":"onTest","type":"codeVoice"}],"type":"strong"},{"text":".","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"And so Factory went with its most recent definition.","type":"text"}]},{"anchor":"SwiftUI","level":2,"type":"heading","text":"SwiftUI"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Similar behavior can be seen in SwiftUI itself."}]},{"syntax":"swift","type":"codeListing","code":["struct innerView: View {"," var body: some View {"," Text(\"Hello\")"," .foregroundColor(.red)"," }","}","struct outerView: View {"," var body: some View {"," innerView()"," .foregroundColor(.green)"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here the color of the “Hello” text is red, despite our attempt to override it. The innermost bound property wins."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So what can we do?"}]},{"anchor":"External-Setup","text":"External Setup","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"One solution is to be careful what we put inside our factory definition."}]},{"type":"codeListing","code":["extension Container {"," public func myService: Factory() {"," self { MyService() }"," .singleton"," }","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"And then we add anything we might want to change later as an externally defined option.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," myService"," .onTest { MockAnalyticsEngine() }"," #endif"," }","}"]},{"text":"Reset","type":"heading","anchor":"Reset","level":2},{"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"},{"code":["public func myService: Factory() {"," self { MyService() }"," .singleton"," .onTest { MockAnalyticsEngine() }","}"],"type":"codeListing","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)"],"syntax":"swift","type":"codeListing"},{"content":[{"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":"paragraph"}],"style":"warning","type":"aside","name":"Warning"},{"anchor":"Chaining","text":"Chaining","level":2,"type":"heading"},{"inlineContent":[{"type":"text","text":"Another solution that might work in some circumstances is chaining."}],"type":"paragraph"},{"code":["let myService = Container.shared.myService"," .onTest { NullAnalyticsEngine() }"," .()"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"This way the internal definitions are applied, then onTest is updated, and then we immediately resolve the service using the latest definition.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"Or we can use a new modifier added to Factory 2.1.","type":"text"}]},{"level":2,"anchor":"Once","type":"heading","text":"Once"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"once"},{"type":"text","text":" modifier basically tells the system that anything that occurs before it should only be done "},{"type":"strong","inlineContent":[{"type":"text","text":"once"}]}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public func myService: Factory() {"," self { MyService() }"," .singleton"," .onTest { MockAnalyticsEngine() }"," .once()"," }","}"]},{"type":"paragraph","inlineContent":[{"text":"So when we do:","type":"text"}]},{"code":["Container.shared.myService.onTest { NullAnalyticsEngine() }"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"text":"Our Factory is constructed, the singleton is applied, the internal onTest is applied, and then the new onTest is applied.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"And then later, when we resolve our service."}],"type":"paragraph"},{"code":["let myService = Container.shared.myService()"],"syntax":"swift","type":"codeListing"},{"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"}]},{"inlineContent":[{"text":"Which means that we get our ","type":"text"},{"type":"codeVoice","code":"NullAnalyticsEngine"},{"type":"text","text":", just like we wanted."}],"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."}]},{"inlineContent":[{"text":"Contexts, in particular, should probably be defined in the Container’s autoRegister function.","type":"text"}],"type":"paragraph"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Modifiers"},"sections":[],"schemaVersion":{"patch":0,"minor":3,"major":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/modifiers"]}],"references":{"doc://Factory/documentation/Factory/Design":{"url":"\/documentation\/factory\/design","title":"Designing Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","kind":"article","role":"article","abstract":[{"text":"Rationale behind the design decisions made in Factory 1.0 and 2.0","type":"text"}],"type":"topic"},"doc://Factory/documentation/Factory/Cycle":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","abstract":[{"text":"What’s a resolution cycle, and why should we care?","type":"text"}],"role":"article","title":"Resolution Cycles","url":"\/documentation\/factory\/cycle"},"doc://Factory/documentation/Factory/GettingStarted":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","type":"topic","kind":"article","abstract":[{"text":"Defining a Factory, resolving it, and changing the default behavior.","type":"text"}],"url":"\/documentation\/factory\/gettingstarted","title":"Getting Started","role":"collectionGroup"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Functional":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","kind":"article","role":"article","abstract":[{"text":"Factory can inject more than service classes and structs.","type":"text"}],"url":"\/documentation\/factory\/functional","title":"Functional Injection","type":"topic"},"doc://Factory/documentation/Factory/Optionals":{"identifier":"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","url":"\/documentation\/factory\/optionals","role":"article"},"doc://Factory/documentation/Factory/Tags":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","kind":"article","role":"article","abstract":[{"text":"Obtaining a list of dependencies of a given type.","type":"text"}],"url":"\/documentation\/factory\/tags","title":"Tags","type":"topic"},"doc://Factory/documentation/Factory/Modules":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","kind":"article","role":"article","abstract":[{"text":"Using Factory in a project with multiple modules.","type":"text"}],"url":"\/documentation\/factory\/modules","title":"Modular Development","type":"topic"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/modules.json b/docs/data/documentation/factory/modules.json index 63002d9e..9e6f6aef 100644 --- a/docs/data/documentation/factory/modules.json +++ b/docs/data/documentation/factory/modules.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"kind":"content","content":[{"level":2,"type":"heading","text":"Overview","anchor":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"When you want to use a dependency injection system like Factory with multiple modules you often run into a “Who’s on first” dilemma."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s say that we have a ModuleP which specifies an abstract AccountLoading protocol."}]},{"type":"codeListing","code":["public protocol AccountLoading {"," func load() -> [Account]","}"],"syntax":"swift"},{"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."}]},{"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"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"And, finally, we have our application itself.","type":"text"}]},{"inlineContent":[{"identifier":"MultiModule","type":"image"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"Note that ModuleA and ModuleB are independent. Neither one knows about the other one, but both have a direct dependency on ModuleP, our master of models and protocols."}],"type":"paragraph"},{"inlineContent":[{"text":"This is a classic modular contractural pattern.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s take a look."}]},{"text":"Implementation in same module as protocol","anchor":"Implementation-in-same-module-as-protocol","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"text":"Before we answer the above question, let’s look at a related, but simpler problem.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s say we have a module called Networking that provides (surprise, surprise) a service that conforms to a Networking protocol. Let’s also say that module "},{"type":"emphasis","inlineContent":[{"type":"text","text":"also"}]},{"type":"text","text":" provides the implementation of that service."}]},{"inlineContent":[{"identifier":"Networking","type":"image"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"In which case our implementation is quite simple. Inside Networking we define the public protocol "},{"type":"emphasis","inlineContent":[{"text":"and","type":"text"}]},{"type":"text","text":" we publicly define the Factory that provides it."}]},{"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":"codeListing"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Got it? Anything that can see our protocol can "},{"type":"emphasis","inlineContent":[{"text":"also","type":"text"}]},{"type":"text","text":" see a source that provides an instance of it."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So with that, let’s return to our originally scheduled program."}]},{"anchor":"Implementation-in-different-module-from-protocol","text":"Implementation in different module from protocol","type":"heading","level":2},{"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":[{"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":[{"text":"It’s a dilemma, but fortunately it’s not a serious one. The solution is twofold.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"First, everyone imports Factory. From an architectural perspective, the dependency injection system is an invisible layer that lives above and wraps around everything else."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Next, we implement part of the “same module” solution shown above, but with a twist, adding the following Factory definition to "},{"inlineContent":[{"type":"text","text":"ModuleP"}],"type":"strong"},{"type":"text","text":"."}]},{"type":"codeListing","syntax":"swift","code":["\/\/ Public Factory","extension Container {"," public var accountLoader: Factory { self { nil } }","}"]},{"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"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That Factory, however, doesn’t know how to construct one, so its definition is optional, and its factory closure just returns nil."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now we’re cooking. But where does our missing ingredient come from?"}]},{"level":2,"type":"heading","text":"Wiring Things Together","anchor":"Wiring-Things-Together"},{"type":"paragraph","inlineContent":[{"text":"Since our application is the only piece of the puzzle that can see ModuleP, ModuleA, ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"and"}]},{"type":"text","text":" ModuleB, it’s up to the application to wire everything together."}]},{"type":"paragraph","inlineContent":[{"text":"So let’s go into our main application and create a spot where we can cross-wire all of the pieces together.","type":"text"}]},{"inlineContent":[{"text":"The key to the puzzle is ","type":"text"},{"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"},{"syntax":"swift","type":"codeListing","code":["import ModuleP","import ModuleA","import ModuleB","","extension Container: AutoRegistering {"," func autoRegister {"," accountLoader.register { AccountLoader() }"," ..."," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Since this file can see all of the modules, it’s tasked with registering a new factory closure for "},{"code":"accountLoader","type":"codeVoice"},{"text":" that provides the actual instance of ","type":"text"},{"code":"AccountLoader","type":"codeVoice"},{"type":"text","text":" from ModuleB."}]},{"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."}],"type":"paragraph"},{"level":2,"anchor":"Optionals","text":"Optionals","type":"heading"},{"type":"paragraph","inlineContent":[{"text":"Note that our code will need to account for the optional service in actual use.","type":"text"}]},{"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()"," }","}"]},{"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"}],"type":"paragraph"},{"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."}]},{"type":"heading","level":2,"text":"Explicitly Unwrapped Optionals","anchor":"Explicitly-Unwrapped-Optionals"},{"type":"paragraph","inlineContent":[{"type":"text","text":"We could, of course, do the following."}]},{"code":["class ViewModel: ObservableObject {"," @Injected(\\.accountLoader) var loader: AccountLoading!"," @Published var accounts: [Account] = []"," func load() {"," accounts = loader.load()"," }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"inlineContent":[{"text":"Which sort of defeats Factory’s primary goal in life - Safety.","type":"text"}],"type":"paragraph"},{"type":"heading","level":2,"text":"Promises","anchor":"Promises"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Some might worry that an developer might slip up and forget to provide a needed registration. While that’s certainly possible, the probability is that you’d tend to notice such a thing the first time you tried to test a new feature."}]},{"inlineContent":[{"type":"text","text":"One "},{"type":"emphasis","inlineContent":[{"type":"text","text":"could"}]},{"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"},{"type":"text","text":" that will cause the application to crash the very first time an unregistered Factory is accessed. And some people actually prefer this “fail fast” approach."}]},{"inlineContent":[{"type":"text","text":"But the problem of course, is what happens if the application is shipped and the registration was never provided? Or was accidentally removed? In either case the end user goes to screen X, the view model for that screen tries to get an accountLoader… and the application crashes."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Not a good look. Fortunately, Factory 2.1 provides a solution.","type":"text"}]},{"type":"codeListing","code":["extension Container {"," public var accountLoader: Factory { promised() }","}"],"syntax":"swift"},{"inlineContent":[{"type":"text","text":"When run in debug mode and the application attempts to resolve an unregistered accountLoader, "},{"type":"codeVoice","code":"promised()"},{"type":"text","text":" will trigger a fatalError to inform you of the mistake. But in a released application, "},{"type":"codeVoice","code":"promised()"},{"text":" simply returns nil and your application can continue on.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The feature still won’t work of course, but at least the application won’t blow up and crash, possibly taking some of your user’s data with it."}]},{"type":"paragraph","inlineContent":[{"text":"Promised also cleans up Factory registrations, a nice win that eliminates the rather odd looking ","type":"text"},{"code":"self { nil }","type":"codeVoice"},{"text":" requirement.","type":"text"}]},{"text":"Separating Dependencies","type":"heading","level":2,"anchor":"Separating-Dependencies"},{"inlineContent":[{"type":"text","text":"There could well be some cases where ModuleP wants to be truely independent and simply "},{"inlineContent":[{"text":"can’t","type":"text"}],"type":"emphasis"},{"type":"text","text":" depend on Factory."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"In those cases, we’re going to need a level of indirection."}]},{"type":"paragraph","inlineContent":[{"type":"image","identifier":"Services"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Everyone sees what they saw before, plus everyone who’s dependent on ModuleP can also see a new module called "},{"type":"codeVoice","code":"Services"},{"text":" which is a new cross-module framework where our empty registrations are defined. ","type":"text"},{"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"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Our original "},{"code":"accountLoader","type":"codeVoice"},{"text":" Factory, which lived in ModuleP in the original example, now lives in Services.","type":"text"}]},{"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 "},{"type":"codeVoice","code":"Services"},{"type":"text","text":" together, just as it did before."}]},{"type":"paragraph","inlineContent":[{"text":"ModuleP is now completely independent.","type":"text"}]},{"level":2,"type":"heading","anchor":"Adaptors","text":"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"},{"inlineContent":[{"type":"image","identifier":"Adaptor"}],"type":"paragraph"},{"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"}]},{"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","type":"codeListing"},{"anchor":"Mix-and-Match","level":2,"text":"Mix and Match","type":"heading"},{"type":"paragraph","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"}]},{"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"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Modules"},"sections":[],"schemaVersion":{"major":0,"patch":0,"minor":3},"abstract":[{"text":"Using Factory in a project with multiple modules.","type":"text"}],"kind":"article","metadata":{"role":"article","roleHeading":"Article","modules":[{"name":"Factory"}],"title":"Modular Development"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/modules"]}],"seeAlsoSections":[{"title":"Advanced Topics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Design","doc:\/\/Factory\/documentation\/Factory\/Modifiers","doc:\/\/Factory\/documentation\/Factory\/Cycle","doc:\/\/Factory\/documentation\/Factory\/Optionals","doc:\/\/Factory\/documentation\/Factory\/Functional","doc:\/\/Factory\/documentation\/Factory\/Tags"],"generated":true}],"references":{"doc://Factory/documentation/Factory/Tags":{"role":"article","title":"Tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","url":"\/documentation\/factory\/tags","kind":"article","type":"topic"},"Networking":{"type":"image","variants":[{"traits":["1x","light"],"url":"\/images\/Networking.png"}],"identifier":"Networking","alt":"Diagram of Application Architecture"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Functional":{"type":"topic","kind":"article","title":"Functional Injection","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"url":"\/documentation\/factory\/functional","identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","role":"article"},"MultiModule":{"variants":[{"traits":["1x","light"],"url":"\/images\/MultiModule.png"}],"alt":"Diagram of Application Architecture","type":"image","identifier":"MultiModule"},"Adaptor":{"type":"image","variants":[{"traits":["1x","light"],"url":"\/images\/Adaptor.png"}],"identifier":"Adaptor","alt":"Diagram of Application Architecture"},"doc://Factory/documentation/Factory/Modifiers":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","type":"topic","title":"Factory Modifiers","abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"url":"\/documentation\/factory\/modifiers","kind":"article","role":"article"},"doc://Factory/documentation/Factory/Design":{"type":"topic","kind":"article","title":"Designing Factory","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","url":"\/documentation\/factory\/design","role":"article"},"doc://Factory/documentation/Factory/Optionals":{"type":"topic","kind":"article","title":"Optionals and Dynamic Registration","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","url":"\/documentation\/factory\/optionals","role":"article"},"doc://Factory/documentation/Factory/Cycle":{"type":"topic","kind":"article","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"title":"Resolution Cycles","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","url":"\/documentation\/factory\/cycle","role":"article"},"Services":{"variants":[{"traits":["1x","light"],"url":"\/images\/Services.png"}],"alt":"Diagram of Application Architecture","type":"image","identifier":"Services"}}} \ No newline at end of file +{"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Modules","interfaceLanguage":"swift"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"seeAlsoSections":[{"generated":true,"title":"Advanced Topics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Design","doc:\/\/Factory\/documentation\/Factory\/Modifiers","doc:\/\/Factory\/documentation\/Factory\/Cycle","doc:\/\/Factory\/documentation\/Factory\/Optionals","doc:\/\/Factory\/documentation\/Factory\/Functional","doc:\/\/Factory\/documentation\/Factory\/Tags"]}],"primaryContentSections":[{"content":[{"level":2,"anchor":"Overview","text":"Overview","type":"heading"},{"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"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s say that we have a ModuleP which specifies an abstract AccountLoading protocol."}]},{"syntax":"swift","code":["public protocol AccountLoading {"," func load() -> [Account]","}"],"type":"codeListing"},{"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."}]},{"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"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"And, finally, we have our application itself."}],"type":"paragraph"},{"inlineContent":[{"type":"image","identifier":"MultiModule"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"Note that ModuleA and ModuleB are independent. Neither one knows about the other one, but both have a direct dependency on ModuleP, our master of models and protocols."}],"type":"paragraph"},{"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?"}]},{"inlineContent":[{"text":"Let’s take a look.","type":"text"}],"type":"paragraph"},{"anchor":"Implementation-in-same-module-as-protocol","text":"Implementation in same module as protocol","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"text":"Before we answer the above question, let’s look at a related, but simpler problem.","type":"text"}]},{"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":[{"text":"also","type":"text"}],"type":"emphasis"},{"text":" provides the implementation of that service.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"image","identifier":"Networking"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"In which case our implementation is quite simple. Inside Networking we define the public protocol "},{"inlineContent":[{"type":"text","text":"and"}],"type":"emphasis"},{"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"},{"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."}]},{"inlineContent":[{"text":"Got it? Anything that can see our protocol can ","type":"text"},{"inlineContent":[{"text":"also","type":"text"}],"type":"emphasis"},{"text":" see a source that provides an instance of it.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"So with that, let’s return to our originally scheduled program.","type":"text"}],"type":"paragraph"},{"type":"heading","text":"Implementation in different module from protocol","anchor":"Implementation-in-different-module-from-protocol","level":2},{"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."}]},{"inlineContent":[{"type":"text","text":"Who’s on first?"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"It’s a dilemma, but fortunately it’s not a serious one. The solution is twofold.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"First, everyone imports Factory. From an architectural perspective, the dependency injection system is an invisible layer that lives above and wraps around everything else."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Next, we implement part of the “same module” solution shown above, but with a twist, adding the following Factory definition to "},{"type":"strong","inlineContent":[{"text":"ModuleP","type":"text"}]},{"type":"text","text":"."}]},{"code":["\/\/ Public Factory","extension Container {"," public var accountLoader: Factory { self { nil } }","}"],"syntax":"swift","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."}]},{"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":"paragraph"},{"text":"Wiring Things Together","type":"heading","anchor":"Wiring-Things-Together","level":2},{"type":"paragraph","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"},{"text":" ModuleB, it’s up to the application to wire everything together.","type":"text"}]},{"inlineContent":[{"text":"So let’s go into our main application and create a spot where we can cross-wire all of the pieces together.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"The key to the puzzle is ","type":"text"},{"code":"AutoRegistering","type":"codeVoice"},{"text":", a container-based protocol which defines a function that’s guaranteed to be called before any Factory is resolved.","type":"text"}]},{"syntax":"swift","type":"codeListing","code":["import ModuleP","import ModuleA","import ModuleB","","extension Container: AutoRegistering {"," func autoRegister {"," accountLoader.register { AccountLoader() }"," ..."," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Since this file can see all of the modules, it’s tasked with registering a new factory closure for "},{"type":"codeVoice","code":"accountLoader"},{"text":" that provides the actual instance of ","type":"text"},{"code":"AccountLoader","type":"codeVoice"},{"text":" from ModuleB.","type":"text"}]},{"inlineContent":[{"text":"And… that’s it. Prior to the first resolution Factory will call ","type":"text"},{"code":"autoRegister","type":"codeVoice"},{"type":"text","text":" in order to setup everything needed for the application to run."}],"type":"paragraph"},{"anchor":"Optionals","text":"Optionals","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"text":"Note that our code will need to account for the optional service in actual use.","type":"text"}]},{"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()"," }","}"]},{"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"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"The "},{"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."}],"type":"paragraph"},{"type":"heading","anchor":"Explicitly-Unwrapped-Optionals","level":2,"text":"Explicitly Unwrapped Optionals"},{"type":"paragraph","inlineContent":[{"text":"We could, of course, do the following.","type":"text"}]},{"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":[{"text":"Which sort of defeats Factory’s primary goal in life - Safety.","type":"text"}],"type":"paragraph"},{"type":"heading","anchor":"Promises","text":"Promises","level":2},{"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"},{"syntax":"swift","type":"codeListing","code":["extension Container {"," public var accountLoader: Factory { self { fatalError() } }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Which provides the factory closure with "},{"type":"codeVoice","code":"fatalError"},{"type":"text","text":" that will cause the application to crash the very first time an unregistered Factory is accessed. And some people actually prefer this “fail fast” approach."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But the problem of course, is what happens if the application is shipped and the registration was never provided? Or was accidentally removed? In either case the end user goes to screen X, the view model for that screen tries to get an accountLoader… and the application crashes."}]},{"inlineContent":[{"text":"Not a good look. Fortunately, Factory 2.1 provides a solution.","type":"text"}],"type":"paragraph"},{"type":"codeListing","code":["extension Container {"," public var accountLoader: Factory { promised() }","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"When run in debug mode and the application attempts to resolve an unregistered accountLoader, "},{"type":"codeVoice","code":"promised()"},{"type":"text","text":" will trigger a fatalError to inform you of the mistake. But in a released application, "},{"type":"codeVoice","code":"promised()"},{"type":"text","text":" simply returns nil and your application can continue on."}]},{"type":"paragraph","inlineContent":[{"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 }"},{"text":" requirement.","type":"text"}]},{"anchor":"Separating-Dependencies","level":2,"text":"Separating Dependencies","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"There could well be some cases where ModuleP wants to be truely independent and simply "},{"inlineContent":[{"type":"text","text":"can’t"}],"type":"emphasis"},{"text":" depend on Factory.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"In those cases, we’re going to need a level of indirection."}]},{"inlineContent":[{"type":"image","identifier":"Services"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"Everyone sees what they saw before, plus everyone who’s dependent on ModuleP can also see a new module called "},{"type":"codeVoice","code":"Services"},{"text":" which is a new cross-module framework where our empty registrations are defined. ","type":"text"},{"type":"codeVoice","code":"Services"},{"type":"text","text":" in turn, can only see ModuleP in order to get the model and protocol definitions it needs to create its Factory’s."}],"type":"paragraph"},{"inlineContent":[{"text":"Our original ","type":"text"},{"type":"codeVoice","code":"accountLoader"},{"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"},{"inlineContent":[{"text":"And the application, which can see everything, cross wires the various service registrations provided by ","type":"text"},{"code":"Services","type":"codeVoice"},{"text":" together, just as it did before.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"ModuleP is now completely independent."}]},{"type":"heading","anchor":"Adaptors","text":"Adaptors","level":2},{"type":"paragraph","inlineContent":[{"text":"There’s one last case, that of using some third party library.","type":"text"}]},{"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"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This is a good approach to take when faced with third-party analytics libraries or feature managers like LaunchDarkly."}]},{"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,"anchor":"Mix-and-Match","type":"heading","text":"Mix and Match"},{"type":"paragraph","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","inlineContent":[{"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":"text"}]}],"kind":"content"}],"variants":[{"paths":["\/documentation\/factory\/modules"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"article","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"metadata":{"title":"Modular Development","role":"article","roleHeading":"Article","modules":[{"name":"Factory"}]},"references":{"Networking":{"variants":[{"url":"\/images\/Networking.png","traits":["1x","light"]}],"alt":"Diagram of Application Architecture","type":"image","identifier":"Networking"},"doc://Factory/documentation/Factory/Cycle":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","abstract":[{"text":"What’s a resolution cycle, and why should we care?","type":"text"}],"role":"article","title":"Resolution Cycles","url":"\/documentation\/factory\/cycle"},"doc://Factory/documentation/Factory/Modifiers":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","kind":"article","role":"article","abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"url":"\/documentation\/factory\/modifiers","title":"Factory Modifiers","type":"topic"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Optionals":{"identifier":"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","url":"\/documentation\/factory\/optionals","role":"article"},"doc://Factory/documentation/Factory/Functional":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","kind":"article","role":"article","abstract":[{"text":"Factory can inject more than service classes and structs.","type":"text"}],"url":"\/documentation\/factory\/functional","title":"Functional Injection","type":"topic"},"Adaptor":{"type":"image","variants":[{"url":"\/images\/Adaptor.png","traits":["1x","light"]}],"alt":"Diagram of Application Architecture","identifier":"Adaptor"},"doc://Factory/documentation/Factory/Tags":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","kind":"article","role":"article","abstract":[{"text":"Obtaining a list of dependencies of a given type.","type":"text"}],"url":"\/documentation\/factory\/tags","title":"Tags","type":"topic"},"Services":{"variants":[{"traits":["1x","light"],"url":"\/images\/Services.png"}],"alt":"Diagram of Application Architecture","type":"image","identifier":"Services"},"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","title":"Designing Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","kind":"article","role":"article","abstract":[{"text":"Rationale behind the design decisions made in Factory 1.0 and 2.0","type":"text"}],"type":"topic"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/optionals.json b/docs/data/documentation/factory/optionals.json index e915fde9..33c8e417 100644 --- a/docs/data/documentation/factory/optionals.json +++ b/docs/data/documentation/factory/optionals.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"content","content":[{"text":"Overview","type":"heading","anchor":"Overview","level":2},{"inlineContent":[{"text":"Optional Factory definitions have several uses, including:","type":"text"}],"type":"paragraph"},{"type":"orderedList","items":[{"content":[{"inlineContent":[{"type":"text","text":"Dynamic Registration - Providing Factory’s based on application state."}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"text":"Multiple-Module Registration - Registering Factory’s across modules to avoid cross-cutting concerns.","type":"text"}],"type":"paragraph"}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s take a look."}]},{"type":"heading","text":"Dynamic Registration","level":2,"anchor":"Dynamic-Registration"},{"inlineContent":[{"text":"Consider the following optional factory.","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["extension Container {"," let userProviding = Factory { self { nil } }","}"]},{"type":"paragraph","inlineContent":[{"text":"Looks strange, right? I mean, of what use is a Factory that returns nothing?","type":"text"}]},{"inlineContent":[{"text":"Now let’s take a look at a dynamic registration in action.","type":"text"}],"type":"paragraph"},{"type":"codeListing","code":["func authenticated(with user: User) {"," ..."," Container.shared.userProviding.register { UserProvider(user: user) }"," ...","}","","func logout() {"," ..."," Container.shared.userProviding.reset()"," ...","}"],"syntax":"swift"},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"Here’s an example:"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["class SomeViewModel: ObservableObject {"," @Injected(\\.userProviding) private let provider"," func update(email: String) {"," provider?.updateEmailAddress(email)"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The injected provider is optional by default since the Factory was defined that way."}]},{"anchor":"Explicitly-Unwrapped-Optionals","level":2,"text":"Explicitly Unwrapped Optionals","type":"heading"},{"type":"paragraph","inlineContent":[{"text":"Note that you ","type":"text"},{"type":"emphasis","inlineContent":[{"text":"could","type":"text"}]},{"text":" explicitly unwrap the optional…","type":"text"}]},{"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":[{"text":"Your code is guaranteed to be safe.","type":"text"}]}]},{"inlineContent":[{"type":"text","text":"I’d advise against it."}],"type":"paragraph"},{"inlineContent":[{"text":"A few other things here. First, note that we used ","type":"text"},{"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"},{"type":"paragraph","inlineContent":[{"type":"text","text":"And also note that calling register also "},{"inlineContent":[{"type":"text","text":"removes any cached dependency from its associated scope."}],"type":"emphasis"},{"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":"heading","level":2,"anchor":"Optionals-and-Multiple-Modules","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"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","type":"reference","isActive":true},{"type":"text","text":" for more."}]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Optionals"},"metadata":{"role":"article","modules":[{"name":"Factory"}],"roleHeading":"Article","title":"Optionals and Dynamic Registration"},"abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"sections":[],"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\/Functional","doc:\/\/Factory\/documentation\/Factory\/Tags"],"title":"Advanced Topics","generated":true}],"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"article","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/optionals"]}],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Modifiers":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","type":"topic","title":"Factory Modifiers","abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"url":"\/documentation\/factory\/modifiers","kind":"article","role":"article"},"doc://Factory/documentation/Factory/Cycle":{"type":"topic","kind":"article","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"title":"Resolution Cycles","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","url":"\/documentation\/factory\/cycle","role":"article"},"doc://Factory/documentation/Factory/Functional":{"type":"topic","kind":"article","title":"Functional Injection","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"url":"\/documentation\/factory\/functional","identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","role":"article"},"doc://Factory/documentation/Factory/Design":{"type":"topic","kind":"article","title":"Designing Factory","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","url":"\/documentation\/factory\/design","role":"article"},"doc://Factory/documentation/Factory/Modules":{"role":"article","title":"Modular Development","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","url":"\/documentation\/factory\/modules","kind":"article","type":"topic"},"doc://Factory/documentation/Factory/Tags":{"role":"article","title":"Tags","abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","url":"\/documentation\/factory\/tags","kind":"article","type":"topic"}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/optionals"]}],"metadata":{"modules":[{"name":"Factory"}],"role":"article","title":"Optionals and Dynamic Registration","roleHeading":"Article"},"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Optionals"},"kind":"article","sections":[],"seeAlsoSections":[{"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\/Functional","doc:\/\/Factory\/documentation\/Factory\/Tags"],"title":"Advanced Topics"}],"primaryContentSections":[{"content":[{"anchor":"Overview","level":2,"type":"heading","text":"Overview"},{"inlineContent":[{"type":"text","text":"Optional Factory definitions have several uses, including:"}],"type":"paragraph"},{"type":"orderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"text":"Dynamic Registration - Providing Factory’s based on application state.","type":"text"}]}]},{"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."}]},{"text":"Dynamic Registration","level":2,"anchor":"Dynamic-Registration","type":"heading"},{"type":"paragraph","inlineContent":[{"text":"Consider the following optional factory.","type":"text"}]},{"code":["extension Container {"," let userProviding = Factory { self { nil } }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"Looks strange, right? I mean, of what use is a Factory that returns nothing?","type":"text"}]},{"inlineContent":[{"type":"text","text":"Now let’s take a look at a dynamic registration in action."}],"type":"paragraph"},{"code":["func authenticated(with user: User) {"," ..."," Container.shared.userProviding.register { UserProvider(user: user) }"," ...","}","","func logout() {"," ..."," Container.shared.userProviding.reset()"," ...","}"],"type":"codeListing","syntax":"swift"},{"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"},{"inlineContent":[{"text":"The injected provider is optional by default since the Factory was defined that way.","type":"text"}],"type":"paragraph"},{"level":2,"type":"heading","anchor":"Explicitly-Unwrapped-Optionals","text":"Explicitly Unwrapped Optionals"},{"type":"paragraph","inlineContent":[{"text":"Note that you ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"could"}]},{"text":" explicitly unwrap the optional…","type":"text"}]},{"type":"codeListing","code":["@Injected(\\.userProviding) private let provider: UserProviding!"],"syntax":"swift"},{"inlineContent":[{"type":"text","text":"But doing so violates the core premise on which Factory was built in the first place: "},{"inlineContent":[{"type":"text","text":"Your code is guaranteed to be safe."}],"type":"emphasis"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"I’d advise against it.","type":"text"}]},{"inlineContent":[{"text":"A few other things here. First, note that we used ","type":"text"},{"type":"codeVoice","code":"@Injected"},{"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"},{"type":"paragraph","inlineContent":[{"text":"And also note that calling register also ","type":"text"},{"type":"emphasis","inlineContent":[{"text":"removes any cached dependency from its associated scope.","type":"text"}]},{"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."}]},{"text":"Optionals and Multiple Modules","anchor":"Optionals-and-Multiple-Modules","level":2,"type":"heading"},{"inlineContent":[{"type":"text","text":"This technique can also be handy when doing registrations in a project with multiple modules. It’s a bit complex, so there’s an entire page devoted to it."}],"type":"paragraph"},{"inlineContent":[{"text":"See ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules"},{"text":" for more.","type":"text"}],"type":"paragraph"}],"kind":"content"}],"abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Cycle":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","abstract":[{"text":"What’s a resolution cycle, and why should we care?","type":"text"}],"role":"article","title":"Resolution Cycles","url":"\/documentation\/factory\/cycle"},"doc://Factory/documentation/Factory/Design":{"url":"\/documentation\/factory\/design","title":"Designing Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","kind":"article","role":"article","abstract":[{"text":"Rationale behind the design decisions made in Factory 1.0 and 2.0","type":"text"}],"type":"topic"},"doc://Factory/documentation/Factory/Functional":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","kind":"article","role":"article","abstract":[{"text":"Factory can inject more than service classes and structs.","type":"text"}],"url":"\/documentation\/factory\/functional","title":"Functional Injection","type":"topic"},"doc://Factory/documentation/Factory/Tags":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Tags","kind":"article","role":"article","abstract":[{"text":"Obtaining a list of dependencies of a given type.","type":"text"}],"url":"\/documentation\/factory\/tags","title":"Tags","type":"topic"},"doc://Factory/documentation/Factory/Modules":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","kind":"article","role":"article","abstract":[{"text":"Using Factory in a project with multiple modules.","type":"text"}],"url":"\/documentation\/factory\/modules","title":"Modular Development","type":"topic"},"doc://Factory/documentation/Factory/Modifiers":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","kind":"article","role":"article","abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"url":"\/documentation\/factory\/modifiers","title":"Factory Modifiers","type":"topic"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory.json b/docs/data/documentation/factory/parameterfactory.json index 316e7613..0581d1f4 100644 --- a/docs/data/documentation/factory/parameterfactory.json +++ b/docs/data/documentation/factory/parameterfactory.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","interfaceLanguage":"swift"},"metadata":{"externalID":"s:7Factory09ParameterA0V","title":"ParameterFactory","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"role":"symbol","symbolKind":"struct","roleHeading":"Structure"},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/init(_:key:_:)"]},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/registration"]},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/callAsFunction(_:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/resolve(_:)"],"title":"Instance Methods"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"],"generated":true,"title":"Default Implementations"}],"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"ParameterFactory"},{"text":"<","kind":"text"},{"text":"P","kind":"genericParameter"},{"text":", ","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">","kind":"text"}],"languages":["swift"]}]},{"content":[{"level":2,"text":"Overview","anchor":"overview","type":"heading"},{"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":[{"type":"text","text":"We define a ParameterFactory exactly as we do a normal factory with two exceptions: we need to specify the"},{"text":" ","type":"text"},{"type":"text","text":"parameter type, and we need to consume the passed parameter in our factory closure."}]},{"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":[{"text":"One caveat is that you can’t use the ","type":"text"},{"type":"codeVoice","code":"@Injected"},{"type":"text","text":" property wrapper with "},{"type":"codeVoice","code":"ParameterFactory"},{"type":"text","text":" as there’s no way to get"},{"type":"text","text":" "},{"type":"text","text":"the needed parameters to the property wrapper before the wrapper is initialized. That being the case, you’ll"},{"text":" ","type":"text"},{"text":"probably need to reference the container directly and do something similar to the following.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["class MyClass {"," var myService: MyServiceType"," init(_ n: Int) {"," myService = Container.shared.parameterService(n)"," }","}"]},{"inlineContent":[{"type":"text","text":"If you need to pass more than one parameter just use a tuple, dictionary, or struct."}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["var tupleService: ParameterFactory<(Int, Int), MultipleParameterService> {"," self { (a, b) in"," MultipleParameterService(a: a, b: b)"," }","}"]},{"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"}],"kind":"content"}],"schemaVersion":{"minor":3,"patch":0,"major":0},"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","doc:\/\/Factory\/s8SendableP"],"title":"Conforms To","type":"conformsTo","kind":"relationships"}],"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/parameterfactory"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"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."}],"type":"topic","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/factorymodifying"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/init(_:key:_:)":{"title":"init(_:key:_:)","abstract":[{"type":"text","text":"Public initializer creates a factory capable of taking parameters at runtime."}],"fragments":[{"text":"init","kind":"identifier"},{"text":"(any ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ManagedContainerP","text":"ManagedContainer"},{"kind":"text","text":", "},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"StaticString","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":", ("},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":")"}],"kind":"symbol","url":"\/documentation\/factory\/parameterfactory\/init(_:key:_:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/init(_:key:_:)","type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"kind":"article","abstract":[],"title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory/resolve(_:)":{"role":"symbol","abstract":[{"type":"text","text":"Unsugared resolution function."}],"url":"\/documentation\/factory\/parameterfactory\/resolve(_:)","type":"topic","title":"resolve(_:)","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/resolve(_:)"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory/callAsFunction(_:)":{"title":"callAsFunction(_:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"}],"url":"\/documentation\/factory\/parameterfactory\/callasfunction(_:)","abstract":[{"text":"Resolves a factory capable of taking parameters at runtime.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/callAsFunction(_:)","type":"topic","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/registration":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/registration","type":"topic","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":", "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Required registration"}],"title":"registration","kind":"symbol","url":"\/documentation\/factory\/parameterfactory\/registration","role":"symbol"},"doc://Factory/s8SendableP":{"title":"Swift.Sendable","identifier":"doc:\/\/Factory\/s8SendableP","type":"unresolvable"},"doc://Factory/documentation/Factory/ParameterFactory/register(factory:)":{"abstract":[{"type":"text","text":"Registers a new factory capable of taking parameters at runtime."}],"kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"register","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"ParameterFactory","kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"title":"register(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(factory:)","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/register(factory:)"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">"}],"platforms":["macOS"],"languages":["swift"]}]},{"content":[{"type":"heading","anchor":"overview","text":"Overview","level":2},{"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 "},{"code":"ParameterFactory","type":"codeVoice"},{"type":"text","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"},{"text":" ","type":"text"},{"type":"text","text":"parameter type, and we need to consume the passed parameter in our factory closure."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var parameterService: ParameterFactory {"," self { ParameterService(value: $0) }"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Resolving it is straightforward. Just pass the parameter to the Factory."}]},{"code":["let myService = Container.shared.parameterService(n)"],"syntax":"Swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"One caveat is that you can’t use the ","type":"text"},{"code":"@Injected","type":"codeVoice"},{"text":" property wrapper with ","type":"text"},{"type":"codeVoice","code":"ParameterFactory"},{"type":"text","text":" as there’s no way to get"},{"type":"text","text":" "},{"type":"text","text":"the needed parameters to the property wrapper before the wrapper is initialized. That being the case, you’ll"},{"type":"text","text":" "},{"type":"text","text":"probably need to reference the container directly and do something similar to the following."}]},{"syntax":"swift","type":"codeListing","code":["class MyClass {"," var myService: MyServiceType"," init(_ n: Int) {"," myService = Container.shared.parameterService(n)"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you need to pass more than one parameter just use a tuple, dictionary, or struct."}]},{"syntax":"swift","code":["var tupleService: ParameterFactory<(Int, Int), MultipleParameterService> {"," self { (a, b) in"," MultipleParameterService(a: a, b: b)"," }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Finally, if you define a scope keep in mind that the first argument passed will be used to create the dependency"},{"text":" ","type":"text"},{"text":"and ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"that"}]},{"type":"text","text":" dependency will be cached. Since the cached object will be returned from now on any arguments passed in"},{"type":"text","text":" "},{"text":"later requests will be ignored until the factory or scope is reset.","type":"text"}]}],"kind":"content"}],"kind":"symbol","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"],"generated":true,"title":"Default Implementations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","doc:\/\/Factory\/s8SendableP"],"title":"Conforms To","kind":"relationships","type":"conformsTo"}],"sections":[],"metadata":{"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"ParameterFactory"}],"modules":[{"name":"Factory"}],"roleHeading":"Structure","symbolKind":"struct","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"title":"ParameterFactory","externalID":"s:7Factory09ParameterA0V"},"variants":[{"paths":["\/documentation\/factory\/parameterfactory"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"},"abstract":[{"type":"text","text":"Factory capable of taking parameters at runtime"}],"schemaVersion":{"patch":0,"minor":3,"major":0},"references":{"doc://Factory/documentation/Factory/ParameterFactory/registration":{"role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A12RegistrationV","kind":"typeIdentifier","text":"FactoryRegistration"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"title":"registration","abstract":[{"type":"text","text":"Required registration"}],"url":"\/documentation\/factory\/parameterfactory\/registration","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/registration","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","type":"topic","abstract":[],"title":"FactoryModifying Implementations","kind":"article","role":"collectionGroup","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"},"doc://Factory/documentation/Factory/ParameterFactory/init(_:key:_:)":{"role":"symbol","url":"\/documentation\/factory\/parameterfactory\/init(_:key:_:)","abstract":[{"type":"text","text":"Public initializer creates a factory capable of taking parameters at runtime."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/init(_:key:_:)","fragments":[{"text":"init","kind":"identifier"},{"text":"(any ","kind":"text"},{"kind":"typeIdentifier","text":"ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP"},{"text":", ","kind":"text"},{"text":"key","kind":"externalParam"},{"kind":"text","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":")"}],"type":"topic","kind":"symbol","title":"init(_:key:_:)"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/register(factory:)":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(factory:)","type":"topic","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"register","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"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"},{"kind":"text","text":">"}],"url":"\/documentation\/factory\/parameterfactory\/register(factory:)","abstract":[{"type":"text","text":"Registers a new factory capable of taking parameters at runtime."}],"title":"register(factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/callAsFunction(_:)":{"url":"\/documentation\/factory\/parameterfactory\/callasfunction(_:)","title":"callAsFunction(_:)","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"text":"(","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/callAsFunction(_:)","type":"topic","abstract":[{"text":"Resolves a factory capable of taking parameters at runtime.","type":"text"}]},"doc://Factory/documentation/Factory/ParameterFactory/resolve(_:)":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/resolve(_:)","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"text":"(","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/parameterfactory\/resolve(_:)","abstract":[{"type":"text","text":"Unsugared resolution function."}],"title":"resolve(_:)"},"doc://Factory/s8SendableP":{"type":"unresolvable","identifier":"doc:\/\/Factory\/s8SendableP","title":"Swift.Sendable"},"doc://Factory/documentation/Factory/FactoryModifying":{"title":"FactoryModifying","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryModifying"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"FactoryModifying","kind":"identifier"}],"url":"\/documentation\/factory\/factorymodifying","abstract":[{"type":"text","text":"Public protocol with functionality common to all Factory’s. Used to add scope and decorator modifiers to Factory."}],"kind":"symbol"}}} \ 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 e34d4e0b..94d931d7 100644 --- a/docs/data/documentation/factory/parameterfactory/cached.json +++ b/docs/data/documentation/factory/parameterfactory/cached.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"cached"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}],"languages":["swift"]}]},{"content":[{"text":"Discussion","level":2,"type":"heading","anchor":"discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .cached","}"]}],"kind":"content"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/cached"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/cached"},"sections":[],"kind":"symbol","schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"roleHeading":"Instance Property","modules":[{"name":"Factory"}],"symbolKind":"property","role":"symbol","extendedModule":"Factory","title":"cached","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"cached","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"externalID":"s:7Factory0A9ModifyingPAAE6cachedxvp::SYNTHESIZED::s:7Factory09ParameterA0V"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"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},{"type":"text","text":"."}],"references":{"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"navigatorTitle":[{"text":"Cached","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/cached-swift.class","type":"topic","title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}]},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory/cached":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/cached","url":"\/documentation\/factory\/parameterfactory\/cached","title":"cached","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},{"type":"text","text":"."}],"kind":"symbol","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"cached","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"kind":"article","abstract":[],"title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"cached","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}]},{"kind":"content","content":[{"anchor":"discussion","text":"Discussion","level":2,"type":"heading"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," factory { MyService() }"," .cached","}"]}]}],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/cached"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"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":"."}],"metadata":{"title":"cached","roleHeading":"Instance Property","role":"symbol","modules":[{"name":"Factory"}],"symbolKind":"property","extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE6cachedxvp::SYNTHESIZED::s:7Factory09ParameterA0V","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"cached","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]},"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/cached"},"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","type":"topic","abstract":[],"title":"FactoryModifying Implementations","kind":"article","role":"collectionGroup","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/cached":{"url":"\/documentation\/factory\/parameterfactory\/cached","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"cached","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/cached","kind":"symbol","title":"cached","abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"type":"text","text":"."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/cached-swift.class","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"kind":"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 5e8d2760..dd54b9df 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(_:)"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/callAsFunction(_:)","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"abstract":[{"text":"Resolves a factory capable of taking parameters at runtime.","type":"text"}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"callAsFunction"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"parameters"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"}]}]},{"kind":"content","content":[{"level":2,"anchor":"discussion","type":"heading","text":"Discussion"},{"type":"codeListing","code":["let service = container.parameterService(16)"],"syntax":"swift"}]}],"metadata":{"title":"callAsFunction(_:)","externalID":"s:7Factory09ParameterA0V14callAsFunctionyq_xF","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"role":"symbol","symbolKind":"method","roleHeading":"Instance Method"},"sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory/ParameterFactory/callAsFunction(_:)":{"title":"callAsFunction(_:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"}],"url":"\/documentation\/factory\/parameterfactory\/callasfunction(_:)","abstract":[{"text":"Resolves a factory capable of taking parameters at runtime.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/callAsFunction(_:)","type":"topic","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/callasfunction(_:)"]}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/callAsFunction(_:)","interfaceLanguage":"swift"},"metadata":{"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"}],"title":"callAsFunction(_:)","modules":[{"name":"Factory"}],"externalID":"s:7Factory09ParameterA0V14callAsFunctionyq_xF","roleHeading":"Instance Method","symbolKind":"method"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"callAsFunction"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"parameters","kind":"internalParam"},{"kind":"text","text":": "},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"T"}]}]},{"kind":"content","content":[{"level":2,"anchor":"discussion","text":"Discussion","type":"heading"},{"code":["let service = container.parameterService(16)"],"syntax":"swift","type":"codeListing"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"text":"Resolves a factory capable of taking parameters at runtime.","type":"text"}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/ParameterFactory/callAsFunction(_:)":{"url":"\/documentation\/factory\/parameterfactory\/callasfunction(_:)","title":"callAsFunction(_:)","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"callAsFunction","kind":"identifier"},{"text":"(","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/callAsFunction(_:)","type":"topic","abstract":[{"text":"Resolves a factory capable of taking parameters at runtime.","type":"text"}]},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"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 c3232c3c..3cae25dc 100644 --- a/docs/data/documentation/factory/parameterfactory/context(_:factory:).json +++ b/docs/data/documentation/factory/parameterfactory/context(_:factory:).json @@ -1 +1 @@ -{"schemaVersion":{"minor":3,"major":0,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/context(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"roleHeading":"Instance Method","symbolKind":"method","extendedModule":"Factory","title":"context(_:factory:)","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE7context_7factoryxAA0A11ContextTypeOd_1TQz1PQzYbctF::SYNTHESIZED::s:7Factory09ParameterA0V","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"context"},{"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","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"modules":[{"name":"Factory"}]},"abstract":[{"text":"Registers a factory closure to be used only when running in a specific context.","type":"text"}],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"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"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","preciseIdentifier":"s:7Factory0A11ContextTypeO","text":"FactoryContextType"},{"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","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier","text":"T","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"},{"content":[{"level":2,"text":"Discussion","anchor":"discussion","type":"heading"},{"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"}],"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/context(_:factory:)"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/context(_:factory:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/context(_:factory:)","kind":"symbol","title":"context(_:factory:)","url":"\/documentation\/factory\/parameterfactory\/context(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"context","kind":"identifier"},{"text":"(","kind":"text"},{"text":"FactoryContextType","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A11ContextTypeO"},{"kind":"text","text":"..., "},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"text":"Registers a factory closure to be used only when running in a specific context.","type":"text"}],"role":"symbol","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"kind":"article","abstract":[],"title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Contexts":{"type":"topic","kind":"article","role":"article","url":"\/documentation\/factory\/contexts","title":"Contexts","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}]},"doc://Factory/documentation/Factory/FactoryContextType":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/factorycontexttype","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"title":"FactoryContextType","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"FactoryContextType","kind":"identifier"}]}}} \ No newline at end of file +{"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/context(_:factory:)","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"symbol","metadata":{"role":"symbol","extendedModule":"Factory","modules":[{"name":"Factory"}],"roleHeading":"Instance Method","symbolKind":"method","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","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"title":"context(_:factory:)","externalID":"s:7Factory0A9ModifyingPAAE7context_7factoryxAA0A11ContextTypeOd_1TQz1PQzYbctF::SYNTHESIZED::s:7Factory09ParameterA0V"},"abstract":[{"text":"Registers a factory closure to be used only when running in a specific context.","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"context"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"contexts"},{"text":": ","kind":"text"},{"text":"FactoryContextType","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","preciseIdentifier":"s:7Factory0A11ContextTypeO","kind":"typeIdentifier"},{"text":"..., ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}]}]},{"content":[{"anchor":"discussion","type":"heading","text":"Discussion","level":2},{"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","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"}]}],"kind":"content"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/context(_:factory:)"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"references":{"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory/FactoryContextType":{"role":"symbol","url":"\/documentation\/factory\/factorycontexttype","title":"FactoryContextType","abstract":[{"type":"text","text":"Context types available for special purpose factory registrations."}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryContextType"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryContextType","navigatorTitle":[{"kind":"identifier","text":"FactoryContextType"}],"type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]},"doc://Factory/documentation/Factory/ParameterFactory/context(_:factory:)":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/context(_:factory:)","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"context","kind":"identifier"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:7Factory0A11ContextTypeO","text":"FactoryContextType","kind":"typeIdentifier"},{"kind":"text","text":"..., "},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/parameterfactory\/context(_:factory:)","abstract":[{"text":"Registers a factory closure to be used only when running in a specific context.","type":"text"}],"title":"context(_:factory:)"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Contexts":{"url":"\/documentation\/factory\/contexts","kind":"article","role":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","title":"Contexts","abstract":[{"text":"Changing injection results under special circumstances.","type":"text"}]},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","type":"topic","abstract":[],"title":"FactoryModifying Implementations","kind":"article","role":"collectionGroup","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"}}} \ 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 085841a1..5094ea7d 100644 --- a/docs/data/documentation/factory/parameterfactory/decorator(_:).json +++ b/docs/data/documentation/factory/parameterfactory/decorator(_:).json @@ -1 +1 @@ -{"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/decorator(_:)"]}],"metadata":{"modules":[{"name":"Factory"}],"extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE9decoratoryxy1TQzYbcF::SYNTHESIZED::s:7Factory09ParameterA0V","role":"symbol","title":"decorator(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"decorator"},{"text":"((","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:s4Voida","text":"Void","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"roleHeading":"Instance Method","symbolKind":"method"},"schemaVersion":{"major":0,"patch":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"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."}],"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/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":"_"},{"text":" ","kind":"text"},{"text":"decorator","kind":"internalParam"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:s4Voida","text":"Void","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"]}],"kind":"declarations"},{"content":[{"anchor":"discussion","text":"Discussion","level":2,"type":"heading"},{"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":[{"type":"text","text":"As shown, decorator can come in handy when you need to perform some operation or manipulation after the fact."}]}],"kind":"content"}],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory/decorator(_:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/decorator(_:)","url":"\/documentation\/factory\/parameterfactory\/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"},{"text":" ","type":"text"},{"type":"text","text":"for further examination or manipulation."}],"title":"decorator(_:)","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"decorator","kind":"identifier"},{"kind":"text","text":"(("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:s4Voida","kind":"typeIdentifier","text":"Void"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"kind":"article","abstract":[],"title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"}}} \ No newline at end of file +{"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"decorator","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"decorator"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}]}],"kind":"declarations"},{"kind":"content","content":[{"type":"heading","anchor":"discussion","text":"Discussion","level":2},{"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"," }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As shown, decorator can come in handy when you need to perform some operation or manipulation after the fact."}]}]}],"sections":[],"metadata":{"roleHeading":"Instance Method","title":"decorator(_:)","symbolKind":"method","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"kind":"text","text":"(("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE9decoratoryxy1TQzYbcF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory"},"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"]]},"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/parameterfactory\/decorator(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"type":"text","text":"Adds a factory specific decorator. The decorator will be "},{"inlineContent":[{"text":"always","type":"text"}],"type":"emphasis"},{"type":"text","text":" be called with the resolved dependency"},{"type":"text","text":" "},{"text":"for further examination or manipulation.","type":"text"}],"schemaVersion":{"patch":0,"minor":3,"major":0},"references":{"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory/ParameterFactory/decorator(_:)":{"url":"\/documentation\/factory\/parameterfactory\/decorator(_:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"text":"((","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/decorator(_:)","kind":"symbol","title":"decorator(_:)","abstract":[{"text":"Adds a factory specific decorator. The decorator will be ","type":"text"},{"type":"emphasis","inlineContent":[{"text":"always","type":"text"}]},{"type":"text","text":" be called with the resolved dependency"},{"type":"text","text":" "},{"text":"for further examination or manipulation.","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","type":"topic","abstract":[],"title":"FactoryModifying Implementations","kind":"article","role":"collectionGroup","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 14d6c3ea..5ec4aea2 100644 --- a/docs/data/documentation/factory/parameterfactory/factorymodifying-implementations.json +++ b/docs/data/documentation/factory/parameterfactory/factorymodifying-implementations.json @@ -1 +1 @@ -{"kind":"article","sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"},"metadata":{"roleHeading":"API Collection","title":"FactoryModifying Implementations","role":"collectionGroup","modules":[{"name":"Factory"}]},"topicSections":[{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/cached","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/graph","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/shared","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/singleton","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/unique"],"generated":true},{"title":"Instance Methods","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(_:)"]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"references":{"doc://Factory/documentation/Factory/ParameterFactory/reset(_:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/reset(_:)","url":"\/documentation\/factory\/parameterfactory\/reset(_:)","title":"reset(_:)","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"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"},"doc://Factory/documentation/Factory/ParameterFactory/context(_:factory:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/context(_:factory:)","kind":"symbol","title":"context(_:factory:)","url":"\/documentation\/factory\/parameterfactory\/context(_:factory:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"context","kind":"identifier"},{"text":"(","kind":"text"},{"text":"FactoryContextType","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A11ContextTypeO"},{"kind":"text","text":"..., "},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"abstract":[{"text":"Registers a factory closure to be used only when running in a specific context.","type":"text"}],"role":"symbol","type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory/decorator(_:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/decorator(_:)","url":"\/documentation\/factory\/parameterfactory\/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"},{"text":" ","type":"text"},{"type":"text","text":"for further examination or manipulation."}],"title":"decorator(_:)","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"decorator","kind":"identifier"},{"kind":"text","text":"(("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:s4Voida","kind":"typeIdentifier","text":"Void"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/onArg(_:factory:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArg(_:factory:)","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"text":"Factory builder shortcut for context(.arg(“test”) { .. }","type":"text"}],"title":"onArg(_:factory:)","kind":"symbol","url":"\/documentation\/factory\/parameterfactory\/onarg(_:factory:)","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/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"},{"text":".","type":"text"}],"kind":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"title":"singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/singleton","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/singleton"},"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/onDebug(factory:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDebug(factory:)","url":"\/documentation\/factory\/parameterfactory\/ondebug(factory:)","abstract":[{"text":"Factory builder shortcut for context(.debug) { .. }","type":"text"}],"title":"onDebug(factory:)","kind":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/graph":{"type":"topic","title":"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"},{"type":"text","text":"."}],"role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"graph","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/graph","kind":"symbol","url":"\/documentation\/factory\/parameterfactory\/graph"},"doc://Factory/documentation/Factory/ParameterFactory/timeToLive(_:)":{"kind":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/timeToLive(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"timeToLive"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"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."}],"url":"\/documentation\/factory\/parameterfactory\/timetolive(_:)","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Singleton"}],"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/ParameterFactory/onSimulator(factory:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onSimulator(factory:)","url":"\/documentation\/factory\/parameterfactory\/onsimulator(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"title":"onSimulator(factory:)","kind":"symbol","type":"topic","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","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/once()":{"type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"once"},{"text":"() -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"title":"once()","abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/parameterfactory\/once()","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/once()"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"title":"Scope.Shared","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/scope\/shared-swift.class","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","navigatorTitle":[{"kind":"identifier","text":"Shared"}]},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/graph-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/unique":{"title":"unique","abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true,"type":"reference"},{"type":"text","text":"."}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"kind":"symbol","url":"\/documentation\/factory\/parameterfactory\/unique","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/unique","type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/shared":{"url":"\/documentation\/factory\/parameterfactory\/shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/shared","kind":"symbol","type":"topic","title":"shared","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","isActive":true},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/ParameterFactory/onPreview(factory:)":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/parameterfactory\/onpreview(factory:)","title":"onPreview(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onPreview(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory/ParameterFactory/onArgs(_:factory:)":{"title":"onArgs(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArgs(_:factory:)","role":"symbol","kind":"symbol","abstract":[{"text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }","type":"text"}],"url":"\/documentation\/factory\/parameterfactory\/onargs(_:factory:)","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onArgs","kind":"identifier"},{"text":"([","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory/ParameterFactory/cached":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/cached","url":"\/documentation\/factory\/parameterfactory\/cached","title":"cached","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},{"type":"text","text":"."}],"kind":"symbol","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"cached","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory/scope(_:)":{"kind":"symbol","abstract":[{"text":"Defines a dependency scope for this Factory. See ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"scope","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"scope(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/scope(_:)","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/scope(_:)"},"doc://Factory/documentation/Factory/ParameterFactory/onDevice(factory:)":{"role":"symbol","type":"topic","title":"onDevice(factory:)","url":"\/documentation\/factory\/parameterfactory\/ondevice(factory:)","abstract":[{"text":"Factory builder shortcut for context(.device) { .. }","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDevice(factory:)","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onDevice","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"navigatorTitle":[{"text":"Cached","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/cached-swift.class","type":"topic","title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}]},"doc://Factory/documentation/Factory/ParameterFactory/onTest(factory:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onTest(factory:)","url":"\/documentation\/factory\/parameterfactory\/ontest(factory:)","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","title":"onTest(factory:)","abstract":[{"text":"Factory builder shortcut for context(.test) { .. }","type":"text"}],"kind":"symbol"}}} \ No newline at end of file +{"kind":"article","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},{"generated":true,"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/context(_:factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/decorator(_:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArg(_:factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArgs(_:factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDebug(factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDevice(factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onPreview(factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onSimulator(factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onTest(factory:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/once()","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/reset(_:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/scope(_:)","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/timeToLive(_:)"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"metadata":{"roleHeading":"API Collection","title":"FactoryModifying Implementations","role":"collectionGroup","modules":[{"name":"Factory"}]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"patch":0,"minor":3},"references":{"doc://Factory/documentation/Factory/ParameterFactory/unique":{"url":"\/documentation\/factory\/parameterfactory\/unique","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"unique","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/unique","kind":"symbol","title":"unique","abstract":[{"text":"Syntactic sugar defines defines unique scope. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"reference","isActive":true},{"type":"text","text":"."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/timeToLive(_:)":{"url":"\/documentation\/factory\/parameterfactory\/timetolive(_:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"timeToLive","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/timeToLive(_:)","kind":"symbol","title":"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"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/context(_:factory:)":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/context(_:factory:)","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"context","kind":"identifier"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:7Factory0A11ContextTypeO","text":"FactoryContextType","kind":"typeIdentifier"},{"kind":"text","text":"..., "},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/parameterfactory\/context(_:factory:)","abstract":[{"text":"Registers a factory closure to be used only when running in a specific context.","type":"text"}],"title":"context(_:factory:)"},"doc://Factory/documentation/Factory/ParameterFactory/onPreview(factory:)":{"abstract":[{"text":"Factory builder shortcut for context(.preview) { .. }","type":"text"}],"type":"topic","title":"onPreview(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onPreview(factory:)","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onPreview","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/parameterfactory\/onpreview(factory:)","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/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"}],"title":"graph","url":"\/documentation\/factory\/parameterfactory\/graph","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"graph","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/graph"},"doc://Factory/documentation/Factory/ParameterFactory/onTest(factory:)":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"text":"Factory builder shortcut for context(.test) { .. }","type":"text"}],"title":"onTest(factory:)","url":"\/documentation\/factory\/parameterfactory\/ontest(factory:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onTest(factory:)","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/onDebug(factory:)":{"url":"\/documentation\/factory\/parameterfactory\/ondebug(factory:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onDebug","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDebug(factory:)","kind":"symbol","title":"onDebug(factory:)","abstract":[{"text":"Factory builder shortcut for context(.debug) { .. }","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/singleton":{"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"singleton","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"kind":"symbol","type":"topic","title":"singleton","url":"\/documentation\/factory\/parameterfactory\/singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/singleton","role":"symbol","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"}]},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/scope(_:)":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/scope(_:)","kind":"symbol","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":"."}],"url":"\/documentation\/factory\/parameterfactory\/scope(_:)","title":"scope(_:)","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"scope","kind":"identifier"},{"kind":"text","text":"("},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory/ParameterFactory/onArgs(_:factory:)":{"url":"\/documentation\/factory\/parameterfactory\/onargs(_:factory:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":"], "},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArgs(_:factory:)","kind":"symbol","title":"onArgs(_:factory:)","abstract":[{"text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/onSimulator(factory:)":{"url":"\/documentation\/factory\/parameterfactory\/onsimulator(factory:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onSimulator","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onSimulator(factory:)","kind":"symbol","title":"onSimulator(factory:)","abstract":[{"text":"Factory builder shortcut for context(.simulator) { .. }","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/onDevice(factory:)":{"url":"\/documentation\/factory\/parameterfactory\/ondevice(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onDevice","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDevice(factory:)","kind":"symbol","title":"onDevice(factory:)","abstract":[{"text":"Factory builder shortcut for context(.device) { .. }","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/decorator(_:)":{"url":"\/documentation\/factory\/parameterfactory\/decorator(_:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"decorator"},{"text":"((","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/decorator(_:)","kind":"symbol","title":"decorator(_:)","abstract":[{"text":"Adds a factory specific decorator. The decorator will be ","type":"text"},{"type":"emphasis","inlineContent":[{"text":"always","type":"text"}]},{"type":"text","text":" be called with the resolved dependency"},{"type":"text","text":" "},{"text":"for further examination or manipulation.","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/once()":{"type":"topic","title":"once()","role":"symbol","url":"\/documentation\/factory\/parameterfactory\/once()","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/once()","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"once"},{"text":"() -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}]},"doc://Factory/documentation/Factory/ParameterFactory/shared":{"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"}],"role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"shared"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/shared","title":"shared","url":"\/documentation\/factory\/parameterfactory\/shared","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/cached":{"url":"\/documentation\/factory\/parameterfactory\/cached","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"cached","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/cached","kind":"symbol","title":"cached","abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be cached. See ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"},{"type":"text","text":"."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/cached-swift.class","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/reset(_:)":{"url":"\/documentation\/factory\/parameterfactory\/reset(_:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/reset(_:)","kind":"symbol","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."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","type":"topic","abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory/ParameterFactory/onArg(_:factory:)":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArg(_:factory:)","kind":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onArg","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":", ","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/parameterfactory\/onarg(_:factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"title":"onArg(_: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 ae4972ca..6d20efd7 100644 --- a/docs/data/documentation/factory/parameterfactory/graph.json +++ b/docs/data/documentation/factory/parameterfactory/graph.json @@ -1 +1 @@ -{"schemaVersion":{"patch":0,"minor":3,"major":0},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/graph"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"sections":[],"metadata":{"role":"symbol","title":"graph","externalID":"s:7Factory0A9ModifyingPAAE5graphxvp::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"roleHeading":"Instance Property","symbolKind":"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"},{"text":".","type":"text"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/graph","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"kind":"text","text":" }"}],"languages":["swift"]}],"kind":"declarations"},{"content":[{"anchor":"discussion","type":"heading","level":2,"text":"Discussion"},{"code":["var service: Factory {"," factory { MyService() }"," .graph","}"],"syntax":"swift","type":"codeListing"}],"kind":"content"}],"references":{"doc://Factory/documentation/Factory/ParameterFactory/graph":{"type":"topic","title":"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"},{"type":"text","text":"."}],"role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"graph","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/graph","kind":"symbol","url":"\/documentation\/factory\/parameterfactory\/graph"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"kind":"article","abstract":[],"title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/graph-swift.class","role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"sections":[],"metadata":{"externalID":"s:7Factory0A9ModifyingPAAE5graphxvp::SYNTHESIZED::s:7Factory09ParameterA0V","title":"graph","extendedModule":"Factory","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"graph"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","role":"symbol","roleHeading":"Instance Property","modules":[{"name":"Factory"}]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/graph"},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"graph","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}]}]},{"kind":"content","content":[{"level":2,"anchor":"discussion","text":"Discussion","type":"heading"},{"syntax":"swift","type":"codeListing","code":["var service: Factory {"," factory { MyService() }"," .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":"."}],"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"]]},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/graph"]}],"references":{"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","type":"topic","abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/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"}],"title":"graph","url":"\/documentation\/factory\/parameterfactory\/graph","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"graph","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/graph"},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","type":"topic","abstract":[],"title":"FactoryModifying Implementations","kind":"article","role":"collectionGroup","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"}}} \ 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 74a128d9..7fd8a954 100644 --- a/docs/data/documentation/factory/parameterfactory/init(_:key:_:).json +++ b/docs/data/documentation/factory/parameterfactory/init(_:key:_:).json @@ -1 +1 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/init(_:key:_:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Public initializer creates a factory capable of taking parameters at runtime."}],"schemaVersion":{"patch":0,"minor":3,"major":0},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"metadata":{"fragments":[{"kind":"identifier","text":"init"},{"text":"(any ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ManagedContainerP","text":"ManagedContainer"},{"kind":"text","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"},{"text":")","kind":"text"}],"roleHeading":"Initializer","role":"symbol","modules":[{"name":"Factory"}],"title":"init(_:key:_:)","externalID":"s:7Factory09ParameterA0V_3key_ACyxq_GAA16ManagedContainer_p_s12StaticStringVq_xYbctcfc","symbolKind":"init"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"init","kind":"keyword"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"container"},{"kind":"text","text":": any "},{"preciseIdentifier":"s:7Factory16ManagedContainerP","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"typeIdentifier","text":"ManagedContainer"},{"kind":"text","text":", "},{"kind":"externalParam","text":"key"},{"kind":"text","text":": "},{"text":"StaticString","kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV"},{"text":" = ","kind":"text"},{"kind":"keyword","text":"#function"},{"text":", ","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"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"},{"kind":"text","text":")"}],"languages":["swift"]}],"kind":"declarations"},{"parameters":[{"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"}]}],"name":"container"},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Hidden value used to differentiate different instances of the same type in the same container."}]}],"name":"key"},{"content":[{"inlineContent":[{"type":"text","text":"A factory closure that produces an object of the desired type when required."}],"type":"paragraph"}],"name":"factory"}],"kind":"parameters"},{"content":[{"type":"heading","level":2,"text":"Discussion","anchor":"discussion"},{"syntax":"swift","code":["var parameterService: ParameterFactory {"," self { ParameterService(value: $0) }","}"],"type":"codeListing"}],"kind":"content"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/init(_:key:_:)"]}],"sections":[],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"ManagedContainer","kind":"identifier"}],"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"title":"ManagedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","type":"topic","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}]},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/init(_:key:_:)":{"title":"init(_:key:_:)","abstract":[{"type":"text","text":"Public initializer creates a factory capable of taking parameters at runtime."}],"fragments":[{"text":"init","kind":"identifier"},{"text":"(any ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ManagedContainerP","text":"ManagedContainer"},{"kind":"text","text":", "},{"text":"key","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"StaticString","preciseIdentifier":"s:s12StaticStringV"},{"kind":"text","text":", ("},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":")"}],"kind":"symbol","url":"\/documentation\/factory\/parameterfactory\/init(_:key:_:)","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/init(_:key:_:)","type":"topic"}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/init(_:key:_:)"]}],"kind":"symbol","metadata":{"role":"symbol","externalID":"s:7Factory09ParameterA0V_3key_ACyxq_GAA16ManagedContainer_p_s12StaticStringVq_xYbctcfc","symbolKind":"init","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"(any "},{"text":"ManagedContainer","kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ManagedContainerP"},{"text":", ","kind":"text"},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"text":"StaticString","preciseIdentifier":"s:s12StaticStringV","kind":"typeIdentifier"},{"text":", (","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":")"}],"roleHeading":"Initializer","title":"init(_:key:_:)","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"schemaVersion":{"minor":3,"major":0,"patch":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/init(_:key:_:)","interfaceLanguage":"swift"},"abstract":[{"text":"Public initializer creates a factory capable of taking parameters at runtime.","type":"text"}],"sections":[],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"init","kind":"keyword"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"container"},{"kind":"text","text":": any "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP","text":"ManagedContainer","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"key","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:s12StaticStringV","text":"StaticString"},{"kind":"text","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"},{"kind":"text","text":" ("},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"},{"text":")","kind":"text"}]}],"kind":"declarations"},{"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"},{"name":"key","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Hidden value used to differentiate different instances of the same type in the same container."}]}]},{"name":"factory","content":[{"type":"paragraph","inlineContent":[{"text":"A factory closure that produces an object of the desired type when required.","type":"text"}]}]}],"kind":"parameters"},{"content":[{"text":"Discussion","anchor":"discussion","type":"heading","level":2},{"type":"codeListing","code":["var parameterService: ParameterFactory {"," self { ParameterService(value: $0) }","}"],"syntax":"swift"}],"kind":"content"}],"references":{"doc://Factory/documentation/Factory/ManagedContainer":{"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","role":"symbol","navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ManagedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory/ParameterFactory/init(_:key:_:)":{"role":"symbol","url":"\/documentation\/factory\/parameterfactory\/init(_:key:_:)","abstract":[{"type":"text","text":"Public initializer creates a factory capable of taking parameters at runtime."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/init(_:key:_:)","fragments":[{"text":"init","kind":"identifier"},{"text":"(any ","kind":"text"},{"kind":"typeIdentifier","text":"ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP"},{"text":", ","kind":"text"},{"text":"key","kind":"externalParam"},{"kind":"text","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":")"}],"type":"topic","kind":"symbol","title":"init(_:key:_:)"}}} \ 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 f14f7d43..202d44fa 100644 --- a/docs/data/documentation/factory/parameterfactory/onarg(_:factory:).json +++ b/docs/data/documentation/factory/parameterfactory/onarg(_:factory:).json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"argument"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]}],"kind":"declarations"}],"schemaVersion":{"minor":3,"major":0,"patch":0},"kind":"symbol","metadata":{"roleHeading":"Instance Method","extendedModule":"Factory","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onArg"},{"text":"(","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":", ","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","title":"onArg(_:factory:)","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE5onArg_7factoryxSS_1TQz1PQzYbctF::SYNTHESIZED::s:7Factory09ParameterA0V","modules":[{"name":"Factory"}]},"abstract":[{"text":"Factory builder shortcut for context(.arg(“test”) { .. }","type":"text"}],"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArg(_:factory:)"},"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/onarg(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"kind":"article","abstract":[],"title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/onArg(_:factory:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArg(_:factory:)","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArg"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"text":"Factory builder shortcut for context(.arg(“test”) { .. }","type":"text"}],"title":"onArg(_:factory:)","kind":"symbol","url":"\/documentation\/factory\/parameterfactory\/onarg(_:factory:)","role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"}}} \ No newline at end of file +{"kind":"symbol","abstract":[{"text":"Factory builder shortcut for context(.arg(“test”) { .. }","type":"text"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArg(_:factory:)"},"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onArg","kind":"identifier"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"argument","kind":"internalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","kind":"typeIdentifier","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"]}],"kind":"declarations"}],"sections":[],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/onarg(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"metadata":{"externalID":"s:7Factory0A9ModifyingPAAE5onArg_7factoryxSS_1TQz1PQzYbctF::SYNTHESIZED::s:7Factory09ParameterA0V","role":"symbol","roleHeading":"Instance Method","extendedModule":"Factory","modules":[{"name":"Factory"}],"symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onArg","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"onArg(_:factory:)"},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","type":"topic","abstract":[],"title":"FactoryModifying Implementations","kind":"article","role":"collectionGroup","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory/ParameterFactory/onArg(_:factory:)":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArg(_:factory:)","kind":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onArg","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":", ","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/parameterfactory\/onarg(_:factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.arg(“test”) { .. }"}],"title":"onArg(_:factory:)"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 9cb06de5..00ca530e 100644 --- a/docs/data/documentation/factory/parameterfactory/onargs(_:factory:).json +++ b/docs/data/documentation/factory/parameterfactory/onargs(_:factory:).json @@ -1 +1 @@ -{"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArgs(_:factory:)","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onArgs","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"args","kind":"internalParam"},{"text":": [","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"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","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"]}],"kind":"declarations"}],"metadata":{"title":"onArgs(_:factory:)","externalID":"s:7Factory0A9ModifyingPAAE6onArgs_7factoryxSaySSG_1TQz1PQzYbctF::SYNTHESIZED::s:7Factory09ParameterA0V","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"text":"([","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"text":"], ","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"extendedModule":"Factory","role":"symbol","symbolKind":"method","roleHeading":"Instance Method"},"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }","type":"text"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/onargs(_:factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"kind":"article","abstract":[],"title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory/onArgs(_:factory:)":{"title":"onArgs(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArgs(_:factory:)","role":"symbol","kind":"symbol","abstract":[{"text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }","type":"text"}],"url":"\/documentation\/factory\/parameterfactory\/onargs(_:factory:)","type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onArgs","kind":"identifier"},{"text":"([","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"}}} \ No newline at end of file +{"sections":[],"abstract":[{"text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/onargs(_:factory:)"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"primaryContentSections":[{"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":": ["},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArgs(_:factory:)"},"kind":"symbol","metadata":{"title":"onArgs(_:factory:)","roleHeading":"Instance Method","role":"symbol","modules":[{"name":"Factory"}],"symbolKind":"method","extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE6onArgs_7factoryxSaySSG_1TQz1PQzYbctF::SYNTHESIZED::s:7Factory09ParameterA0V","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onArgs","kind":"identifier"},{"kind":"text","text":"(["},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":"], "},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"schemaVersion":{"major":0,"patch":0,"minor":3},"references":{"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/onArgs(_:factory:)":{"url":"\/documentation\/factory\/parameterfactory\/onargs(_:factory:)","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onArgs"},{"kind":"text","text":"(["},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":"], "},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onArgs(_:factory:)","kind":"symbol","title":"onArgs(_:factory:)","abstract":[{"text":"Factory builder shortcut for context(.args[“test1”,“test2”) { .. }","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","type":"topic","abstract":[],"title":"FactoryModifying Implementations","kind":"article","role":"collectionGroup","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/once().json b/docs/data/documentation/factory/parameterfactory/once().json index 28451863..312a0b87 100644 --- a/docs/data/documentation/factory/parameterfactory/once().json +++ b/docs/data/documentation/factory/parameterfactory/once().json @@ -1 +1 @@ -{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/once()"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/once()","interfaceLanguage":"swift"},"metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"once","kind":"identifier"},{"kind":"text","text":"() -> "},{"text":"Self","kind":"typeIdentifier"}],"symbolKind":"method","role":"symbol","title":"once()","extendedModule":"Factory","modules":[{"name":"Factory"}],"roleHeading":"Instance Method","externalID":"s:7Factory0A9ModifyingPAAE4oncexyF::SYNTHESIZED::s:7Factory09ParameterA0V"},"schemaVersion":{"patch":0,"minor":3,"major":0},"sections":[],"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"once","kind":"identifier"},{"kind":"text","text":"() -> "},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"]}],"kind":"declarations"}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"kind":"article","abstract":[],"title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/once()":{"type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"once"},{"text":"() -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"title":"once()","abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/parameterfactory\/once()","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/once()"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ 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":[],"metadata":{"role":"symbol","title":"once()","roleHeading":"Instance Method","modules":[{"name":"Factory"}],"symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"once","kind":"identifier"},{"kind":"text","text":"() -> "},{"text":"Self","kind":"typeIdentifier"}],"externalID":"s:7Factory0A9ModifyingPAAE4oncexyF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory"},"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"once"},{"kind":"text","text":"() -> "},{"text":"Self","kind":"typeIdentifier"}]}],"kind":"declarations"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/once()"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/once()"]}],"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","type":"topic","abstract":[],"title":"FactoryModifying Implementations","kind":"article","role":"collectionGroup","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"},"doc://Factory/documentation/Factory/ParameterFactory/once()":{"type":"topic","title":"once()","role":"symbol","url":"\/documentation\/factory\/parameterfactory\/once()","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/once()","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"once"},{"text":"() -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"type":"text","text":"Adds ability to mutate Factory on first instantiation only."}]}}} \ 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 9b3015cc..c3424110 100644 --- a/docs/data/documentation/factory/parameterfactory/ondebug(factory:).json +++ b/docs/data/documentation/factory/parameterfactory/ondebug(factory:).json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"platforms":["macOS"]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/ondebug(factory:)"]}],"metadata":{"extendedModule":"Factory","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE7onDebug7factoryx1TQz1PQzYbc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onDebug","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"method","roleHeading":"Instance Method","title":"onDebug(factory:)","modules":[{"name":"Factory"}]},"sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDebug(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"references":{"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},"doc://Factory/documentation/Factory/ParameterFactory/onDebug(factory:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDebug(factory:)","url":"\/documentation\/factory\/parameterfactory\/ondebug(factory:)","abstract":[{"text":"Factory builder shortcut for context(.debug) { .. }","type":"text"}],"title":"onDebug(factory:)","kind":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDebug"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"kind":"article","abstract":[],"title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"}}} \ No newline at end of file +{"abstract":[{"type":"text","text":"Factory builder shortcut for context(.debug) { .. }"}],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/ondebug(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDebug(factory:)","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"patch":0,"minor":3},"metadata":{"symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE7onDebug7factoryx1TQz1PQzYbc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","title":"onDebug(factory:)","roleHeading":"Instance Method","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"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"modules":[{"name":"Factory"}],"role":"symbol","extendedModule":"Factory"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onDebug","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"platforms":["macOS"],"languages":["swift"]}]}],"sections":[],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/onDebug(factory:)":{"url":"\/documentation\/factory\/parameterfactory\/ondebug(factory:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onDebug","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDebug(factory:)","kind":"symbol","title":"onDebug(factory:)","abstract":[{"text":"Factory builder shortcut for context(.debug) { .. }","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","type":"topic","abstract":[],"title":"FactoryModifying Implementations","kind":"article","role":"collectionGroup","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/ondevice(factory:).json b/docs/data/documentation/factory/parameterfactory/ondevice(factory:).json index 51937306..7090a799 100644 --- a/docs/data/documentation/factory/parameterfactory/ondevice(factory:).json +++ b/docs/data/documentation/factory/parameterfactory/ondevice(factory:).json @@ -1 +1 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDevice(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/ondevice(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"modules":[{"name":"Factory"}],"role":"symbol","title":"onDevice(factory:)","roleHeading":"Instance Method","symbolKind":"method","externalID":"s:7Factory0A9ModifyingPAAE8onDevice7factoryx1TQz1PQzYbc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onDevice","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"extendedModule":"Factory"},"kind":"symbol","primaryContentSections":[{"declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onDevice"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"sections":[],"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},"references":{"doc://Factory/documentation/Factory/ParameterFactory/onDevice(factory:)":{"role":"symbol","type":"topic","title":"onDevice(factory:)","url":"\/documentation\/factory\/parameterfactory\/ondevice(factory:)","abstract":[{"text":"Factory builder shortcut for context(.device) { .. }","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDevice(factory:)","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onDevice","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"kind":"article","abstract":[],"title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"}}} \ No newline at end of file +{"abstract":[{"type":"text","text":"Factory builder shortcut for context(.device) { .. }"}],"sections":[],"metadata":{"role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onDevice","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"title":"onDevice(factory:)","modules":[{"name":"Factory"}],"extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE8onDevice7factoryx1TQz1PQzYbc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","roleHeading":"Instance Method","symbolKind":"method"},"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\/ondevice(factory:)"]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDevice(factory:)","interfaceLanguage":"swift"},"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onDevice","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"},{"kind":"typeIdentifier","text":"P","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"],"platforms":["macOS"]}]}],"references":{"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/onDevice(factory:)":{"url":"\/documentation\/factory\/parameterfactory\/ondevice(factory:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onDevice","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onDevice(factory:)","kind":"symbol","title":"onDevice(factory:)","abstract":[{"text":"Factory builder shortcut for context(.device) { .. }","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","type":"topic","abstract":[],"title":"FactoryModifying Implementations","kind":"article","role":"collectionGroup","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/parameterfactory/onpreview(factory:).json b/docs/data/documentation/factory/parameterfactory/onpreview(factory:).json index 1a7b96bf..cb26685a 100644 --- a/docs/data/documentation/factory/parameterfactory/onpreview(factory:).json +++ b/docs/data/documentation/factory/parameterfactory/onpreview(factory:).json @@ -1 +1 @@ -{"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"metadata":{"externalID":"s:7Factory0A9ModifyingPAAE9onPreview7factoryx1TQz1PQzYbc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","roleHeading":"Instance Method","title":"onPreview(factory:)","extendedModule":"Factory","modules":[{"name":"Factory"}],"symbolKind":"method","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onPreview","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol"},"sections":[],"kind":"symbol","primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onPreview","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier","text":"P","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/onpreview(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onPreview(factory:)","interfaceLanguage":"swift"},"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},"references":{"doc://Factory/documentation/Factory/ParameterFactory/onPreview(factory:)":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/parameterfactory\/onpreview(factory:)","title":"onPreview(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onPreview(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onPreview"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"kind":"article","abstract":[],"title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"}}} \ No newline at end of file +{"metadata":{"title":"onPreview(factory:)","roleHeading":"Instance Method","role":"symbol","modules":[{"name":"Factory"}],"symbolKind":"method","extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE9onPreview7factoryx1TQz1PQzYbc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onPreview"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"sections":[],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.preview) { .. }"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onPreview","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"P","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier","text":"T","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onPreview(factory:)","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/onpreview(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/onPreview(factory:)":{"abstract":[{"text":"Factory builder shortcut for context(.preview) { .. }","type":"text"}],"type":"topic","title":"onPreview(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onPreview(factory:)","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onPreview","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"url":"\/documentation\/factory\/parameterfactory\/onpreview(factory:)","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","type":"topic","abstract":[],"title":"FactoryModifying Implementations","kind":"article","role":"collectionGroup","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"}}} \ 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 895873a1..929853f0 100644 --- a/docs/data/documentation/factory/parameterfactory/onsimulator(factory:).json +++ b/docs/data/documentation/factory/parameterfactory/onsimulator(factory:).json @@ -1 +1 @@ -{"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(.simulator) { .. }","type":"text"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"onSimulator","kind":"identifier"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","text":"P","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"platforms":["macOS"],"languages":["swift"]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onSimulator(factory:)","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/onsimulator(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"symbolKind":"method","extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE11onSimulator7factoryx1TQz1PQzYbc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","roleHeading":"Instance Method","role":"symbol","modules":[{"name":"Factory"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onSimulator","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"text":"T","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"title":"onSimulator(factory:)"},"sections":[],"references":{"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"kind":"article","abstract":[],"title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},"doc://Factory/documentation/Factory/ParameterFactory/onSimulator(factory:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onSimulator(factory:)","url":"\/documentation\/factory\/parameterfactory\/onsimulator(factory:)","abstract":[{"type":"text","text":"Factory builder shortcut for context(.simulator) { .. }"}],"title":"onSimulator(factory:)","kind":"symbol","type":"topic","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","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"onSimulator","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": "},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"]}]}],"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/onsimulator(factory:)"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"sections":[],"metadata":{"role":"symbol","extendedModule":"Factory","modules":[{"name":"Factory"}],"roleHeading":"Instance Method","symbolKind":"method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"onSimulator"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"title":"onSimulator(factory:)","externalID":"s:7Factory0A9ModifyingPAAE11onSimulator7factoryx1TQz1PQzYbc_tF::SYNTHESIZED::s:7Factory09ParameterA0V"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onSimulator(factory:)"},"abstract":[{"text":"Factory builder shortcut for context(.simulator) { .. }","type":"text"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","type":"topic","abstract":[],"title":"FactoryModifying Implementations","kind":"article","role":"collectionGroup","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]},"doc://Factory/documentation/Factory/ParameterFactory/onSimulator(factory:)":{"url":"\/documentation\/factory\/parameterfactory\/onsimulator(factory:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"onSimulator","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onSimulator(factory:)","kind":"symbol","title":"onSimulator(factory:)","abstract":[{"text":"Factory builder shortcut for context(.simulator) { .. }","type":"text"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 7cc28c37..0cf807bf 100644 --- a/docs/data/documentation/factory/parameterfactory/ontest(factory:).json +++ b/docs/data/documentation/factory/parameterfactory/ontest(factory:).json @@ -1 +1 @@ -{"abstract":[{"text":"Factory builder shortcut for context(.test) { .. }","type":"text"}],"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/parameterfactory\/ontest(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onTest(factory:)"},"sections":[],"metadata":{"symbolKind":"method","modules":[{"name":"Factory"}],"roleHeading":"Instance Method","extendedModule":"Factory","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol","title":"onTest(factory:)","externalID":"s:7Factory0A9ModifyingPAAE6onTest7factoryx1TQz1PQzYbc_tF::SYNTHESIZED::s:7Factory09ParameterA0V"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"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":": "},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"P","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}]}],"kind":"declarations"}],"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":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"kind":"symbol","title":"P","type":"topic","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"P"}],"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P"},"doc://Factory/documentation/Factory/ParameterFactory/onTest(factory:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onTest(factory:)","url":"\/documentation\/factory\/parameterfactory\/ontest(factory:)","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","title":"onTest(factory:)","abstract":[{"text":"Factory builder shortcut for context(.test) { .. }","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"kind":"article","abstract":[],"title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/FactoryModifying/T":{"required":true,"url":"\/documentation\/factory\/factorymodifying\/t","title":"T","type":"topic","abstract":[{"type":"text","text":"The return type of the Factory’s dependency."}],"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"kind":"identifier","text":"T"}],"role":"symbol"}}} \ No newline at end of file +{"sections":[],"abstract":[{"type":"text","text":"Factory builder shortcut for context(.test) { .. }"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/ontest(factory:)"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"onTest","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","text":"P","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onTest(factory:)","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE6onTest7factoryx1TQz1PQzYbc_tF::SYNTHESIZED::s:7Factory09ParameterA0V","modules":[{"name":"Factory"}],"title":"onTest(factory:)","roleHeading":"Instance Method","symbolKind":"method","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onTest"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"T","preciseIdentifier":"s:7Factory0A9ModifyingP1TQa"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]},"schemaVersion":{"major":0,"patch":0,"minor":3},"references":{"doc://Factory/documentation/Factory/ParameterFactory/onTest(factory:)":{"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"onTest"},{"kind":"text","text":"("},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Self","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A9ModifyingP1PQa","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory0A9ModifyingP1TQa","kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"abstract":[{"text":"Factory builder shortcut for context(.test) { .. }","type":"text"}],"title":"onTest(factory:)","url":"\/documentation\/factory\/parameterfactory\/ontest(factory:)","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/onTest(factory:)","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryModifying/P":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/P","role":"symbol","type":"topic","title":"P","url":"\/documentation\/factory\/factorymodifying\/p","required":true,"abstract":[{"text":"The parameter type of the Factory, if any. Will be ","type":"text"},{"code":"Void","type":"codeVoice"},{"type":"text","text":" on the standard Factory."}],"kind":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"P","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryModifying/T":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryModifying\/T","role":"symbol","type":"topic","title":"T","url":"\/documentation\/factory\/factorymodifying\/t","required":true,"abstract":[{"text":"The return type of the Factory’s dependency.","type":"text"}],"kind":"symbol","fragments":[{"text":"associatedtype","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"T"}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","type":"topic","abstract":[],"title":"FactoryModifying Implementations","kind":"article","role":"collectionGroup","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"}}} \ 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 1cbd42dc..d747bd7c 100644 --- a/docs/data/documentation/factory/parameterfactory/register(factory:).json +++ b/docs/data/documentation/factory/parameterfactory/register(factory:).json @@ -1 +1 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(factory:)","interfaceLanguage":"swift"},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" (","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","text":"ParameterFactory","kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V"},{"text":"<","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"languages":["swift"]}],"kind":"declarations"},{"kind":"content","content":[{"text":"Discussion","level":2,"type":"heading","anchor":"discussion"},{"code":["container.parameterService.register { n in"," ParameterService(value: n)","}"],"syntax":"swift","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"}]}],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/register(factory:)"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"text":"Registers a new factory capable of taking parameters at runtime.","type":"text"}],"sections":[],"metadata":{"modules":[{"name":"Factory"}],"externalID":"s:7Factory09ParameterA0V8register7factoryACyxq_Gq_xYbc_tF","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"register","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V","text":"ParameterFactory"},{"text":"<","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"role":"symbol","title":"register(factory:)","roleHeading":"Instance Method","symbolKind":"method"},"schemaVersion":{"major":0,"patch":0,"minor":3},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/register(factory:)":{"abstract":[{"type":"text","text":"Registers a new factory capable of taking parameters at runtime."}],"kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"register","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"ParameterFactory","kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"title":"register(factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(factory:)","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/register(factory:)"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"kind":"symbol","metadata":{"symbolKind":"method","title":"register(factory:)","roleHeading":"Instance Method","modules":[{"name":"Factory"}],"externalID":"s:7Factory09ParameterA0V8register7factoryACyxq_Gq_xYbc_tF","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"register","kind":"identifier"},{"text":"(","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7Factory09ParameterA0V","kind":"typeIdentifier","text":"ParameterFactory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}]},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(factory:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Registers a new factory capable of taking parameters at runtime."}],"schemaVersion":{"major":0,"patch":0,"minor":3},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"register"},{"kind":"text","text":"("},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"text":" (","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory09ParameterA0V","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","text":"ParameterFactory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"},{"kind":"content","content":[{"text":"Discussion","type":"heading","anchor":"discussion","level":2},{"code":["container.parameterService.register { n in"," ParameterService(value: n)","}"],"syntax":"swift","type":"codeListing"},{"type":"unorderedList","items":[{"content":[{"inlineContent":[{"type":"text","text":"factory: A new factory closure that produces an object of the desired type when needed."}],"type":"paragraph"}]}]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/register(factory:)"]}],"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory/ParameterFactory/register(factory:)":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/register(factory:)","type":"topic","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"register","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": (","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"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"},{"kind":"text","text":">"}],"url":"\/documentation\/factory\/parameterfactory\/register(factory:)","abstract":[{"type":"text","text":"Registers a new factory capable of taking parameters at runtime."}],"title":"register(factory:)"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"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 e42ad5a2..560c928c 100644 --- a/docs/data/documentation/factory/parameterfactory/registration.json +++ b/docs/data/documentation/factory/parameterfactory/registration.json @@ -1 +1 @@ -{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/registration"]}],"schemaVersion":{"major":0,"patch":0,"minor":3},"sections":[],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"abstract":[{"text":"Required registration","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"text":"FactoryRegistration","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"platforms":["macOS"],"languages":["swift"]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/registration","interfaceLanguage":"swift"},"metadata":{"roleHeading":"Instance Property","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"registration","kind":"identifier"},{"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"}],"symbolKind":"property","title":"registration","externalID":"s:7Factory09ParameterA0V12registrationAA0A12RegistrationVyxq_Gvp","modules":[{"name":"Factory"}],"role":"symbol"},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryRegistration":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"FactoryRegistration","kind":"identifier"}],"title":"FactoryRegistration","abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"url":"\/documentation\/factory\/factoryregistration","kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/registration":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/registration","type":"topic","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":", "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"abstract":[{"type":"text","text":"Required registration"}],"title":"registration","kind":"symbol","url":"\/documentation\/factory\/parameterfactory\/registration","role":"symbol"}}} \ No newline at end of file +{"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/registration"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"registration","kind":"identifier"},{"text":": ","kind":"text"},{"text":"FactoryRegistration","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12RegistrationV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"text":", ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"title":"registration","roleHeading":"Instance Property","modules":[{"name":"Factory"}],"externalID":"s:7Factory09ParameterA0V12registrationAA0A12RegistrationVyxq_Gvp","symbolKind":"property"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"registration","kind":"identifier"},{"kind":"text","text":": "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration","preciseIdentifier":"s:7Factory0A12RegistrationV","text":"FactoryRegistration","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/registration","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Required registration"}],"sections":[],"kind":"symbol","schemaVersion":{"minor":3,"major":0,"patch":0},"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory/ParameterFactory/registration":{"role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"registration"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A12RegistrationV","kind":"typeIdentifier","text":"FactoryRegistration"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":", "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"title":"registration","abstract":[{"type":"text","text":"Required registration"}],"url":"\/documentation\/factory\/parameterfactory\/registration","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/registration","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/FactoryRegistration":{"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryRegistration"}],"abstract":[{"type":"text","text":"Shared registration type for Factory and ParameterFactory. Used internally to manage the registration and resolution process."}],"kind":"symbol","type":"topic","url":"\/documentation\/factory\/factoryregistration","role":"symbol","title":"FactoryRegistration","navigatorTitle":[{"kind":"identifier","text":"FactoryRegistration"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryRegistration"}}} \ 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 343d2816..4278b584 100644 --- a/docs/data/documentation/factory/parameterfactory/reset(_:).json +++ b/docs/data/documentation/factory/parameterfactory/reset(_:).json @@ -1 +1 @@ -{"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":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/reset(_:)","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/reset(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"reset","kind":"identifier"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"options","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions"},{"kind":"text","text":" = .all) -> "},{"text":"Self","kind":"typeIdentifier"}]}]},{"kind":"parameters","parameters":[{"name":"options","content":[{"inlineContent":[{"type":"text","text":"options description"}],"type":"paragraph"}]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"schemaVersion":{"patch":0,"minor":3,"major":0},"metadata":{"roleHeading":"Instance Method","title":"reset(_:)","role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE5resetyxAA0A12ResetOptionsOF::SYNTHESIZED::s:7Factory09ParameterA0V","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"reset","kind":"identifier"},{"kind":"text","text":"("},{"text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"extendedModule":"Factory","modules":[{"name":"Factory"}],"symbolKind":"method"},"sections":[],"references":{"doc://Factory/documentation/Factory/ParameterFactory/reset(_:)":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/reset(_:)","url":"\/documentation\/factory\/parameterfactory\/reset(_:)","title":"reset(_:)","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"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"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/FactoryResetOptions":{"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"title":"FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"kind":"article","abstract":[],"title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"}}} \ No newline at end of file +{"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/reset(_:)","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/reset(_:)"]}],"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"metadata":{"role":"symbol","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"text":"(","kind":"text"},{"text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"externalID":"s:7Factory0A9ModifyingPAAE5resetyxAA0A12ResetOptionsOF::SYNTHESIZED::s:7Factory09ParameterA0V","roleHeading":"Instance Method","extendedModule":"Factory","symbolKind":"method","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"}],"primaryContentSections":[{"kind":"declarations","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":"("},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"options","kind":"internalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","kind":"typeIdentifier"},{"text":" = .all) -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]}]},{"parameters":[{"name":"options","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"options description"}]}]}],"kind":"parameters"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","type":"topic","abstract":[],"title":"FactoryModifying Implementations","kind":"article","role":"collectionGroup","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory/FactoryResetOptions":{"title":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","type":"topic","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/reset(_:)":{"url":"\/documentation\/factory\/parameterfactory\/reset(_:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"reset"},{"kind":"text","text":"("},{"text":"FactoryResetOptions","preciseIdentifier":"s:7Factory0A12ResetOptionsO","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/reset(_:)","kind":"symbol","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."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"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 0c32cfe7..aaddfff4 100644 --- a/docs/data/documentation/factory/parameterfactory/resolve(_:).json +++ b/docs/data/documentation/factory/parameterfactory/resolve(_:).json @@ -1 +1 @@ -{"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/resolve(_:)"},"sections":[],"metadata":{"role":"symbol","modules":[{"name":"Factory"}],"externalID":"s:7Factory09ParameterA0V7resolveyq_xF","title":"resolve(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"roleHeading":"Instance Method","symbolKind":"method"},"abstract":[{"text":"Unsugared resolution function.","type":"text"}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"parameters","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"P"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"}],"languages":["swift"]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/resolve(_:)"]}],"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory/resolve(_:)":{"role":"symbol","abstract":[{"type":"text","text":"Unsugared resolution function."}],"url":"\/documentation\/factory\/parameterfactory\/resolve(_:)","type":"topic","title":"resolve(_:)","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/resolve(_:)"}}} \ No newline at end of file +{"metadata":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"P"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"}],"externalID":"s:7Factory09ParameterA0V7resolveyq_xF","roleHeading":"Instance Method","title":"resolve(_:)","symbolKind":"method","role":"symbol","modules":[{"name":"Factory"}]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/resolve(_:)"},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory"]]},"abstract":[{"text":"Unsugared resolution function.","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"parameters"},{"text":": ","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"}],"languages":["swift"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/resolve(_:)"]}],"sections":[],"references":{"doc://Factory/documentation/Factory/ParameterFactory/resolve(_:)":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/resolve(_:)","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"text":"(","kind":"text"},{"text":"P","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"T","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/parameterfactory\/resolve(_:)","abstract":[{"type":"text","text":"Unsugared resolution function."}],"title":"resolve(_:)"},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 5d2360c6..98371486 100644 --- a/docs/data/documentation/factory/parameterfactory/scope(_:).json +++ b/docs/data/documentation/factory/parameterfactory/scope(_:).json @@ -1 +1 @@ -{"sections":[],"schemaVersion":{"patch":0,"minor":3,"major":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/scope(_:)","interfaceLanguage":"swift"},"metadata":{"modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE5scopeyxAA5ScopeCF::SYNTHESIZED::s:7Factory09ParameterA0V","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"scope","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","title":"scope(_:)","extendedModule":"Factory","roleHeading":"Instance Method","symbolKind":"method"},"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":"."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"scope","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"scope","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"]}]},{"kind":"content","content":[{"text":"Discussion","level":2,"type":"heading","anchor":"discussion"},{"type":"codeListing","code":["var service: Factory {"," self { MyService() }"," .scope(.session)","}"],"syntax":"swift"}]}],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/scope(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"kind":"symbol","references":{"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"kind":"article","abstract":[],"title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/ParameterFactory/scope(_:)":{"kind":"symbol","abstract":[{"text":"Defines a dependency scope for this Factory. See ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"type":"text","text":"."}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"scope","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"title":"scope(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/scope(_:)","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/scope(_:)"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"metadata":{"role":"symbol","roleHeading":"Instance Method","extendedModule":"Factory","externalID":"s:7Factory0A9ModifyingPAAE5scopeyxAA5ScopeCF::SYNTHESIZED::s:7Factory09ParameterA0V","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"scope","kind":"identifier"},{"kind":"text","text":"("},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"modules":[{"name":"Factory"}],"title":"scope(_:)","symbolKind":"method"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/scope(_:)","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/scope(_:)"]}],"kind":"symbol","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":"."}],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"scope","kind":"identifier"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"scope","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Self"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"},{"content":[{"type":"heading","text":"Discussion","level":2,"anchor":"discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .scope(.session)","}"]}],"kind":"content"}],"references":{"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","type":"topic","abstract":[],"title":"FactoryModifying Implementations","kind":"article","role":"collectionGroup","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"},"doc://Factory/documentation/Factory/ParameterFactory/scope(_:)":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/scope(_:)","kind":"symbol","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":"."}],"url":"\/documentation\/factory\/parameterfactory\/scope(_:)","title":"scope(_:)","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"scope","kind":"identifier"},{"kind":"text","text":"("},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 7cffc465..5f923665 100644 --- a/docs/data/documentation/factory/parameterfactory/shared.json +++ b/docs/data/documentation/factory/parameterfactory/shared.json @@ -1 +1 @@ -{"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":"."}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}]}]},{"kind":"content","content":[{"type":"heading","anchor":"discussion","level":2,"text":"Discussion"},{"type":"codeListing","syntax":"swift","code":["var service: Factory {"," self { MyService() }"," .shared","}"]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"metadata":{"roleHeading":"Instance Property","externalID":"s:7Factory0A9ModifyingPAAE6sharedxvp::SYNTHESIZED::s:7Factory09ParameterA0V","role":"symbol","extendedModule":"Factory","title":"shared","symbolKind":"property","modules":[{"name":"Factory"}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}]},"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/shared"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/shared"]}],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/shared":{"url":"\/documentation\/factory\/parameterfactory\/shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/shared","kind":"symbol","type":"topic","title":"shared","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol","abstract":[{"type":"text","text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","isActive":true},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"title":"Scope.Shared","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/scope\/shared-swift.class","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","navigatorTitle":[{"kind":"identifier","text":"Shared"}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"kind":"article","abstract":[],"title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/shared"]}],"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/shared"},"abstract":[{"text":"Syntactic sugar defines this Factory’s dependency scope to be shared. See ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class"},{"text":".","type":"text"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"sections":[],"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"text":"get","kind":"keyword"},{"kind":"text","text":" }"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"},{"kind":"content","content":[{"level":2,"anchor":"discussion","text":"Discussion","type":"heading"},{"type":"codeListing","code":["var service: Factory {"," self { MyService() }"," .shared","}"],"syntax":"swift"}]}],"metadata":{"role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","title":"shared","roleHeading":"Instance Property","modules":[{"name":"Factory"}],"externalID":"s:7Factory0A9ModifyingPAAE6sharedxvp::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory"},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory/ParameterFactory/shared":{"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"}],"role":"symbol","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"shared"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/shared","title":"shared","url":"\/documentation\/factory\/parameterfactory\/shared","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","type":"topic","abstract":[],"title":"FactoryModifying Implementations","kind":"article","role":"collectionGroup","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"}}} \ 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 4d9aa479..c8631d76 100644 --- a/docs/data/documentation/factory/parameterfactory/singleton.json +++ b/docs/data/documentation/factory/parameterfactory/singleton.json @@ -1 +1 @@ -{"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/singleton","interfaceLanguage":"swift"},"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":"."}],"schemaVersion":{"minor":3,"major":0,"patch":0},"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/singleton"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"singleton"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":" { "},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}]}]},{"kind":"content","content":[{"anchor":"discussion","text":"Discussion","level":2,"type":"heading"},{"syntax":"swift","type":"codeListing","code":["var service: Factory {"," self { MyService() }"," .singleton","}"]}]}],"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Instance Property","extendedModule":"Factory","title":"singleton","symbolKind":"property","fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"singleton"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE9singletonxvp::SYNTHESIZED::s:7Factory09ParameterA0V"},"references":{"doc://Factory/documentation/Factory/ParameterFactory/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"},{"text":".","type":"text"}],"kind":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"title":"singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/singleton","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory\/singleton"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"kind":"article","abstract":[],"title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Singleton"}],"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"singleton"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"kind":"text","text":" }"}],"languages":["swift"]}]},{"kind":"content","content":[{"text":"Discussion","level":2,"type":"heading","anchor":"discussion"},{"code":["var service: Factory {"," self { MyService() }"," .singleton","}"],"type":"codeListing","syntax":"swift"}]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"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"}],"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/singleton"},"metadata":{"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"externalID":"s:7Factory0A9ModifyingPAAE9singletonxvp::SYNTHESIZED::s:7Factory09ParameterA0V","roleHeading":"Instance Property","title":"singleton","symbolKind":"property","role":"symbol","extendedModule":"Factory","modules":[{"name":"Factory"}]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/singleton"]}],"references":{"doc://Factory/documentation/Factory/ParameterFactory/singleton":{"fragments":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"text":"singleton","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"kind":"symbol","type":"topic","title":"singleton","url":"\/documentation\/factory\/parameterfactory\/singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/singleton","role":"symbol","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"}]},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","type":"topic","abstract":[],"title":"FactoryModifying Implementations","kind":"article","role":"collectionGroup","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"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 6fb30c17..4bc297d4 100644 --- a/docs/data/documentation/factory/parameterfactory/timetolive(_:).json +++ b/docs/data/documentation/factory/parameterfactory/timetolive(_:).json @@ -1 +1 @@ -{"metadata":{"externalID":"s:7Factory0A9ModifyingPAAE10timeToLiveyxSdF::SYNTHESIZED::s:7Factory09ParameterA0V","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":") -> "},{"text":"Self","kind":"typeIdentifier"}],"extendedModule":"Factory","symbolKind":"method","title":"timeToLive(_:)","roleHeading":"Instance Method","modules":[{"name":"Factory"}],"role":"symbol"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/timeToLive(_:)","interfaceLanguage":"swift"},"kind":"symbol","schemaVersion":{"minor":3,"patch":0,"major":0},"sections":[],"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."}],"variants":[{"paths":["\/documentation\/factory\/parameterfactory\/timetolive(_:)"],"traits":[{"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":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"timeToLive","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"seconds"},{"kind":"text","text":": "},{"text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"languages":["swift"]}]}],"references":{"doc://Factory/documentation/Factory/ParameterFactory/timeToLive(_:)":{"kind":"symbol","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/timeToLive(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"timeToLive"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"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."}],"url":"\/documentation\/factory\/parameterfactory\/timetolive(_:)","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"kind":"article","abstract":[],"title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Instance Method","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"timeToLive","kind":"identifier"},{"text":"(","kind":"text"},{"text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Self","kind":"typeIdentifier"}],"title":"timeToLive(_:)","externalID":"s:7Factory0A9ModifyingPAAE10timeToLiveyxSdF::SYNTHESIZED::s:7Factory09ParameterA0V","extendedModule":"Factory","role":"symbol"},"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":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"timeToLive"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"seconds"},{"kind":"text","text":": "},{"preciseIdentifier":"c:@T@NSTimeInterval","text":"TimeInterval","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"languages":["swift"]}]}],"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/timetolive(_:)"]}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/timeToLive(_:)","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/timeToLive(_:)":{"url":"\/documentation\/factory\/parameterfactory\/timetolive(_:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"timeToLive","kind":"identifier"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"TimeInterval","preciseIdentifier":"c:@T@NSTimeInterval"},{"text":") -> ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/timeToLive(_:)","kind":"symbol","title":"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"}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","type":"topic","abstract":[],"title":"FactoryModifying Implementations","kind":"article","role":"collectionGroup","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"}}} \ 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 449c0b48..8fa270e7 100644 --- a/docs/data/documentation/factory/parameterfactory/unique.json +++ b/docs/data/documentation/factory/parameterfactory/unique.json @@ -1 +1 @@ -{"abstract":[{"text":"Syntactic sugar defines defines unique scope. See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true},{"text":".","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}]}]},{"kind":"content","content":[{"level":2,"anchor":"discussion","type":"heading","text":"Discussion"},{"type":"codeListing","code":["var service: Factory {"," self { MyService() }"," .unique","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"While you can add the modifier, Factory’s are unique by default."}]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/unique"},"schemaVersion":{"minor":3,"patch":0,"major":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"]]},"metadata":{"title":"unique","externalID":"s:7Factory0A9ModifyingPAAE6uniquexvp::SYNTHESIZED::s:7Factory09ParameterA0V","roleHeading":"Instance Property","symbolKind":"property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"unique","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"}],"role":"symbol","extendedModule":"Factory","modules":[{"name":"Factory"}]},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/unique"]}],"sections":[],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory/unique":{"title":"unique","abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true,"type":"reference"},{"type":"text","text":"."}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"kind":"symbol","url":"\/documentation\/factory\/parameterfactory\/unique","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/unique","type":"topic"},"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"kind":"article","abstract":[],"title":"FactoryModifying Implementations","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations","role":"collectionGroup","type":"topic","url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations"}}} \ No newline at end of file +{"abstract":[{"type":"text","text":"Syntactic sugar defines defines unique scope. See "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","isActive":true},{"text":".","type":"text"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"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":"unique","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":" { "},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}],"languages":["swift"]}]},{"content":[{"text":"Discussion","type":"heading","level":2,"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."}]}],"kind":"content"}],"kind":"symbol","metadata":{"extendedModule":"Factory","title":"unique","modules":[{"name":"Factory"}],"role":"symbol","externalID":"s:7Factory0A9ModifyingPAAE6uniquexvp::SYNTHESIZED::s:7Factory09ParameterA0V","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"unique"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"roleHeading":"Instance Property","symbolKind":"property"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/parameterfactory\/unique"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/unique","interfaceLanguage":"swift"},"sections":[],"references":{"doc://Factory/documentation/Factory/ParameterFactory/unique":{"url":"\/documentation\/factory\/parameterfactory\/unique","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"unique","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/unique","kind":"symbol","title":"unique","abstract":[{"text":"Syntactic sugar defines defines unique scope. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"reference","isActive":true},{"type":"text","text":"."}],"type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory/ParameterFactory/FactoryModifying-Implementations":{"url":"\/documentation\/factory\/parameterfactory\/factorymodifying-implementations","type":"topic","abstract":[],"title":"FactoryModifying Implementations","kind":"article","role":"collectionGroup","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory\/FactoryModifying-Implementations"},"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/previews.json b/docs/data/documentation/factory/previews.json index 48c34849..c1392e21 100644 --- a/docs/data/documentation/factory/previews.json +++ b/docs/data/documentation/factory/previews.json @@ -1 +1 @@ -{"kind":"article","schemaVersion":{"patch":0,"minor":3,"major":0},"metadata":{"title":"SwiftUI Previews","modules":[{"name":"Factory"}],"roleHeading":"Article","role":"article"},"abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/previews"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Previews"},"sections":[],"primaryContentSections":[{"content":[{"level":2,"type":"heading","anchor":"Overview","text":"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"}]},{"level":2,"type":"heading","text":"SwiftUI Integrations","anchor":"SwiftUI-Integrations"},{"inlineContent":[{"type":"text","text":"Factory can be used in SwiftUI to assign a dependency to a "},{"type":"codeVoice","code":"StateObject"},{"text":" or ","type":"text"},{"type":"codeVoice","code":"ObservedObject"},{"text":".","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["struct ContentView: View {"," @StateObject private var viewModel = Container.shared.contentViewModel()"," var body: some View {"," ..."," }","}"]},{"type":"paragraph","inlineContent":[{"text":"Keep in mind that if you assign to an ","type":"text"},{"type":"codeVoice","code":"ObservedObject"},{"text":" your Factory is responsible for managing the object’s lifecycle (see the section on Scopes).","type":"text"}]},{"type":"heading","anchor":"SwiftUI-Previews","level":2,"text":"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"}]},{"syntax":"swift","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"},{"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."}]},{"level":2,"anchor":"SwiftUI-Previews","type":"heading","text":"SwiftUI #Previews"},{"inlineContent":[{"type":"text","text":"The same can be done using the new macro-based #Preview option added to Xcode 15 and iOS 17… but there’s a problem. Attempting to do the above gives us an error."}],"type":"paragraph"},{"code":["#Preview {"," let _ = Container.myService.register { MockServiceN(4) }"," ContentView() \/\/ error: Result of 'ContentView' initializer is unused","}"],"syntax":"swift","type":"codeListing"},{"inlineContent":[{"type":"text","text":"The solution lies in recognizing the fact that the #Preview closure is not a ViewBuilder. To fix it we just need to explicitly return our view."}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["#Preview {"," let _ = Container.myService.register { MockServiceN(4) }"," return ContentView()","}"]},{"inlineContent":[{"type":"text","text":"Or we could simply turn the expression into a ViewBuilder using our old friend, Group."}],"type":"paragraph"},{"type":"codeListing","code":["#Preview {"," Group {"," let _ = Container.myService.register { MockServiceN(4) }"," ContentView()"," }","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Group actually has a few additional uses…"}]},{"anchor":"Multiple-Previews","level":2,"type":"heading","text":"Multiple Previews"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If we want to do multiple previews at once, each with different data, we simply need to instantiate our view models and pass them into the view as parameters."}]},{"inlineContent":[{"type":"text","text":"Given the ContentView we used above…"}],"type":"paragraph"},{"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)"," }"," }","}"],"syntax":"swift"},{"inlineContent":[{"type":"text","text":"Of course, it’s even easier with #Preview."}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["#Preview {"," Group {"," let _ = Container.shared.myService.register { MockServiceN(4) }"," ContentView()"," }","}","#Preview {"," Group {"," let _ = Container.shared.myService.register { MockServiceN(8) }"," ContentView()"," }","}"]},{"inlineContent":[{"type":"text","text":"Since #Preview has been back-ported to iOS 13, I’d use it from now on. (Assuming of course that you can migrate your project to Xcode 15.)"}],"type":"paragraph"},{"text":"InjectedObject","type":"heading","level":2,"anchor":"InjectedObject"},{"inlineContent":[{"type":"text","text":"Should you prefer, you can also use "},{"code":"InjectedObject","type":"codeVoice"},{"text":", an immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"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."}]},{"inlineContent":[{"type":"text","text":"Like the other Injected property wrappers, InjectedObject wraps obtains the dependency from the Factory keypath"},{"type":"text","text":" "},{"type":"text","text":"and provides it to a wrapped instance of StateObject."}],"type":"paragraph"},{"type":"codeListing","code":["struct ContentView: View {"," @InjectedObject(\\.contentViewModel) var model"," var body: some View {"," ..."," }","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"ContentViewModel must, of course, be of type ObservableObject and is registered like any other service"},{"text":" ","type":"text"},{"type":"text","text":"or dependency."}]},{"code":["extension Container {"," var contentViewModel: Factory {"," self { ContentViewModel() }"," }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As with StateObject and ObservedObject, updating the object’s state will trigger a view update."}]},{"inlineContent":[{"type":"text","text":"InjectedObject is also handy when…"}],"type":"paragraph"},{"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":[{"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 "},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"reference"},{"type":"text","text":" for more details on graph."}],"type":"paragraph"}]}],"type":"orderedList"},{"anchor":"InjectedObject-Previews","level":2,"type":"heading","text":"InjectedObject Previews"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Single previews work exactly the same."}]},{"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":[{"type":"text","text":"But due a bug in how Swift manages property wrappers with built in initializers, doing multiple previews is just a little different than shown earlier."}]},{"type":"codeListing","syntax":"swift","code":["struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," Group {"," let _ = Container.shared.myServiceType.register { MockServiceN(44) }"," let model1 = ContentViewModel()"," ContentView(model: InjectedObject(model1))"," "," let _ = Container.shared.myServiceType.register { MockServiceN(88) }"," let model2 = ContentViewModel()"," ContentView(model: InjectedObject(model2))"," }"," }","}"]},{"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."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"That said, and as we’ve shown before, it’s even easier with #Preview."}]},{"syntax":"swift","code":["#Preview {"," Group {"," let _ = Container.shared.myService.register { MockServiceN(4) }"," ContentView()"," }","}","#Preview {"," Group {"," let _ = Container.shared.myService.register { MockServiceN(8) }"," ContentView()"," }","}"],"type":"codeListing"},{"text":"Common Setup","type":"heading","level":2,"anchor":"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"},{"syntax":"swift","type":"codeListing","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"}],"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"]}],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Scopes":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","title":"Scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"url":"\/documentation\/factory\/scopes","kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/Testing":{"type":"topic","kind":"article","role":"article","url":"\/documentation\/factory\/testing","title":"Testing","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}]},"doc://Factory/documentation/Factory/Chains":{"title":"Circular Dependency Chains","kind":"article","url":"\/documentation\/factory\/chains","type":"topic","role":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","abstract":[{"text":"Detecting and solving Circular Dependency Chains.","type":"text"}]},"doc://Factory/documentation/Factory/Contexts":{"type":"topic","kind":"article","role":"article","url":"\/documentation\/factory\/contexts","title":"Contexts","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}]},"doc://Factory/documentation/Factory/Debugging":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","url":"\/documentation\/factory\/debugging","title":"Debugging","role":"article","kind":"article","abstract":[{"text":"Additional support for debugging resolution cycles, dependency chains and other issue.","type":"text"}],"type":"topic"}}} \ No newline at end of file +{"kind":"article","abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"metadata":{"title":"SwiftUI Previews","role":"article","modules":[{"name":"Factory"}],"roleHeading":"Article"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Previews","interfaceLanguage":"swift"},"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"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}],"primaryContentSections":[{"kind":"content","content":[{"level":2,"type":"heading","text":"Overview","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"},{"type":"heading","anchor":"SwiftUI-Integrations","level":2,"text":"SwiftUI Integrations"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory can be used in SwiftUI to assign a dependency to a "},{"code":"StateObject","type":"codeVoice"},{"type":"text","text":" or "},{"type":"codeVoice","code":"ObservedObject"},{"text":".","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["struct ContentView: View {"," @StateObject private var viewModel = Container.shared.contentViewModel()"," var body: some View {"," ..."," }","}"]},{"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"}],"type":"paragraph"},{"type":"heading","anchor":"SwiftUI-Previews","text":"SwiftUI Previews","level":2},{"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"}]},{"type":"codeListing","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()"," }","}"],"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."}]},{"level":2,"type":"heading","text":"SwiftUI #Previews","anchor":"SwiftUI-Previews"},{"inlineContent":[{"type":"text","text":"The same can be done using the new macro-based #Preview option added to Xcode 15 and iOS 17… but there’s a problem. Attempting to do the above gives us an error."}],"type":"paragraph"},{"syntax":"swift","code":["#Preview {"," let _ = Container.myService.register { MockServiceN(4) }"," ContentView() \/\/ error: Result of 'ContentView' initializer is unused","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"The solution lies in recognizing the fact that the #Preview closure is not a ViewBuilder. To fix it we just need to explicitly return our view.","type":"text"}]},{"code":["#Preview {"," let _ = Container.myService.register { MockServiceN(4) }"," return ContentView()","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"Or we could simply turn the expression into a ViewBuilder using our old friend, Group.","type":"text"}]},{"syntax":"swift","type":"codeListing","code":["#Preview {"," Group {"," let _ = Container.myService.register { MockServiceN(4) }"," ContentView()"," }","}"]},{"inlineContent":[{"text":"Group actually has a few additional uses…","type":"text"}],"type":"paragraph"},{"type":"heading","level":2,"anchor":"Multiple-Previews","text":"Multiple Previews"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"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"},{"inlineContent":[{"text":"Of course, it’s even easier with #Preview.","type":"text"}],"type":"paragraph"},{"code":["#Preview {"," Group {"," let _ = Container.shared.myService.register { MockServiceN(4) }"," ContentView()"," }","}","#Preview {"," Group {"," let _ = Container.shared.myService.register { MockServiceN(8) }"," ContentView()"," }","}"],"syntax":"swift","type":"codeListing"},{"inlineContent":[{"text":"Since #Preview has been back-ported to iOS 13, I’d use it from now on. (Assuming of course that you can migrate your project to Xcode 15.)","type":"text"}],"type":"paragraph"},{"type":"heading","level":2,"anchor":"InjectedObject","text":"InjectedObject"},{"type":"paragraph","inlineContent":[{"text":"Should you prefer, you can also use ","type":"text"},{"type":"codeVoice","code":"InjectedObject"},{"text":", an immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}]},{"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"},{"text":"and @EnvironmentObject.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"Like the other Injected property wrappers, InjectedObject wraps obtains the dependency from the Factory keypath","type":"text"},{"type":"text","text":" "},{"text":"and provides it to a wrapped instance of StateObject.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["struct ContentView: View {"," @InjectedObject(\\.contentViewModel) var model"," var body: some View {"," ..."," }","}"]},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"code":["extension Container {"," var contentViewModel: Factory {"," self { ContentViewModel() }"," }","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"As with StateObject and ObservedObject, updating the object’s state will trigger a view update.","type":"text"}]},{"inlineContent":[{"type":"text","text":"InjectedObject is also handy when…"}],"type":"paragraph"},{"type":"orderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"You have a service that could be consumed from a view or a view model."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"You have view model dependencies that depend on the Graph scope and you need the view model to be the graph’s root. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","isActive":true,"type":"reference"},{"type":"text","text":" for more details on graph."}]}]}]},{"text":"InjectedObject Previews","level":2,"anchor":"InjectedObject-Previews","type":"heading"},{"type":"paragraph","inlineContent":[{"text":"Single previews work exactly the same.","type":"text"}]},{"type":"codeListing","code":["struct ContentView_Previews: PreviewProvider {"," static var previews: some View {"," let _ = Container.shared.myService.register { MockServiceN(4) }"," ContentView()"," }","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"But due a bug in how Swift manages property wrappers with built in initializers, doing multiple previews is just a little different than shown earlier."}]},{"type":"codeListing","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))"," }"," }","}"],"syntax":"swift"},{"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."}]},{"type":"paragraph","inlineContent":[{"text":"That said, and as we’ve shown before, it’s even easier with #Preview.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["#Preview {"," Group {"," let _ = Container.shared.myService.register { MockServiceN(4) }"," ContentView()"," }","}","#Preview {"," Group {"," let _ = Container.shared.myService.register { MockServiceN(8) }"," ContentView()"," }","}"]},{"text":"Common Setup","type":"heading","anchor":"Common-Setup","level":2},{"inlineContent":[{"type":"text","text":"If we have several mocks that we use all of the time in our previews or unit tests, we can also add a setup function to a given container to make this easier."}],"type":"paragraph"},{"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","syntax":"swift"}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/previews"]}],"references":{"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}]},"doc://Factory/documentation/Factory/Chains":{"kind":"article","title":"Circular Dependency Chains","url":"\/documentation\/factory\/chains","identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","role":"article","type":"topic","abstract":[{"type":"text","text":"Detecting and solving Circular Dependency Chains."}]},"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","url":"\/documentation\/factory\/debugging","role":"article","type":"topic","title":"Debugging"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Testing":{"abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"kind":"article","url":"\/documentation\/factory\/testing","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","role":"article","type":"topic","title":"Testing"},"doc://Factory/documentation/Factory/Contexts":{"url":"\/documentation\/factory\/contexts","kind":"article","role":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","title":"Contexts","abstract":[{"text":"Changing injection results under special circumstances.","type":"text"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/registrations.json b/docs/data/documentation/factory/registrations.json index 3645e6b4..5584603c 100644 --- a/docs/data/documentation/factory/registrations.json +++ b/docs/data/documentation/factory/registrations.json @@ -1 +1 @@ -{"seeAlsoSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolutions"],"title":"Examples","generated":true}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Registrations","interfaceLanguage":"swift"},"sections":[],"variants":[{"paths":["\/documentation\/factory\/registrations"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/GettingStarted"]]},"primaryContentSections":[{"kind":"content","content":[{"text":"Basic","level":3,"anchor":"Basic","type":"heading"},{"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":[{"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":[{"type":"text","text":"You can also go ahead and use the full, formal definition, constructing the Factory yourself and passing it a reference to its enclosing container."}]},{"code":["extension Container {"," var service: Factory {"," Factory(self) { MyService() }"," }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"We prefer the more concise version, and that’s what we’ll use going forward."}]},{"style":"note","name":"Note","type":"aside","content":[{"inlineContent":[{"type":"text","text":"The container helper functions are "},{"type":"codeVoice","code":"@inlinable"},{"type":"text","text":" and as such there’s no performance penalty incurred when calling them."}],"type":"paragraph"}]},{"type":"heading","anchor":"Scopes","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","level":3,"text":"Constructor Injection","anchor":"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","syntax":"swift","code":["extension Container {"," var constructedService: Factory {"," self { MyConstructedService(service: self.cachedService()) }"," }"," var cachedService: Factory {"," self { MyService() }.cached"," }","}"]},{"type":"heading","level":3,"anchor":"Parameters","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},{"text":".","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var parameterService: ParameterFactory {"," self { ParameterService(value: $0) }"," }","}"]},{"inlineContent":[{"text":"Note that we also needed to specify the type of our parameter.","type":"text"}],"type":"paragraph"},{"level":3,"type":"heading","anchor":"Same-Types","text":"Same Types"},{"type":"paragraph","inlineContent":[{"text":"Example of correctly handling multiple instances of the same type.","type":"text"}]},{"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"},{"level":3,"anchor":"Inside-Custom-Containers","type":"heading","text":"Inside Custom Containers"},{"type":"paragraph","inlineContent":[{"text":"You’ve seen factory registrations done within container ","type":"text"},{"type":"emphasis","inlineContent":[{"text":"extensions","type":"text"}]},{"type":"text","text":", but it should also be noted that we can also create them within our own custom containers."}]},{"syntax":"swift","code":["final class ServiceContainer: SharedContainer {"," \/\/ CONFORMANCE"," static var shared = ServiceContainer()"," var manager = ContainerManager()"," "," \/\/ DEFINE FACTORY"," var service1: Factory {"," self { MyService() }"," }",""," \/\/ DON'T DO THIS"," lazy var service2: Factory = self {"," MyService()"," }","}"],"type":"codeListing"},{"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":[{"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"},{"style":"warning","content":[{"type":"paragraph","inlineContent":[{"text":"Creating a “lazy” Factory and assigning it to it’s enclosing class will create a reference cycle.","type":"text"}]}],"name":"Warning","type":"aside"},{"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."}]},{"type":"heading","level":3,"text":"Static Factory’s","anchor":"Static-Factorys"},{"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"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that we referenced the class “shared” container. That container will manage the registrations and scopes for our Factory."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"While you "},{"inlineContent":[{"text":"can","type":"text"}],"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 "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","type":"reference","isActive":true},{"type":"text","text":" property wrappers due to the lack of keyPaths."}]},{"inlineContent":[{"text":"Better to simply define the Factory as a standard computed variable within a Container, and then access the “shared” version.","type":"text"}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["extension Container {"," var newSchool: Factory {"," self { School() }"," }","}","","let school = Container.shared.newSchool"]}]}],"kind":"article","metadata":{"roleHeading":"Article","modules":[{"name":"Factory"}],"role":"article","title":"Sample Registrations"},"schemaVersion":{"minor":3,"patch":0,"major":0},"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","kind":"article","role":"article","url":"\/documentation\/factory\/resolutions","title":"Sample Resolutions","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","abstract":[{"type":"text","text":"There are many ways to use Factory to resolve dependencies. Here are a few examples."}]},"doc://Factory/documentation/Factory/Injected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"title":"Injected","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/GettingStarted":{"type":"topic","title":"Getting Started","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","url":"\/documentation\/factory\/gettingstarted","role":"collectionGroup"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/GettingStarted"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/registrations"]}],"seeAlsoSections":[{"title":"Examples","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolutions"],"generated":true}],"schemaVersion":{"minor":3,"patch":0,"major":0},"kind":"article","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Registrations"},"sections":[],"metadata":{"modules":[{"name":"Factory"}],"role":"article","roleHeading":"Article","title":"Sample Registrations"},"abstract":[{"text":"There are many ways to register dependencies with Factory. Here are a few examples.","type":"text"}],"primaryContentSections":[{"kind":"content","content":[{"text":"Basic","type":"heading","anchor":"Basic","level":3},{"type":"paragraph","inlineContent":[{"text":"Example of a basic dependency registration in a Factory 2.0 container.","type":"text"}]},{"type":"codeListing","code":["extension Container {"," var service: Factory {"," self { MyService() }"," }","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This registered dependency returns a new, unique version of "},{"type":"codeVoice","code":"MyServiceType"},{"type":"text","text":" whenever it’s asked to do so."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can also go ahead and use the full, formal definition, constructing the Factory yourself and passing it a reference to its enclosing container."}]},{"code":["extension Container {"," var service: Factory {"," Factory(self) { MyService() }"," }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"We prefer the more concise version, and that’s what we’ll use going forward."}]},{"style":"note","name":"Note","type":"aside","content":[{"inlineContent":[{"type":"text","text":"The container helper functions are "},{"type":"codeVoice","code":"@inlinable"},{"text":" and as such there’s no performance penalty incurred when calling them.","type":"text"}],"type":"paragraph"}]},{"text":"Scopes","type":"heading","level":3,"anchor":"Scopes"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Examples of defining scoped services in a Factory 2.0 container."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var standardService: Factory {"," self { MyService() }"," }"," var cachedService: Factory {"," self { MyService() }"," .cached"," }"," var singletonService: Factory {"," self { SimpleService() }"," .singleton"," }"," var sharedService: Factory {"," self { MyService() }"," .shared"," .decorator { print(\"DECORATING \\($0.id)\") }"," }"," var customScopedService: Factory {"," self { SimpleService() }"," .scope(.session)"," }","}"]},{"text":"Constructor Injection","type":"heading","anchor":"Constructor-Injection","level":3},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var constructedService: Factory {"," self { MyConstructedService(service: self.cachedService()) }"," }"," var cachedService: Factory {"," self { MyService() }.cached"," }","}"]},{"anchor":"Parameters","text":"Parameters","type":"heading","level":3},{"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":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","isActive":true},{"text":".","type":"text"}]},{"type":"codeListing","code":["extension Container {"," var parameterService: ParameterFactory {"," self { ParameterService(value: $0) }"," }","}"],"syntax":"swift"},{"inlineContent":[{"type":"text","text":"Note that we also needed to specify the type of our parameter."}],"type":"paragraph"},{"anchor":"Same-Types","type":"heading","text":"Same Types","level":3},{"type":"paragraph","inlineContent":[{"type":"text","text":"Example of correctly handling multiple instances of the same type."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var string1: Factory {"," self { \"String 1\" }"," }"," var string2: Factory {"," self { \"String 2\" }"," }"," var string3: Factory {"," self { \"String 3\" }"," }"," var string4: Factory {"," self { \"String 4\" }"," }","}"]},{"type":"heading","level":3,"anchor":"Inside-Custom-Containers","text":"Inside Custom Containers"},{"inlineContent":[{"type":"text","text":"You’ve seen factory registrations done within container "},{"inlineContent":[{"type":"text","text":"extensions"}],"type":"emphasis"},{"type":"text","text":", but it should also be noted that we can also create them within our own custom containers."}],"type":"paragraph"},{"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","type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"Note the last “lazy” definition of ","type":"text"},{"type":"codeVoice","code":"service2"},{"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"}]},{"style":"warning","type":"aside","content":[{"inlineContent":[{"text":"Creating a “lazy” Factory and assigning it to it’s enclosing class will create a reference cycle.","type":"text"}],"type":"paragraph"}],"name":"Warning"},{"type":"paragraph","inlineContent":[{"text":"Should you attempt to release such a container it will never go away, and you’ll have a memory leak on your hands.","type":"text"}]},{"type":"heading","level":3,"text":"Static Factory’s","anchor":"Static-Factorys"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Example of a static Factory 2.0 registration container."}]},{"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":[{"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 "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","isActive":true,"type":"reference"},{"text":" property wrappers due to the lack of keyPaths.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"Better to simply define the Factory as a standard computed variable within a Container, and then access the “shared” version.","type":"text"}]},{"syntax":"swift","code":["extension Container {"," var newSchool: Factory {"," self { School() }"," }","}","","let school = Container.shared.newSchool"],"type":"codeListing"}]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/GettingStarted":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","type":"topic","kind":"article","abstract":[{"text":"Defining a Factory, resolving it, and changing the default behavior.","type":"text"}],"url":"\/documentation\/factory\/gettingstarted","title":"Getting Started","role":"collectionGroup"},"doc://Factory/documentation/Factory/Resolutions":{"role":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","title":"Sample Resolutions","kind":"article","url":"\/documentation\/factory\/resolutions","abstract":[{"type":"text","text":"There are many ways to use Factory to resolve dependencies. Here are a few examples."}]},"doc://Factory/documentation/Factory/Injected":{"navigatorTitle":[{"text":"Injected","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"role":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}]},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/resolutions.json b/docs/data/documentation/factory/resolutions.json index 1c766db0..595e3a16 100644 --- a/docs/data/documentation/factory/resolutions.json +++ b/docs/data/documentation/factory/resolutions.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/GettingStarted"]]},"seeAlsoSections":[{"generated":true,"title":"Examples","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Registrations"]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/resolutions"]}],"kind":"article","metadata":{"roleHeading":"Article","title":"Sample Resolutions","role":"article","modules":[{"name":"Factory"}]},"sections":[],"primaryContentSections":[{"kind":"content","content":[{"text":"Shared Class Container","level":3,"anchor":"Shared-Class-Container","type":"heading"},{"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"},{"inlineContent":[{"type":"text","text":"This is the classic Service Locator pattern updated for Factory 2.0."}],"type":"paragraph"},{"type":"heading","level":3,"text":"Initialization from Passed Container","anchor":"Initialization-from-Passed-Container"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Passing an instance of a container to our view model and initializing service from that container."}]},{"syntax":"swift","type":"codeListing","code":["class ContentViewModel: ObservableObject {",""," let service2: MyServiceType",""," init(container: Container) {"," service2 = container.service()"," }"," ","}"]},{"anchor":"Lazy-Initialization-from-Passed-Container","level":3,"text":"Lazy Initialization from Passed Container","type":"heading"},{"inlineContent":[{"text":"Passing an instance of a container to our view model and saving it for later lazy initializers.","type":"text"}],"type":"paragraph"},{"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"," }","","}"]},{"text":"Injected Property Wrappers","type":"heading","level":3,"anchor":"Injected-Property-Wrappers"},{"inlineContent":[{"type":"text","text":"Using the "},{"type":"codeVoice","code":"@Injected"},{"type":"text","text":" and "},{"type":"codeVoice","code":"@LazyInjected"},{"type":"text","text":" property wrappers to obtain dependencies using an Annotation pattern similar to that used by "},{"type":"codeVoice","code":"EnvironmentObject"},{"text":" in SwiftUI.","type":"text"}],"type":"paragraph"},{"type":"codeListing","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"},{"inlineContent":[{"type":"text","text":"One can also inject the view model itself."}],"type":"paragraph"},{"code":["struct ContentView: View {"," @InjectedObject(\\.contentViewModel) var model: ContentViewModel"," var body: some View {"," ..."," }","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","isActive":true,"type":"reference"},{"text":", ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","isActive":true},{"type":"text","text":", "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"},{"type":"text","text":", and "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","isActive":true,"type":"reference"},{"type":"text","text":" for more."}]},{"text":"Global Keypath Resolution from Shared Container","anchor":"Global-Keypath-Resolution-from-Shared-Container","level":3,"type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory provides two global functions that utilize keypaths for resolution."}]},{"code":["class ContentViewModel: ObservableObject {"," let service1 = resolve(\\.constructedService)"," let service2 = resolve(\\MyContainer.anotherService)","}"],"syntax":"swift","type":"codeListing"},{"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","type":"heading","level":3,"text":"Parameterized Initialization from Passed Container"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Passing a required parameter to a factory for resolution."}]},{"code":["class ContentViewModel: ObservableObject {",""," let parameterService: ParameterService",""," init(container: Container, value: Int) {"," service2 = container.parameterService(value)"," }","","}"],"syntax":"swift","type":"codeListing"},{"inlineContent":[{"text":"See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","isActive":true,"type":"reference"},{"text":" for more details.","type":"text"}],"type":"paragraph"},{"anchor":"Classic-Factory-from-Static-Class-Member","type":"heading","level":3,"text":"Classic Factory from Static Class Member"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Initializing dependency from class. This is classic Service Locator pattern but this pattern should be consider deprecated."}]},{"type":"codeListing","code":["class ContentViewModel: ObservableObject {"," let newSchool = Container.newSchool()","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This was discussed in greater detail in "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Registrations"}]},{"level":3,"anchor":"Composition-Root","type":"heading","text":"Composition Root"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you want to use a Composition Root pattern, just use the container to provide the required dependencies to a constructor."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var constructedService: Factory {"," self { MyConstructedService(service: self.cachedService()) }.singleton"," }"," var cachedService: Factory {"," self { MyService() }.cached"," }","}","","@main","struct FactoryDemoApp: App {"," let viewModel = MyViewModel(service: Container.shared.constructedService())"," var body: some Scene {"," WindowGroup {"," NavigationView {"," ContentView(viewModel: viewModel)"," }"," }"," }","}ß"]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Resolutions","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"There are many ways to use Factory to resolve dependencies. Here are a few examples."}],"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","navigatorTitle":[{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"LazyInjected"}]},"doc://Factory/documentation/Factory/WeakLazyInjected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/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"},{"text":" ","kind":"text"},{"kind":"identifier","text":"WeakLazyInjected"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/ParameterFactory":{"kind":"symbol","abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}],"navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"ParameterFactory","kind":"identifier"}],"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","role":"symbol","type":"topic","url":"\/documentation\/factory\/parameterfactory"},"doc://Factory/documentation/Factory/Registrations":{"type":"topic","kind":"article","role":"article","url":"\/documentation\/factory\/registrations","title":"Sample Registrations","identifier":"doc:\/\/Factory\/documentation\/Factory\/Registrations","abstract":[{"type":"text","text":"There are many ways to register dependencies with Factory. Here are a few examples."}]},"doc://Factory/documentation/Factory/Injected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/injected","navigatorTitle":[{"kind":"identifier","text":"Injected"}],"title":"Injected","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","abstract":[{"type":"text","text":"Convenience property wrapper takes a factory and resolves an instance of the desired type."}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Injected","kind":"identifier"}]},"doc://Factory/documentation/Factory/InjectedObject":{"kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}],"navigatorTitle":[{"text":"InjectedObject","kind":"identifier"}],"url":"\/documentation\/factory\/injectedobject","abstract":[{"text":"Immediate injection property wrapper for SwiftUI ObservableObjects.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","role":"symbol","title":"InjectedObject"},"doc://Factory/documentation/Factory/GettingStarted":{"type":"topic","title":"Getting Started","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","url":"\/documentation\/factory\/gettingstarted","role":"collectionGroup"}}} \ No newline at end of file +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Resolutions"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/GettingStarted"]]},"primaryContentSections":[{"content":[{"text":"Shared Class Container","type":"heading","anchor":"Shared-Class-Container","level":3},{"inlineContent":[{"type":"text","text":"Here we instantiate our dependency from a shared class container."}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["class ContentViewModel: ObservableObject {"," let service = Container.shared.constructedService()","}"]},{"inlineContent":[{"text":"This is the classic Service Locator pattern updated for Factory 2.0.","type":"text"}],"type":"paragraph"},{"text":"Initialization from Passed Container","anchor":"Initialization-from-Passed-Container","level":3,"type":"heading"},{"type":"paragraph","inlineContent":[{"text":"Passing an instance of a container to our view model and initializing service from that container.","type":"text"}]},{"type":"codeListing","code":["class ContentViewModel: ObservableObject {",""," let service2: MyServiceType",""," init(container: Container) {"," service2 = container.service()"," }"," ","}"],"syntax":"swift"},{"text":"Lazy Initialization from Passed Container","type":"heading","level":3,"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"," }","","}"]},{"anchor":"Injected-Property-Wrappers","text":"Injected Property Wrappers","level":3,"type":"heading"},{"type":"paragraph","inlineContent":[{"text":"Using the ","type":"text"},{"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 "},{"code":"EnvironmentObject","type":"codeVoice"},{"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","","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"One can also inject the view model itself."}]},{"code":["struct ContentView: View {"," @InjectedObject(\\.contentViewModel) var model: ContentViewModel"," var body: some View {"," ..."," }","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","isActive":true,"type":"reference"},{"type":"text","text":", "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","isActive":true},{"text":", ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","type":"reference","isActive":true},{"type":"text","text":", "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected"},{"text":" and ","type":"text"},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","type":"reference"},{"type":"text","text":" for more."}]},{"type":"heading","level":3,"anchor":"Global-Keypath-Resolution-from-Shared-Container","text":"Global Keypath Resolution from Shared Container"},{"type":"paragraph","inlineContent":[{"text":"Factory provides two global functions that utilize keypaths for resolution.","type":"text"}]},{"syntax":"swift","type":"codeListing","code":["class ContentViewModel: ObservableObject {"," let service1 = resolve(\\.constructedService)"," let service2 = resolve(\\MyContainer.anotherService)","}"]},{"type":"paragraph","inlineContent":[{"text":"The end result is identical to using a keypath with the @Injected property wrapper.","type":"text"}]},{"anchor":"Parameterized-Initialization-from-Passed-Container","type":"heading","text":"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)"," }","","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","isActive":true},{"type":"text","text":" for more details."}]},{"text":"Classic Factory from Static Class Member","type":"heading","level":3,"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"}]},{"code":["class ContentViewModel: ObservableObject {"," let newSchool = Container.newSchool()","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"This was discussed in greater detail in ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Registrations","isActive":true}]},{"text":"Composition Root","type":"heading","level":3,"anchor":"Composition-Root"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you want to use a Composition Root pattern, just use the container to provide the required dependencies to a constructor."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var constructedService: Factory {"," self { MyConstructedService(service: self.cachedService()) }.singleton"," }"," var cachedService: Factory {"," self { MyService() }.cached"," }","}","","@main","struct FactoryDemoApp: App {"," let viewModel = MyViewModel(service: Container.shared.constructedService())"," var body: some Scene {"," WindowGroup {"," NavigationView {"," ContentView(viewModel: viewModel)"," }"," }"," }","}ß"]}],"kind":"content"}],"variants":[{"paths":["\/documentation\/factory\/resolutions"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"patch":0,"minor":3},"abstract":[{"text":"There are many ways to use Factory to resolve dependencies. Here are a few examples.","type":"text"}],"seeAlsoSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Registrations"],"generated":true,"title":"Examples"}],"kind":"article","sections":[],"metadata":{"modules":[{"name":"Factory"}],"role":"article","title":"Sample Resolutions","roleHeading":"Article"},"references":{"doc://Factory/documentation/Factory/GettingStarted":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","type":"topic","kind":"article","abstract":[{"text":"Defining a Factory, resolving it, and changing the default behavior.","type":"text"}],"url":"\/documentation\/factory\/gettingstarted","title":"Getting Started","role":"collectionGroup"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"title":"WeakLazyInjected","url":"\/documentation\/factory\/weaklazyinjected","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"text":"WeakLazyInjected","kind":"identifier"}]},"doc://Factory/documentation/Factory/Injected":{"navigatorTitle":[{"text":"Injected","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Injected","kind":"symbol","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"role":"symbol","title":"Injected","url":"\/documentation\/factory\/injected","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Injected"}]},"doc://Factory/documentation/Factory/DynamicInjected":{"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"DynamicInjected"}],"navigatorTitle":[{"text":"DynamicInjected","kind":"identifier"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/DynamicInjected","kind":"symbol","type":"topic","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type.","type":"text"}],"title":"DynamicInjected","role":"symbol","url":"\/documentation\/factory\/dynamicinjected"},"doc://Factory/documentation/Factory/Registrations":{"abstract":[{"type":"text","text":"There are many ways to register dependencies with Factory. Here are a few examples."}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Registrations","title":"Sample Registrations","role":"article","url":"\/documentation\/factory\/registrations","kind":"article"},"doc://Factory/documentation/Factory/ParameterFactory":{"title":"ParameterFactory","identifier":"doc:\/\/Factory\/documentation\/Factory\/ParameterFactory","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ParameterFactory"}],"url":"\/documentation\/factory\/parameterfactory","navigatorTitle":[{"text":"ParameterFactory","kind":"identifier"}],"abstract":[{"text":"Factory capable of taking parameters at runtime","type":"text"}]},"doc://Factory/documentation/Factory/InjectedObject":{"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"InjectedObject"}],"abstract":[{"type":"text","text":"Immediate injection property wrapper for SwiftUI ObservableObjects."}],"url":"\/documentation\/factory\/injectedobject","identifier":"doc:\/\/Factory\/documentation\/Factory\/InjectedObject","title":"InjectedObject","kind":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"InjectedObject"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/LazyInjected":{"type":"topic","title":"LazyInjected","abstract":[{"text":"Convenience property wrapper takes a factory and resolves an instance of the desired type the first time the wrapped value is requested.","type":"text"}],"navigatorTitle":[{"kind":"identifier","text":"LazyInjected"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/LazyInjected","url":"\/documentation\/factory\/lazyinjected","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LazyInjected","kind":"identifier"}],"kind":"symbol"}}} \ 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 deb1c005..856ded32 100644 --- a/docs/data/documentation/factory/resolve(_:)-52olu.json +++ b/docs/data/documentation/factory/resolve(_:)-52olu.json @@ -1 +1 @@ -{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/resolve(_:)-52olu"]}],"metadata":{"roleHeading":"Function","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC","text":"Container"},{"kind":"text","text":", "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>) -> "},{"text":"T","kind":"typeIdentifier"}],"symbolKind":"func","title":"resolve(_:)","externalID":"s:7Factory7resolveyxs7KeyPathCyAA9ContainerCA2AVyxGGlF","modules":[{"name":"Factory"}],"role":"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":">("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"text":"Container","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","preciseIdentifier":"s:7Factory9ContainerC"},{"text":", ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">>) -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"}],"languages":["swift"]}]},{"content":[{"level":2,"type":"heading","anchor":"discussion","text":"Discussion"},{"syntax":"swift","code":["@State var model: ContentViewModel = resolve(\\.contentViewModel)"],"type":"codeListing"}],"kind":"content"}],"abstract":[{"type":"text","text":"Global function to resolve a keypath on Container.shared into the requested type"}],"sections":[],"kind":"symbol","schemaVersion":{"major":0,"patch":0,"minor":3},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-52olu","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"references":{"doc://Factory/documentation/Factory/Container":{"kind":"symbol","navigatorTitle":[{"text":"Container","kind":"identifier"}],"title":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"role":"symbol","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/resolve(_:)-52olu":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-52olu","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC","text":"Container"},{"kind":"text","text":", "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>) -> "},{"kind":"typeIdentifier","text":"T"}],"title":"resolve(_:)","abstract":[{"text":"Global function to resolve a keypath on Container.shared into the requested type","type":"text"}],"url":"\/documentation\/factory\/resolve(_:)-52olu","kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"keyPath","kind":"internalParam"},{"kind":"text","text":": "},{"text":"KeyPath","preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","text":"Container","kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">>) -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"languages":["swift"]}],"kind":"declarations"},{"kind":"content","content":[{"level":2,"type":"heading","text":"Discussion","anchor":"discussion"},{"syntax":"swift","code":["@State var model: ContentViewModel = resolve(\\.contentViewModel)"],"type":"codeListing"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-52olu","interfaceLanguage":"swift"},"metadata":{"title":"resolve(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"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"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>) -> "},{"kind":"typeIdentifier","text":"T"}],"roleHeading":"Function","externalID":"s:7Factory7resolveyxs7KeyPathCyAA9ContainerCA2AVyxGGlF","modules":[{"name":"Factory"}],"symbolKind":"func","role":"symbol"},"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"paths":["\/documentation\/factory\/resolve(_:)-52olu"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"text":"Global function to resolve a keypath on Container.shared into the requested type","type":"text"}],"kind":"symbol","sections":[],"references":{"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/resolve(_:)-52olu":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-52olu","url":"\/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"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"text":"<","kind":"text"},{"text":"Container","kind":"typeIdentifier","preciseIdentifier":"s:7Factory9ContainerC"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">>) -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"}],"kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/Container":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","title":"Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"url":"\/documentation\/factory\/container","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}],"navigatorTitle":[{"text":"Container","kind":"identifier"}]}}} \ 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 b04b772d..d9246515 100644 --- a/docs/data/documentation/factory/resolve(_:)-632zk.json +++ b/docs/data/documentation/factory/resolve(_:)-632zk.json @@ -1 +1 @@ -{"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-632zk"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"<"},{"text":"C","kind":"genericParameter"},{"text":", ","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"keyPath","kind":"internalParam"},{"kind":"text","text":": "},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"C"},{"text":", ","kind":"text"},{"text":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">>) -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":" ","kind":"text"},{"text":"where","kind":"keyword"},{"text":" ","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"text":" : ","kind":"text"},{"preciseIdentifier":"s:7Factory15SharedContainerP","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","text":"SharedContainer"}],"platforms":["macOS"],"languages":["swift"]}]},{"content":[{"anchor":"discussion","type":"heading","text":"Discussion","level":2},{"syntax":"swift","type":"codeListing","code":["@State var model: ContentViewModel = resolve(\\MyContainer.contentViewModel)"]}],"kind":"content"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"metadata":{"title":"resolve(_:)","symbolKind":"func","externalID":"s:7Factory7resolveyq_s7KeyPathCyxA2AVyq_GGAA15SharedContainerRzr0_lF","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"kind":"text","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"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>) -> "},{"text":"T","kind":"typeIdentifier"}],"roleHeading":"Function","modules":[{"name":"Factory"}]},"abstract":[{"text":"Global function to resolve a keypath on the specified shared container into the requested type","type":"text"}],"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/resolve(_:)-632zk"]}],"references":{"doc://Factory/documentation/Factory/resolve(_:)-632zk":{"role":"symbol","abstract":[{"type":"text","text":"Global function to resolve a keypath on the specified shared container into the requested type"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolve"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":", "},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">>) -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"}],"title":"resolve(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-632zk","kind":"symbol","url":"\/documentation\/factory\/resolve(_:)-632zk","type":"topic"},"doc://Factory/documentation/Factory/SharedContainer":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/sharedcontainer","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"title":"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."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"SharedContainer","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"sections":[],"metadata":{"externalID":"s:7Factory7resolveyq_s7KeyPathCyxA2AVyq_GGAA15SharedContainerRzr0_lF","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolve"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"text":", ","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier","text":"KeyPath"},{"kind":"text","text":"<"},{"text":"C","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>) -> "},{"kind":"typeIdentifier","text":"T"}],"roleHeading":"Function","role":"symbol","symbolKind":"func","modules":[{"name":"Factory"}],"title":"resolve(_:)"},"abstract":[{"text":"Global function to resolve a keypath on the specified shared container into the requested type","type":"text"}],"variants":[{"paths":["\/documentation\/factory\/resolve(_:)-632zk"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolve"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"text":"C","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>) -> "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":" "},{"kind":"keyword","text":"where"},{"kind":"text","text":" "},{"text":"C","kind":"typeIdentifier"},{"kind":"text","text":" : "},{"preciseIdentifier":"s:7Factory15SharedContainerP","text":"SharedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"typeIdentifier"}],"platforms":["macOS"],"languages":["swift"]}]},{"kind":"content","content":[{"type":"heading","level":2,"text":"Discussion","anchor":"discussion"},{"code":["@State var model: ContentViewModel = resolve(\\MyContainer.contentViewModel)"],"syntax":"swift","type":"codeListing"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-632zk","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/resolve(_:)-632zk":{"abstract":[{"text":"Global function to resolve a keypath on the specified shared container into the requested type","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/resolve(_:)-632zk","role":"symbol","title":"resolve(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"<"},{"text":"C","kind":"genericParameter"},{"kind":"text","text":", "},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>) -> "},{"kind":"typeIdentifier","text":"T"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/resolve(_:)-632zk"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/SharedContainer":{"url":"\/documentation\/factory\/sharedcontainer","type":"topic","abstract":[{"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.","type":"text"}],"title":"SharedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"SharedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/resolving.json b/docs/data/documentation/factory/resolving.json index 5d632b1a..59bbff6f 100644 --- a/docs/data/documentation/factory/resolving.json +++ b/docs/data/documentation/factory/resolving.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/resolving"]}],"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Resolving"},"abstract":[{"type":"text","text":"When protocol is applied to a container it enables a typed registration\/resolution mode."}],"topicSections":[{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-4znbq","doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-h3xb","doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-6wtxp"]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Resolving"},{"kind":"text","text":" : "},{"text":"ManagedContainer","kind":"typeIdentifier","preciseIdentifier":"s:7Factory16ManagedContainerP","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"}],"platforms":["macOS"],"languages":["swift"]}]}],"metadata":{"role":"symbol","modules":[{"name":"Factory"}],"externalID":"s:7Factory9ResolvingP","title":"Resolving","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Resolving"}],"roleHeading":"Protocol","symbolKind":"protocol","navigatorTitle":[{"kind":"identifier","text":"Resolving"}]},"schemaVersion":{"minor":3,"major":0,"patch":0},"kind":"symbol","relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","doc:\/\/Factory\/s8SendableP"],"kind":"relationships","title":"Inherits From","type":"inheritsFrom"}],"references":{"doc://Factory/documentation/Factory/Resolving":{"kind":"symbol","role":"symbol","url":"\/documentation\/factory\/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"},{"text":"Resolving","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"Resolving"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","title":"Resolving"},"doc://Factory/documentation/Factory/Resolving/register(_:factory:)-h3xb":{"required":true,"kind":"symbol","role":"symbol","url":"\/documentation\/factory\/resolving\/register(_:factory:)-h3xb","abstract":[{"type":"text","text":"Registers a new type and associated factory closure with this container."}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"register","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":".Type, "},{"text":"factory","kind":"externalParam"},{"text":": () -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"defaultImplementations":1,"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-h3xb","title":"register(_:factory:)"},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"ManagedContainer","kind":"identifier"}],"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"title":"ManagedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","type":"topic","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}]},"doc://Factory/documentation/Factory/Resolving/factory(_:)-4znbq":{"kind":"symbol","abstract":[{"type":"text","text":"Returns a registered factory for this type from this container."}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"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","kind":"typeIdentifier","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">?","kind":"text"}],"title":"factory(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-4znbq","role":"symbol","type":"topic","defaultImplementations":1,"url":"\/documentation\/factory\/resolving\/factory(_:)-4znbq","required":true},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/s8SendableP":{"identifier":"doc:\/\/Factory\/s8SendableP","title":"Swift.Sendable","type":"unresolvable"},"doc://Factory/documentation/Factory/Resolving/resolve(_:)-6wtxp":{"required":true,"role":"symbol","abstract":[{"text":"Resolves a type from this container.","type":"text"}],"url":"\/documentation\/factory\/resolving\/resolve(_:)-6wtxp","type":"topic","title":"resolve(_:)","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type) -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}],"defaultImplementations":1,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-6wtxp"}}} \ No newline at end of file +{"topicSections":[{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-4znbq","doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-h3xb","doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-6wtxp"]}],"relationshipsSections":[{"kind":"relationships","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","doc:\/\/Factory\/s8SendableP"],"type":"inheritsFrom","title":"Inherits From"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"Resolving","kind":"identifier"},{"text":" : ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP","text":"ManagedContainer","kind":"typeIdentifier"}]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/resolving"]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Resolving","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"externalID":"s:7Factory9ResolvingP","roleHeading":"Protocol","symbolKind":"protocol","fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Resolving"}],"modules":[{"name":"Factory"}],"navigatorTitle":[{"kind":"identifier","text":"Resolving"}],"role":"symbol","title":"Resolving"},"sections":[],"abstract":[{"type":"text","text":"When protocol is applied to a container it enables a typed registration\/resolution mode."}],"references":{"doc://Factory/documentation/Factory/Resolving/factory(_:)-4znbq":{"url":"\/documentation\/factory\/resolving\/factory(_:)-4znbq","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"factory","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type) -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">?","kind":"text"}],"abstract":[{"type":"text","text":"Returns a registered factory for this type from this container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-4znbq","required":true,"kind":"symbol","type":"topic","role":"symbol","defaultImplementations":1,"title":"factory(_:)"},"doc://Factory/documentation/Factory/ManagedContainer":{"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","role":"symbol","navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ManagedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Resolving/resolve(_:)-6wtxp":{"abstract":[{"text":"Resolves a type from this container.","type":"text"}],"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"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"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-6wtxp","title":"resolve(_:)","defaultImplementations":1,"url":"\/documentation\/factory\/resolving\/resolve(_:)-6wtxp","required":true,"type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Resolving":{"title":"Resolving","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"Resolving","kind":"identifier"}],"url":"\/documentation\/factory\/resolving","navigatorTitle":[{"kind":"identifier","text":"Resolving"}],"abstract":[{"text":"When protocol is applied to a container it enables a typed registration\/resolution mode.","type":"text"}]},"doc://Factory/s8SendableP":{"identifier":"doc:\/\/Factory\/s8SendableP","type":"unresolvable","title":"Swift.Sendable"},"doc://Factory/documentation/Factory/Resolving/register(_:factory:)-h3xb":{"url":"\/documentation\/factory\/resolving\/register(_:factory:)-h3xb","kind":"symbol","abstract":[{"type":"text","text":"Registers a new type and associated factory closure with this container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-h3xb","type":"topic","title":"register(_:factory:)","required":true,"role":"symbol","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"},{"text":"factory","kind":"externalParam"},{"kind":"text","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"}],"defaultImplementations":1}}} \ 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 0b5a637f..3dcf0913 100644 --- a/docs/data/documentation/factory/resolving/factory(_:)-4znbq.json +++ b/docs/data/documentation/factory/resolving/factory(_:)-4znbq.json @@ -1 +1 @@ -{"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Resolving"]]},"abstract":[{"type":"text","text":"Returns a registered factory for this type from this container."}],"schemaVersion":{"major":0,"minor":3,"patch":0},"defaultImplementationsSections":[{"title":"Resolving Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-6s19m"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-4znbq"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"factory"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"type","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":".Type) -> ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">?"}],"languages":["swift"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/resolving\/factory(_:)-4znbq"]}],"metadata":{"symbolKind":"method","required":true,"modules":[{"name":"Factory"}],"roleHeading":"Instance Method","externalID":"s:7Factory9ResolvingP7factoryyA2AVyqd__GSgqd__mlF","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"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) -> "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">?","kind":"text"}],"title":"factory(_:)"},"sections":[],"references":{"doc://Factory/documentation/Factory/Resolving/factory(_:)-6s19m":{"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"},{"type":"text","text":" "},{"text":"registration.","type":"text"}],"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"factory","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"T"},{"text":".Type) -> ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">?","kind":"text"}],"title":"factory(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-6s19m","role":"symbol","type":"topic","url":"\/documentation\/factory\/resolving\/factory(_:)-6s19m"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Resolving/factory(_:)-4znbq":{"kind":"symbol","abstract":[{"type":"text","text":"Returns a registered factory for this type from this container."}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"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","kind":"typeIdentifier","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">?","kind":"text"}],"title":"factory(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-4znbq","role":"symbol","type":"topic","defaultImplementations":1,"url":"\/documentation\/factory\/resolving\/factory(_:)-4znbq","required":true},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/Resolving":{"kind":"symbol","role":"symbol","url":"\/documentation\/factory\/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"},{"text":"Resolving","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"Resolving"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","title":"Resolving"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Resolving"]]},"sections":[],"abstract":[{"type":"text","text":"Returns a registered factory for this type from this container."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"type","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":".Type) -> ","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">?"}],"languages":["swift"],"platforms":["macOS"]}]}],"defaultImplementationsSections":[{"title":"Resolving Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-6s19m"]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/resolving\/factory(_:)-4znbq"]}],"kind":"symbol","metadata":{"role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"factory","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":".Type) -> ","kind":"text"},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">?"}],"symbolKind":"method","title":"factory(_:)","roleHeading":"Instance Method","externalID":"s:7Factory9ResolvingP7factoryyA2AVyqd__GSgqd__mlF","modules":[{"name":"Factory"}],"required":true},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-4znbq"},"schemaVersion":{"patch":0,"minor":3,"major":0},"references":{"doc://Factory/documentation/Factory/Resolving/factory(_:)-4znbq":{"url":"\/documentation\/factory\/resolving\/factory(_:)-4znbq","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"factory","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type) -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">?","kind":"text"}],"abstract":[{"type":"text","text":"Returns a registered factory for this type from this container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-4znbq","required":true,"kind":"symbol","type":"topic","role":"symbol","defaultImplementations":1,"title":"factory(_:)"},"doc://Factory/documentation/Factory/Resolving":{"title":"Resolving","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"Resolving","kind":"identifier"}],"url":"\/documentation\/factory\/resolving","navigatorTitle":[{"kind":"identifier","text":"Resolving"}],"abstract":[{"text":"When protocol is applied to a container it enables a typed registration\/resolution mode.","type":"text"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Resolving/factory(_:)-6s19m":{"url":"\/documentation\/factory\/resolving\/factory(_:)-6s19m","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"factory","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"T"},{"text":".Type) -> ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">?","kind":"text"}],"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."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-6s19m","role":"symbol","kind":"symbol","type":"topic","title":"factory(_:)"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"}}} \ 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 d8ac1aae..635f0200 100644 --- a/docs/data/documentation/factory/resolving/factory(_:)-6s19m.json +++ b/docs/data/documentation/factory/resolving/factory(_:)-6s19m.json @@ -1 +1 @@ -{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/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":" "},{"text":"registration.","type":"text"}],"kind":"symbol","metadata":{"modules":[{"name":"Factory"}],"externalID":"s:7Factory9ResolvingPAAE7factoryyA2AVyqd__GSgqd__mlF","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"factory","kind":"identifier"},{"text":"<","kind":"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":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">?","kind":"text"}],"role":"symbol","title":"factory(_:)","extendedModule":"Factory","roleHeading":"Instance Method","symbolKind":"method"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Resolving","doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-4znbq"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"variants":[{"paths":["\/documentation\/factory\/resolving\/factory(_:)-6s19m"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"factory","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"type","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":".Type = T.self) -> "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">?"}],"platforms":["macOS"],"languages":["swift"]}]},{"kind":"content","content":[{"text":"Discussion","type":"heading","anchor":"discussion","level":2},{"type":"paragraph","inlineContent":[{"text":"Note that nothing will be applied if initial registration is not found.","type":"text"}]}]}],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/Resolving/factory(_:)-4znbq":{"kind":"symbol","abstract":[{"type":"text","text":"Returns a registered factory for this type from this container."}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"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","kind":"typeIdentifier","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">?","kind":"text"}],"title":"factory(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-4znbq","role":"symbol","type":"topic","defaultImplementations":1,"url":"\/documentation\/factory\/resolving\/factory(_:)-4znbq","required":true},"doc://Factory/documentation/Factory/Resolving/factory(_:)-6s19m":{"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"},{"type":"text","text":" "},{"text":"registration.","type":"text"}],"kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"factory","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"T"},{"text":".Type) -> ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">?","kind":"text"}],"title":"factory(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-6s19m","role":"symbol","type":"topic","url":"\/documentation\/factory\/resolving\/factory(_:)-6s19m"},"doc://Factory/documentation/Factory/Resolving":{"kind":"symbol","role":"symbol","url":"\/documentation\/factory\/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"},{"text":"Resolving","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"Resolving"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","title":"Resolving"}}} \ No newline at end of file +{"schemaVersion":{"major":0,"patch":0,"minor":3},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"type","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":".Type = T.self) -> ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","kind":"typeIdentifier","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">?"}]}]},{"kind":"content","content":[{"type":"heading","text":"Discussion","anchor":"discussion","level":2},{"inlineContent":[{"text":"Note that nothing will be applied if initial registration is not found.","type":"text"}],"type":"paragraph"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-6s19m","interfaceLanguage":"swift"},"sections":[],"metadata":{"title":"factory(_:)","roleHeading":"Instance Method","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type) -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">?"}],"symbolKind":"method","role":"symbol","extendedModule":"Factory","externalID":"s:7Factory9ResolvingPAAE7factoryyA2AVyqd__GSgqd__mlF"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Resolving","doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-4znbq"]]},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/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."}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Resolving/factory(_:)-6s19m":{"url":"\/documentation\/factory\/resolving\/factory(_:)-6s19m","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"factory","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"T"},{"text":".Type) -> ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">?","kind":"text"}],"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."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-6s19m","role":"symbol","kind":"symbol","type":"topic","title":"factory(_:)"},"doc://Factory/documentation/Factory/Resolving":{"title":"Resolving","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"Resolving","kind":"identifier"}],"url":"\/documentation\/factory\/resolving","navigatorTitle":[{"kind":"identifier","text":"Resolving"}],"abstract":[{"text":"When protocol is applied to a container it enables a typed registration\/resolution mode.","type":"text"}]},"doc://Factory/documentation/Factory/Resolving/factory(_:)-4znbq":{"url":"\/documentation\/factory\/resolving\/factory(_:)-4znbq","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"factory","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type) -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">?","kind":"text"}],"abstract":[{"type":"text","text":"Returns a registered factory for this type from this container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/factory(_:)-4znbq","required":true,"kind":"symbol","type":"topic","role":"symbol","defaultImplementations":1,"title":"factory(_:)"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/resolving/register(_:factory:)-9ktpf.json b/docs/data/documentation/factory/resolving/register(_:factory:)-9ktpf.json index 764fa2eb..e2846ee4 100644 --- a/docs/data/documentation/factory/resolving/register(_:factory:)-9ktpf.json +++ b/docs/data/documentation/factory/resolving/register(_:factory:)-9ktpf.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Resolving","doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-h3xb"]]},"kind":"symbol","abstract":[{"type":"text","text":"Registers a new type and associated factory closure with this container."}],"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@discardableResult"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"type","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":".Type = T.self, ","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"keyword","text":"@escaping"},{"kind":"text","text":" () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}]}]},{"content":[{"type":"heading","text":"Discussion","anchor":"discussion","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"Also returns Factory for further specialization for scopes, decorators, etc."}]}],"kind":"content"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-9ktpf","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/factory\/resolving\/register(_:factory:)-9ktpf"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"symbolKind":"method","extendedModule":"Factory","roleHeading":"Instance Method","modules":[{"name":"Factory"}],"role":"symbol","externalID":"s:7Factory9ResolvingPAAE8register_7factoryA2AVyqd__Gqd__m_qd__yYbctlF","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"register"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"T","kind":"typeIdentifier"},{"text":".Type, ","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": () -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"title":"register(_:factory:)"},"sections":[],"references":{"doc://Factory/documentation/Factory/Resolving/register(_:factory:)-h3xb":{"required":true,"kind":"symbol","role":"symbol","url":"\/documentation\/factory\/resolving\/register(_:factory:)-h3xb","abstract":[{"type":"text","text":"Registers a new type and associated factory closure with this container."}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"register","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":".Type, "},{"text":"factory","kind":"externalParam"},{"text":": () -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"defaultImplementations":1,"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-h3xb","title":"register(_:factory:)"},"doc://Factory/documentation/Factory/Resolving":{"kind":"symbol","role":"symbol","url":"\/documentation\/factory\/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"},{"text":"Resolving","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"Resolving"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","title":"Resolving"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Resolving/register(_:factory:)-9ktpf":{"kind":"symbol","role":"symbol","url":"\/documentation\/factory\/resolving\/register(_:factory:)-9ktpf","abstract":[{"type":"text","text":"Registers a new type and associated factory closure with this container."}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"register","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type, "},{"kind":"externalParam","text":"factory"},{"text":": () -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"type":"topic","title":"register(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-9ktpf"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"}}} \ No newline at end of file +{"schemaVersion":{"minor":3,"patch":0,"major":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"@discardableResult","kind":"attribute"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"register"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"type","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":".Type = T.self, ","kind":"text"},{"text":"factory","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" () -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"platforms":["macOS"]}]},{"content":[{"level":2,"text":"Discussion","anchor":"discussion","type":"heading"},{"inlineContent":[{"type":"text","text":"Also returns Factory for further specialization for scopes, decorators, etc."}],"type":"paragraph"}],"kind":"content"}],"abstract":[{"type":"text","text":"Registers a new type and associated factory closure with this container."}],"variants":[{"paths":["\/documentation\/factory\/resolving\/register(_:factory:)-9ktpf"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"register","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type, "},{"text":"factory","kind":"externalParam"},{"kind":"text","text":": () -> "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"title":"register(_:factory:)","modules":[{"name":"Factory"}],"externalID":"s:7Factory9ResolvingPAAE8register_7factoryA2AVyqd__Gqd__m_qd__yYbctlF","roleHeading":"Instance Method","extendedModule":"Factory","symbolKind":"method"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Resolving","doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-h3xb"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-9ktpf","interfaceLanguage":"swift"},"kind":"symbol","sections":[],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Resolving/register(_:factory:)-9ktpf":{"url":"\/documentation\/factory\/resolving\/register(_:factory:)-9ktpf","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-9ktpf","title":"register(_:factory:)","abstract":[{"text":"Registers a new type and associated factory closure with this container.","type":"text"}],"type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"T","kind":"typeIdentifier"},{"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"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}]},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Resolving":{"title":"Resolving","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"Resolving","kind":"identifier"}],"url":"\/documentation\/factory\/resolving","navigatorTitle":[{"kind":"identifier","text":"Resolving"}],"abstract":[{"text":"When protocol is applied to a container it enables a typed registration\/resolution mode.","type":"text"}]},"doc://Factory/documentation/Factory/Resolving/register(_:factory:)-h3xb":{"url":"\/documentation\/factory\/resolving\/register(_:factory:)-h3xb","kind":"symbol","abstract":[{"type":"text","text":"Registers a new type and associated factory closure with this container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-h3xb","type":"topic","title":"register(_:factory:)","required":true,"role":"symbol","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"},{"text":"factory","kind":"externalParam"},{"kind":"text","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"}],"defaultImplementations":1}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/resolving/register(_:factory:)-h3xb.json b/docs/data/documentation/factory/resolving/register(_:factory:)-h3xb.json index d6cbe15f..a182e801 100644 --- a/docs/data/documentation/factory/resolving/register(_:factory:)-h3xb.json +++ b/docs/data/documentation/factory/resolving/register(_:factory:)-h3xb.json @@ -1 +1 @@ -{"kind":"symbol","sections":[],"metadata":{"roleHeading":"Instance Method","role":"symbol","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"register"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":".Type, "},{"text":"factory","kind":"externalParam"},{"text":": () -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"externalID":"s:7Factory9ResolvingP8register_7factoryA2AVyqd__Gqd__m_qd__yYbctlF","modules":[{"name":"Factory"}],"title":"register(_:factory:)","required":true},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"register","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"type"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"},{"text":".Type, ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" () -> "},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"languages":["swift"]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-h3xb","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Registers a new type and associated factory closure with this container."}],"variants":[{"paths":["\/documentation\/factory\/resolving\/register(_:factory:)-h3xb"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Resolving"]]},"defaultImplementationsSections":[{"title":"Resolving Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-9ktpf"]}],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Resolving/register(_:factory:)-h3xb":{"required":true,"kind":"symbol","role":"symbol","url":"\/documentation\/factory\/resolving\/register(_:factory:)-h3xb","abstract":[{"type":"text","text":"Registers a new type and associated factory closure with this container."}],"fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"register","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":".Type, "},{"text":"factory","kind":"externalParam"},{"text":": () -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"defaultImplementations":1,"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-h3xb","title":"register(_:factory:)"},"doc://Factory/documentation/Factory/Resolving/register(_:factory:)-9ktpf":{"kind":"symbol","role":"symbol","url":"\/documentation\/factory\/resolving\/register(_:factory:)-9ktpf","abstract":[{"type":"text","text":"Registers a new type and associated factory closure with this container."}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"register","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type, "},{"kind":"externalParam","text":"factory"},{"text":": () -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":") -> "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"type":"topic","title":"register(_:factory:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-9ktpf"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/Resolving":{"kind":"symbol","role":"symbol","url":"\/documentation\/factory\/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"},{"text":"Resolving","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"Resolving"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","title":"Resolving"}}} \ No newline at end of file +{"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Resolving"]]},"metadata":{"title":"register(_:factory:)","externalID":"s:7Factory9ResolvingP8register_7factoryA2AVyqd__Gqd__m_qd__yYbctlF","modules":[{"name":"Factory"}],"role":"symbol","required":true,"roleHeading":"Instance Method","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"register"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type, "},{"kind":"externalParam","text":"factory"},{"kind":"text","text":": () -> "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":") -> "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}]},"abstract":[{"text":"Registers a new type and associated factory closure with this container.","type":"text"}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-h3xb","interfaceLanguage":"swift"},"defaultImplementationsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-9ktpf"],"title":"Resolving Implementations"}],"schemaVersion":{"minor":3,"patch":0,"major":0},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"register"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"type"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"},{"text":".Type, ","kind":"text"},{"kind":"externalParam","text":"factory"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"text":" () -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"languages":["swift"]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/resolving\/register(_:factory:)-h3xb"]}],"references":{"doc://Factory/documentation/Factory/Resolving/register(_:factory:)-h3xb":{"url":"\/documentation\/factory\/resolving\/register(_:factory:)-h3xb","kind":"symbol","abstract":[{"type":"text","text":"Registers a new type and associated factory closure with this container."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-h3xb","type":"topic","title":"register(_:factory:)","required":true,"role":"symbol","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"},{"text":"factory","kind":"externalParam"},{"kind":"text","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"}],"defaultImplementations":1},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Resolving":{"title":"Resolving","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"Resolving","kind":"identifier"}],"url":"\/documentation\/factory\/resolving","navigatorTitle":[{"kind":"identifier","text":"Resolving"}],"abstract":[{"text":"When protocol is applied to a container it enables a typed registration\/resolution mode.","type":"text"}]},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Resolving/register(_:factory:)-9ktpf":{"url":"\/documentation\/factory\/resolving\/register(_:factory:)-9ktpf","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/register(_:factory:)-9ktpf","title":"register(_:factory:)","abstract":[{"text":"Registers a new type and associated factory closure with this container.","type":"text"}],"type":"topic","kind":"symbol","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"register"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"T","kind":"typeIdentifier"},{"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"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}]}}} \ 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 4eb88bc9..8db5ea9d 100644 --- a/docs/data/documentation/factory/resolving/resolve(_:)-6wtxp.json +++ b/docs/data/documentation/factory/resolving/resolve(_:)-6wtxp.json @@ -1 +1 @@ -{"abstract":[{"text":"Resolves a type from this container.","type":"text"}],"variants":[{"paths":["\/documentation\/factory\/resolving\/resolve(_:)-6wtxp"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Resolving"]]},"kind":"symbol","defaultImplementationsSections":[{"title":"Resolving Implementations","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-82xu1"]}],"metadata":{"title":"resolve(_:)","modules":[{"name":"Factory"}],"externalID":"s:7Factory9ResolvingP7resolveyqd__Sgqd__mlF","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":".Type) -> "},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"required":true,"roleHeading":"Instance Method","symbolKind":"method"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-6wtxp"},"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"type"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type) -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}]}]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory/Resolving/resolve(_:)-82xu1":{"abstract":[{"type":"text","text":"Resolves a type from this container."}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/resolving\/resolve(_:)-82xu1","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-82xu1","title":"resolve(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":".Type) -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}]},"doc://Factory/documentation/Factory/Resolving/resolve(_:)-6wtxp":{"required":true,"role":"symbol","abstract":[{"text":"Resolves a type from this container.","type":"text"}],"url":"\/documentation\/factory\/resolving\/resolve(_:)-6wtxp","type":"topic","title":"resolve(_:)","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type) -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}],"defaultImplementations":1,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-6wtxp"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Resolving":{"kind":"symbol","role":"symbol","url":"\/documentation\/factory\/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"},{"text":"Resolving","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"Resolving"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","title":"Resolving"}}} \ No newline at end of file +{"metadata":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"T"},{"text":".Type) -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}],"role":"symbol","externalID":"s:7Factory9ResolvingP7resolveyqd__Sgqd__mlF","required":true,"modules":[{"name":"Factory"}],"symbolKind":"method","roleHeading":"Instance Method","title":"resolve(_:)"},"abstract":[{"type":"text","text":"Resolves a type from this container."}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-6wtxp"},"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"type","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":".Type) -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}]}],"sections":[],"variants":[{"paths":["\/documentation\/factory\/resolving\/resolve(_:)-6wtxp"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Resolving"]]},"defaultImplementationsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-82xu1"],"title":"Resolving Implementations"}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/Resolving/resolve(_:)-82xu1":{"abstract":[{"text":"Resolves a type from this container.","type":"text"}],"role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":".Type) -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-82xu1","title":"resolve(_:)","url":"\/documentation\/factory\/resolving\/resolve(_:)-82xu1","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Resolving/resolve(_:)-6wtxp":{"abstract":[{"text":"Resolves a type from this container.","type":"text"}],"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"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"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-6wtxp","title":"resolve(_:)","defaultImplementations":1,"url":"\/documentation\/factory\/resolving\/resolve(_:)-6wtxp","required":true,"type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Resolving":{"title":"Resolving","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"Resolving","kind":"identifier"}],"url":"\/documentation\/factory\/resolving","navigatorTitle":[{"kind":"identifier","text":"Resolving"}],"abstract":[{"text":"When protocol is applied to a container it enables a typed registration\/resolution mode.","type":"text"}]}}} \ 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 ab6e3500..794fa2d8 100644 --- a/docs/data/documentation/factory/resolving/resolve(_:)-82xu1.json +++ b/docs/data/documentation/factory/resolving/resolve(_:)-82xu1.json @@ -1 +1 @@ -{"sections":[],"abstract":[{"type":"text","text":"Resolves a type from this container."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-82xu1","interfaceLanguage":"swift"},"metadata":{"roleHeading":"Instance Method","role":"symbol","extendedModule":"Factory","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":".Type) -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}],"symbolKind":"method","title":"resolve(_:)","modules":[{"name":"Factory"}],"externalID":"s:7Factory9ResolvingPAAE7resolveyqd__Sgqd__mlF"},"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"type"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"},{"text":".Type = T.self) -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"platforms":["macOS"]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Resolving","doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-6wtxp"]]},"variants":[{"paths":["\/documentation\/factory\/resolving\/resolve(_:)-82xu1"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Resolving/resolve(_:)-82xu1":{"abstract":[{"type":"text","text":"Resolves a type from this container."}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/resolving\/resolve(_:)-82xu1","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-82xu1","title":"resolve(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolve"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":".Type) -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}]},"doc://Factory/documentation/Factory/Resolving":{"kind":"symbol","role":"symbol","url":"\/documentation\/factory\/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"},{"text":"Resolving","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"Resolving"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","title":"Resolving"},"doc://Factory/documentation/Factory/Resolving/resolve(_:)-6wtxp":{"required":true,"role":"symbol","abstract":[{"text":"Resolves a type from this container.","type":"text"}],"url":"\/documentation\/factory\/resolving\/resolve(_:)-6wtxp","type":"topic","title":"resolve(_:)","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":".Type) -> "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}],"defaultImplementations":1,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-6wtxp"}}} \ No newline at end of file +{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-82xu1","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/resolving\/resolve(_:)-82xu1"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Resolving","doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-6wtxp"]]},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"type"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":".Type = T.self) -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}]}],"kind":"declarations"}],"sections":[],"abstract":[{"text":"Resolves a type from this container.","type":"text"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"modules":[{"name":"Factory"}],"title":"resolve(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"<"},{"text":"T","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"typeIdentifier","text":"T"},{"text":".Type) -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"extendedModule":"Factory","roleHeading":"Instance Method","role":"symbol","externalID":"s:7Factory9ResolvingPAAE7resolveyqd__Sgqd__mlF","symbolKind":"method"},"kind":"symbol","references":{"doc://Factory/documentation/Factory/Resolving":{"title":"Resolving","identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"Resolving","kind":"identifier"}],"url":"\/documentation\/factory\/resolving","navigatorTitle":[{"kind":"identifier","text":"Resolving"}],"abstract":[{"text":"When protocol is applied to a container it enables a typed registration\/resolution mode.","type":"text"}]},"doc://Factory/documentation/Factory/Resolving/resolve(_:)-6wtxp":{"abstract":[{"text":"Resolves a type from this container.","type":"text"}],"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"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"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-6wtxp","title":"resolve(_:)","defaultImplementations":1,"url":"\/documentation\/factory\/resolving\/resolve(_:)-6wtxp","required":true,"type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Resolving/resolve(_:)-82xu1":{"abstract":[{"text":"Resolves a type from this container.","type":"text"}],"role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">(","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":".Type) -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Resolving\/resolve(_:)-82xu1","title":"resolve(_:)","url":"\/documentation\/factory\/resolving\/resolve(_:)-82xu1","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/scope.json b/docs/data/documentation/factory/scope.json index 99382082..004948d1 100644 --- a/docs/data/documentation/factory/scope.json +++ b/docs/data/documentation/factory/scope.json @@ -1 +1 @@ -{"seeAlsoSections":[{"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,"title":"Scope Class Definitions"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"variants":[{"paths":["\/documentation\/factory\/scope"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"type":"codeVoice","code":"Cached"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"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"}],"relationshipsSections":[{"type":"inheritedBy","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","kind":"relationships"},{"type":"conformsTo","kind":"relationships","identifiers":["doc:\/\/Factory\/s8SendableP"],"title":"Conforms To"}],"metadata":{"role":"symbol","symbolKind":"class","roleHeading":"Class","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"externalID":"s:7Factory5ScopeC","title":"Scope","modules":[{"name":"Factory"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}]},"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Scope"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"},{"kind":"content","content":[{"level":2,"text":"Overview","anchor":"overview","type":"heading"},{"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"},{"text":"is cached. The next time that Factory is resolved a reference to the originally cached object will be returned.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"That behavior can vary according to the scope type (e.g. Shared or Graph)","type":"text"}]},{"code":["extension Container {"," var service: Factory {"," self { MyService() }"," .singleton"," }","}"],"syntax":"swift","type":"codeListing"},{"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"},{"type":"text","text":"will all of its cached references."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"If no scope is associated with a given Factory then the scope is considered to be unique and a new instance"},{"type":"text","text":" "},{"type":"text","text":"of the dependency will be created each and every time that factory is resolved."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Class is @unchecked Sendable as all public state is managed via global locking mechanisms"}]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope","interfaceLanguage":"swift"},"kind":"symbol","sections":[],"references":{"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/unique-swift.class","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"title":"Scope.Unique","type":"topic"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Singleton"}],"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/Scopes":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","title":"Scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"url":"\/documentation\/factory\/scopes","kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/Scope/shared-swift.type.property":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/shared-swift.type.property","type":"topic","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier","text":"Scope"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory5ScopeC6SharedC","text":"Shared","kind":"typeIdentifier"}],"abstract":[{"text":"A reference to the default shared scope manager.","type":"text"}],"title":"shared","kind":"symbol","url":"\/documentation\/factory\/scope\/shared-swift.type.property","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"navigatorTitle":[{"text":"Cached","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/cached-swift.class","type":"topic","title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}]},"doc://Factory/documentation/Factory/Scope/singleton-swift.type.property":{"url":"\/documentation\/factory\/scope\/singleton-swift.type.property","role":"symbol","type":"topic","title":"singleton","abstract":[{"text":"A reference to the default singleton scope manager.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/singleton-swift.type.property","kind":"symbol","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","kind":"typeIdentifier","text":"Scope"},{"text":".","kind":"text"},{"text":"Singleton","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC9SingletonC"}]},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/graph-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scope/unique-swift.type.property":{"fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"unique"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC","text":"Scope","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory5ScopeC6UniqueC","kind":"typeIdentifier","text":"Unique"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/unique-swift.type.property","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/unique-swift.type.property","title":"unique","role":"symbol","type":"topic","abstract":[{"text":"A reference to the default unique scope.","type":"text"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"title":"Scope.Shared","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/scope\/shared-swift.class","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","navigatorTitle":[{"kind":"identifier","text":"Shared"}]},"doc://Factory/documentation/Factory/Scope/cached-swift.type.property":{"title":"cached","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC6CachedC","text":"Cached","kind":"typeIdentifier"}],"kind":"symbol","type":"topic","abstract":[{"type":"text","text":"A reference to the default cached scope manager."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/cached-swift.type.property","role":"symbol","url":"\/documentation\/factory\/scope\/cached-swift.type.property"},"doc://Factory/documentation/Factory/Scope/graph-swift.type.property":{"type":"topic","kind":"symbol","abstract":[{"text":"A reference to the default graph scope manager.","type":"text"}],"title":"graph","url":"\/documentation\/factory\/scope\/graph-swift.type.property","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/graph-swift.type.property","role":"symbol","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"text":"Graph","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC5GraphC"}]},"doc://Factory/s8SendableP":{"identifier":"doc:\/\/Factory\/s8SendableP","title":"Swift.Sendable","type":"unresolvable"}}} \ No newline at end of file +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Scope"},"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}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"relationshipsSections":[{"title":"Inherited By","kind":"relationships","type":"inheritedBy","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":"conformsTo","title":"Conforms To","identifiers":["doc:\/\/Factory\/s8SendableP"],"kind":"relationships"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope"]}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Scope","kind":"identifier"}],"languages":["swift"]}],"kind":"declarations"},{"kind":"content","content":[{"anchor":"overview","level":2,"text":"Overview","type":"heading"},{"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"},{"type":"text","text":" "},{"text":"is cached. The next time that Factory is resolved a reference to the originally cached object will be returned.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"That behavior can vary according to the scope type (e.g. Shared or Graph)"}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var service: Factory {"," self { MyService() }"," .singleton"," }","}"]},{"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"}],"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"},{"text":" ","type":"text"},{"text":"of the dependency will be created each and every time that factory is resolved.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Class is @unchecked Sendable as all public state is managed via global locking mechanisms"}]}]}],"sections":[],"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"type":"text","text":"including "},{"type":"codeVoice","code":"Singleton"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"type":"text","text":", "},{"code":"Graph","type":"codeVoice"},{"text":", and ","type":"text"},{"type":"codeVoice","code":"Shared"},{"text":".","type":"text"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"modules":[{"name":"Factory"}],"title":"Scope","navigatorTitle":[{"kind":"identifier","text":"Scope"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"symbolKind":"class","role":"symbol","roleHeading":"Class","externalID":"s:7Factory5ScopeC"},"kind":"symbol","topicSections":[{"title":"Type Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/cached-swift.type.property","doc:\/\/Factory\/documentation\/Factory\/Scope\/graph-swift.type.property","doc:\/\/Factory\/documentation\/Factory\/Scope\/shared-swift.type.property","doc:\/\/Factory\/documentation\/Factory\/Scope\/singleton-swift.type.property","doc:\/\/Factory\/documentation\/Factory\/Scope\/unique-swift.type.property"]}],"references":{"doc://Factory/s8SendableP":{"type":"unresolvable","identifier":"doc:\/\/Factory\/s8SendableP","title":"Swift.Sendable"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/cached-swift.class","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/Scope/shared-swift.type.property":{"url":"\/documentation\/factory\/scope\/shared-swift.type.property","role":"symbol","type":"topic","kind":"symbol","abstract":[{"type":"text","text":"A reference to the default shared scope manager."}],"title":"shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/shared-swift.type.property","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC","text":"Scope","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory5ScopeC6SharedC","text":"Shared","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}]},"doc://Factory/documentation/Factory/Scope/unique-swift.type.property":{"role":"symbol","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"unique","kind":"identifier"},{"kind":"text","text":": "},{"text":"Scope","preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC6UniqueC","text":"Unique"}],"title":"unique","abstract":[{"type":"text","text":"A reference to the default unique scope."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/unique-swift.type.property","url":"\/documentation\/factory\/scope\/unique-swift.type.property","kind":"symbol","type":"topic"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/cached-swift.type.property":{"url":"\/documentation\/factory\/scope\/cached-swift.type.property","title":"cached","type":"topic","abstract":[{"type":"text","text":"A reference to the default cached scope manager."}],"fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier","text":"Scope"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC6CachedC","text":"Cached","kind":"typeIdentifier"}],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/cached-swift.type.property"},"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."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/singleton-swift.type.property","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC9SingletonC","text":"Singleton"}]},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","type":"topic","abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"title":"Scope.Unique","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scope/graph-swift.type.property":{"abstract":[{"text":"A reference to the default graph scope manager.","type":"text"}],"role":"symbol","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Graph","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"}}} \ 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 2fd4bbba..a69b22a3 100644 --- a/docs/data/documentation/factory/scope/cached-swift.class.json +++ b/docs/data/documentation/factory/scope/cached-swift.class.json @@ -1 +1 @@ -{"relationshipsSections":[{"kind":"relationships","type":"inheritsFrom","title":"Inherits From","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"]},{"type":"conformsTo","kind":"relationships","identifiers":["doc:\/\/Factory\/s8SendableP"],"title":"Conforms To"}],"variants":[{"paths":["\/documentation\/factory\/scope\/cached-swift.class"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"final"},{"text":" ","kind":"text"},{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Cached","kind":"identifier"}],"platforms":["macOS"]}],"kind":"declarations"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"metadata":{"roleHeading":"Class","externalID":"s:7Factory5ScopeC6CachedC","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Cached"}],"navigatorTitle":[{"kind":"identifier","text":"Cached"}],"symbolKind":"class","extendedModule":"Factory","title":"Scope.Cached","modules":[{"name":"Factory"}]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","interfaceLanguage":"swift"},"sections":[],"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class\/init()"],"title":"Initializers"}],"schemaVersion":{"minor":3,"patch":0,"major":0},"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"]}],"kind":"symbol","abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"references":{"doc://Factory/documentation/Factory/Scopes":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","title":"Scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"url":"\/documentation\/factory\/scopes","kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/graph-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class/init()":{"type":"topic","role":"symbol","fragments":[{"kind":"identifier","text":"init"},{"text":"()","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class\/init()","url":"\/documentation\/factory\/scope\/cached-swift.class\/init()","title":"init()","kind":"symbol","abstract":[]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Singleton"}],"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/s8SendableP":{"type":"unresolvable","identifier":"doc:\/\/Factory\/s8SendableP","title":"Swift.Sendable"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"title":"Scope.Shared","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/scope\/shared-swift.class","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","navigatorTitle":[{"kind":"identifier","text":"Shared"}]},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/unique-swift.class","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"title":"Scope.Unique","type":"topic"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"navigatorTitle":[{"text":"Cached","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/cached-swift.class","type":"topic","title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}]}}} \ No newline at end of file +{"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"]}],"variants":[{"paths":["\/documentation\/factory\/scope\/cached-swift.class"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"final","kind":"keyword"},{"kind":"text","text":" "},{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Cached","kind":"identifier"}],"platforms":["macOS"]}]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class\/init()"],"title":"Initializers"}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"kind":"symbol","abstract":[{"type":"text","text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset."}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","interfaceLanguage":"swift"},"metadata":{"role":"symbol","extendedModule":"Factory","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"modules":[{"name":"Factory"}],"roleHeading":"Class","symbolKind":"class","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Cached","kind":"identifier"}],"title":"Scope.Cached","externalID":"s:7Factory5ScopeC6CachedC"},"relationshipsSections":[{"type":"inheritsFrom","title":"Inherits From","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"],"kind":"relationships"},{"title":"Conforms To","identifiers":["doc:\/\/Factory\/s8SendableP"],"type":"conformsTo","kind":"relationships"}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"title":"Scope.Unique","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/s8SendableP":{"identifier":"doc:\/\/Factory\/s8SendableP","title":"Swift.Sendable","type":"unresolvable"},"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/cached-swift.class","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","type":"topic","abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class/init()":{"type":"topic","title":"init()","abstract":[],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class\/init()","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"url":"\/documentation\/factory\/scope\/cached-swift.class\/init()"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}]}}} \ 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 0ea717e8..0d70e00a 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 @@ -{"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"override","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"init"},{"kind":"text","text":"()"}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/cached-swift.class\/init()"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class\/init()"},"metadata":{"symbolKind":"init","externalID":"s:7Factory5ScopeC6CachedCAEycfc","roleHeading":"Initializer","role":"symbol","modules":[{"name":"Factory"}],"fragments":[{"kind":"identifier","text":"init"},{"text":"()","kind":"text"}],"title":"init()"},"sections":[],"references":{"doc://Factory/documentation/Factory/Scopes":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","title":"Scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"url":"\/documentation\/factory\/scopes","kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class/init()":{"type":"topic","role":"symbol","fragments":[{"kind":"identifier","text":"init"},{"text":"()","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class\/init()","url":"\/documentation\/factory\/scope\/cached-swift.class\/init()","title":"init()","kind":"symbol","abstract":[]},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"navigatorTitle":[{"text":"Cached","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/cached-swift.class","type":"topic","title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}]}}} \ No newline at end of file +{"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/cached-swift.class\/init()"]}],"schemaVersion":{"major":0,"patch":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"]]},"metadata":{"roleHeading":"Initializer","title":"init()","role":"symbol","externalID":"s:7Factory5ScopeC6CachedCAEycfc","symbolKind":"init","fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"modules":[{"name":"Factory"}]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class\/init()","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"override"},{"text":" ","kind":"text"},{"text":"init","kind":"keyword"},{"text":"()","kind":"text"}]}],"kind":"declarations"}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/cached-swift.class","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}]},"doc://Factory/documentation/Factory/Scope/Cached-swift.class/init()":{"type":"topic","title":"init()","abstract":[],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class\/init()","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"url":"\/documentation\/factory\/scope\/cached-swift.class\/init()"}}} \ 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 7c11da3b..88572932 100644 --- a/docs/data/documentation/factory/scope/cached-swift.type.property.json +++ b/docs/data/documentation/factory/scope/cached-swift.type.property.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"cached","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC6CachedC","text":"Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class"}],"languages":["swift"],"platforms":["macOS"]}]}],"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/cached-swift.type.property","interfaceLanguage":"swift"},"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"}],"schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"role":"symbol","title":"cached","externalID":"s:7Factory5ScopeC6cachedAC6CachedCvpZ","roleHeading":"Type Property","modules":[{"name":"Factory"}],"extendedModule":"Factory","symbolKind":"property","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"cached","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier","text":"Scope"},{"text":".","kind":"text"},{"text":"Cached","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC6CachedC"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"references":{"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Scopes":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","title":"Scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"url":"\/documentation\/factory\/scopes","kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"navigatorTitle":[{"text":"Cached","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/cached-swift.class","type":"topic","title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}]},"doc://Factory/documentation/Factory/Scope/cached-swift.type.property":{"title":"cached","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC6CachedC","text":"Cached","kind":"typeIdentifier"}],"kind":"symbol","type":"topic","abstract":[{"type":"text","text":"A reference to the default cached scope manager."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/cached-swift.type.property","role":"symbol","url":"\/documentation\/factory\/scope\/cached-swift.type.property"}}} \ No newline at end of file +{"metadata":{"fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"cached"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"text":".","kind":"text"},{"text":"Cached","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC6CachedC"}],"title":"cached","externalID":"s:7Factory5ScopeC6cachedAC6CachedCvpZ","symbolKind":"property","modules":[{"name":"Factory"}],"role":"symbol","extendedModule":"Factory","roleHeading":"Type Property"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/cached-swift.type.property","interfaceLanguage":"swift"},"schemaVersion":{"minor":3,"major":0,"patch":0},"sections":[],"abstract":[{"text":"A reference to the default cached scope manager.","type":"text"}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier","text":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"kind":"text","text":"."},{"text":"Cached","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","preciseIdentifier":"s:7Factory5ScopeC6CachedC"}],"languages":["swift"],"platforms":["macOS"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/cached-swift.type.property"]}],"references":{"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/cached-swift.class","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}]},"doc://Factory/documentation/Factory/Scope/cached-swift.type.property":{"url":"\/documentation\/factory\/scope\/cached-swift.type.property","title":"cached","type":"topic","abstract":[{"type":"text","text":"A reference to the default cached scope manager."}],"fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"cached"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier","text":"Scope"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC6CachedC","text":"Cached","kind":"typeIdentifier"}],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/cached-swift.type.property"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 80bf93c2..f1270691 100644 --- a/docs/data/documentation/factory/scope/graph-swift.class.json +++ b/docs/data/documentation/factory/scope/graph-swift.class.json @@ -1 +1 @@ -{"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/graph-swift.class"]}],"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class\/init()"]}],"metadata":{"navigatorTitle":[{"text":"Graph","kind":"identifier"}],"externalID":"s:7Factory5ScopeC5GraphC","roleHeading":"Class","title":"Scope.Graph","extendedModule":"Factory","modules":[{"name":"Factory"}],"symbolKind":"class","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"role":"symbol"},"relationshipsSections":[{"type":"inheritsFrom","kind":"relationships","title":"Inherits From","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"]},{"identifiers":["doc:\/\/Factory\/s8SendableP"],"kind":"relationships","title":"Conforms To","type":"conformsTo"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"seeAlsoSections":[{"title":"Scope Class Definitions","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope","doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class"],"generated":true}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"final","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"languages":["swift"]}],"kind":"declarations"},{"kind":"content","content":[{"text":"Overview","anchor":"overview","type":"heading","level":2},{"inlineContent":[{"type":"text","text":"This scope is managed and cleared by the main resolution function at the end of each resolution cycle."}],"type":"paragraph"}]}],"references":{"doc://Factory/documentation/Factory/Scope/Graph-swift.class/init()":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class\/init()","fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"role":"symbol","abstract":[],"title":"init()","type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.class\/init()"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Singleton"}],"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/Scopes":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","title":"Scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"url":"\/documentation\/factory\/scopes","kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/graph-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"navigatorTitle":[{"text":"Cached","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/cached-swift.class","type":"topic","title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}]},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"title":"Scope.Shared","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/scope\/shared-swift.class","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","navigatorTitle":[{"kind":"identifier","text":"Shared"}]},"doc://Factory/s8SendableP":{"title":"Swift.Sendable","identifier":"doc:\/\/Factory\/s8SendableP","type":"unresolvable"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/unique-swift.class","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"title":"Scope.Unique","type":"topic"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"relationshipsSections":[{"type":"inheritsFrom","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"],"kind":"relationships","title":"Inherits From"},{"identifiers":["doc:\/\/Factory\/s8SendableP"],"title":"Conforms To","kind":"relationships","type":"conformsTo"}],"metadata":{"symbolKind":"class","role":"symbol","roleHeading":"Class","title":"Scope.Graph","externalID":"s:7Factory5ScopeC5GraphC","extendedModule":"Factory","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"navigatorTitle":[{"text":"Graph","kind":"identifier"}]},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","interfaceLanguage":"swift"},"kind":"symbol","schemaVersion":{"minor":3,"major":0,"patch":0},"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class\/init()"],"title":"Initializers"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"final","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Graph","kind":"identifier"}]}]},{"content":[{"text":"Overview","level":2,"anchor":"overview","type":"heading"},{"type":"paragraph","inlineContent":[{"text":"This scope is managed and cleared by the main resolution function at the end of each resolution cycle.","type":"text"}]}],"kind":"content"}],"variants":[{"paths":["\/documentation\/factory\/scope\/graph-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\/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}],"abstract":[{"text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle.","type":"text"}],"references":{"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","type":"topic","abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class/init()":{"url":"\/documentation\/factory\/scope\/graph-swift.class\/init()","type":"topic","abstract":[],"title":"init()","fragments":[{"kind":"identifier","text":"init"},{"text":"()","kind":"text"}],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class\/init()"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"title":"Scope.Unique","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/cached-swift.class","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}]},"doc://Factory/s8SendableP":{"identifier":"doc:\/\/Factory\/s8SendableP","title":"Swift.Sendable","type":"unresolvable"}}} \ 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 eb187a5d..ac7dfd31 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 @@ -{"metadata":{"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"symbolKind":"init","role":"symbol","title":"init()","externalID":"s:7Factory5ScopeC5GraphCAEycfc","modules":[{"name":"Factory"}],"roleHeading":"Initializer"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/graph-swift.class\/init()"]}],"kind":"symbol","sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class\/init()","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"override","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"init"},{"text":"()","kind":"text"}],"languages":["swift"]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class/init()":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class\/init()","fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"role":"symbol","abstract":[],"title":"init()","type":"topic","url":"\/documentation\/factory\/scope\/graph-swift.class\/init()"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/graph-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","title":"Scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"url":"\/documentation\/factory\/scopes","kind":"article","role":"collectionGroup"}}} \ No newline at end of file +{"metadata":{"modules":[{"name":"Factory"}],"title":"init()","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"symbolKind":"init","role":"symbol","roleHeading":"Initializer","externalID":"s:7Factory5ScopeC5GraphCAEycfc"},"sections":[],"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class\/init()"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"override"},{"kind":"text","text":" "},{"text":"init","kind":"keyword"},{"kind":"text","text":"()"}],"platforms":["macOS"]}],"kind":"declarations"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/graph-swift.class\/init()"]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","type":"topic","abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}]},"doc://Factory/documentation/Factory/Scope/Graph-swift.class/init()":{"url":"\/documentation\/factory\/scope\/graph-swift.class\/init()","type":"topic","abstract":[],"title":"init()","fragments":[{"kind":"identifier","text":"init"},{"text":"()","kind":"text"}],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class\/init()"}}} \ 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 0beb2019..bcd7873a 100644 --- a/docs/data/documentation/factory/scope/graph-swift.type.property.json +++ b/docs/data/documentation/factory/scope/graph-swift.type.property.json @@ -1 +1 @@ -{"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"text":"graph","kind":"identifier"},{"kind":"text","text":": "},{"text":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC5GraphC","text":"Graph","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"}],"languages":["swift"]}],"kind":"declarations"}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"schemaVersion":{"minor":3,"major":0,"patch":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/graph-swift.type.property"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/graph-swift.type.property","interfaceLanguage":"swift"},"sections":[],"metadata":{"extendedModule":"Factory","roleHeading":"Type Property","title":"graph","modules":[{"name":"Factory"}],"externalID":"s:7Factory5ScopeC5graphAC5GraphCvpZ","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Graph","preciseIdentifier":"s:7Factory5ScopeC5GraphC"}],"symbolKind":"property","role":"symbol"},"abstract":[{"text":"A reference to the default graph scope manager.","type":"text"}],"references":{"doc://Factory/documentation/Factory/Scope/graph-swift.type.property":{"type":"topic","kind":"symbol","abstract":[{"text":"A reference to the default graph scope manager.","type":"text"}],"title":"graph","url":"\/documentation\/factory\/scope\/graph-swift.type.property","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/graph-swift.type.property","role":"symbol","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"text":"Graph","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC5GraphC"}]},"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/graph-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","title":"Scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"url":"\/documentation\/factory\/scopes","kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"abstract":[{"text":"A reference to the default graph scope manager.","type":"text"}],"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/graph-swift.type.property"]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","text":"Scope"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory5ScopeC5GraphC","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","text":"Graph"}]}]}],"schemaVersion":{"patch":0,"minor":3,"major":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/graph-swift.type.property","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"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","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"text":".","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC5GraphC","text":"Graph","kind":"typeIdentifier"}],"symbolKind":"property","title":"graph","roleHeading":"Type Property","modules":[{"name":"Factory"}],"externalID":"s:7Factory5ScopeC5graphAC5GraphCvpZ","extendedModule":"Factory"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"references":{"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}]},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","type":"topic","abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory/Scope/graph-swift.type.property":{"abstract":[{"text":"A reference to the default graph scope manager.","type":"text"}],"role":"symbol","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"graph"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Graph","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"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]}}} \ 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 bf8e1340..b1feeb8f 100644 --- a/docs/data/documentation/factory/scope/shared-swift.class.json +++ b/docs/data/documentation/factory/scope/shared-swift.class.json @@ -1 +1 @@ -{"kind":"symbol","relationshipsSections":[{"kind":"relationships","type":"inheritsFrom","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"],"title":"Inherits From"},{"kind":"relationships","title":"Conforms To","type":"conformsTo","identifiers":["doc:\/\/Factory\/s8SendableP"]}],"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"],"title":"Scope Class Definitions","generated":true}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"final","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"languages":["swift"]}],"kind":"declarations"}],"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class\/init()"]}],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class"},"schemaVersion":{"major":0,"minor":3,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/shared-swift.class"]}],"sections":[],"metadata":{"roleHeading":"Class","extendedModule":"Factory","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"text":"Shared","kind":"identifier"}],"symbolKind":"class","title":"Scope.Shared","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"externalID":"s:7Factory5ScopeC6SharedC","role":"symbol","modules":[{"name":"Factory"}]},"references":{"doc://Factory/documentation/Factory/Scopes":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","title":"Scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"url":"\/documentation\/factory\/scopes","kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/graph-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class/init()":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class\/init()","type":"topic","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"abstract":[],"title":"init()","url":"\/documentation\/factory\/scope\/shared-swift.class\/init()","kind":"symbol","role":"symbol"},"doc://Factory/s8SendableP":{"type":"unresolvable","identifier":"doc:\/\/Factory\/s8SendableP","title":"Swift.Sendable"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"navigatorTitle":[{"text":"Cached","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/cached-swift.class","type":"topic","title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"title":"Scope.Shared","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/scope\/shared-swift.class","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","navigatorTitle":[{"kind":"identifier","text":"Shared"}]},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Singleton"}],"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/unique-swift.class","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"title":"Scope.Unique","type":"topic"}}} \ No newline at end of file +{"schemaVersion":{"major":0,"minor":3,"patch":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/shared-swift.class"]}],"kind":"symbol","sections":[],"abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class\/init()"],"title":"Initializers"}],"relationshipsSections":[{"type":"inheritsFrom","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"],"kind":"relationships","title":"Inherits From"},{"kind":"relationships","identifiers":["doc:\/\/Factory\/s8SendableP"],"type":"conformsTo","title":"Conforms To"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"final","kind":"keyword"},{"text":" ","kind":"text"},{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Shared"}]}]}],"metadata":{"roleHeading":"Class","externalID":"s:7Factory5ScopeC6SharedC","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"Shared"}],"extendedModule":"Factory","title":"Scope.Shared","modules":[{"name":"Factory"}],"symbolKind":"class"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"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"],"title":"Scope Class Definitions","generated":true}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class"},"references":{"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"kind":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]},"doc://Factory/s8SendableP":{"title":"Swift.Sendable","identifier":"doc:\/\/Factory\/s8SendableP","type":"unresolvable"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/cached-swift.class","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class/init()":{"abstract":[],"kind":"symbol","role":"symbol","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"type":"topic","title":"init()","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class\/init()","url":"\/documentation\/factory\/scope\/shared-swift.class\/init()"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","type":"topic","abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"title":"Scope.Unique","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}]}}} \ 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 7dde6730..3a464bb5 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 @@ -{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/shared-swift.class\/init()"]}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class\/init()","interfaceLanguage":"swift"},"kind":"symbol","schemaVersion":{"major":0,"patch":0,"minor":3},"metadata":{"roleHeading":"Initializer","externalID":"s:7Factory5ScopeC6SharedCAEycfc","fragments":[{"kind":"identifier","text":"init"},{"text":"()","kind":"text"}],"title":"init()","symbolKind":"init","role":"symbol","modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"override","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"init"},{"text":"()","kind":"text"}],"platforms":["macOS"]}]}],"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Scopes":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","title":"Scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"url":"\/documentation\/factory\/scopes","kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class/init()":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class\/init()","type":"topic","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"abstract":[],"title":"init()","url":"\/documentation\/factory\/scope\/shared-swift.class\/init()","kind":"symbol","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"title":"Scope.Shared","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/scope\/shared-swift.class","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","navigatorTitle":[{"kind":"identifier","text":"Shared"}]}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"override"},{"text":" ","kind":"text"},{"kind":"keyword","text":"init"},{"text":"()","kind":"text"}],"platforms":["macOS"]}]}],"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/scope\/shared-swift.class\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class"]]},"sections":[],"metadata":{"role":"symbol","modules":[{"name":"Factory"}],"symbolKind":"init","roleHeading":"Initializer","fragments":[{"kind":"identifier","text":"init"},{"text":"()","kind":"text"}],"title":"init()","externalID":"s:7Factory5ScopeC6SharedCAEycfc"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class\/init()","interfaceLanguage":"swift"},"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory/Scope/Shared-swift.class/init()":{"abstract":[],"kind":"symbol","role":"symbol","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"type":"topic","title":"init()","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class\/init()","url":"\/documentation\/factory\/scope\/shared-swift.class\/init()"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"kind":"symbol"}}} \ 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 d57fd013..8c6e95d9 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 @@ -{"sections":[],"metadata":{"roleHeading":"Type Property","extendedModule":"Factory","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory5ScopeC","text":"Scope","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Shared","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC6SharedC"}],"symbolKind":"property","title":"shared","externalID":"s:7Factory5ScopeC6sharedAC6SharedCvpZ","modules":[{"name":"Factory"}],"role":"symbol"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"schemaVersion":{"major":0,"patch":0,"minor":3},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/shared-swift.type.property","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"A reference to the default shared scope manager."}],"variants":[{"paths":["\/documentation\/factory\/scope\/shared-swift.type.property"],"traits":[{"interfaceLanguage":"swift"}]}],"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","text":"Scope"},{"text":".","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","kind":"typeIdentifier","text":"Shared","preciseIdentifier":"s:7Factory5ScopeC6SharedC"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"title":"Scope.Shared","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/scope\/shared-swift.class","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","navigatorTitle":[{"kind":"identifier","text":"Shared"}]},"doc://Factory/documentation/Factory/Scope/shared-swift.type.property":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/shared-swift.type.property","type":"topic","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier","text":"Scope"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory5ScopeC6SharedC","text":"Shared","kind":"typeIdentifier"}],"abstract":[{"text":"A reference to the default shared scope manager.","type":"text"}],"title":"shared","kind":"symbol","url":"\/documentation\/factory\/scope\/shared-swift.type.property","role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","title":"Scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"url":"\/documentation\/factory\/scopes","kind":"article","role":"collectionGroup"}}} \ No newline at end of file +{"abstract":[{"text":"A reference to the default shared scope manager.","type":"text"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","preciseIdentifier":"s:7Factory5ScopeC6SharedC","text":"Shared"}],"languages":["swift"]}],"kind":"declarations"}],"kind":"symbol","metadata":{"role":"symbol","roleHeading":"Type Property","symbolKind":"property","extendedModule":"Factory","modules":[{"name":"Factory"}],"title":"shared","externalID":"s:7Factory5ScopeC6sharedAC6SharedCvpZ","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Shared","preciseIdentifier":"s:7Factory5ScopeC6SharedC"}]},"variants":[{"paths":["\/documentation\/factory\/scope\/shared-swift.type.property"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/shared-swift.type.property"},"sections":[],"references":{"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/Scope/shared-swift.type.property":{"url":"\/documentation\/factory\/scope\/shared-swift.type.property","role":"symbol","type":"topic","kind":"symbol","abstract":[{"type":"text","text":"A reference to the default shared scope manager."}],"title":"shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/shared-swift.type.property","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC","text":"Scope","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory5ScopeC6SharedC","text":"Shared","kind":"typeIdentifier"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}]}}} \ 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 8c610b50..986ea079 100644 --- a/docs/data/documentation/factory/scope/singleton-swift.class.json +++ b/docs/data/documentation/factory/scope/singleton-swift.class.json @@ -1 +1 @@ -{"abstract":[{"type":"text","text":"Defines the singleton scope. The same instance will always be returned by the factory."}],"kind":"symbol","metadata":{"symbolKind":"class","externalID":"s:7Factory5ScopeC9SingletonC","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"roleHeading":"Class","modules":[{"name":"Factory"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Singleton","kind":"identifier"}],"extendedModule":"Factory","role":"symbol","title":"Scope.Singleton"},"variants":[{"paths":["\/documentation\/factory\/scope\/singleton-swift.class"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","interfaceLanguage":"swift"},"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()"]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"sections":[],"relationshipsSections":[{"title":"Inherits From","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"],"type":"inheritsFrom","kind":"relationships"},{"kind":"relationships","identifiers":["doc:\/\/Factory\/s8SendableP"],"title":"Conforms To","type":"conformsTo"}],"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\/Unique-swift.class"],"generated":true}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"final","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Singleton"}]}]}],"references":{"doc://Factory/documentation/Factory/Scope/Singleton-swift.class/reset()":{"abstract":[{"text":"Reset","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/reset()","role":"symbol","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"text":"()","kind":"text"}],"title":"reset()","url":"\/documentation\/factory\/scope\/singleton-swift.class\/reset()","type":"topic"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/unique-swift.class","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"title":"Scope.Unique","type":"topic"},"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","title":"Scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"url":"\/documentation\/factory\/scopes","kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/graph-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"navigatorTitle":[{"text":"Cached","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/cached-swift.class","type":"topic","title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}]},"doc://Factory/s8SendableP":{"identifier":"doc:\/\/Factory\/s8SendableP","title":"Swift.Sendable","type":"unresolvable"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"title":"Scope.Shared","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/scope\/shared-swift.class","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","navigatorTitle":[{"kind":"identifier","text":"Shared"}]},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class/init()":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/init()","type":"topic","fragments":[{"kind":"identifier","text":"init"},{"text":"()","kind":"text"}],"abstract":[],"title":"init()","kind":"symbol","url":"\/documentation\/factory\/scope\/singleton-swift.class\/init()","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Singleton"}],"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.class"}}} \ No newline at end of file +{"relationshipsSections":[{"type":"inheritsFrom","title":"Inherits From","kind":"relationships","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"]},{"kind":"relationships","type":"conformsTo","identifiers":["doc:\/\/Factory\/s8SendableP"],"title":"Conforms To"}],"abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/init()"]},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/reset()"]}],"kind":"symbol","metadata":{"extendedModule":"Factory","title":"Scope.Singleton","modules":[{"name":"Factory"}],"externalID":"s:7Factory5ScopeC9SingletonC","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Singleton","kind":"identifier"}],"roleHeading":"Class","symbolKind":"class","navigatorTitle":[{"text":"Singleton","kind":"identifier"}]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"final","kind":"keyword"},{"kind":"text","text":" "},{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Singleton","kind":"identifier"}]}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","interfaceLanguage":"swift"},"seeAlsoSections":[{"title":"Scope Class Definitions","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope","doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class"],"generated":true}],"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/singleton-swift.class"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/Scope/Singleton-swift.class/reset()":{"url":"\/documentation\/factory\/scope\/singleton-swift.class\/reset()","kind":"symbol","type":"topic","title":"reset()","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/reset()","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"()"}],"abstract":[{"text":"Reset","type":"text"}]},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","type":"topic","abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/s8SendableP":{"title":"Swift.Sendable","type":"unresolvable","identifier":"doc:\/\/Factory\/s8SendableP"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/cached-swift.class","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"title":"Scope.Unique","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class/init()":{"title":"init()","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/init()","kind":"symbol","role":"symbol","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class\/init()","abstract":[]},"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"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 86749b70..46a92f52 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 @@ -{"sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"override","kind":"keyword"},{"text":" ","kind":"text"},{"text":"init","kind":"keyword"},{"text":"()","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/scope\/singleton-swift.class\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/init()"},"kind":"symbol","metadata":{"roleHeading":"Initializer","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"symbolKind":"init","title":"init()","externalID":"s:7Factory5ScopeC9SingletonCAEycfc","modules":[{"name":"Factory"}],"role":"symbol"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"]]},"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class/init()":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/init()","type":"topic","fragments":[{"kind":"identifier","text":"init"},{"text":"()","kind":"text"}],"abstract":[],"title":"init()","kind":"symbol","url":"\/documentation\/factory\/scope\/singleton-swift.class\/init()","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Singleton"}],"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/Scopes":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","title":"Scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"url":"\/documentation\/factory\/scopes","kind":"article","role":"collectionGroup"}}} \ No newline at end of file +{"sections":[],"variants":[{"paths":["\/documentation\/factory\/scope\/singleton-swift.class\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"]]},"metadata":{"title":"init()","externalID":"s:7Factory5ScopeC9SingletonCAEycfc","modules":[{"name":"Factory"}],"role":"symbol","fragments":[{"text":"init","kind":"identifier"},{"text":"()","kind":"text"}],"roleHeading":"Initializer","symbolKind":"init"},"schemaVersion":{"minor":3,"major":0,"patch":0},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/init()","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"override"},{"text":" ","kind":"text"},{"kind":"keyword","text":"init"},{"text":"()","kind":"text"}],"languages":["swift"]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class/init()":{"title":"init()","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/init()","kind":"symbol","role":"symbol","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"()"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class\/init()","abstract":[]}}} \ 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 93dc5851..c2a487f4 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 @@ -{"schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/singleton-swift.class\/reset()"]}],"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"reset","kind":"identifier"},{"text":"()","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}]}],"abstract":[{"text":"Reset","type":"text"}],"kind":"symbol","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\/reset()","interfaceLanguage":"swift"},"metadata":{"roleHeading":"Instance Method","role":"symbol","modules":[{"name":"Factory"}],"externalID":"s:7Factory5ScopeC9SingletonC5resetyyF","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"reset","kind":"identifier"},{"text":"()","kind":"text"}],"title":"reset()","symbolKind":"method"},"references":{"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Scopes":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","title":"Scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"url":"\/documentation\/factory\/scopes","kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Singleton"}],"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class/reset()":{"abstract":[{"text":"Reset","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/reset()","role":"symbol","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"text":"()","kind":"text"}],"title":"reset()","url":"\/documentation\/factory\/scope\/singleton-swift.class\/reset()","type":"topic"}}} \ No newline at end of file +{"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"roleHeading":"Instance Method","modules":[{"name":"Factory"}],"symbolKind":"method","title":"reset()","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"text":"()","kind":"text"}],"externalID":"s:7Factory5ScopeC9SingletonC5resetyyF"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/reset()","interfaceLanguage":"swift"},"sections":[],"abstract":[{"type":"text","text":"Reset"}],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"()"}],"platforms":["macOS"],"languages":["swift"]}],"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()"]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}]},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class/reset()":{"url":"\/documentation\/factory\/scope\/singleton-swift.class\/reset()","kind":"symbol","type":"topic","title":"reset()","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class\/reset()","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"reset"},{"kind":"text","text":"()"}],"abstract":[{"text":"Reset","type":"text"}]}}} \ 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 132b1f4f..174dd870 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 @@ -{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/singleton-swift.type.property"},"abstract":[{"text":"A reference to the default singleton scope manager.","type":"text"}],"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","metadata":{"roleHeading":"Type Property","externalID":"s:7Factory5ScopeC9singletonAC9SingletonCvpZ","title":"singleton","symbolKind":"property","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"text":".","kind":"text"},{"text":"Singleton","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC9SingletonC"}],"role":"symbol","extendedModule":"Factory","modules":[{"name":"Factory"}]},"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":" "},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"singleton"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier","text":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","text":"Singleton","preciseIdentifier":"s:7Factory5ScopeC9SingletonC"}],"languages":["swift"]}]}],"variants":[{"paths":["\/documentation\/factory\/scope\/singleton-swift.type.property"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"references":{"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Singleton"}],"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Scopes":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","title":"Scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"url":"\/documentation\/factory\/scopes","kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory/Scope/singleton-swift.type.property":{"url":"\/documentation\/factory\/scope\/singleton-swift.type.property","role":"symbol","type":"topic","title":"singleton","abstract":[{"text":"A reference to the default singleton scope manager.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/singleton-swift.type.property","kind":"symbol","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","kind":"typeIdentifier","text":"Scope"},{"text":".","kind":"text"},{"text":"Singleton","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC9SingletonC"}]}}} \ No newline at end of file +{"kind":"symbol","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier","text":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"text":".","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","text":"Singleton","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC9SingletonC"}],"platforms":["macOS"],"languages":["swift"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/singleton-swift.type.property"]}],"sections":[],"abstract":[{"text":"A reference to the default singleton scope manager.","type":"text"}],"metadata":{"role":"symbol","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"singleton"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC","text":"Scope","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC9SingletonC","text":"Singleton"}],"title":"singleton","modules":[{"name":"Factory"}],"externalID":"s:7Factory5ScopeC9singletonAC9SingletonCvpZ","roleHeading":"Type Property","extendedModule":"Factory","symbolKind":"property"},"schemaVersion":{"minor":3,"patch":0,"major":0},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/singleton-swift.type.property","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol"},"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."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/singleton-swift.type.property","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"singleton","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC","text":"Scope"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC9SingletonC","text":"Singleton"}]}}} \ 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 6245d0d3..3cffb5a8 100644 --- a/docs/data/documentation/factory/scope/unique-swift.class.json +++ b/docs/data/documentation/factory/scope/unique-swift.class.json @@ -1 +1 @@ -{"relationshipsSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"],"kind":"relationships","title":"Inherits From","type":"inheritsFrom"},{"type":"conformsTo","identifiers":["doc:\/\/Factory\/s8SendableP"],"kind":"relationships","title":"Conforms To"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","interfaceLanguage":"swift"},"kind":"symbol","topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class\/init()"]}],"sections":[],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"final","kind":"keyword"},{"text":" ","kind":"text"},{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Unique","kind":"identifier"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/scope\/unique-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\/Singleton-swift.class"],"generated":true,"title":"Scope Class Definitions"}],"metadata":{"externalID":"s:7Factory5ScopeC6UniqueC","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}],"extendedModule":"Factory","title":"Scope.Unique","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"symbolKind":"class","role":"symbol","roleHeading":"Class","modules":[{"name":"Factory"}]},"schemaVersion":{"minor":3,"patch":0,"major":0},"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"references":{"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/graph-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/unique-swift.class","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"title":"Scope.Unique","type":"topic"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class/init()":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class\/init()","type":"topic","url":"\/documentation\/factory\/scope\/unique-swift.class\/init()","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"abstract":[],"kind":"symbol","title":"init()"},"doc://Factory/s8SendableP":{"type":"unresolvable","title":"Swift.Sendable","identifier":"doc:\/\/Factory\/s8SendableP"},"doc://Factory/documentation/Factory/Scopes":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","title":"Scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"url":"\/documentation\/factory\/scopes","kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Singleton"}],"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.class"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"title":"Scope.Shared","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/scope\/shared-swift.class","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","navigatorTitle":[{"kind":"identifier","text":"Shared"}]},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"navigatorTitle":[{"text":"Cached","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/cached-swift.class","type":"topic","title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class\/init()"]}],"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"relationshipsSections":[{"type":"inheritsFrom","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Scope"],"title":"Inherits From","kind":"relationships"},{"title":"Conforms To","identifiers":["doc:\/\/Factory\/s8SendableP"],"kind":"relationships","type":"conformsTo"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/unique-swift.class"]}],"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","interfaceLanguage":"swift"},"schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"extendedModule":"Factory","title":"Scope.Unique","role":"symbol","externalID":"s:7Factory5ScopeC6UniqueC","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Unique"}],"modules":[{"name":"Factory"}],"roleHeading":"Class","symbolKind":"class"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes"]]},"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\/Graph-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class"]}],"sections":[],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"final","kind":"keyword"},{"text":" ","kind":"text"},{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Unique"}],"platforms":["macOS"],"languages":["swift"]}]}],"references":{"doc://Factory/s8SendableP":{"type":"unresolvable","identifier":"doc:\/\/Factory\/s8SendableP","title":"Swift.Sendable"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class/init()":{"url":"\/documentation\/factory\/scope\/unique-swift.class\/init()","abstract":[],"type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class\/init()","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"role":"symbol","title":"init()"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"title":"Scope.Unique","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/cached-swift.class","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}]},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","type":"topic","abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-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 cbc54cc7..f4f957f1 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 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class"]]},"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"title":"init()","externalID":"s:7Factory5ScopeC6UniqueCAEycfc","roleHeading":"Initializer","modules":[{"name":"Factory"}],"fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"role":"symbol","symbolKind":"init"},"variants":[{"paths":["\/documentation\/factory\/scope\/unique-swift.class\/init()"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class\/init()","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"override","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"init"},{"kind":"text","text":"()"}]}],"kind":"declarations"}],"references":{"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/unique-swift.class","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"title":"Scope.Unique","type":"topic"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Scopes":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","title":"Scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"url":"\/documentation\/factory\/scopes","kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class/init()":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class\/init()","type":"topic","url":"\/documentation\/factory\/scope\/unique-swift.class\/init()","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"abstract":[],"kind":"symbol","title":"init()"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"override"},{"text":" ","kind":"text"},{"kind":"keyword","text":"init"},{"text":"()","kind":"text"}],"languages":["swift"]}]}],"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/unique-swift.class\/init()"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class"]]},"sections":[],"metadata":{"role":"symbol","modules":[{"name":"Factory"}],"roleHeading":"Initializer","symbolKind":"init","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"title":"init()","externalID":"s:7Factory5ScopeC6UniqueCAEycfc"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class\/init()"},"schemaVersion":{"minor":3,"major":0,"patch":0},"references":{"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"title":"Scope.Unique","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}]},"doc://Factory/documentation/Factory/Scope/Unique-swift.class/init()":{"url":"\/documentation\/factory\/scope\/unique-swift.class\/init()","abstract":[],"type":"topic","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class\/init()","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"()"}],"role":"symbol","title":"init()"}}} \ 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 e0755914..0f3229f0 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 @@ -{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scope\/unique-swift.type.property"]}],"kind":"symbol","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."}],"metadata":{"extendedModule":"Factory","title":"unique","modules":[{"name":"Factory"}],"roleHeading":"Type Property","externalID":"s:7Factory5ScopeC6uniqueAC6UniqueCvpZ","role":"symbol","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"text":"unique","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Scope","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory5ScopeC6UniqueC","kind":"typeIdentifier","text":"Unique"}],"symbolKind":"property"},"schemaVersion":{"patch":0,"minor":3,"major":0},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"kind":"keyword","text":"let"},{"kind":"text","text":" "},{"kind":"identifier","text":"unique"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope"},{"text":".","kind":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","kind":"typeIdentifier","text":"Unique","preciseIdentifier":"s:7Factory5ScopeC6UniqueC"}]}],"kind":"declarations"},{"content":[{"type":"heading","text":"Discussion","level":2,"anchor":"discussion"},{"inlineContent":[{"type":"text","text":"If no scope cache is specified then Factory is running in unique mode."}],"type":"paragraph"}],"kind":"content"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/unique-swift.type.property","interfaceLanguage":"swift"},"sections":[],"references":{"doc://Factory/documentation/Factory/Scopes":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","title":"Scopes","abstract":[{"text":"Not everything wants to be a Singleton. Learn the power of Scopes.","type":"text"}],"url":"\/documentation\/factory\/scopes","kind":"article","role":"collectionGroup"},"doc://Factory/documentation/Factory/Scope/unique-swift.type.property":{"fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"let"},{"text":" ","kind":"text"},{"kind":"identifier","text":"unique"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory5ScopeC","text":"Scope","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:7Factory5ScopeC6UniqueC","kind":"typeIdentifier","text":"Unique"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/unique-swift.type.property","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/unique-swift.type.property","title":"unique","role":"symbol","type":"topic","abstract":[{"text":"A reference to the default unique scope.","type":"text"}]},"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/unique-swift.class","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"title":"Scope.Unique","type":"topic"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"variants":[{"paths":["\/documentation\/factory\/scope\/unique-swift.type.property"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"role":"symbol","fragments":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"unique","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Scope","preciseIdentifier":"s:7Factory5ScopeC"},{"text":".","kind":"text"},{"text":"Unique","kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC6UniqueC"}],"roleHeading":"Type Property","title":"unique","extendedModule":"Factory","modules":[{"name":"Factory"}],"externalID":"s:7Factory5ScopeC6uniqueAC6UniqueCvpZ","symbolKind":"property"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"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"},{"preciseIdentifier":"s:7Factory5ScopeC6UniqueC","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","kind":"typeIdentifier","text":"Unique"}]}],"kind":"declarations"},{"content":[{"text":"Discussion","anchor":"discussion","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"text":"If no scope cache is specified then Factory is running in unique mode.","type":"text"}]}],"kind":"content"}],"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/Scopes","doc:\/\/Factory\/documentation\/Factory\/Scope"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Scope\/unique-swift.type.property"},"kind":"symbol","abstract":[{"text":"A reference to the default unique scope.","type":"text"}],"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/Scope/unique-swift.type.property":{"role":"symbol","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"let","kind":"keyword"},{"text":" ","kind":"text"},{"text":"unique","kind":"identifier"},{"kind":"text","text":": "},{"text":"Scope","preciseIdentifier":"s:7Factory5ScopeC","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory5ScopeC6UniqueC","text":"Unique"}],"title":"unique","abstract":[{"type":"text","text":"A reference to the default unique scope."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/unique-swift.type.property","url":"\/documentation\/factory\/scope\/unique-swift.type.property","kind":"symbol","type":"topic"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"title":"Scope.Unique","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scopes":{"title":"Scopes","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scopes","type":"topic","kind":"article","role":"collectionGroup","url":"\/documentation\/factory\/scopes","abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/scopes.json b/docs/data/documentation/factory/scopes.json index a7dd347e..fbe36088 100644 --- a/docs/data/documentation/factory/scopes.json +++ b/docs/data/documentation/factory/scopes.json @@ -1 +1 @@ -{"kind":"article","metadata":{"roleHeading":"API Collection","role":"collectionGroup","modules":[{"name":"Factory"}],"title":"Scopes"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"abstract":[{"type":"text","text":"Not everything wants to be a Singleton. Learn the power of Scopes."}],"sections":[],"seeAlsoSections":[{"generated":true,"title":"The Basics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/GettingStarted","doc:\/\/Factory\/documentation\/Factory\/Containers"]}],"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","type":"heading","level":2,"text":"Overview"},{"inlineContent":[{"type":"text","text":"If you’ve used Resolver or some other dependency injection system before then you’ve probably experienced the benefits and power of scopes."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"And if not, the concept is easy to understand: Just how long should an instance of an object live?","type":"text"}]},{"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"}]},{"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"},{"syntax":"swift","code":["let a = container.myService()","let b = container.myService()"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"When we do this, both "},{"type":"codeVoice","code":"a"},{"text":" and ","type":"text"},{"code":"b","type":"codeVoice"},{"type":"text","text":" refer to the same instance."}]},{"type":"paragraph","inlineContent":[{"text":"Singletons are easy to create, but they should be used with care. Like static singletons you might create in your own code, using singleton scopes can become problematic when testing your code and often require special handling. See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","isActive":true},{"text":" for more information on how to handle this.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Another issue to keep in mind is that singletons are global, meaning that they’re "},{"type":"emphasis","inlineContent":[{"type":"text","text":"not"}]},{"text":" managed or cached by any specific container. If we create two instances of the above container and resolve ","type":"text"},{"type":"codeVoice","code":"myService"},{"type":"text","text":" from both, we’ll get the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"same"}]},{"text":" instance from both.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Then again, that’s kind of the idea, isn’t it?"}]},{"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"},{"inlineContent":[{"type":"text","text":"and only one"}],"type":"emphasis"},{"text":" instance of an object.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"So what do we do if we need our object to be cached?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Just say so."}]},{"text":"Cached","anchor":"Cached","level":2,"type":"heading"},{"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"," }","}"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"type":"text","text":"Now let’s resolve it."}],"type":"paragraph"},{"type":"codeListing","code":["let a = container.cachedService()","let b = container.cachedService()"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"When we do this we see that both "},{"type":"codeVoice","code":"a"},{"text":" and ","type":"text"},{"type":"codeVoice","code":"b"},{"text":" reference the same instance, just as we saw with the singleton example above.","type":"text"}]},{"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"}],"type":"paragraph"},{"level":2,"text":"Shared","anchor":"Shared","type":"heading"},{"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":"paragraph"},{"syntax":"swift","code":["extension Container {"," var sharedService: Factory { "," self { MyService() }.shared"," }","}"],"type":"codeListing"},{"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":[{"type":"text","text":"When "},{"type":"codeVoice","code":"a"},{"type":"text","text":" was resolved it was cached in the shared cache. When "},{"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 "},{"type":"codeVoice","code":"a"},{"type":"text","text":" and "},{"type":"codeVoice","code":"b"},{"type":"text","text":" is released (set to nil in the example), the weak reference maintained by the shared cache is also released."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"So when we resolve ","type":"text"},{"type":"codeVoice","code":"c"},{"type":"text","text":" we’re going to get a new instance, and the cycle proceeds anew."}]},{"type":"heading","level":2,"text":"Custom Scopes","anchor":"Custom-Scopes"},{"inlineContent":[{"type":"text","text":"You can also add your own special purpose caches to the mix. Try this."}],"type":"paragraph"},{"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"},{"inlineContent":[{"text":"Once created, a single instance of ","type":"text"},{"code":"AuthenticatedUser","type":"codeVoice"},{"text":" and ","type":"text"},{"type":"codeVoice","code":"ProfileImageCache"},{"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":"paragraph"},{"type":"codeListing","syntax":"swift","code":["func logout() {"," Container.shared.manager.reset(scope: .session)"," ..."," }"]},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"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"},{"type":"paragraph","inlineContent":[{"type":"text","text":"There’s one additional scope, called "},{"type":"codeVoice","code":"graph"},{"type":"text","text":". This scope will reuse any factory instances resolved during a given resolution cycle. This can come in handy when a single class implements multiple protocols. Consider the following…"}]},{"type":"codeListing","syntax":"swift","code":["class ProtocolConsumer {"," @Injected(\\.idProvider) var ids"," @Injected(\\.valueProvider) var values"," init() {}","}"]},{"type":"paragraph","inlineContent":[{"text":"The ","type":"text"},{"code":"ProtocolConsumer","type":"codeVoice"},{"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."}]},{"syntax":"swift","code":["extension Container {"," \/\/ the root"," var consumer: Factory { self { ProtocolConsumer() } }"," \/\/ the interfaces"," var idProvider: Factory { self { commonProviding() } }"," var valueProvider: Factory { self { commonProviding() } }"," \/\/ the common implementation"," private var commonProviding: Factory { self { MyService() }.graph }","}"],"type":"codeListing"},{"inlineContent":[{"type":"text","text":"Both provider factories reference the same factory. When Factory is asked for an instance of "},{"code":"consumer","type":"codeVoice"},{"text":", both providers will receive the same instance of ","type":"text"},{"type":"codeVoice","code":"MyService"},{"text":".","type":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"There are a few caveats and considerations for using graph. The first is that anyone who wants to participate in the graph needs to explicitly state as such using the graph scope. Note the scope parameter for "},{"code":"commonProviding","type":"codeVoice"},{"type":"text","text":"."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The second is that there needs to be a “root” to the graph."}]},{"type":"paragraph","inlineContent":[{"text":"In the above example, the ","type":"text"},{"code":"consumer","type":"codeVoice"},{"type":"text","text":" object is the root. Factory is asked for a consumer, which in turn requires two providers."}]},{"inlineContent":[{"type":"text","text":"If you were to instantiate an instance of "},{"type":"codeVoice","code":"ProtocolConsumer"},{"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":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"See: ","type":"text"},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle"},{"type":"text","text":" for more on this."}]},{"level":2,"text":"Unique","type":"heading","anchor":"Unique"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The last scope we’re going to discuss is "},{"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","inlineContent":[{"text":"Everyone gets a new, unique instance.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"Unique.","type":"text"}]},{"level":2,"type":"heading","text":"Default Scope","anchor":"Default-Scope"},{"inlineContent":[{"type":"text","text":"Factory’s can have their scopes defined in two different ways:"}],"type":"paragraph"},{"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 "},{"type":"emphasis","inlineContent":[{"text":"usually","type":"text"}]},{"type":"text","text":" defaults to "},{"code":"unique","type":"codeVoice"},{"text":".","type":"text"}]}]}],"type":"orderedList"},{"inlineContent":[{"type":"text","text":"The key word here is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"usually"}]},{"type":"text","text":", because Factory lets you control the default scope on a per-container basis."}],"type":"paragraph"},{"syntax":"swift","code":["extension Container: AutoRegistering {"," func autoRegister() {"," manager.defaultScope = .cached"," ..."," }","}"],"type":"codeListing"},{"inlineContent":[{"text":"Now any Factory registration resolved on that container that ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"doesn’t specify a scope of its own"}]},{"text":" will use the ","type":"text"},{"type":"codeVoice","code":"cached"},{"text":" scope by default.","type":"text"}],"type":"paragraph"},{"level":2,"text":"Lifecycles","type":"heading","anchor":"Lifecycles"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Scope caches for all types except singletons are maintained by the Factory’s container."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"If I create an instance of "},{"type":"codeVoice","code":"Container"},{"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","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"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But if we create two instances of the above container and resolve "},{"type":"codeVoice","code":"cachedService"},{"text":" from both, we’ll get two different instances of the service.","type":"text"}]},{"code":["let a = container1.cachedService()","let b = container2.cachedService()"],"syntax":"swift","type":"codeListing"},{"inlineContent":[{"type":"text","text":"Scope is managed by the container."}],"type":"paragraph"},{"style":"warning","type":"aside","name":"Warning","content":[{"type":"paragraph","inlineContent":[{"text":"If a container ever goes out of scope, so will all of its registrations and cached objects.","type":"text"}]}]},{"inlineContent":[{"type":"text","text":"See the “Releasing a Container” discussion in "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","isActive":true,"type":"reference"},{"type":"text","text":" for more information."}],"type":"paragraph"},{"type":"heading","level":2,"anchor":"TimeToLive","text":"TimeToLive"},{"type":"paragraph","inlineContent":[{"text":"Factory provides a “time to live” option for scoped dependencies.","type":"text"}]},{"syntax":"swift","code":["extension Container {"," var authenticatedUser: Factory { "," self { AuthenticatedUser() }"," .scope(.session)"," .timeToLive(60 * 20) \/\/ (60 seconds * 20) = 20 minutes"," }","}"],"type":"codeListing"},{"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":[{"type":"text","text":"after"}],"type":"emphasis"},{"type":"text","text":" that period will discard the previously cached item, caching and returning a new instance instead."}]},{"inlineContent":[{"type":"text","text":"Requesting a cached item before the timeout period ends returns the currently cached item and effectively restarts the clock for that item."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Like registrations, setting a time to live on a dependency only affects the "},{"inlineContent":[{"type":"text","text":"next"}],"type":"emphasis"},{"type":"text","text":" resolution for that item. Anything already resolved and referenced stays resolved and referenced."}]},{"type":"heading","level":2,"text":"Reset","anchor":"Reset"},{"type":"paragraph","inlineContent":[{"text":"As mentioned earlier in the discussion on custom scopes, individual scope caches on a container can be reset (cleared) if needed.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["\/\/ clear the default cached scope","Container.shared.manager.reset(scope: .cached)","\/\/ clear everything cached by the custom session scope","Container.shared.manager.reset(scope: .session)"]},{"type":"paragraph","inlineContent":[{"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":"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"},{"text":" managed by any particular container. If needed, the singleton scope can be reset directly.","type":"text"}],"type":"paragraph"},{"code":["Scope.singleton.reset()"],"type":"codeListing","syntax":"swift"},{"name":"Important","style":"important","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"},{"type":"emphasis","inlineContent":[{"type":"text","text":"next"}]},{"text":" time a Factory on that container is asked to resolve a dependency that dependency will be a new instance.","type":"text"}],"type":"paragraph"}],"type":"aside"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Scopes","interfaceLanguage":"swift"},"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"}],"schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scopes"]}],"references":{"doc://Factory/documentation/Factory/Scope":{"abstract":[{"type":"text","text":"Scopes are used to define the lifetime of resolved dependencies. Factory provides several scope types,"},{"text":" ","type":"text"},{"text":"including ","type":"text"},{"code":"Singleton","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"type":"codeVoice","code":"Graph"},{"text":", and ","type":"text"},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}],"kind":"symbol","title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","navigatorTitle":[{"text":"Scope","kind":"identifier"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Scope"}],"url":"\/documentation\/factory\/scope","role":"symbol"},"doc://Factory/documentation/Factory/Testing":{"type":"topic","kind":"article","role":"article","url":"\/documentation\/factory\/testing","title":"Testing","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}]},"doc://Factory/documentation/Factory/Cycle":{"type":"topic","kind":"article","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"title":"Resolution Cycles","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","url":"\/documentation\/factory\/cycle","role":"article"},"doc://Factory/documentation/Factory/Containers":{"kind":"article","abstract":[{"text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","title":"Containers","type":"topic","url":"\/documentation\/factory\/containers","role":"article"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/unique-swift.class","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","navigatorTitle":[{"text":"Unique","kind":"identifier"}],"title":"Scope.Unique","type":"topic"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"navigatorTitle":[{"text":"Cached","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/cached-swift.class","type":"topic","title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}]},"doc://Factory/documentation/Factory/GettingStarted":{"type":"topic","title":"Getting Started","abstract":[{"type":"text","text":"Defining a Factory, resolving it, and changing the default behavior."}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","url":"\/documentation\/factory\/gettingstarted","role":"collectionGroup"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Shared","kind":"identifier"}],"title":"Scope.Shared","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/scope\/shared-swift.class","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","navigatorTitle":[{"kind":"identifier","text":"Shared"}]},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Graph"}],"abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"text":"Graph","kind":"identifier"}],"kind":"symbol","url":"\/documentation\/factory\/scope\/graph-swift.class","role":"symbol"},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol","navigatorTitle":[{"text":"Singleton","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Singleton"}],"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","url":"\/documentation\/factory\/scope\/singleton-swift.class"}}} \ No newline at end of file +{"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"]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"article","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/scopes"]}],"seeAlsoSections":[{"title":"The Basics","identifiers":["doc:\/\/Factory\/documentation\/Factory\/GettingStarted","doc:\/\/Factory\/documentation\/Factory\/Containers"],"generated":true}],"primaryContentSections":[{"content":[{"level":2,"anchor":"Overview","text":"Overview","type":"heading"},{"type":"paragraph","inlineContent":[{"text":"If you’ve used Resolver or some other dependency injection system before then you’ve probably experienced the benefits and power of scopes.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"And if not, the concept is easy to understand: Just how long should an instance of an object live?"}]},{"inlineContent":[{"type":"text","text":"You’ve no doubt stuffed an instance of a class into a static variable and created a singleton at some point in your career. This is an example of a scope. A single instance is created and then used and shared by all of the methods and functions in the app."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"This is easily done in Factory."}],"type":"paragraph"},{"level":2,"type":"heading","anchor":"Singleton","text":"Singleton"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Just specify a singleton factory."}]},{"type":"codeListing","code":["extension Container {"," var myService: Factory { "," self { MyService() }"," .singleton"," }","}"],"syntax":"swift"},{"inlineContent":[{"text":"Now whenever someone requests an instance of ","type":"text"},{"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()"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"When we do this, both "},{"type":"codeVoice","code":"a"},{"text":" and ","type":"text"},{"code":"b","type":"codeVoice"},{"type":"text","text":" refer to the same instance."}]},{"inlineContent":[{"text":"Singletons are easy to create, but they should be used with care. Like static singletons you might create in your own code, using singleton scopes can become problematic when testing your code and often require special handling. See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","isActive":true,"type":"reference"},{"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"},{"inlineContent":[{"text":"not","type":"text"}],"type":"emphasis"},{"text":" managed or cached by any specific container. If we create two instances of the above container and resolve ","type":"text"},{"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"},{"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":[{"type":"text","text":"and only one"}]},{"type":"text","text":" instance of an object."}]},{"inlineContent":[{"text":"So what do we do if we need our object to be cached?","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Just say so.","type":"text"}]},{"anchor":"Cached","type":"heading","text":"Cached","level":2},{"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"}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var cachedService: Factory { "," self { MyService() }.cached"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now let’s resolve it."}]},{"type":"codeListing","syntax":"swift","code":["let a = container.cachedService()","let b = container.cachedService()"]},{"inlineContent":[{"text":"When we do this we see that both ","type":"text"},{"type":"codeVoice","code":"a"},{"type":"text","text":" and "},{"type":"codeVoice","code":"b"},{"type":"text","text":" reference the same instance, just as we saw with the singleton example above."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"Cached scopes are Factory’s workhorses. They make unit testing a lot easier and should be your first choice when you’re looking for a caching solution."}],"type":"paragraph"},{"level":2,"anchor":"Shared","text":"Shared","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Shared items exist just as long as someone holds a strong reference to them. When the last reference goes away, the weakly held shared reference also goes away."}]},{"syntax":"swift","code":["extension Container {"," var sharedService: Factory { "," self { MyService() }.shared"," }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now let’s resolve it."}]},{"type":"codeListing","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()"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"When "},{"code":"a","type":"codeVoice"},{"text":" was resolved it was cached in the shared cache. When ","type":"text"},{"code":"b","type":"codeVoice"},{"text":" is resolved it’s pulled from the cache as we might expect. But when the last strong external reference to ","type":"text"},{"type":"codeVoice","code":"a"},{"type":"text","text":" and "},{"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"},{"type":"codeVoice","code":"c"},{"type":"text","text":" we’re going to get a new instance, and the cycle proceeds anew."}],"type":"paragraph"},{"type":"heading","anchor":"Custom-Scopes","text":"Custom Scopes","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can also add your own special purpose caches to the mix. Try this."}]},{"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":"codeListing"},{"inlineContent":[{"text":"Once created, a single instance of ","type":"text"},{"type":"codeVoice","code":"AuthenticatedUser"},{"type":"text","text":" and "},{"type":"codeVoice","code":"ProfileImageCache"},{"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":"paragraph"},{"code":["func logout() {"," Container.shared.manager.reset(scope: .session)"," ..."," }"],"syntax":"swift","type":"codeListing"},{"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":[{"text":"Custom scopes are powerful tools to have in your arsenal. Use them.","type":"text"}],"type":"paragraph"},{"level":2,"text":"Graph Scope","anchor":"Graph-Scope","type":"heading"},{"inlineContent":[{"type":"text","text":"There’s one additional scope, called "},{"code":"graph","type":"codeVoice"},{"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"},{"type":"codeListing","code":["class ProtocolConsumer {"," @Injected(\\.idProvider) var ids"," @Injected(\\.valueProvider) var values"," init() {}","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The "},{"type":"codeVoice","code":"ProtocolConsumer"},{"type":"text","text":" wants two different protocols. But it doesn’t know that a single class provides both services. (Nor should it care.) Take a look at the referenced factories."}]},{"syntax":"swift","code":["extension Container {"," \/\/ the root"," var consumer: Factory { self { ProtocolConsumer() } }"," \/\/ the interfaces"," var idProvider: Factory { self { commonProviding() } }"," var valueProvider: Factory { self { commonProviding() } }"," \/\/ the common implementation"," private var commonProviding: Factory { self { MyService() }.graph }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"Both provider factories reference the same factory. When Factory is asked for an instance of ","type":"text"},{"code":"consumer","type":"codeVoice"},{"text":", both providers will receive the same instance of ","type":"text"},{"type":"codeVoice","code":"MyService"},{"type":"text","text":"."}]},{"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"},{"type":"codeVoice","code":"commonProviding"},{"type":"text","text":"."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"The second is that there needs to be a “root” to the graph."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"In the above example, the "},{"type":"codeVoice","code":"consumer"},{"type":"text","text":" object is the root. Factory is asked for a consumer, which in turn requires two providers."}]},{"type":"paragraph","inlineContent":[{"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: "},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","isActive":true},{"type":"text","text":" for more on this."}],"type":"paragraph"},{"level":2,"type":"heading","anchor":"Unique","text":"Unique"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The last scope we’re going to discuss is "},{"type":"codeVoice","code":"unique"},{"type":"text","text":". When unique is specified a new instance of the service will be instantiated and returned each and every time one is requested from the factory."}]},{"type":"paragraph","inlineContent":[{"text":"Everyone gets a new, unique instance.","type":"text"}]},{"inlineContent":[{"text":"Unique.","type":"text"}],"type":"paragraph"},{"type":"heading","level":2,"text":"Default Scope","anchor":"Default-Scope"},{"type":"paragraph","inlineContent":[{"text":"Factory’s can have their scopes defined in two different ways:","type":"text"}]},{"type":"orderedList","items":[{"content":[{"inlineContent":[{"text":"We can use a scope modifier, as we’ve shown above.","type":"text"}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"text":"We don’t specify a scope at all, in which case the scope ","type":"text"},{"inlineContent":[{"type":"text","text":"usually"}],"type":"emphasis"},{"type":"text","text":" defaults to "},{"type":"codeVoice","code":"unique"},{"text":".","type":"text"}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The key word here is "},{"type":"emphasis","inlineContent":[{"type":"text","text":"usually"}]},{"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"," ..."," }","}"],"syntax":"swift","type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"Now any Factory registration resolved on that container that ","type":"text"},{"inlineContent":[{"text":"doesn’t specify a scope of its own","type":"text"}],"type":"emphasis"},{"text":" will use the ","type":"text"},{"code":"cached","type":"codeVoice"},{"text":" scope by default.","type":"text"}]},{"text":"Lifecycles","type":"heading","anchor":"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":[{"text":"If I create an instance of ","type":"text"},{"code":"Container","type":"codeVoice"},{"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."}]},{"code":["let a = container.cachedService()","let b = container.cachedService()","let c = container.cachedService()"],"syntax":"swift","type":"codeListing"},{"inlineContent":[{"type":"text","text":"In this example, a, b, and c are identical."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"But if we create two instances of the above container and resolve ","type":"text"},{"code":"cachedService","type":"codeVoice"},{"type":"text","text":" from both, we’ll get two different instances of the service."}]},{"type":"codeListing","syntax":"swift","code":["let a = container1.cachedService()","let b = container2.cachedService()"]},{"inlineContent":[{"text":"Scope is managed by the container.","type":"text"}],"type":"paragraph"},{"type":"aside","style":"warning","name":"Warning","content":[{"type":"paragraph","inlineContent":[{"text":"If a container ever goes out of scope, so will all of its registrations and cached objects.","type":"text"}]}]},{"inlineContent":[{"text":"See the “Releasing a Container” discussion in ","type":"text"},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers"},{"type":"text","text":" for more information."}],"type":"paragraph"},{"anchor":"TimeToLive","type":"heading","level":2,"text":"TimeToLive"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Factory provides a “time to live” option for scoped dependencies."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," var authenticatedUser: Factory { "," self { AuthenticatedUser() }"," .scope(.session)"," .timeToLive(60 * 20) \/\/ (60 seconds * 20) = 20 minutes"," }","}"]},{"inlineContent":[{"text":"As shown above, set a time to live for 20 minutes and any new request for that dependency that occurs ","type":"text"},{"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."}],"type":"paragraph"},{"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"},{"inlineContent":[{"type":"text","text":"Like registrations, setting a time to live on a dependency only affects the "},{"inlineContent":[{"type":"text","text":"next"}],"type":"emphasis"},{"text":" resolution for that item. Anything already resolved and referenced stays resolved and referenced.","type":"text"}],"type":"paragraph"},{"anchor":"Reset","level":2,"text":"Reset","type":"heading"},{"inlineContent":[{"text":"As mentioned earlier in the discussion on custom scopes, individual scope caches on a container can be reset (cleared) if needed.","type":"text"}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["\/\/ clear the default cached scope","Container.shared.manager.reset(scope: .cached)","\/\/ clear everything cached by the custom session scope","Container.shared.manager.reset(scope: .session)"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"You can reset the cache for "},{"type":"emphasis","inlineContent":[{"type":"text","text":"all"}]},{"type":"text","text":" of the scopes managed by that container."}]},{"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 "},{"inlineContent":[{"type":"text","text":"not"}],"type":"emphasis"},{"text":" managed by any particular container. If needed, the singleton scope can be reset directly.","type":"text"}]},{"syntax":"swift","type":"codeListing","code":["Scope.singleton.reset()"]},{"name":"Important","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Resetting a container or scope has no effect whatsoever on anything that’s already been resolved by Factory. It only ensures that the "},{"inlineContent":[{"type":"text","text":"next"}],"type":"emphasis"},{"type":"text","text":" time a Factory on that container is asked to resolve a dependency that dependency will be a new instance."}]}],"type":"aside","style":"important"}],"kind":"content"}],"sections":[],"metadata":{"role":"collectionGroup","title":"Scopes","roleHeading":"API Collection","modules":[{"name":"Factory"}]},"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."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"references":{"doc://Factory/documentation/Factory/Scope":{"title":"Scope","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope","type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Scope","kind":"identifier"}],"url":"\/documentation\/factory\/scope","navigatorTitle":[{"kind":"identifier","text":"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"},{"code":"Singleton","type":"codeVoice"},{"type":"text","text":", "},{"code":"Cached","type":"codeVoice"},{"text":", ","type":"text"},{"code":"Graph","type":"codeVoice"},{"type":"text","text":", and "},{"code":"Shared","type":"codeVoice"},{"type":"text","text":"."}]},"doc://Factory/documentation/Factory/Scope/Singleton-swift.class":{"title":"Scope.Singleton","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Singleton-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Singleton"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Singleton","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/singleton-swift.class","abstract":[{"text":"Defines the singleton scope. The same instance will always be returned by the factory.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Unique-swift.class":{"abstract":[{"type":"text","text":"Defines the unique scope. A new instance of a given type will be returned on every resolution cycle."}],"kind":"symbol","role":"symbol","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"Unique","kind":"identifier"}],"type":"topic","navigatorTitle":[{"kind":"identifier","text":"Unique"}],"title":"Scope.Unique","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Unique-swift.class","url":"\/documentation\/factory\/scope\/unique-swift.class"},"doc://Factory/documentation/Factory/Scope/Cached-swift.class":{"title":"Scope.Cached","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Cached-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Cached"}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"text":"Cached","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/cached-swift.class","abstract":[{"text":"Defines a cached scope. The same instance will be returned by the factory until the cache is reset.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/Testing":{"abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"kind":"article","url":"\/documentation\/factory\/testing","identifier":"doc:\/\/Factory\/documentation\/Factory\/Testing","role":"article","type":"topic","title":"Testing"},"doc://Factory/documentation/Factory/Containers":{"kind":"article","type":"topic","title":"Containers","url":"\/documentation\/factory\/containers","identifier":"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?"}]},"doc://Factory/documentation/Factory/GettingStarted":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/GettingStarted","type":"topic","kind":"article","abstract":[{"text":"Defining a Factory, resolving it, and changing the default behavior.","type":"text"}],"url":"\/documentation\/factory\/gettingstarted","title":"Getting Started","role":"collectionGroup"},"doc://Factory/documentation/Factory/Cycle":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","abstract":[{"text":"What’s a resolution cycle, and why should we care?","type":"text"}],"role":"article","title":"Resolution Cycles","url":"\/documentation\/factory\/cycle"},"doc://Factory/documentation/Factory/Scope/Shared-swift.class":{"title":"Scope.Shared","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Shared-swift.class","role":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Shared"}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Shared","kind":"identifier"}],"url":"\/documentation\/factory\/scope\/shared-swift.class","abstract":[{"type":"text","text":"Defines a shared (weak) scope. The same instance will be returned by the factory as long as someone maintains a strong reference."}],"kind":"symbol"},"doc://Factory/documentation/Factory/Scope/Graph-swift.class":{"url":"\/documentation\/factory\/scope\/graph-swift.class","type":"topic","abstract":[{"type":"text","text":"Defines the graph scope. A single instance of a given type will be returned during a given resolution cycle."}],"title":"Scope.Graph","navigatorTitle":[{"kind":"identifier","text":"Graph"}],"fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Graph"}],"kind":"symbol","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Scope\/Graph-swift.class"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/sharedcontainer.json b/docs/data/documentation/factory/sharedcontainer.json index ed8f5603..98d6e1eb 100644 --- a/docs/data/documentation/factory/sharedcontainer.json +++ b/docs/data/documentation/factory/sharedcontainer.json @@ -1 +1 @@ -{"relationshipsSections":[{"kind":"relationships","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","doc:\/\/Factory\/s8SendableP"],"type":"inheritsFrom","title":"Inherits From"},{"title":"Conforming Types","type":"conformingTypes","identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container"],"kind":"relationships"}],"metadata":{"roleHeading":"Protocol","title":"SharedContainer","externalID":"s:7Factory15SharedContainerP","navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}],"modules":[{"name":"Factory"}],"symbolKind":"protocol","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"text":"SharedContainer","kind":"identifier"}],"role":"symbol"},"sections":[],"variants":[{"paths":["\/documentation\/factory\/sharedcontainer"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"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":{"url":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","interfaceLanguage":"swift"},"kind":"symbol","topicSections":[{"title":"Type Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/SharedContainer\/shared"]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"SharedContainer","kind":"identifier"},{"kind":"text","text":" : "},{"preciseIdentifier":"s:7Factory16ManagedContainerP","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","kind":"typeIdentifier","text":"ManagedContainer"}]}]},{"kind":"content","content":[{"text":"Overview","type":"heading","anchor":"overview","level":2},{"type":"paragraph","inlineContent":[{"text":"Here’s an example of reaching out to a Container’s shared instance for dependency resolution.","type":"text"}]},{"syntax":"swift","type":"codeListing","code":["class ContentViewModel {"," let service: MyServiceType = Container.shared.service()","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The default "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container"},{"type":"text","text":" provided is a SharedContainer. It can be used in both roles as needed."}]},{"type":"paragraph","inlineContent":[{"text":"See ","type":"text"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","isActive":true,"type":"reference"},{"type":"text","text":" for more information."}]}]}],"references":{"doc://Factory/documentation/Factory/Container":{"kind":"symbol","navigatorTitle":[{"text":"Container","kind":"identifier"}],"title":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"role":"symbol","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/SharedContainer/shared":{"kind":"symbol","abstract":[{"type":"text","text":"Defines a single “shared” container for that container type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer\/shared","title":"shared","type":"topic","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/sharedcontainer\/shared","required":true,"role":"symbol"},"doc://Factory/documentation/Factory/SharedContainer":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/sharedcontainer","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"title":"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."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"SharedContainer","kind":"identifier"}]},"doc://Factory/s8SendableP":{"title":"Swift.Sendable","type":"unresolvable","identifier":"doc:\/\/Factory\/s8SendableP"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Containers":{"kind":"article","abstract":[{"text":"Containers are the cornerstone of Factory 2.0. What are they and how do we use them?","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers","title":"Containers","type":"topic","url":"\/documentation\/factory\/containers","role":"article"},"doc://Factory/documentation/Factory/ManagedContainer":{"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"ManagedContainer","kind":"identifier"}],"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"ManagedContainer"}],"title":"ManagedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","role":"symbol","type":"topic","abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}]}}} \ No newline at end of file +{"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."}],"relationshipsSections":[{"kind":"relationships","identifiers":["doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","doc:\/\/Factory\/s8SendableP"],"title":"Inherits From","type":"inheritsFrom"},{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Container"],"type":"conformingTypes","kind":"relationships","title":"Conforming Types"}],"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","interfaceLanguage":"swift"},"metadata":{"fragments":[{"text":"protocol","kind":"keyword"},{"kind":"text","text":" "},{"text":"SharedContainer","kind":"identifier"}],"externalID":"s:7Factory15SharedContainerP","roleHeading":"Protocol","title":"SharedContainer","symbolKind":"protocol","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"modules":[{"name":"Factory"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"topicSections":[{"identifiers":["doc:\/\/Factory\/documentation\/Factory\/SharedContainer\/shared"],"title":"Type Properties"}],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"SharedContainer","kind":"identifier"},{"text":" : ","kind":"text"},{"kind":"typeIdentifier","text":"ManagedContainer","preciseIdentifier":"s:7Factory16ManagedContainerP","identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer"}],"platforms":["macOS"]}]},{"content":[{"anchor":"overview","text":"Overview","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s an example of reaching out to a Container’s shared instance for dependency resolution."}]},{"type":"codeListing","code":["class ContentViewModel {"," let service: MyServiceType = Container.shared.service()","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"The default ","type":"text"},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"reference"},{"type":"text","text":" provided is a SharedContainer. It can be used in both roles as needed."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"See "},{"type":"reference","isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Containers"},{"text":" for more information.","type":"text"}]}],"kind":"content"}],"variants":[{"paths":["\/documentation\/factory\/sharedcontainer"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/SharedContainer/shared":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer\/shared","abstract":[{"text":"Defines a single “shared” container for that container type.","type":"text"}],"fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"title":"shared","url":"\/documentation\/factory\/sharedcontainer\/shared","required":true,"role":"symbol","type":"topic"},"doc://Factory/documentation/Factory/Containers":{"kind":"article","type":"topic","title":"Containers","url":"\/documentation\/factory\/containers","identifier":"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?"}]},"doc://Factory/documentation/Factory/SharedContainer":{"url":"\/documentation\/factory\/sharedcontainer","type":"topic","abstract":[{"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.","type":"text"}],"title":"SharedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"SharedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}]},"doc://Factory/s8SendableP":{"identifier":"doc:\/\/Factory\/s8SendableP","type":"unresolvable","title":"Swift.Sendable"},"doc://Factory/documentation/Factory/Container":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","title":"Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"url":"\/documentation\/factory\/container","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}],"navigatorTitle":[{"text":"Container","kind":"identifier"}]},"doc://Factory/documentation/Factory/ManagedContainer":{"url":"\/documentation\/factory\/managedcontainer","kind":"symbol","role":"symbol","navigatorTitle":[{"text":"ManagedContainer","kind":"identifier"}],"abstract":[{"text":"ManagedContainer defines the core protocol all Containers must adopt.","type":"text"}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"ManagedContainer"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/ManagedContainer","type":"topic","title":"ManagedContainer"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 2c8be697..029d2c88 100644 --- a/docs/data/documentation/factory/sharedcontainer/shared.json +++ b/docs/data/documentation/factory/sharedcontainer/shared.json @@ -1 +1 @@ -{"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer\/shared","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/SharedContainer"]]},"abstract":[{"type":"text","text":"Defines a single “shared” container for that container type."}],"schemaVersion":{"major":0,"patch":0,"minor":3},"kind":"symbol","variants":[{"paths":["\/documentation\/factory\/sharedcontainer\/shared"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"required":true,"roleHeading":"Type Property","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"}],"symbolKind":"property","title":"shared","role":"symbol","modules":[{"name":"Factory"}],"externalID":"s:7Factory15SharedContainerP6sharedxvpZ"},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":" { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}]}]},{"kind":"content","content":[{"text":"Discussion","level":2,"type":"heading","anchor":"discussion"},{"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"},{"text":" ","type":"text"},{"type":"text","text":"mixed environments where you’re passing container references AND using the @Injected property wrappers."}]},{"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":" "},{"text":"future whenever the container is accessed.","type":"text"}],"type":"paragraph"}]}],"references":{"doc://Factory/documentation/Factory/SharedContainer":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/sharedcontainer","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"title":"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."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"SharedContainer","kind":"identifier"}]},"doc://Factory/documentation/Factory/SharedContainer/shared":{"kind":"symbol","abstract":[{"type":"text","text":"Defines a single “shared” container for that container type."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer\/shared","title":"shared","type":"topic","fragments":[{"kind":"keyword","text":"static"},{"text":" ","kind":"text"},{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"shared"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"}],"url":"\/documentation\/factory\/sharedcontainer\/shared","required":true,"role":"symbol"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/SharedContainer"]]},"schemaVersion":{"patch":0,"minor":3,"major":0},"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer\/shared","interfaceLanguage":"swift"},"abstract":[{"text":"Defines a single “shared” container for that container type.","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"static","kind":"keyword"},{"kind":"text","text":" "},{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"shared","kind":"identifier"},{"kind":"text","text":": "},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":" { "},{"text":"get","kind":"keyword"},{"text":" }","kind":"text"}],"languages":["swift"]}]},{"content":[{"anchor":"discussion","level":2,"text":"Discussion","type":"heading"},{"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"},{"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":" "},{"text":"future whenever the container is accessed.","type":"text"}],"type":"paragraph"}],"kind":"content"}],"metadata":{"fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"title":"shared","modules":[{"name":"Factory"}],"required":true,"symbolKind":"property","role":"symbol","roleHeading":"Type Property","externalID":"s:7Factory15SharedContainerP6sharedxvpZ"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/sharedcontainer\/shared"]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/SharedContainer":{"url":"\/documentation\/factory\/sharedcontainer","type":"topic","abstract":[{"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.","type":"text"}],"title":"SharedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"SharedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}]},"doc://Factory/documentation/Factory/SharedContainer/shared":{"kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer\/shared","abstract":[{"text":"Defines a single “shared” container for that container type.","type":"text"}],"fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"shared","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Self","kind":"typeIdentifier"}],"title":"shared","url":"\/documentation\/factory\/sharedcontainer\/shared","required":true,"role":"symbol","type":"topic"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/tags.json b/docs/data/documentation/factory/tags.json index d1ec9ac3..bb411c33 100644 --- a/docs/data/documentation/factory/tags.json +++ b/docs/data/documentation/factory/tags.json @@ -1 +1 @@ -{"kind":"article","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\/Functional"]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/tags"]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"sections":[],"primaryContentSections":[{"content":[{"level":2,"type":"heading","anchor":"Overview","text":"Overview"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Some dependency injection systems offer functionality known as tagging. Once tagged, you can ask the system for a list of all registered dependencies that conform to that tag."}]},{"syntax":"swift","code":["let processors = container.resolve(tagged: \"processor\")"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"syntax":"swift","type":"codeListing","code":["let processors = container.resolve(Processing.self)"]},{"type":"paragraph","inlineContent":[{"text":"Doing this sort of thing in Factory is somewhat problematic, in that in most cases for most instances there ","type":"text"},{"inlineContent":[{"text":"isn’t","type":"text"}],"type":"emphasis"},{"text":" a registration phase. Factory’s are lazy creatures, and they’re not evaluated until the Factory is requested.","type":"text"}]},{"inlineContent":[{"text":"So what can we do?","type":"text"}],"type":"paragraph"},{"anchor":"Simple-Solution","type":"heading","level":2,"text":"Simple Solution"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Consider the following Factory registrations."}]},{"syntax":"swift","code":["extension SharedContainer {"," var processor1: Factory { self { Processor1() } }"," var processor2: Factory { self { Processor2() } }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"And now the following container extension added to our main application."}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public static var processors: [KeyPath>] = ["," \\.processor1,"," \\.processor2,"," ]","}"]},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Once that’s done, accomplishing the lookup and getting the list of actual processors is a piece of cake."}]},{"type":"codeListing","code":["extension Container {"," public func processors() -> [Processor] {"," Container.processors.map { self[keyPath: $0]() }"," }","}"],"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."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"But we can do more."}]},{"anchor":"Appending-New-Processors","type":"heading","text":"Appending New Processors","level":2},{"inlineContent":[{"type":"text","text":"First, note that anything could be added to the array at any point in time."}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["extension Container: AutoRegistering {"," func autoRegister() {"," Container.processors.append(\\.processor3)"," }"," var processor3: Factory { self { Processor3() } }","}"]},{"level":2,"text":"Multiple Modules and Anonymous Processors","anchor":"Multiple-Modules-and-Anonymous-Processors","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Above we mentioned that that main app should know what processors are available to it. That said, sometime you may not."}]},{"type":"paragraph","inlineContent":[{"text":"In that case you could ask a set of modules for their own, anonymous contributions.","type":"text"}]},{"code":["extension Container: AutoRegistering {"," func autoRegister() {"," Container.processors += ModuleA.availableProcessors()"," Container.processors += ModuleB.availableProcessors()"," Container.processors += ModuleC.availableProcessors()"," }","}"],"type":"codeListing","syntax":"swift"},{"anchor":"Priority","level":2,"type":"heading","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]() }"," }","}"]},{"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"}],"type":"paragraph"}],"kind":"content"}],"metadata":{"role":"article","title":"Tags","modules":[{"name":"Factory"}],"roleHeading":"Article"},"abstract":[{"type":"text","text":"Obtaining a list of dependencies of a given type."}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Tags","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/Modules":{"role":"article","title":"Modular Development","abstract":[{"type":"text","text":"Using Factory in a project with multiple modules."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","url":"\/documentation\/factory\/modules","kind":"article","type":"topic"},"doc://Factory/documentation/Factory/Optionals":{"type":"topic","kind":"article","title":"Optionals and Dynamic Registration","abstract":[{"type":"text","text":"With Factory registrations can be performed at any time."}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Optionals","url":"\/documentation\/factory\/optionals","role":"article"},"doc://Factory/documentation/Factory/Cycle":{"type":"topic","kind":"article","abstract":[{"type":"text","text":"What’s a resolution cycle, and why should we care?"}],"title":"Resolution Cycles","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","url":"\/documentation\/factory\/cycle","role":"article"},"doc://Factory/documentation/Factory/Modifiers":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","type":"topic","title":"Factory Modifiers","abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"url":"\/documentation\/factory\/modifiers","kind":"article","role":"article"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Functional":{"type":"topic","kind":"article","title":"Functional Injection","abstract":[{"type":"text","text":"Factory can inject more than service classes and structs."}],"url":"\/documentation\/factory\/functional","identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","role":"article"},"doc://Factory/documentation/Factory/Design":{"type":"topic","kind":"article","title":"Designing Factory","abstract":[{"type":"text","text":"Rationale behind the design decisions made in Factory 1.0 and 2.0"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","url":"\/documentation\/factory\/design","role":"article"}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"sections":[],"metadata":{"modules":[{"name":"Factory"}],"title":"Tags","roleHeading":"Article","role":"article"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Tags"},"kind":"article","schemaVersion":{"major":0,"minor":3,"patch":0},"variants":[{"paths":["\/documentation\/factory\/tags"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"text":"Obtaining a list of dependencies of a given type.","type":"text"}],"seeAlsoSections":[{"generated":true,"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"]}],"primaryContentSections":[{"kind":"content","content":[{"anchor":"Overview","type":"heading","level":2,"text":"Overview"},{"type":"paragraph","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"}]},{"syntax":"swift","code":["let processors = container.resolve(tagged: \"processor\")"],"type":"codeListing"},{"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"},{"code":["let processors = container.resolve(Processing.self)"],"type":"codeListing","syntax":"swift"},{"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"},{"text":" a registration phase. Factory’s are lazy creatures, and they’re not evaluated until the Factory is requested.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"So what can we do?","type":"text"}],"type":"paragraph"},{"level":2,"text":"Simple Solution","type":"heading","anchor":"Simple-Solution"},{"inlineContent":[{"text":"Consider the following Factory registrations.","type":"text"}],"type":"paragraph"},{"code":["extension SharedContainer {"," var processor1: Factory { self { Processor1() } }"," var processor2: Factory { self { Processor2() } }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"text":"And now the following container extension added to our main application.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["extension Container {"," public static var processors: [KeyPath>] = ["," \\.processor1,"," \\.processor2,"," ]","}"]},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"inlineContent":[{"text":"Once that’s done, accomplishing the lookup and getting the list of actual processors is a piece of cake.","type":"text"}],"type":"paragraph"},{"type":"codeListing","code":["extension Container {"," public func processors() -> [Processor] {"," Container.processors.map { self[keyPath: $0]() }"," }","}"],"syntax":"swift"},{"inlineContent":[{"type":"text","text":"And since the keyPath definition guarantees the type of the object, the array will also be type safe, something that can be difficult to accomplish with simple string-based tagging systems."}],"type":"paragraph"},{"inlineContent":[{"text":"But we can do more.","type":"text"}],"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,"text":"Multiple Modules and Anonymous Processors","type":"heading","anchor":"Multiple-Modules-and-Anonymous-Processors"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Above we mentioned that that main app should know what processors are available to it. That said, sometime you may not."}]},{"inlineContent":[{"text":"In that case you could ask a set of modules for their own, anonymous contributions.","type":"text"}],"type":"paragraph"},{"syntax":"swift","code":["extension Container: AutoRegistering {"," func autoRegister() {"," Container.processors += ModuleA.availableProcessors()"," Container.processors += ModuleB.availableProcessors()"," Container.processors += ModuleC.availableProcessors()"," }","}"],"type":"codeListing"},{"anchor":"Priority","text":"Priority","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The basic solution can obviously be expanded as needed, perhaps by creating a struct that allows for tag priority."}]},{"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]() }"," }","}"]},{"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."}],"type":"paragraph"}]}],"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Modifiers":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modifiers","kind":"article","role":"article","abstract":[{"text":"Considerations when defining and redefining a Factory’s behavior.","type":"text"}],"url":"\/documentation\/factory\/modifiers","title":"Factory Modifiers","type":"topic"},"doc://Factory/documentation/Factory/Optionals":{"identifier":"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","url":"\/documentation\/factory\/optionals","role":"article"},"doc://Factory/documentation/Factory/Modules":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Modules","kind":"article","role":"article","abstract":[{"text":"Using Factory in a project with multiple modules.","type":"text"}],"url":"\/documentation\/factory\/modules","title":"Modular Development","type":"topic"},"doc://Factory/documentation/Factory/Design":{"url":"\/documentation\/factory\/design","title":"Designing Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Design","kind":"article","role":"article","abstract":[{"text":"Rationale behind the design decisions made in Factory 1.0 and 2.0","type":"text"}],"type":"topic"},"doc://Factory/documentation/Factory/Cycle":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Cycle","kind":"article","abstract":[{"text":"What’s a resolution cycle, and why should we care?","type":"text"}],"role":"article","title":"Resolution Cycles","url":"\/documentation\/factory\/cycle"},"doc://Factory/documentation/Factory/Functional":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Functional","kind":"article","role":"article","abstract":[{"text":"Factory can inject more than service classes and structs.","type":"text"}],"url":"\/documentation\/factory\/functional","title":"Functional Injection","type":"topic"}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/testing.json b/docs/data/documentation/factory/testing.json index 60f67e36..077663ff 100644 --- a/docs/data/documentation/factory/testing.json +++ b/docs/data/documentation/factory/testing.json @@ -1 +1 @@ -{"primaryContentSections":[{"content":[{"type":"heading","anchor":"Overview","level":2,"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"},{"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."}]},{"code":["Container.shared.accountLoading.register { MockNoAccounts() }"],"type":"codeListing","syntax":"swift"},{"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 "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"},{"text":" you may have already seen and used. Others, like pushing\/popping container state, resetting, and so on, are discussed below.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Before we look at them, it’s important to first understand Xcode’s test process and environment, and consider what that means when writing your own unit tests using Factory."}]},{"inlineContent":[{"inlineContent":[{"type":"text","text":"Jump to the end for information on using Factory with Swift Testing in Xcode 16."}],"type":"emphasis"}],"type":"paragraph"},{"text":"The Unit Test Environment","anchor":"The-Unit-Test-Environment","type":"heading","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"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This means that application main ran, that the application delegate’s "},{"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":[{"type":"text","text":"then"}],"type":"emphasis"},{"type":"text","text":" XCTest will start constructing test classes and running test cases."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"All of which means that a LOT of code has already run before your first test has even fired."}]},{"inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Including dependency injection code."}]}],"type":"paragraph"},{"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"},{"inlineContent":[{"type":"text","text":"singletons"}],"type":"emphasis"},{"text":". But again, let’s save that topic for a bit later.","type":"text"}]},{"level":2,"type":"heading","text":"Changing, Not Rebuilding","anchor":"Changing-Not-Rebuilding"},{"type":"paragraph","inlineContent":[{"type":"text","text":"So our environment exists, running and awaiting our first test. All of our original runtime dependency injection extensions and registrations are also out there, ready to be resolved and injected when needed."}]},{"type":"paragraph","inlineContent":[{"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},{"text":" can help with that.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"But we’re here to test, and one thing we probably ","type":"text"},{"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":[{"text":"Again, Factory makes that easy.","type":"text"}]},{"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"},{"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"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Only if we’re running a lot of tests like this then we’re going to making a lot of changes to the dependency injection environment. And that’s problematic."}]},{"inlineContent":[{"type":"text","text":"We need to make sure that a change made in one test doesn’t affect a later test that relied on the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"original"}]},{"type":"text","text":" object that demonstrated a "},{"type":"emphasis","inlineContent":[{"type":"text","text":"different"}]},{"text":" behavior. Or setting up circumstances where randomizing tests can cause the same thing to occur.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Sound confusing? It is. Try tracking it down in actual code."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"How to solve it? Well, the best solution to that sort of problem is to avoid it in the first place."}]},{"inlineContent":[{"type":"text","text":"Fortunately, Factory can help with that."}],"type":"paragraph"},{"level":2,"anchor":"Pushing-and-Popping-State","type":"heading","text":"Pushing and Popping State"},{"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":[{"text":"Then in teardown you can ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"pop"}]},{"type":"text","text":" the stack, eliminating all of your changes and restoring the container to its original state before the push."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"This lets each set of tests start from the same initial state, regardless of what any prior test had changed."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"The following example assumes we’re using the shared container.","type":"text"}]},{"type":"codeListing","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)"," }","}"],"syntax":"swift"},{"inlineContent":[{"text":"That’s pretty much it. Our ","type":"text"},{"type":"codeVoice","code":"AccountsViewModel"},{"text":" depended on an ","type":"text"},{"type":"codeVoice","code":"AccountsLoading"},{"type":"text","text":" service."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"Change the service provided and we change the "},{"inlineContent":[{"type":"text","text":"data"}],"type":"emphasis"},{"text":" provided. Change the ","type":"text"},{"type":"emphasis","inlineContent":[{"text":"data","type":"text"}]},{"text":" provided and we change our view model’s behavior.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"And then we test the results to see if everything matches up with our expectations."}]},{"anchor":"Diving-Deeper","type":"heading","text":"Diving Deeper","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"Note that the above is just one way of doing things. If, for example, our "},{"type":"codeVoice","code":"AccountLoader"},{"text":" service depended on a custom network layer, we could reach further down the stack.","type":"text"}]},{"code":["func testNoAccounts() async throws {"," let json = #\"{ \"accounts\": [] }\"#"," Container.shared.networking.register { MockJSON(json) }"," let model = Container.shared.accountsViewModel()"," \/\/ as before","}"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"type":"text","text":"We create the "},{"code":"AccountsViewModel","type":"codeVoice"},{"type":"text","text":", the view model injects the "},{"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"},{"type":"codeListing","syntax":"swift","code":["func testNoAccounts() async throws {"," Container.shared.networking.register { MockError(404) }"," let model = Container.shared.accountsViewModel()"," \/\/ as before","}"]},{"inlineContent":[{"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":"text"}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"Factory makes reaching deep into a dependency tree and adjusting behavior simple and easy."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"It can even help you see what’s "},{"type":"emphasis","inlineContent":[{"type":"text","text":"inside"}]},{"type":"text","text":" that dependency tree. See "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","isActive":true,"type":"reference"},{"type":"text","text":" for more information."}]},{"level":2,"type":"heading","anchor":"Rebuilding-The-Container","text":"Rebuilding The Container"},{"type":"paragraph","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"}]},{"code":["final class FactoryCoreTests: XCTestCase {",""," override func setUp() {"," Container.shared.reset()"," Container.shared.setupMocks()"," }"," "," func testNoAccounts() throws {"," ..."," }","}"],"type":"codeListing","syntax":"swift"},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"heading","level":2,"anchor":"Passed-Containers","text":"Passed Containers"},{"type":"paragraph","inlineContent":[{"text":"You can also pass the container into the view model itself.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["final class FactoryCoreTests: XCTestCase {",""," var container: Container!",""," override func setUp() {"," container = Container()"," container.setupMocks()"," }"," "," func testSomething() throws {"," container.myServiceType.register(factory: { MockService() })"," let model = MyViewModel(container: container)"," model.load()"," XCTAssertTrue(model.isLoaded)"," }","}"]},{"inlineContent":[{"text":"This does, of course, assume that you structured your app appropriately.","type":"text"}],"type":"paragraph"},{"level":2,"text":"Common Setup","anchor":"Common-Setup","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"As shown in the earlier examples, if we have several mocks that we use all of the time in our previews or unit tests, we can also add a setup function to a given container to make this easier."}]},{"type":"codeListing","code":["extension Container {"," func setupMocks() {"," myService.register { MockServiceN(4) }"," sharedService.register { MockService2() }"," }","}"],"syntax":"swift"},{"level":2,"anchor":"Testing-Singletons","text":"Testing Singletons","type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Let’s talk singletons. The singleton scope cache is global, meaning that it’s "},{"type":"emphasis","inlineContent":[{"type":"text","text":"not"}]},{"type":"text","text":" managed by any specific container."}]},{"type":"paragraph","inlineContent":[{"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"}]},{"inlineContent":[{"type":"text","text":"Singletons are, after all, expected to be singletons."}],"type":"paragraph"},{"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"}]},{"text":" cached singleton with just a single method call. Just call reset on that particular scope.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["Scope.singleton.reset()"]},{"inlineContent":[{"type":"text","text":"Or you can reset a specific singleton by reaching out to its factory."}],"type":"paragraph"},{"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","syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"On that last point. Doing a registration change on a factory usually clears it’s associated scope automatically. The assumption, of course, being that if you register something you expect it to be used."}]},{"inlineContent":[{"type":"text","text":"This also applies to singletons "},{"inlineContent":[{"type":"text","text":"unless you’re inside of a autoRegister block."}],"type":"emphasis"},{"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":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"So all that said, we can deal with them. But as a general rule, singletons can complicate your life, your code, and your tests, and as such they should be avoided and only be used when there’s an overriding need for there to be one and only one instance of an object."}]},{"inlineContent":[{"type":"text","text":"Got that, Highlander?"}],"type":"paragraph"},{"text":"Xcode UITesting","type":"heading","anchor":"Xcode-UITesting","level":2},{"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"}]},{"text":" it gets to RunLoop.main and starts idling.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"How?","type":"text"}]},{"inlineContent":[{"text":"One solution is passed parameters.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"The test case is fairly straightforward.","type":"text"}]},{"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)"," }","} "],"syntax":"swift","type":"codeListing"},{"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"}]},{"type":"codeListing","syntax":"swift","code":["import Foundation","import Factory","","extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," if ProcessInfo().arguments.contains(\"mock1\") {"," myServiceType.register { MockServiceN(1) }"," }"," #endif"," }","}"]},{"inlineContent":[{"type":"text","text":"Or you can simplify things with an "},{"code":"arg","type":"codeVoice"},{"type":"text","text":" context that accomplishes the same thing."}],"type":"paragraph"},{"syntax":"swift","code":["import Foundation","import Factory","","extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," myServiceType.onArg(\"mock1\") { MockServiceN(1) }"," #endif"," }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"There are many contexts for testing, previews, and even UITesting. See "},{"isActive":true,"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts"},{"type":"text","text":" for more."}]},{"type":"paragraph","inlineContent":[{"text":"Obviously, one can add as many different test cases and registrations as needed.","type":"text"}]},{"level":2,"type":"heading","text":"Xcode 16 and Swift Testing","anchor":"Xcode-16-and-Swift-Testing"},{"inlineContent":[{"text":"So can we use Factory with Swift Testing in Xcode 16?","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"As usual, the answer to that is complicated, but it basically boils down to what you’re testing and whether or not those tests can be run in parallel.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Consider the following.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["import Testing","","struct AppTests {"," @Test(arguments: Parameters.allCases) func testA(parameter: Parameters) {"," Container.shared.someService.register { MockService(parameter: parameter) }"," let service = Container.shared.someService()"," #expect(service.parameter == parameter)"," }",""," @Test func testB() async throws {"," Container.shared.someService.register { ErrorService() }"," let service = Container.shared.someService()"," #expect(service.error == \"Oops\")"," }","}"]},{"type":"paragraph","inlineContent":[{"text":"Examine the code and you’ll see that the two tests both register different values for ","type":"text"},{"code":"someService","type":"codeVoice"},{"type":"text","text":" on the same shared container."}]},{"inlineContent":[{"type":"text","text":"Which means that these tests could suffer from race conditions should they be run in parallel."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Which in turn would result in tests failing randomly. And that’s bad.","type":"text"}]},{"type":"heading","level":3,"text":"Serialized Testing","anchor":"Serialized-Testing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The rules are relatively straightforward."}]},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"If you’re accessing a shared container "},{"type":"strong","inlineContent":[{"type":"text","text":"or"}]},{"text":" if you’re using one of the @injected property wrappers","type":"text"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"And if you’re altering common dependencies"}]}]}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Then those tests need to be serialized using "},{"type":"codeVoice","code":"@Suite(.serialized)"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here’s an example."}]},{"syntax":"swift","code":["import Testing","","@Suite(.serialized) struct AppTests {"," @Test(arguments: Parameters.allCases) func testA(parameter: Parameters) {"," Container.shared.someService.register { MockService(parameter: parameter) }"," let service = Container.shared.someService()"," #expect(service.parameter == parameter)"," }",""," @Test func testB() async throws {"," Container.shared.someService.register { ErrorService() }"," let service = Container.shared.someService()"," #expect(service.error == \"Oops\")"," }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"text":"Now testA will complete before testB is started, and both will obtain the expected services from the shared container.","type":"text"}]},{"level":3,"type":"heading","text":"Swift Testing and Container Injection","anchor":"Swift-Testing-and-Container-Injection"},{"type":"paragraph","inlineContent":[{"type":"text","text":"If you inject a specific container instance into your view models or services, then you can build and inject a separate container for each set of tests so that parallel testing works."}]},{"code":["class ContentViewModel {"," let service2: MyServiceType"," init(container: Container) {"," service2 = container.service()"," }","}","","@Suite struct AppTests {"," @Test(arguments: Parameters.allCases) func testA(parameter: Parameters) {"," let container = Container()"," container.someService.register { MockService(parameter: parameter) }"," let model = ContentViewModel(container: container)"," #expect(model.parameter == parameter)"," }",""," @Test func testB() async throws {"," let container = Container()"," container.someService.register { ErrorService() }"," let model = ContentViewModel(container: container)"," #expect(model.error == \"Oops\")"," }","}"],"syntax":"swift","type":"codeListing"},{"inlineContent":[{"text":"Here, every instance of ContentViewModel gets its own dedicated container and as such parallel testing should work as expected.","type":"text"}],"type":"paragraph"},{"type":"heading","text":"Swift Testing and Global Shared and Static Values","anchor":"Swift-Testing-and-Global-Shared-and-Static-Values","level":3},{"inlineContent":[{"type":"text","text":"This issue isn’t specific to Factor or Resolver, and in fact impacts other scenarios like using a "},{"type":"reference","identifier":"https:\/\/www.swiftwithvincent.com\/blog\/how-to-mock-any-network-call-with-urlprotocol","isActive":true},{"type":"text","text":" on URLSession.shared, or testing any code that depends on a global or statically shared variable."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"Setting up a URLProtocol result in testA and another in testB could cause race conditions when tests aren’t seeing the results that they’re expecting."}],"type":"paragraph"}],"kind":"content"}],"metadata":{"role":"article","modules":[{"name":"Factory"}],"roleHeading":"Article","title":"Testing"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/Testing","interfaceLanguage":"swift"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"abstract":[{"text":"Using Factory for Unit and UI Testing.","type":"text"}],"variants":[{"paths":["\/documentation\/factory\/testing"],"traits":[{"interfaceLanguage":"swift"}]}],"seeAlsoSections":[{"generated":true,"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Previews","doc:\/\/Factory\/documentation\/Factory\/Contexts","doc:\/\/Factory\/documentation\/Factory\/Debugging","doc:\/\/Factory\/documentation\/Factory\/Chains"],"title":"Development and Testing"}],"kind":"article","schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://Factory/documentation/Factory/Debugging":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","url":"\/documentation\/factory\/debugging","title":"Debugging","role":"article","kind":"article","abstract":[{"text":"Additional support for debugging resolution cycles, dependency chains and other issue.","type":"text"}],"type":"topic"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/Contexts":{"type":"topic","kind":"article","role":"article","url":"\/documentation\/factory\/contexts","title":"Contexts","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","abstract":[{"type":"text","text":"Changing injection results under special circumstances."}]},"doc://Factory/documentation/Factory/Chains":{"title":"Circular Dependency Chains","kind":"article","url":"\/documentation\/factory\/chains","type":"topic","role":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","abstract":[{"text":"Detecting and solving Circular Dependency Chains.","type":"text"}]},"doc://Factory/documentation/Factory/Previews":{"title":"SwiftUI Previews","kind":"article","url":"\/documentation\/factory\/previews","type":"topic","role":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","abstract":[{"text":"Mocking dependencies for SwiftUI Previews.","type":"text"}]},"https://www.swiftwithvincent.com/blog/how-to-mock-any-network-call-with-urlprotocol":{"url":"https:\/\/www.swiftwithvincent.com\/blog\/how-to-mock-any-network-call-with-urlprotocol","type":"link","title":"URLProtocol","identifier":"https:\/\/www.swiftwithvincent.com\/blog\/how-to-mock-any-network-call-with-urlprotocol","titleInlineContent":[{"text":"URLProtocol","type":"text"}]}}} \ No newline at end of file +{"kind":"article","hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"primaryContentSections":[{"kind":"content","content":[{"text":"Overview","anchor":"Overview","type":"heading","level":2},{"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"},{"type":"codeListing","syntax":"swift","code":["Container.shared.accountLoading.register { MockNoAccounts() }"]},{"inlineContent":[{"type":"text","text":"But Factory has other enhancements designed to make unit testing and user interface testing simpler and easier."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Some, like "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","isActive":true,"type":"reference"},{"type":"text","text":" you may have already seen and used. Others, like pushing\/popping container state, resetting, and so on, are discussed below."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Before we look at them, it’s important to first understand Xcode’s test process and environment, and consider what that means when writing your own unit tests using Factory."}]},{"type":"paragraph","inlineContent":[{"inlineContent":[{"type":"text","text":"Jump to the end for information on using Factory with Swift Testing in Xcode 16."}],"type":"emphasis"}]},{"type":"heading","level":2,"text":"The Unit Test Environment","anchor":"The-Unit-Test-Environment"},{"type":"paragraph","inlineContent":[{"type":"text","text":"When you run a unit test, Xcode is launching and running your app in order to provide a relevant context for your test code."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This means that application main ran, that the application delegate’s "},{"type":"codeVoice","code":"didFinishLaunchingWithOptions"},{"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":"text"},{"inlineContent":[{"type":"text","text":"then"}],"type":"emphasis"},{"type":"text","text":" XCTest will start constructing test classes and running test cases."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"All of which means that a LOT of code has already run before your first test has even fired."}]},{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Including dependency injection code."}]}]},{"type":"paragraph","inlineContent":[{"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"}]},{"inlineContent":[{"text":"This is specially true when dealing with ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"singletons"}]},{"type":"text","text":". But again, let’s save that topic for a bit later."}],"type":"paragraph"},{"anchor":"Changing-Not-Rebuilding","type":"heading","level":2,"text":"Changing, Not Rebuilding"},{"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":[{"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"},{"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"},{"isActive":true,"identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","type":"reference"},{"type":"text","text":" can help with that."}]},{"type":"paragraph","inlineContent":[{"text":"But we’re here to test, and one thing we probably ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"do"}]},{"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."}]},{"code":["func testNoAccounts() async {"," \/\/ register a mock"," Container.shared.accountLoading.register { MockNoAccounts() }"," \/\/ instantiate the model that uses the mock"," let model = Container.shared.accountsViewModel()"," \/\/ and test..."," await model.load()"," XCTAssertTrue(model.isLoaded)"," XCTAssertTrue(model.isEmpty)","}"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"type":"text","text":"Or we can write a test against unstable test data…"}],"type":"paragraph"},{"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","type":"codeListing"},{"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":[{"text":"We need to make sure that a change made in one test doesn’t affect a later test that relied on the ","type":"text"},{"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":[{"type":"text","text":"Sound confusing? It is. Try tracking it down in actual code."}]},{"type":"paragraph","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","inlineContent":[{"type":"text","text":"Fortunately, Factory can help with that."}]},{"anchor":"Pushing-and-Popping-State","text":"Pushing and Popping State","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"text":"In your unit test setUp function you can ","type":"text"},{"inlineContent":[{"type":"text","text":"push"}],"type":"emphasis"},{"text":" the current state of the registration system and then register and test anything you want.","type":"text"}]},{"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":[{"text":"The following example assumes we’re using the shared container.","type":"text"}],"type":"paragraph"},{"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)"," }","}"],"syntax":"swift","type":"codeListing"},{"inlineContent":[{"type":"text","text":"That’s pretty much it. Our "},{"type":"codeVoice","code":"AccountsViewModel"},{"type":"text","text":" depended on an "},{"type":"codeVoice","code":"AccountsLoading"},{"type":"text","text":" service."}],"type":"paragraph"},{"inlineContent":[{"text":"Change the service provided and we change the ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"data"}]},{"type":"text","text":" provided. Change the "},{"type":"emphasis","inlineContent":[{"text":"data","type":"text"}]},{"text":" provided and we change our view model’s behavior.","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"And then we test the results to see if everything matches up with our expectations.","type":"text"}]},{"anchor":"Diving-Deeper","type":"heading","level":2,"text":"Diving Deeper"},{"type":"paragraph","inlineContent":[{"text":"Note that the above is just one way of doing things. If, for example, our ","type":"text"},{"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","}"],"type":"codeListing","syntax":"swift"},{"inlineContent":[{"text":"We create the ","type":"text"},{"type":"codeVoice","code":"AccountsViewModel"},{"text":", the view model injects the ","type":"text"},{"code":"AccountLoading","type":"codeVoice"},{"type":"text","text":" service, and that service injects our mock network service."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"Same for our error code."}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["func testNoAccounts() async throws {"," Container.shared.networking.register { MockError(404) }"," let model = Container.shared.accountsViewModel()"," \/\/ as before","}"]},{"type":"paragraph","inlineContent":[{"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":"text"}]},{"type":"paragraph","inlineContent":[{"text":"Factory makes reaching deep into a dependency tree and adjusting behavior simple and easy.","type":"text"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"It can even help you see what’s "},{"inlineContent":[{"type":"text","text":"inside"}],"type":"emphasis"},{"text":" that dependency tree. See ","type":"text"},{"type":"reference","identifier":"doc:\/\/Factory\/documentation\/Factory\/Debugging","isActive":true},{"text":" for more information.","type":"text"}]},{"level":2,"text":"Rebuilding The Container","anchor":"Rebuilding-The-Container","type":"heading"},{"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","anchor":"Passed-Containers","level":2,"type":"heading"},{"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"},{"inlineContent":[{"text":"This does, of course, assume that you structured your app appropriately.","type":"text"}],"type":"paragraph"},{"text":"Common Setup","type":"heading","level":2,"anchor":"Common-Setup"},{"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":"paragraph"},{"syntax":"swift","type":"codeListing","code":["extension Container {"," func setupMocks() {"," myService.register { MockServiceN(4) }"," sharedService.register { MockService2() }"," }","}"]},{"type":"heading","level":2,"anchor":"Testing-Singletons","text":"Testing Singletons"},{"inlineContent":[{"type":"text","text":"Let’s talk singletons. The singleton scope cache is global, meaning that it’s "},{"type":"emphasis","inlineContent":[{"type":"text","text":"not"}]},{"type":"text","text":" managed by any specific container."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"That being the case, neither the push\/pull mechanism or the container rebuilding mechanisms described above will clear any cached singleton instances."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Singletons are, after all, expected to be singletons."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So what to do about it? Well, if needed we can reset "},{"type":"emphasis","inlineContent":[{"type":"text","text":"every"}]},{"type":"text","text":" cached singleton with just a single method call. Just call reset on that particular scope."}]},{"type":"codeListing","syntax":"swift","code":["Scope.singleton.reset()"]},{"inlineContent":[{"type":"text","text":"Or you can reset a specific singleton by reaching out to its factory."}],"type":"paragraph"},{"type":"codeListing","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() }"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"On that last point. Doing a registration change on a factory usually clears it’s associated scope automatically. The assumption, of course, being that if you register something you expect it to be used."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This also applies to singletons "},{"inlineContent":[{"text":"unless you’re inside of a autoRegister block.","type":"text"}],"type":"emphasis"},{"type":"text","text":" AutoRegistration can happen on every container creation, and automatically clearing a registered singleton each and every time that occurs kind of defeats the idea of multiple containers on one hand and singletons on the other."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"So all that said, we can deal with them. But as a general rule, singletons can complicate your life, your code, and your tests, and as such they should be avoided and only be used when there’s an overriding need for there to be one and only one instance of an object."}]},{"type":"paragraph","inlineContent":[{"text":"Got that, Highlander?","type":"text"}]},{"type":"heading","level":2,"text":"Xcode UITesting","anchor":"Xcode-UITesting"},{"type":"paragraph","inlineContent":[{"type":"text","text":"UITesting can be more challenging, in that we’re now to dealing with an active, running application. We have our existing tools, of course, but the issue is often complicated by the fact that we may want to change the application’s behavior "},{"inlineContent":[{"text":"before","type":"text"}],"type":"emphasis"},{"type":"text","text":" it gets to RunLoop.main and starts idling."}]},{"inlineContent":[{"text":"How?","type":"text"}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"One solution is passed parameters.","type":"text"}]},{"inlineContent":[{"text":"The test case is fairly straightforward.","type":"text"}],"type":"paragraph"},{"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":"codeListing","syntax":"swift"},{"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"}]},{"syntax":"swift","type":"codeListing","code":["import Foundation","import Factory","","extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," if ProcessInfo().arguments.contains(\"mock1\") {"," myServiceType.register { MockServiceN(1) }"," }"," #endif"," }","}"]},{"type":"paragraph","inlineContent":[{"text":"Or you can simplify things with an ","type":"text"},{"code":"arg","type":"codeVoice"},{"text":" context that accomplishes the same thing.","type":"text"}]},{"type":"codeListing","syntax":"swift","code":["import Foundation","import Factory","","extension Container: AutoRegistering {"," public func autoRegister() {"," #if DEBUG"," myServiceType.onArg(\"mock1\") { MockServiceN(1) }"," #endif"," }","}"]},{"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"},{"type":"paragraph","inlineContent":[{"text":"Obviously, one can add as many different test cases and registrations as needed.","type":"text"}]},{"type":"heading","level":2,"text":"Xcode 16 and Swift Testing","anchor":"Xcode-16-and-Swift-Testing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"So can we use Factory with Swift Testing in Xcode 16?"}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"As usual, the answer to that is complicated, but it basically boils down to what you’re testing and whether or not those tests can be run in parallel."}]},{"inlineContent":[{"type":"text","text":"Consider the following."}],"type":"paragraph"},{"type":"codeListing","syntax":"swift","code":["import Testing","","struct AppTests {"," @Test(arguments: Parameters.allCases) func testA(parameter: Parameters) {"," Container.shared.someService.register { MockService(parameter: parameter) }"," let service = Container.shared.someService()"," #expect(service.parameter == parameter)"," }",""," @Test func testB() async throws {"," Container.shared.someService.register { ErrorService() }"," let service = Container.shared.someService()"," #expect(service.error == \"Oops\")"," }","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Examine the code and you’ll see that the two tests both register different values for "},{"type":"codeVoice","code":"someService"},{"text":" on the same shared container.","type":"text"}]},{"inlineContent":[{"type":"text","text":"Which means that these tests could suffer from race conditions should they be run in parallel."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Which in turn would result in tests failing randomly. And that’s bad.","type":"text"}]},{"level":3,"type":"heading","text":"Serialized Testing","anchor":"Serialized-Testing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The rules are relatively straightforward."}]},{"items":[{"content":[{"type":"paragraph","inlineContent":[{"text":"If you’re accessing a shared container ","type":"text"},{"inlineContent":[{"text":"or","type":"text"}],"type":"strong"},{"text":" if you’re using one of the @injected property wrappers","type":"text"}]}]},{"content":[{"inlineContent":[{"type":"text","text":"And if you’re altering common dependencies"}],"type":"paragraph"}]}],"type":"unorderedList"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Then those tests need to be serialized using "},{"type":"codeVoice","code":"@Suite(.serialized)"},{"type":"text","text":"."}]},{"inlineContent":[{"text":"Here’s an example.","type":"text"}],"type":"paragraph"},{"type":"codeListing","code":["import Testing","","@Suite(.serialized) struct AppTests {"," @Test(arguments: Parameters.allCases) func testA(parameter: Parameters) {"," Container.shared.someService.register { MockService(parameter: parameter) }"," let service = Container.shared.someService()"," #expect(service.parameter == parameter)"," }",""," @Test func testB() async throws {"," Container.shared.someService.register { ErrorService() }"," let service = Container.shared.someService()"," #expect(service.error == \"Oops\")"," }","}"],"syntax":"swift"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Now testA will complete before testB is started, and both will obtain the expected services from the shared container."}]},{"type":"heading","level":3,"anchor":"Swift-Testing-and-Container-Injection","text":"Swift Testing and Container Injection"},{"inlineContent":[{"text":"If you inject a specific container instance into your view models or services, then you can build and inject a separate container for each set of tests so that parallel testing works.","type":"text"}],"type":"paragraph"},{"syntax":"swift","code":["class ContentViewModel {"," let service2: MyServiceType"," init(container: Container) {"," service2 = container.service()"," }","}","","@Suite struct AppTests {"," @Test(arguments: Parameters.allCases) func testA(parameter: Parameters) {"," let container = Container()"," container.someService.register { MockService(parameter: parameter) }"," let model = ContentViewModel(container: container)"," #expect(model.parameter == parameter)"," }",""," @Test func testB() async throws {"," let container = Container()"," container.someService.register { ErrorService() }"," let model = ContentViewModel(container: container)"," #expect(model.error == \"Oops\")"," }","}"],"type":"codeListing"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Here, every instance of ContentViewModel gets its own dedicated container and as such parallel testing should work as expected."}]},{"type":"heading","anchor":"Swift-Testing-and-Global-Shared-and-Static-Values","level":3,"text":"Swift Testing and Global Shared and Static Values"},{"inlineContent":[{"type":"text","text":"This issue isn’t specific to Factor or Resolver, and in fact impacts other scenarios like using a "},{"type":"reference","identifier":"https:\/\/www.swiftwithvincent.com\/blog\/how-to-mock-any-network-call-with-urlprotocol","isActive":true},{"type":"text","text":" on URLSession.shared, or testing any code that depends on a global or statically shared variable."}],"type":"paragraph"},{"type":"paragraph","inlineContent":[{"text":"Setting up a URLProtocol result in testA and another in testB could cause race conditions when tests aren’t seeing the results that they’re expecting.","type":"text"}]}]}],"variants":[{"paths":["\/documentation\/factory\/testing"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"abstract":[{"type":"text","text":"Using Factory for Unit and UI Testing."}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/Testing"},"sections":[],"metadata":{"modules":[{"name":"Factory"}],"role":"article","title":"Testing","roleHeading":"Article"},"seeAlsoSections":[{"title":"Development and Testing","generated":true,"identifiers":["doc:\/\/Factory\/documentation\/Factory\/Previews","doc:\/\/Factory\/documentation\/Factory\/Contexts","doc:\/\/Factory\/documentation\/Factory\/Debugging","doc:\/\/Factory\/documentation\/Factory\/Chains"]}],"references":{"doc://Factory/documentation/Factory/Chains":{"kind":"article","title":"Circular Dependency Chains","url":"\/documentation\/factory\/chains","identifier":"doc:\/\/Factory\/documentation\/Factory\/Chains","role":"article","type":"topic","abstract":[{"type":"text","text":"Detecting and solving Circular Dependency Chains."}]},"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","url":"\/documentation\/factory\/debugging","role":"article","type":"topic","title":"Debugging"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Previews":{"abstract":[{"type":"text","text":"Mocking dependencies for SwiftUI Previews."}],"kind":"article","identifier":"doc:\/\/Factory\/documentation\/Factory\/Previews","url":"\/documentation\/factory\/previews","role":"article","type":"topic","title":"SwiftUI Previews"},"https://www.swiftwithvincent.com/blog/how-to-mock-any-network-call-with-urlprotocol":{"titleInlineContent":[{"type":"text","text":"URLProtocol"}],"identifier":"https:\/\/www.swiftwithvincent.com\/blog\/how-to-mock-any-network-call-with-urlprotocol","type":"link","url":"https:\/\/www.swiftwithvincent.com\/blog\/how-to-mock-any-network-call-with-urlprotocol","title":"URLProtocol"},"doc://Factory/documentation/Factory/Contexts":{"url":"\/documentation\/factory\/contexts","kind":"article","role":"article","type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/Contexts","title":"Contexts","abstract":[{"text":"Changing injection results under special circumstances.","type":"text"}]}}} \ No newline at end of file diff --git a/docs/data/documentation/factory/weaklazyinjected.json b/docs/data/documentation/factory/weaklazyinjected.json index 9f91a209..73c4197f 100644 --- a/docs/data/documentation/factory/weaklazyinjected.json +++ b/docs/data/documentation/factory/weaklazyinjected.json @@ -1 +1 @@ -{"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","interfaceLanguage":"swift"},"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":{"navigatorTitle":[{"text":"WeakLazyInjected","kind":"identifier"}],"roleHeading":"Structure","role":"symbol","modules":[{"name":"Factory"}],"externalID":"s:7Factory16WeakLazyInjectedV","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"}],"title":"WeakLazyInjected","symbolKind":"struct"},"sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"schemaVersion":{"minor":3,"major":0,"patch":0},"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","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()"]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"attribute","text":"@propertyWrapper"},{"kind":"text","text":" "},{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"T"},{"text":">","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}]},{"content":[{"anchor":"overview","text":"Overview","level":2,"type":"heading"},{"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":[{"type":"text","text":"Property wrappers implement an annotation pattern to resolving dependencies, similar to using"},{"type":"text","text":" "},{"type":"text","text":"EnvironmentObject in SwiftUI."}]},{"type":"codeListing","syntax":"swift","code":["class MyViewModel {"," @LazyInjected(\\.myService) var service"," @LazyInjected(\\MyCustomContainer.myService) var service","}"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"The provided keypath resolves to a Factory definition on the "},{"code":"shared","type":"codeVoice"},{"type":"text","text":" container required for each Container type."},{"text":" ","type":"text"},{"text":"The short version of the keyPath resolves to the default container, while the expanded version","type":"text"},{"type":"text","text":" "},{"text":"allows you to point an instance on your own customer container type.","type":"text"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Lazy injection is resolved the first time the dependency is referenced by the code, "},{"type":"strong","inlineContent":[{"type":"text","text":"not"}]},{"text":" on initialization.","type":"text"}]}],"style":"note","name":"Note","type":"aside"}],"kind":"content"}],"references":{"doc://Factory/documentation/Factory/WeakLazyInjected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/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"},{"text":" ","kind":"text"},{"kind":"identifier","text":"WeakLazyInjected"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/WeakLazyInjected/factory":{"title":"factory","url":"\/documentation\/factory\/weaklazyinjected\/factory","role":"symbol","kind":"symbol","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":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/factory","abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"type":"topic"},"doc://Factory/documentation/Factory/WeakLazyInjected/projectedValue":{"title":"projectedValue","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"text":"WeakLazyInjected","kind":"typeIdentifier","preciseIdentifier":"s:7Factory16WeakLazyInjectedV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"url":"\/documentation\/factory\/weaklazyinjected\/projectedvalue","abstract":[{"text":"Unwraps the property wrapper granting access to the resolve\/reset function.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/projectedValue","type":"topic","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/WeakLazyInjected/init(_:)-4r0lx":{"type":"topic","fragments":[{"kind":"identifier","text":"init"},{"text":"(","kind":"text"},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}],"title":"init(_:)","abstract":[{"text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time.","type":"text"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/weaklazyinjected\/init(_:)-4r0lx","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-4r0lx"},"doc://Factory/documentation/Factory/WeakLazyInjected/wrappedValue":{"title":"wrappedValue","abstract":[{"text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time.","type":"text"}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}],"kind":"symbol","url":"\/documentation\/factory\/weaklazyinjected\/wrappedvalue","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/wrappedValue","type":"topic"},"doc://Factory/documentation/Factory/WeakLazyInjected/resolve(reset:)":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"text":")","kind":"text"}],"kind":"symbol","abstract":[{"text":"Allows the user to force a Factory resolution at their discretion.","type":"text"}],"url":"\/documentation\/factory\/weaklazyinjected\/resolve(reset:)","role":"symbol","title":"resolve(reset:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolve(reset:)","type":"topic"},"doc://Factory/documentation/Factory/WeakLazyInjected/init(_:)-75hq3":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected\/init(_:)-75hq3","title":"init(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-75hq3","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"fragments":[{"text":"init","kind":"identifier"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"kind":"text","text":"<"},{"text":"C","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}]},"doc://Factory/documentation/Factory/WeakLazyInjected/resolvedOrNil()":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolvedOrNil()","url":"\/documentation\/factory\/weaklazyinjected\/resolvedornil()","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"resolvedOrNil","kind":"identifier"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}],"role":"symbol","title":"resolvedOrNil()","kind":"symbol","abstract":[{"type":"text","text":"Projected function returns resolved instance if it exists."}]}}} \ No newline at end of file +{"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"attribute","text":"@propertyWrapper"},{"text":" ","kind":"text"},{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"WeakLazyInjected"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">","kind":"text"}],"languages":["swift"]}],"kind":"declarations"},{"kind":"content","content":[{"text":"Overview","level":2,"type":"heading","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"},{"type":"text","text":" "},{"text":"It’s useful for delegate patterns and parent\/child relationships.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"Property wrappers implement an annotation pattern to resolving dependencies, similar to using","type":"text"},{"text":" ","type":"text"},{"text":"EnvironmentObject in SwiftUI.","type":"text"}]},{"type":"codeListing","code":["class MyViewModel {"," @LazyInjected(\\.myService) var service1"," @LazyInjected(\\MyCustomContainer.myService) var service2","}"],"syntax":"swift"},{"inlineContent":[{"type":"text","text":"The provided keypath resolves to a Factory definition on the "},{"code":"shared","type":"codeVoice"},{"text":" container required for each Container type.","type":"text"},{"type":"text","text":" "},{"text":"The short version of the keyPath resolves to the default container, while the expanded version","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"allows you to point an instance of your own custom container type."}],"type":"paragraph"},{"type":"aside","style":"note","name":"Note","content":[{"type":"paragraph","inlineContent":[{"text":"Lazy injection is resolved the first time the dependency is referenced by the code, ","type":"text"},{"type":"strong","inlineContent":[{"text":"not","type":"text"}]},{"type":"text","text":" on initialization."}]}]}]}],"kind":"symbol","topicSections":[{"title":"Initializers","identifiers":["doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-4r0lx","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-75hq3"]},{"title":"Instance Properties","identifiers":["doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/projectedValue","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/wrappedValue"]},{"title":"Instance Methods","identifiers":["doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolve(reset:)","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolvedOrNil()"]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/weaklazyinjected"]}],"sections":[],"metadata":{"role":"symbol","navigatorTitle":[{"text":"WeakLazyInjected","kind":"identifier"}],"modules":[{"name":"Factory"}],"roleHeading":"Structure","symbolKind":"struct","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"WeakLazyInjected","kind":"identifier"}],"title":"WeakLazyInjected","externalID":"s:7Factory16WeakLazyInjectedV"},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","interfaceLanguage":"swift"},"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."}],"schemaVersion":{"patch":0,"minor":3,"major":0},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/WeakLazyInjected/resolve(reset:)":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/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\/weaklazyinjected\/resolve(reset:)","abstract":[{"text":"Allows the user to force a Factory resolution at their discretion.","type":"text"}],"title":"resolve(reset:)"},"doc://Factory/documentation/Factory/WeakLazyInjected/init(_:)-75hq3":{"role":"symbol","url":"\/documentation\/factory\/weaklazyinjected\/init(_:)-75hq3","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"title":"init(_:)","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"C"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-75hq3","kind":"symbol"},"doc://Factory/documentation/Factory/WeakLazyInjected/wrappedValue":{"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"wrappedValue","kind":"identifier"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?"}],"title":"wrappedValue","kind":"symbol","type":"topic","abstract":[{"text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time.","type":"text"}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/wrappedValue","url":"\/documentation\/factory\/weaklazyinjected\/wrappedvalue"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"title":"WeakLazyInjected","url":"\/documentation\/factory\/weaklazyinjected","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"text":"WeakLazyInjected","kind":"identifier"}]},"doc://Factory/documentation/Factory/WeakLazyInjected/projectedValue":{"title":"projectedValue","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/projectedValue","abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"projectedValue","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WeakLazyInjected","preciseIdentifier":"s:7Factory16WeakLazyInjectedV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"kind":"symbol","url":"\/documentation\/factory\/weaklazyinjected\/projectedvalue","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory/WeakLazyInjected/init(_:)-4r0lx":{"title":"init(_:)","url":"\/documentation\/factory\/weaklazyinjected\/init(_:)-4r0lx","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":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-4r0lx","role":"symbol","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier","text":"KeyPath"},{"text":"<","kind":"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"}],"type":"topic"},"doc://Factory/documentation/Factory/WeakLazyInjected/resolvedOrNil()":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolvedOrNil()","type":"topic","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolvedOrNil"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"url":"\/documentation\/factory\/weaklazyinjected\/resolvedornil()","abstract":[{"text":"Projected function returns resolved instance if it exists.","type":"text"}],"title":"resolvedOrNil()"},"doc://Factory/documentation/Factory/WeakLazyInjected/factory":{"abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"kind":"symbol","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"type":"topic","title":"factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/factory","url":"\/documentation\/factory\/weaklazyinjected\/factory"}}} \ 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 c5c9c98c..0548687c 100644 --- a/docs/data/documentation/factory/weaklazyinjected/factory.json +++ b/docs/data/documentation/factory/weaklazyinjected/factory.json @@ -1 +1 @@ -{"abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"schemaVersion":{"patch":0,"minor":3,"major":0},"sections":[],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/factory","interfaceLanguage":"swift"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"text":": ","kind":"text"},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"> { "},{"kind":"keyword","text":"get"},{"kind":"text","text":" }"}],"platforms":["macOS"],"languages":["swift"]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/weaklazyinjected\/factory"]}],"metadata":{"title":"factory","role":"symbol","symbolKind":"property","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"factory","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"roleHeading":"Instance Property","modules":[{"name":"Factory"}],"externalID":"s:7Factory16WeakLazyInjectedV7factoryA2AVyxGvp"},"kind":"symbol","references":{"doc://Factory/documentation/Factory/WeakLazyInjected/factory":{"title":"factory","url":"\/documentation\/factory\/weaklazyinjected\/factory","role":"symbol","kind":"symbol","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":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/factory","abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"type":"topic"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/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"},{"text":" ","kind":"text"},{"kind":"identifier","text":"WeakLazyInjected"}]},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"}}} \ No newline at end of file +{"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"factory","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"> { "},{"kind":"keyword","text":"get"},{"text":" }","kind":"text"}],"languages":["swift"]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"metadata":{"title":"factory","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"factory"},{"text":": ","kind":"text"},{"text":"Factory","preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">"}],"roleHeading":"Instance Property","externalID":"s:7Factory16WeakLazyInjectedV7factoryA2AVyxGvp","modules":[{"name":"Factory"}],"symbolKind":"property","role":"symbol"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/factory"},"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/factory"],"traits":[{"interfaceLanguage":"swift"}]}],"abstract":[{"text":"Grants access to the internal Factory.","type":"text"}],"kind":"symbol","sections":[],"references":{"doc://Factory/documentation/Factory/WeakLazyInjected/factory":{"abstract":[{"type":"text","text":"Grants access to the internal Factory."}],"kind":"symbol","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"factory"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"type":"topic","title":"factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/factory","url":"\/documentation\/factory\/weaklazyinjected\/factory"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"title":"WeakLazyInjected","url":"\/documentation\/factory\/weaklazyinjected","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"text":"WeakLazyInjected","kind":"identifier"}]},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"}}} \ 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 eba6027c..3f067db3 100644 --- a/docs/data/documentation/factory/weaklazyinjected/init(_:)-4r0lx.json +++ b/docs/data/documentation/factory/weaklazyinjected/init(_:)-4r0lx.json @@ -1 +1 @@ -{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-4r0lx"},"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/init(_:)-4r0lx"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"("},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"kind":"internalParam","text":"keyPath"},{"kind":"text","text":": "},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier","text":"Container"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}]},{"kind":"parameters","parameters":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"KeyPath to a Factory on the default Container."}]}],"name":"keyPath"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"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"}],"sections":[],"metadata":{"fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"text":"Factory","kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"symbolKind":"init","role":"symbol","title":"init(_:)","modules":[{"name":"Factory"}],"roleHeading":"Initializer","externalID":"s:7Factory16WeakLazyInjectedVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc"},"references":{"doc://Factory/documentation/Factory/Container":{"kind":"symbol","navigatorTitle":[{"text":"Container","kind":"identifier"}],"title":"Container","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"role":"symbol","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Container"}],"url":"\/documentation\/factory\/container"},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},"doc://Factory/documentation/Factory/WeakLazyInjected/init(_:)-4r0lx":{"type":"topic","fragments":[{"kind":"identifier","text":"init"},{"text":"(","kind":"text"},{"text":"KeyPath","kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Factory","preciseIdentifier":"s:7FactoryAAV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}],"title":"init(_:)","abstract":[{"text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time.","type":"text"}],"role":"symbol","kind":"symbol","url":"\/documentation\/factory\/weaklazyinjected\/init(_:)-4r0lx","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-4r0lx"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/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"},{"text":" ","kind":"text"},{"kind":"identifier","text":"WeakLazyInjected"}]}}} \ No newline at end of file +{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/weaklazyinjected\/init(_:)-4r0lx"]}],"metadata":{"modules":[{"name":"Factory"}],"roleHeading":"Initializer","role":"symbol","symbolKind":"init","externalID":"s:7Factory16WeakLazyInjectedVyACyxGs7KeyPathCyAA9ContainerCA2AVyxGGcfc","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:s7KeyPathC","text":"KeyPath","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"Container","preciseIdentifier":"s:7Factory9ContainerC","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}],"title":"init(_:)"},"sections":[],"abstract":[{"text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time.","type":"text"}],"schemaVersion":{"major":0,"minor":3,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-4r0lx"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"text":"keyPath","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"KeyPath","preciseIdentifier":"s:s7KeyPathC"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","text":"Container","preciseIdentifier":"s:7Factory9ContainerC"},{"kind":"text","text":", "},{"preciseIdentifier":"s:7FactoryAAV","kind":"typeIdentifier","text":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">>)"}],"languages":["swift"],"platforms":["macOS"]}]},{"parameters":[{"content":[{"inlineContent":[{"type":"text","text":"KeyPath to a Factory on the default Container."}],"type":"paragraph"}],"name":"keyPath"}],"kind":"parameters"}],"kind":"symbol","references":{"doc://Factory/documentation/Factory/WeakLazyInjected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"title":"WeakLazyInjected","url":"\/documentation\/factory\/weaklazyinjected","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"text":"WeakLazyInjected","kind":"identifier"}]},"doc://Factory/documentation/Factory/WeakLazyInjected/init(_:)-4r0lx":{"title":"init(_:)","url":"\/documentation\/factory\/weaklazyinjected\/init(_:)-4r0lx","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":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-4r0lx","role":"symbol","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier","text":"KeyPath"},{"text":"<","kind":"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"}],"type":"topic"},"doc://Factory/documentation/Factory/Container":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Container","type":"topic","title":"Container","abstract":[{"text":"This is the default Container provided for your convenience by Factory.","type":"text"}],"url":"\/documentation\/factory\/container","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Container"}],"navigatorTitle":[{"text":"Container","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"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 5639842a..a35c2c19 100644 --- a/docs/data/documentation/factory/weaklazyinjected/init(_:)-75hq3.json +++ b/docs/data/documentation/factory/weaklazyinjected/init(_:)-75hq3.json @@ -1 +1 @@ -{"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"init","kind":"keyword"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"text":">(","kind":"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"},{"kind":"text","text":", "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>) "},{"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"}],"languages":["swift"]}]},{"parameters":[{"name":"keyPath","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"KeyPath to a Factory on the specified Container."}]}]}],"kind":"parameters"}],"kind":"symbol","metadata":{"fragments":[{"kind":"identifier","text":"init"},{"text":"<","kind":"text"},{"kind":"genericParameter","text":"C"},{"text":">(","kind":"text"},{"preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier","text":"KeyPath"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":", "},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"text":"T","kind":"typeIdentifier"},{"text":">>)","kind":"text"}],"roleHeading":"Initializer","role":"symbol","modules":[{"name":"Factory"}],"title":"init(_:)","externalID":"s:7Factory16WeakLazyInjectedVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc","symbolKind":"init"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"abstract":[{"text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time.","type":"text"}],"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/init(_:)-75hq3"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-75hq3","interfaceLanguage":"swift"},"references":{"doc://Factory/documentation/Factory/SharedContainer":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/sharedcontainer","navigatorTitle":[{"kind":"identifier","text":"SharedContainer"}],"title":"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."}],"fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"SharedContainer","kind":"identifier"}]},"doc://Factory/documentation/Factory/WeakLazyInjected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/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"},{"text":" ","kind":"text"},{"kind":"identifier","text":"WeakLazyInjected"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/WeakLazyInjected/init(_:)-75hq3":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected\/init(_:)-75hq3","title":"init(_:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-75hq3","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"fragments":[{"text":"init","kind":"identifier"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"kind":"text","text":"<"},{"text":"C","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:7FactoryAAV","text":"Factory"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":">>)"}]},"doc://Factory/documentation/Factory/Factory":{"role":"symbol","abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"url":"\/documentation\/factory\/factory","navigatorTitle":[{"kind":"identifier","text":"Factory"}],"type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"title":"Factory","kind":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory"}}} \ No newline at end of file +{"schemaVersion":{"patch":0,"major":0,"minor":3},"abstract":[{"text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time.","type":"text"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-75hq3"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/weaklazyinjected\/init(_:)-75hq3"]}],"kind":"symbol","sections":[],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"init","kind":"keyword"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"kind":"text","text":">("},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"text":"keyPath","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"KeyPath","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"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">>) ","kind":"text"},{"kind":"keyword","text":"where"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","text":"C"},{"kind":"text","text":" : "},{"text":"SharedContainer","kind":"typeIdentifier","preciseIdentifier":"s:7Factory15SharedContainerP","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer"}]}],"kind":"declarations"},{"kind":"parameters","parameters":[{"name":"keyPath","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"KeyPath to a Factory on the specified Container."}]}]}]}],"metadata":{"symbolKind":"init","roleHeading":"Initializer","role":"symbol","fragments":[{"kind":"identifier","text":"init"},{"text":"<","kind":"text"},{"text":"C","kind":"genericParameter"},{"text":">(","kind":"text"},{"preciseIdentifier":"s:s7KeyPathC","kind":"typeIdentifier","text":"KeyPath"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"C"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"externalID":"s:7Factory16WeakLazyInjectedVyACyxGs7KeyPathCyqd__A2AVyxGGcAA15SharedContainerRd__lufc","title":"init(_:)","modules":[{"name":"Factory"}]},"references":{"doc://Factory/documentation/Factory/WeakLazyInjected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"title":"WeakLazyInjected","url":"\/documentation\/factory\/weaklazyinjected","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"text":"WeakLazyInjected","kind":"identifier"}]},"doc://Factory/documentation/Factory/WeakLazyInjected/init(_:)-75hq3":{"role":"symbol","url":"\/documentation\/factory\/weaklazyinjected\/init(_:)-75hq3","abstract":[{"type":"text","text":"Initializes the property wrapper. The dependency isn’t resolved until the wrapped value is accessed for the first time."}],"title":"init(_:)","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"C"},{"kind":"text","text":">("},{"kind":"typeIdentifier","preciseIdentifier":"s:s7KeyPathC","text":"KeyPath"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"C"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:7FactoryAAV","text":"Factory","kind":"typeIdentifier"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">>)","kind":"text"}],"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/init(_:)-75hq3","kind":"symbol"},"doc://Factory/documentation/Factory/Factory":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/Factory","role":"symbol","type":"topic","navigatorTitle":[{"text":"Factory","kind":"identifier"}],"title":"Factory","url":"\/documentation\/factory\/factory","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Factory","kind":"identifier"}],"abstract":[{"text":"A Factory manages the dependency injection process for a specific object or service.","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/SharedContainer":{"url":"\/documentation\/factory\/sharedcontainer","type":"topic","abstract":[{"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.","type":"text"}],"title":"SharedContainer","identifier":"doc:\/\/Factory\/documentation\/Factory\/SharedContainer","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"text":"SharedContainer","kind":"identifier"}],"navigatorTitle":[{"text":"SharedContainer","kind":"identifier"}]},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 171e04d6..431f73a6 100644 --- a/docs/data/documentation/factory/weaklazyinjected/projectedvalue.json +++ b/docs/data/documentation/factory/weaklazyinjected/projectedvalue.json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/weaklazyinjected\/projectedvalue"]}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"var"},{"text":" ","kind":"text"},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","text":"WeakLazyInjected","preciseIdentifier":"s:7Factory16WeakLazyInjectedV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"> { ","kind":"text"},{"kind":"keyword","text":"get"},{"text":" ","kind":"text"},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/projectedValue","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"sections":[],"metadata":{"title":"projectedValue","externalID":"s:7Factory16WeakLazyInjectedV14projectedValueACyxGvp","modules":[{"name":"Factory"}],"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"projectedValue","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:7Factory16WeakLazyInjectedV","kind":"typeIdentifier","text":"WeakLazyInjected"},{"kind":"text","text":"<"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"role":"symbol","symbolKind":"property","roleHeading":"Instance Property"},"schemaVersion":{"minor":3,"major":0,"patch":0},"kind":"symbol","references":{"doc://Factory/documentation/Factory/WeakLazyInjected/projectedValue":{"title":"projectedValue","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"text":"WeakLazyInjected","kind":"typeIdentifier","preciseIdentifier":"s:7Factory16WeakLazyInjectedV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":">","kind":"text"}],"url":"\/documentation\/factory\/weaklazyinjected\/projectedvalue","abstract":[{"text":"Unwraps the property wrapper granting access to the resolve\/reset function.","type":"text"}],"identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/projectedValue","type":"topic","role":"symbol","kind":"symbol"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/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"},{"text":" ","kind":"text"},{"kind":"identifier","text":"WeakLazyInjected"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/projectedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"modules":[{"name":"Factory"}],"title":"projectedValue","symbolKind":"property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"projectedValue"},{"kind":"text","text":": "},{"text":"WeakLazyInjected","kind":"typeIdentifier","preciseIdentifier":"s:7Factory16WeakLazyInjectedV"},{"text":"<","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":">"}],"externalID":"s:7Factory16WeakLazyInjectedV14projectedValueACyxGvp","role":"symbol","roleHeading":"Instance Property"},"sections":[],"kind":"symbol","identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/projectedValue","interfaceLanguage":"swift"},"schemaVersion":{"minor":3,"major":0,"patch":0},"abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"projectedValue","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"WeakLazyInjected","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected","preciseIdentifier":"s:7Factory16WeakLazyInjectedV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"> { ","kind":"text"},{"kind":"keyword","text":"get"},{"kind":"text","text":" "},{"text":"set","kind":"keyword"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}]}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"references":{"doc://Factory/documentation/Factory/WeakLazyInjected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"title":"WeakLazyInjected","url":"\/documentation\/factory\/weaklazyinjected","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"text":"WeakLazyInjected","kind":"identifier"}]},"doc://Factory/documentation/Factory/WeakLazyInjected/projectedValue":{"title":"projectedValue","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/projectedValue","abstract":[{"type":"text","text":"Unwraps the property wrapper granting access to the resolve\/reset function."}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"projectedValue","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"WeakLazyInjected","preciseIdentifier":"s:7Factory16WeakLazyInjectedV"},{"text":"<","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":">","kind":"text"}],"kind":"symbol","url":"\/documentation\/factory\/weaklazyinjected\/projectedvalue","type":"topic","role":"symbol"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"}}} \ 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 b572e9df..ebb9f29c 100644 --- a/docs/data/documentation/factory/weaklazyinjected/resolve(reset:).json +++ b/docs/data/documentation/factory/weaklazyinjected/resolve(reset:).json @@ -1 +1 @@ -{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolve(reset:)"},"schemaVersion":{"patch":0,"minor":3,"major":0},"metadata":{"roleHeading":"Instance Method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"reset"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"text":")","kind":"text"}],"modules":[{"name":"Factory"}],"role":"symbol","title":"resolve(reset:)","externalID":"s:7Factory16WeakLazyInjectedV7resolve5resetyAA0A12ResetOptionsO_tF","symbolKind":"method"},"kind":"symbol","abstract":[{"type":"text","text":"Allows the user to force a Factory resolution at their discretion."}],"sections":[],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"mutating","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"resolve"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"reset"},{"kind":"text","text":" "},{"kind":"internalParam","text":"options"},{"kind":"text","text":": "},{"preciseIdentifier":"s:7Factory0A12ResetOptionsO","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","text":"FactoryResetOptions","kind":"typeIdentifier"},{"text":" = .none)","kind":"text"}],"languages":["swift"]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/resolve(reset:)"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://Factory/documentation/Factory/WeakLazyInjected/resolve(reset:)":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolve","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"reset"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"text":")","kind":"text"}],"kind":"symbol","abstract":[{"text":"Allows the user to force a Factory resolution at their discretion.","type":"text"}],"url":"\/documentation\/factory\/weaklazyinjected\/resolve(reset:)","role":"symbol","title":"resolve(reset:)","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolve(reset:)","type":"topic"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/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"},{"text":" ","kind":"text"},{"kind":"identifier","text":"WeakLazyInjected"}]},"doc://Factory/documentation/Factory/FactoryResetOptions":{"type":"topic","navigatorTitle":[{"kind":"identifier","text":"FactoryResetOptions"}],"title":"FactoryResetOptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol","url":"\/documentation\/factory\/factoryresetoptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"FactoryResetOptions"}]}}} \ No newline at end of file +{"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolve(reset:)","interfaceLanguage":"swift"},"metadata":{"title":"resolve(reset:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"text":"(","kind":"text"},{"text":"reset","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO","text":"FactoryResetOptions"},{"kind":"text","text":")"}],"roleHeading":"Instance Method","externalID":"s:7Factory16WeakLazyInjectedV7resolve5resetyAA0A12ResetOptionsO_tF","modules":[{"name":"Factory"}],"symbolKind":"method","role":"symbol"},"sections":[],"abstract":[{"text":"Allows the user to force a Factory resolution at their discretion.","type":"text"}],"kind":"symbol","primaryContentSections":[{"declarations":[{"tokens":[{"text":"mutating","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"resolve","kind":"identifier"},{"text":"(","kind":"text"},{"text":"reset","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"options","kind":"internalParam"},{"kind":"text","text":": "},{"identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","text":"FactoryResetOptions","kind":"typeIdentifier","preciseIdentifier":"s:7Factory0A12ResetOptionsO"},{"text":" = .none)","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/resolve(reset:)"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"title":"WeakLazyInjected","url":"\/documentation\/factory\/weaklazyinjected","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"text":"WeakLazyInjected","kind":"identifier"}]},"doc://Factory/documentation/Factory/FactoryResetOptions":{"title":"FactoryResetOptions","identifier":"doc:\/\/Factory\/documentation\/Factory\/FactoryResetOptions","role":"symbol","type":"topic","navigatorTitle":[{"text":"FactoryResetOptions","kind":"identifier"}],"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"FactoryResetOptions"}],"url":"\/documentation\/factory\/factoryresetoptions","abstract":[{"text":"Reset options for Factory’s and Container’s","type":"text"}],"kind":"symbol"},"doc://Factory/documentation/Factory/WeakLazyInjected/resolve(reset:)":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/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\/weaklazyinjected\/resolve(reset:)","abstract":[{"text":"Allows the user to force a Factory resolution at their discretion.","type":"text"}],"title":"resolve(reset:)"}}} \ 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 af56a3b9..b91b8274 100644 --- a/docs/data/documentation/factory/weaklazyinjected/resolvedornil().json +++ b/docs/data/documentation/factory/weaklazyinjected/resolvedornil().json @@ -1 +1 @@ -{"kind":"symbol","metadata":{"symbolKind":"method","externalID":"s:7Factory16WeakLazyInjectedV13resolvedOrNilxSgyF","roleHeading":"Instance Method","role":"symbol","modules":[{"name":"Factory"}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"resolvedOrNil","kind":"identifier"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"title":"resolvedOrNil()"},"abstract":[{"type":"text","text":"Projected function returns resolved instance if it exists."}],"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"sections":[],"schemaVersion":{"minor":3,"major":0,"patch":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/weaklazyinjected\/resolvedornil()"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolvedOrNil()","interfaceLanguage":"swift"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"resolvedOrNil","kind":"identifier"},{"kind":"text","text":"() -> "},{"text":"T","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"languages":["swift"]}],"kind":"declarations"},{"content":[{"level":2,"type":"heading","text":"Discussion","anchor":"discussion"},{"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"},{"text":" ","type":"text"},{"text":"the property wrapper instance if it hasn’t already been resolved.","type":"text"}],"type":"paragraph"},{"code":["deinit {"," $myService.resolvedOrNil()?.cleanup()","}"],"syntax":"swift","type":"codeListing"}],"kind":"content"}],"references":{"doc://Factory/documentation/Factory/WeakLazyInjected/resolvedOrNil()":{"type":"topic","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolvedOrNil()","url":"\/documentation\/factory\/weaklazyinjected\/resolvedornil()","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"resolvedOrNil","kind":"identifier"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}],"role":"symbol","title":"resolvedOrNil()","kind":"symbol","abstract":[{"type":"text","text":"Projected function returns resolved instance if it exists."}]},"doc://Factory/documentation/Factory/WeakLazyInjected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/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"},{"text":" ","kind":"text"},{"kind":"identifier","text":"WeakLazyInjected"}]},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"}}} \ No newline at end of file +{"abstract":[{"type":"text","text":"Projected function returns resolved instance if it exists."}],"schemaVersion":{"minor":3,"major":0,"patch":0},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"resolvedOrNil","kind":"identifier"},{"text":"() -> ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}]}]},{"kind":"content","content":[{"type":"heading","level":2,"anchor":"discussion","text":"Discussion"},{"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"},{"text":" ","type":"text"},{"type":"text","text":"the property wrapper instance if it hasn’t already been resolved."}],"type":"paragraph"},{"syntax":"swift","type":"codeListing","code":["deinit {"," $myService.resolvedOrNil()?.cleanup()","}"]}]}],"kind":"symbol","metadata":{"title":"resolvedOrNil()","externalID":"s:7Factory16WeakLazyInjectedV13resolvedOrNilxSgyF","modules":[{"name":"Factory"}],"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolvedOrNil"},{"text":"() -> ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"roleHeading":"Instance Method","symbolKind":"method"},"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/resolvedornil()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolvedOrNil()","interfaceLanguage":"swift"},"sections":[],"references":{"doc://Factory/documentation/Factory/WeakLazyInjected/resolvedOrNil()":{"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/resolvedOrNil()","type":"topic","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"resolvedOrNil"},{"kind":"text","text":"() -> "},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"url":"\/documentation\/factory\/weaklazyinjected\/resolvedornil()","abstract":[{"text":"Projected function returns resolved instance if it exists.","type":"text"}],"title":"resolvedOrNil()"},"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"title":"WeakLazyInjected","url":"\/documentation\/factory\/weaklazyinjected","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"text":"WeakLazyInjected","kind":"identifier"}]}}} \ 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 9f54d227..16bf6ddb 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."}],"metadata":{"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"wrappedValue","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"text":"?","kind":"text"}],"roleHeading":"Instance Property","role":"symbol","modules":[{"name":"Factory"}],"title":"wrappedValue","externalID":"s:7Factory16WeakLazyInjectedV12wrappedValuexSgvp","symbolKind":"property"},"sections":[],"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"text":"wrappedValue","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"text":"? { ","kind":"text"},{"kind":"keyword","text":"mutating"},{"kind":"text","text":" "},{"text":"get","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}]}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/factory\/weaklazyinjected\/wrappedvalue"]}],"identifier":{"url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/wrappedValue","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://Factory/documentation/Factory/WeakLazyInjected/wrappedValue":{"title":"wrappedValue","abstract":[{"text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time.","type":"text"}],"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"wrappedValue"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?"}],"kind":"symbol","url":"\/documentation\/factory\/weaklazyinjected\/wrappedvalue","role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/wrappedValue","type":"topic"},"doc://Factory/documentation/Factory":{"kind":"symbol","title":"Factory","identifier":"doc:\/\/Factory\/documentation\/Factory","url":"\/documentation\/factory","abstract":[{"type":"text","text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI."}],"role":"collection","type":"topic"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"type":"topic","kind":"symbol","role":"symbol","url":"\/documentation\/factory\/weaklazyinjected","navigatorTitle":[{"kind":"identifier","text":"WeakLazyInjected"}],"title":"WeakLazyInjected","identifier":"doc:\/\/Factory\/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"},{"text":" ","kind":"text"},{"kind":"identifier","text":"WeakLazyInjected"}]}}} \ No newline at end of file +{"variants":[{"paths":["\/documentation\/factory\/weaklazyinjected\/wrappedvalue"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"title":"wrappedValue","externalID":"s:7Factory16WeakLazyInjectedV12wrappedValuexSgvp","modules":[{"name":"Factory"}],"role":"symbol","roleHeading":"Instance Property","symbolKind":"property","fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"wrappedValue","kind":"identifier"},{"text":": ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?"}]},"hierarchy":{"paths":[["doc:\/\/Factory\/documentation\/Factory","doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected"]]},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"wrappedValue","kind":"identifier"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"T"},{"text":"? { ","kind":"text"},{"text":"mutating","kind":"keyword"},{"kind":"text","text":" "},{"text":"get","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"set"},{"kind":"text","text":" }"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/wrappedValue"},"abstract":[{"text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time.","type":"text"}],"sections":[],"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"references":{"doc://Factory/documentation/Factory":{"abstract":[{"text":"A new approach to Container-Based Dependency Injection for Swift and SwiftUI.","type":"text"}],"role":"collection","identifier":"doc:\/\/Factory\/documentation\/Factory","title":"Factory","url":"\/documentation\/factory","type":"topic","kind":"symbol"},"doc://Factory/documentation/Factory/WeakLazyInjected/wrappedValue":{"fragments":[{"text":"var","kind":"keyword"},{"kind":"text","text":" "},{"text":"wrappedValue","kind":"identifier"},{"kind":"text","text":": "},{"text":"T","kind":"typeIdentifier"},{"kind":"text","text":"?"}],"title":"wrappedValue","kind":"symbol","type":"topic","abstract":[{"text":"Manages the wrapped dependency, which is resolved when this value is accessed for the first time.","type":"text"}],"role":"symbol","identifier":"doc:\/\/Factory\/documentation\/Factory\/WeakLazyInjected\/wrappedValue","url":"\/documentation\/factory\/weaklazyinjected\/wrappedvalue"},"doc://Factory/documentation/Factory/WeakLazyInjected":{"identifier":"doc:\/\/Factory\/documentation\/Factory\/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."}],"title":"WeakLazyInjected","url":"\/documentation\/factory\/weaklazyinjected","type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"WeakLazyInjected","kind":"identifier"}],"navigatorTitle":[{"text":"WeakLazyInjected","kind":"identifier"}]}}} \ No newline at end of file diff --git a/docs/documentation/factory/dynamicinjected/index.html b/docs/documentation/factory/dynamicinjected/index.html new file mode 100644 index 00000000..b301ba20 --- /dev/null +++ b/docs/documentation/factory/dynamicinjected/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/factory/dynamicinjected/init(_:)-2f6gs/index.html b/docs/documentation/factory/dynamicinjected/init(_:)-2f6gs/index.html new file mode 100644 index 00000000..b301ba20 --- /dev/null +++ b/docs/documentation/factory/dynamicinjected/init(_:)-2f6gs/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/factory/dynamicinjected/init(_:)-3wi25/index.html b/docs/documentation/factory/dynamicinjected/init(_:)-3wi25/index.html new file mode 100644 index 00000000..b301ba20 --- /dev/null +++ b/docs/documentation/factory/dynamicinjected/init(_:)-3wi25/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/factory/dynamicinjected/projectedvalue/index.html b/docs/documentation/factory/dynamicinjected/projectedvalue/index.html new file mode 100644 index 00000000..b301ba20 --- /dev/null +++ b/docs/documentation/factory/dynamicinjected/projectedvalue/index.html @@ -0,0 +1 @@ +Documentation
\ No newline at end of file diff --git a/docs/documentation/factory/dynamicinjected/wrappedvalue/index.html b/docs/documentation/factory/dynamicinjected/wrappedvalue/index.html new file mode 100644 index 00000000..b301ba20 --- /dev/null +++ b/docs/documentation/factory/dynamicinjected/wrappedvalue/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 bd8366e8..e67f89e5 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:_:)-33sw2","title":"func callAsFunction(key: StaticString, () -> T) -> Factory","type":"method"},{"path":"\/documentation\/factory\/container\/callasfunction(key:_:)-9b7qn","title":"func callAsFunction(key: StaticString, (P) -> T) -> ParameterFactory","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:_:)-6ql8v","title":"func callAsFunction(key: StaticString, () -> T) -> Factory","type":"method"},{"path":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-8rljq","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:)-9ktpf","title":"func register(T.Type, factory: () -> T) -> Factory","type":"method"}],"title":"Resolving Implementations","type":"groupMarker"}],"path":"\/documentation\/factory\/resolving\/register(_:factory:)-h3xb","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(any 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"},{"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(any 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(any 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 +{"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:_:)-33sw2","title":"func callAsFunction(key: StaticString, () -> T) -> Factory","type":"method"},{"path":"\/documentation\/factory\/container\/callasfunction(key:_:)-9b7qn","title":"func callAsFunction(key: StaticString, (P) -> T) -> ParameterFactory","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:_:)-6ql8v","title":"func callAsFunction(key: StaticString, () -> T) -> Factory","type":"method"},{"path":"\/documentation\/factory\/managedcontainer\/callasfunction(key:_:)-8rljq","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:)-9ktpf","title":"func register(T.Type, factory: () -> T) -> Factory","type":"method"}],"title":"Resolving Implementations","type":"groupMarker"}],"path":"\/documentation\/factory\/resolving\/register(_:factory:)-h3xb","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\/dynamicinjected\/init(_:)-2f6gs","title":"init(KeyPath>)","type":"init"},{"path":"\/documentation\/factory\/dynamicinjected\/init(_:)-3wi25","title":"init(KeyPath>)","type":"init"},{"title":"Instance Properties","type":"groupMarker"},{"path":"\/documentation\/factory\/dynamicinjected\/projectedvalue","title":"var projectedValue: Factory","type":"property"},{"path":"\/documentation\/factory\/dynamicinjected\/wrappedvalue","title":"var wrappedValue: T","type":"property"}],"path":"\/documentation\/factory\/dynamicinjected","title":"DynamicInjected","type":"struct"},{"children":[{"title":"Initializers","type":"groupMarker"},{"path":"\/documentation\/factory\/factory\/init(_:key:_:)","title":"init(any 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"},{"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(any 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(any 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 a231cfea..9725c00a 100644 --- a/docs/metadata.json +++ b/docs/metadata.json @@ -1 +1 @@ -{"schemaVersion":{"patch":0,"minor":1,"major":0},"bundleDisplayName":"Factory","bundleIdentifier":"Factory"} \ No newline at end of file +{"schemaVersion":{"major":0,"minor":1,"patch":0},"bundleIdentifier":"Factory","bundleDisplayName":"Factory"} \ No newline at end of file