Class BuilderServiceCollection
- Namespace
- The.Web.Composition
- Assembly
- Instagile.Web.Client.dll
public sealed class BuilderServiceCollection : IServiceCollection, IList<ServiceDescriptor>, ICollection<ServiceDescriptor>, IEnumerable<ServiceDescriptor>, IEnumerable, IBuilder<BuilderServiceCollection>
- Inheritance
-
BuilderServiceCollection
- Implements
- Inherited Members
- Extension Methods
-
JobServiceCollectionExtensions.AddJob<TService, TOptions>(IServiceCollection, IConfigurationSection)
Constructors
BuilderServiceCollection(IBuilder<Builder>, IServiceCollection)
public BuilderServiceCollection(IBuilder<Builder> builder, IServiceCollection inner)
Parameters
builderIBuilder<Builder>innerIServiceCollection
Methods
Configure(Action<Options>)
public BuilderServiceCollection Configure(Action<Options> configure)
Parameters
Returns
RegisterAuthentication(Func<IAuthentication, IAuthentication>)
Optionally provide an IAuthentication to use for login. Principals will still be derived from the HttpContext, but logging in can set the User of that context.
public BuilderServiceCollection RegisterAuthentication(Func<IAuthentication, IAuthentication> wrapAuthentication)
Parameters
wrapAuthenticationFunc<IAuthentication, IAuthentication>
Returns
Remarks
The factory delegate is given the default WebAuthentication in case it wants to wrap it.
RegisterAuthentication(IAuthentication)
Optionally provide an IAuthentication to use for login. Principals will still be derived from the HttpContext, but logging in can set the User of that context.
public BuilderServiceCollection RegisterAuthentication(IAuthentication authentication)
Parameters
authenticationIAuthentication
Returns
RegisterAuthorisation(IAuthorisation)
Optionally provide an IAuthorisation to use for checking resource access.
public BuilderServiceCollection RegisterAuthorisation(IAuthorisation authorisation)
Parameters
authorisationIAuthorisation
Returns
RegisterDocumentStore(IDocumentStore)
Optionally provide an IDocumentStore to use instead of the default NoDocumentStore for reading and writing documents.
public BuilderServiceCollection RegisterDocumentStore(IDocumentStore documentStore)
Parameters
documentStoreIDocumentStore
Returns
RegisterEndpoint(Func<IServiceProvider, IEndpoint>)
Optionally provide an IEndpoint to use for making RPC calls. This will be used for RemoteEntityStore if no other entitystore is specified.
public BuilderServiceCollection RegisterEndpoint(Func<IServiceProvider, IEndpoint> getEndpoint)
Parameters
getEndpointFunc<IServiceProvider, IEndpoint>
Returns
RegisterEntityStore(IEntityStore)
Optionally provide an IEntityStore to use for reading and writing entities. If an endpoint is registered, RemoteEntityStore will be used by default.
public BuilderServiceCollection RegisterEntityStore(IEntityStore store)
Parameters
storeIEntityStore
Returns
RegisterMailer(IMailer)
Optionally provide an IMailer to use for sending email.
public BuilderServiceCollection RegisterMailer(IMailer mailer)
Parameters
mailerIMailer
Returns
RegisterMetadata(EntityMetadataDictionary)
Provide the generated entity metadata.
public BuilderServiceCollection RegisterMetadata(EntityMetadataDictionary metadata)
Parameters
metadataEntityMetadataDictionary
Returns
RegisterPersistentCache(IPersistentCache?)
Optionally provide an an external store to keep entity cache entries outside of memory.
public BuilderServiceCollection RegisterPersistentCache(IPersistentCache? persistentCache)
Parameters
persistentCacheIPersistentCache
Returns
RegisterPreferenceStore(IPreferenceStore)
Optionally provide an IPreferenceStore to use instead of the default entity-based or in-memory store for reading and writing preferences.
public BuilderServiceCollection RegisterPreferenceStore(IPreferenceStore preferenceStore)
Parameters
preferenceStoreIPreferenceStore
Returns
RegisterReminderStore(IReminderStore)
Optionally provide an IReminderStore used by AddReminders() to query reminder counts. If an endpoint is registered, RemoteReminderStore will be used by default; otherwise, the default is LocalReminderStore.
public BuilderServiceCollection RegisterReminderStore(IReminderStore reminderStore)
Parameters
reminderStoreIReminderStore
Returns
RegisterTransientCache(TransientCache?)
Optionally replace or remove the built in memory-based entity cache.
public BuilderServiceCollection RegisterTransientCache(TransientCache? memoryCache)
Parameters
memoryCacheTransientCache
Returns
RemoveRPC(Procedure)
Deregister a built-in remote procedure.
public BuilderServiceCollection RemoveRPC(Procedure procedure)
Parameters
procedureProcedure
Returns
WithLicenceChallengeResponse(string)
public BuilderServiceCollection WithLicenceChallengeResponse(string encodedResponse)
Parameters
encodedResponsestring
Returns
WithLicenceFile(string)
public BuilderServiceCollection WithLicenceFile(string licenseFile)
Parameters
licenseFilestring
Returns
WithLicenceResource(Assembly, string)
public BuilderServiceCollection WithLicenceResource(Assembly embeddedResourceLocation, string embeddedResourceName)