using Microsoft.Extensions.DependencyInjection; namespace Umbraco.Cms.Core.Composing; /// /// Represents a collection builder. /// public interface ICollectionBuilder { /// /// Registers the builder so it can build the collection, by /// registering the collection and the types. /// void RegisterWith(IServiceCollection services); } /// /// Represents a collection builder. /// /// The type of the collection. /// The type of the items. public interface ICollectionBuilder : ICollectionBuilder where TCollection : IBuilderCollection { /// /// Creates a collection. /// /// A collection. /// Creates a new collection each time it is invoked. TCollection CreateCollection(IServiceProvider factory); }