serviceprovider

package
v0.1.30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TypeIServiceProvider = di.GetInterfaceReflectType((*IServiceProvider)(nil))

IServiceProvider reflect type

Functions

func AddScopedServiceProvider added in v0.1.7

func AddScopedServiceProvider(builder *di.Builder)

AddServiceProvider adds service to the DI container

func AddSingletonServiceProvider added in v0.1.7

func AddSingletonServiceProvider(builder *di.Builder)

AddSingletonServiceProvider adds service to the DI container

Types

type IServiceProvider

type IServiceProvider interface {
	GetByName(name string) interface{}
	GetByType(rt reflect.Type) interface{}
	GetManyByType(rt reflect.Type) []interface{}
	GetContainer() di.Container
}

func GetScopedServiceProviderFromContainer added in v0.1.7

func GetScopedServiceProviderFromContainer(ctn di.Container) IServiceProvider

GetScopedServiceProviderFromContainer from the Container

func GetSingletonServiceProviderFromContainer added in v0.1.7

func GetSingletonServiceProviderFromContainer(ctn di.Container) IServiceProvider

GetSingletonServiceProviderFromContainer from the Container

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL