/// <summary>
 /// Controller activator is used to instantiate an <see cref="IHttpController"/>.
 /// </summary>
 /// <returns>
 /// An <see cref="IHttpControllerActivator"/> instance or null if none are registered.
 /// </returns>
 public static IHttpControllerActivator GetHttpControllerActivator(this ServicesContainer services)
 {
     return(services.GetServiceOrThrow <IHttpControllerActivator>());
 }
 public static IApiExplorer GetApiExplorer(this ServicesContainer services)
 {
     return(services.GetServiceOrThrow <IApiExplorer>());
 }
 public static ModelMetadataProvider GetModelMetadataProvider(this ServicesContainer services)
 {
     return(services.GetServiceOrThrow <ModelMetadataProvider>());
 }
 public static IAssembliesResolver GetAssembliesResolver(this ServicesContainer services)
 {
     return(services.GetServiceOrThrow <IAssembliesResolver>());
 }
 public static IHttpControllerTypeResolver GetHttpControllerTypeResolver(this ServicesContainer services)
 {
     return(services.GetServiceOrThrow <IHttpControllerTypeResolver>());
 }
Esempio n. 6
0
        /// <summary>
        /// Gets the <see cref="ICommandHandlerTypeResolver"/> service.
        /// </summary>
        /// <param name="services">The <see cref="ServicesContainer"/>.</param>
        /// <returns>The <see cref="ICommandHandlerTypeResolver"/> service.</returns>
        /// <exception cref="InvalidOperationException">The <see cref="ICommandHandlerTypeResolver"/> service is not registered.</exception>
        public static ICommandHandlerTypeResolver GetCommandHandlerTypeResolver(this ServicesContainer services)
        {
            Contract.Requires(services != null);

            return(services.GetServiceOrThrow <ICommandHandlerTypeResolver>());
        }
Esempio n. 7
0
        /// <summary>
        /// Gets the <see cref="IEventHandlerSelector"/> service.
        /// </summary>
        /// <param name="services">The <see cref="ServicesContainer"/>.</param>
        /// <returns>The <see cref="IEventHandlerSelector"/> service.</returns>
        /// <exception cref="InvalidOperationException">The <see cref="IEventHandlerSelector"/> service is not registered.</exception>
        public static IEventHandlerSelector GetEventHandlerSelector(this ServicesContainer services)
        {
            Contract.Requires(services != null);

            return(services.GetServiceOrThrow <IEventHandlerSelector>());
        }
Esempio n. 8
0
        /// <summary>
        /// Gets the <see cref="ITraceManager"/> service.
        /// </summary>
        /// <param name="services">The <see cref="ServicesContainer"/>.</param>
        /// <returns>The <see cref="ITraceManager"/> service.</returns>
        public static ITraceManager GetTraceManager(this ServicesContainer services)
        {
            Contract.Requires(services != null);

            return(services.GetServiceOrThrow <ITraceManager>());
        }
Esempio n. 9
0
        /// <summary>
        /// Gets the <see cref="ICommandHandlerActivator"/> service.
        /// </summary>
        /// <param name="services">The <see cref="ServicesContainer"/>.</param>
        /// <returns>The <see cref="ICommandHandlerActivator"/> service.</returns>
        /// <exception cref="InvalidOperationException">The <see cref="ICommandHandlerActivator"/> service is not registered.</exception>
        public static ICommandHandlerActivator GetHandlerActivator(this ServicesContainer services)
        {
            Contract.Requires(services != null);

            return(services.GetServiceOrThrow <ICommandHandlerActivator>());
        }
Esempio n. 10
0
        /// <summary>
        /// Gets the <see cref="IPrincipalProvider"/> service.
        /// </summary>
        /// <param name="services">The <see cref="ServicesContainer"/>.</param>
        /// <returns>The <see cref="IPrincipalProvider"/> service.</returns>
        /// <exception cref="InvalidOperationException">The <see cref="IPrincipalProvider"/> service is not registered.</exception>
        public static IPrincipalProvider GetPrincipalProvider(this ServicesContainer services)
        {
            Contract.Requires(services != null);

            return(services.GetServiceOrThrow <IPrincipalProvider>());
        }
Esempio n. 11
0
        /// <summary>
        /// Gets the <see cref="IEventWorker"/> service.
        /// </summary>
        /// <param name="services">The <see cref="ServicesContainer"/>.</param>
        /// <returns>The <see cref="IEventWorker"/> service.</returns>
        /// <exception cref="InvalidOperationException">The <see cref="IEventWorker"/> service is not registered.</exception>
        public static IEventWorker GetEventWorker(this ServicesContainer services)
        {
            Contract.Requires(services != null);

            return(services.GetServiceOrThrow <IEventWorker>());
        }
Esempio n. 12
0
        /// <summary>
        /// Gets the list of <see cref="IModelFlattener"/> service.
        /// </summary>
        /// <param name="services">The <see cref="ServicesContainer"/>.</param>
        /// <returns>The <see cref="IModelFlattener"/> services.</returns>
        /// <exception cref="InvalidOperationException">The <see cref="IModelFlattener"/> services are not registered.</exception>
        public static IModelFlattener GetModelFlattener(this ServicesContainer services)
        {
            Contract.Requires(services != null);

            return(services.GetServiceOrThrow <IModelFlattener>());
        }
Esempio n. 13
0
        /// <summary>
        /// Gets the <see cref="ModelMetadataProvider"/> service.
        /// </summary>
        /// <param name="services">The <see cref="ServicesContainer"/>.</param>
        /// <returns>The <see cref="ModelMetadataProvider"/> service.</returns>
        /// <exception cref="InvalidOperationException">The <see cref="ModelMetadataProvider"/> service is not registered.</exception>
        public static ModelMetadataProvider GetModelMetadataProvider(this ServicesContainer services)
        {
            Contract.Requires(services != null);

            return(services.GetServiceOrThrow <ModelMetadataProvider>());
        }
Esempio n. 14
0
        /// <summary>
        /// Gets the <see cref="IInterceptionProvider"/> service.
        /// </summary>
        /// <param name="services">The <see cref="ServicesContainer"/>.</param>
        /// <returns>The <see cref="IInterceptionProvider"/> service.</returns>
        /// <exception cref="InvalidOperationException">The <see cref="IInterceptionProvider"/> service is not registered.</exception>
        public static IInterceptionProvider GetInterceptorProvider(this ServicesContainer services)
        {
            Contract.Requires(services != null);

            return(services.GetServiceOrThrow <IInterceptionProvider>());
        }
 public static IHttpActionSelector GetActionSelector(this ServicesContainer services)
 {
     return(services.GetServiceOrThrow <IHttpActionSelector>());
 }
Esempio n. 16
0
        /// <summary>
        /// Gets the <see cref="IAssembliesResolver"/> service.
        /// </summary>
        /// <param name="services">The <see cref="ServicesContainer"/>.</param>
        /// <returns>The <see cref="IAssembliesResolver"/> service.</returns>
        /// <exception cref="InvalidOperationException">The <see cref="IAssembliesResolver"/> service is not registered.</exception>
        public static IAssembliesResolver GetAssembliesResolver(this ServicesContainer services)
        {
            Contract.Requires(services != null);

            return(services.GetServiceOrThrow <IAssembliesResolver>());
        }
 public static IHttpActionInvoker GetActionInvoker(this ServicesContainer services)
 {
     return(services.GetServiceOrThrow <IHttpActionInvoker>());
 }
Esempio n. 18
0
        /// <summary>
        /// Gets the <see cref="IEventHandlerDescriptorProvider"/> service.
        /// </summary>
        /// <param name="services">The <see cref="ServicesContainer"/>.</param>
        /// <returns>The <see cref="IEventHandlerDescriptorProvider"/> service.</returns>
        /// <exception cref="InvalidOperationException">The <see cref="IEventHandlerDescriptorProvider"/> service is not registered.</exception>
        public static IEventHandlerDescriptorProvider GetEventHandlerDescriptorProvider(this ServicesContainer services)
        {
            Contract.Requires(services != null);

            return(services.GetServiceOrThrow <IEventHandlerDescriptorProvider>());
        }