|
void | AddTransient< T > (ServiceFactory< T > factory) |
| Adds an instance of a service that respects the TService contract as a per-request instance. This means that data here is completely isolated and exists per-request. One thing to keep in mind: More...
|
|
void | AddSingleton< T > (ServiceFactory< T > factory) |
| Adds an instance of a service that respects the TService contract as a singleton (shared data across all requests being processed). Some things to keep in mind since the data in this service is shared between all requests being serviced: More...
|
|
void | AddScoped< T > (ServiceFactory< T > factory) |
| Adds an instance of a service that respects the TService contract as a per-request singleton. This means that data in Scoped services are shared between all Transient services being used by a request.
|
|
void | AddTransient< T > () |
| Adds an instance of a service that respects the TService contract as a per-request instance. This means that data here is completely isolated and exists per-request. One thing to keep in mind: More...
|
|
void | AddSingleton< T > () |
| Adds an instance of a service that respects the TService contract as a singleton (shared data across all requests being processed). Some things to keep in mind since the data in this service is shared between all requests being serviced: More...
|
|
void | AddScoped< T > () |
| Adds an instance of a service that respects the TService contract as a per-request singleton. This means that data in Scoped services are shared between all Transient services being used by a request.
|
|
void | AddTransient< TService, TImplementation > () |
|
void | AddSingleton< TService, TImplementation > () |
|
void | AddScoped< TService, TImplementation > () |
|
◆ AddScoped< TService, TImplementation >()
void Beamable.Server.IServiceBuilder.AddScoped< TService, TImplementation > |
( |
| ) |
|
- Type Constraints
-
TService | : | class | |
TImplementation | : | class | |
TImplementation | : | TService | |
◆ AddSingleton< T >() [1/2]
void Beamable.Server.IServiceBuilder.AddSingleton< T > |
( |
| ) |
|
Adds an instance of a service that respects the TService contract as a singleton (shared data across all requests being processed). Some things to keep in mind since the data in this service is shared between all requests being serviced:
- If it's not read-only, you need to guarantee thread safety yourself.
- If it is read-only, you can access fields here without any fear.
◆ AddSingleton< T >() [2/2]
void Beamable.Server.IServiceBuilder.AddSingleton< T > |
( |
ServiceFactory< T > |
factory | ) |
|
Adds an instance of a service that respects the TService contract as a singleton (shared data across all requests being processed). Some things to keep in mind since the data in this service is shared between all requests being serviced:
- If it's not read-only, you need to guarantee thread safety yourself.
- If it is read-only, you can access fields here without any fear.
◆ AddSingleton< TService, TImplementation >()
void Beamable.Server.IServiceBuilder.AddSingleton< TService, TImplementation > |
( |
| ) |
|
- Type Constraints
-
TService | : | class | |
TImplementation | : | class | |
TImplementation | : | TService | |
◆ AddTransient< T >() [1/2]
void Beamable.Server.IServiceBuilder.AddTransient< T > |
( |
| ) |
|
Adds an instance of a service that respects the TService contract as a per-request instance. This means that data here is completely isolated and exists per-request. One thing to keep in mind:
- If 2 Transient services, A and B, spawned for Request-1 ask for a Scoped service, C, both A and B will share C's instance.
◆ AddTransient< T >() [2/2]
void Beamable.Server.IServiceBuilder.AddTransient< T > |
( |
ServiceFactory< T > |
factory | ) |
|
Adds an instance of a service that respects the TService contract as a per-request instance. This means that data here is completely isolated and exists per-request. One thing to keep in mind:
- If 2 Transient services, A and B, spawned for Request-1 ask for a Scoped service, C, both A and B will share C's instance.
◆ AddTransient< TService, TImplementation >()
void Beamable.Server.IServiceBuilder.AddTransient< TService, TImplementation > |
( |
| ) |
|
- Type Constraints
-
TService | : | class | |
TImplementation | : | class | |
TImplementation | : | TService | |
The documentation for this interface was generated from the following file:
- com.beamable.server/SharedRuntime/ServiceBuilder.cs