|
virtual void | Dispose (bool disposing) |
|
Definition at line 24 of file ServiceContainer.cs.
Deveel.Data.Services.ServiceContainer.ServiceContainer |
( |
| ) |
|
|
inline |
Deveel.Data.Services.ServiceContainer.ServiceContainer |
( |
ServiceContainer |
parent, |
|
|
string |
scopeName |
|
) |
| |
|
inlineprivate |
Definition at line 32 of file ServiceContainer.cs.
34 container = parent.container.OpenScope(scopeName)
35 .With(rules => rules.WithDefaultReuseInsteadOfTransient(Reuse.InCurrentNamedScope(scopeName)));
40 .WithDefaultReuseInsteadOfTransient(Reuse.Singleton)
41 .WithoutThrowOnRegisteringDisposableTransient());
List< IRegistrationConfigurationProvider > registrationProviders
Deveel.Data.Services.ServiceContainer.~ServiceContainer |
( |
| ) |
|
|
inlineprivate |
virtual void Deveel.Data.Services.ServiceContainer.Dispose |
( |
bool |
disposing | ) |
|
|
inlineprotectedvirtual |
void Deveel.Data.Services.ServiceContainer.Dispose |
( |
| ) |
|
|
inline |
object IServiceProvider. Deveel.Data.Services.ServiceContainer.GetService |
( |
Type |
serviceType | ) |
|
|
inlineprivate |
IScope Deveel.Data.Services.ServiceContainer.OpenScope |
( |
string |
name | ) |
|
|
inline |
Implements Deveel.Data.Services.IScope.
Definition at line 128 of file ServiceContainer.cs.
129 if (registration == null)
130 throw new ArgumentNullException(
"registration");
133 throw new InvalidOperationException(
"The container was not initialized.");
136 var serviceType = registration.ServiceType;
137 var service = registration.Instance;
138 var serviceName = registration.ServiceKey;
139 var implementationType = registration.ImplementationType;
141 var reuse = Reuse.Singleton;
143 reuse = Reuse.InCurrentNamedScope(
ScopeName);
145 if (!
String.IsNullOrEmpty(registration.Scope))
146 reuse = Reuse.InCurrentNamedScope(registration.Scope);
148 if (service == null) {
149 container.Register(serviceType, implementationType, serviceKey: serviceName, reuse: reuse);
151 container.RegisterInstance(serviceType, service, serviceKey: serviceName, reuse: reuse);
A long string in the system.
Definition at line 83 of file ServiceContainer.cs.
84 var registration =
new ServiceRegistration(provider.ServiceType, provider.ImplementationType) {
85 Scope = provider.ScopeName,
86 ServiceKey = provider.ServiceKey,
87 Instance = provider.Instance
void Register(ServiceRegistration registration)
void Deveel.Data.Services.ServiceContainer.RegisterConfigurations |
( |
| ) |
|
|
inlineprivate |
Definition at line 73 of file ServiceContainer.cs.
79 registrationProviders.Clear();
List< IRegistrationConfigurationProvider > registrationProviders
void RegisterConfiguration(IRegistrationConfigurationProvider provider)
object Deveel.Data.Services.ServiceContainer.Resolve |
( |
Type |
serviceType, |
|
|
object |
name |
|
) |
| |
|
inline |
Implements Deveel.Data.Services.IScope.
Definition at line 98 of file ServiceContainer.cs.
99 if (serviceType == null)
100 throw new ArgumentNullException(
"serviceType");
103 throw new InvalidOperationException(
"The container was not initialized.");
106 return container.Resolve(serviceType, name, IfUnresolved.ReturnDefault);
IEnumerable Deveel.Data.Services.ServiceContainer.ResolveAll |
( |
Type |
serviceType | ) |
|
|
inline |
Implements Deveel.Data.Services.IScope.
Definition at line 116 of file ServiceContainer.cs.
117 if (serviceType == null)
118 throw new ArgumentNullException(
"serviceType");
121 throw new InvalidOperationException(
"The container was not initialized.");
124 return container.ResolveMany<
object>(serviceType);
bool Deveel.Data.Services.ServiceContainer.Unregister |
( |
Type |
serviceType, |
|
|
object |
serviceName |
|
) |
| |
|
inline |
Implements Deveel.Data.Services.IScope.
Definition at line 156 of file ServiceContainer.cs.
157 if (serviceType == null)
158 throw new ArgumentNullException(
"serviceType");
161 throw new InvalidOperationException(
"The container was not initialized.");
164 container.Unregister(serviceType, serviceName);
IContainer Deveel.Data.Services.ServiceContainer.container |
|
private |
string Deveel.Data.Services.ServiceContainer.ScopeName |
|
getsetprivate |
The documentation for this class was generated from the following file:
- /var/calculate/remote/distfiles/egit-src/deveeldb.git/src/deveeldb/Deveel.Data.Services/ServiceContainer.cs