Class ServiceInterceptor
Inherited Members
Namespace: Evergine.Framework.Services
Assembly: Evergine.Framework.dll
Syntax
public class ServiceInterceptor : ContainerInterceptor<Service>
  Remarks
Registered Service instances that inherit from UpdatableService will be updated automatically by this instance. This update order depends on the order in which Service instances where registered (first registered, first to be updated and so on).
Constructors
ServiceInterceptor()
Initializes a new instance of the ServiceInterceptor class.
Declaration
public ServiceInterceptor()
  Properties
ActiveServicesCount
Gets the number of active services.
Declaration
public int ActiveServicesCount { get; }
  Property Value
| Type | Description | 
|---|---|
| int | 
IsActivated
Gets a value indicating whether this object is started.
Declaration
public virtual bool IsActivated { get; }
  Property Value
| Type | Description | 
|---|---|
| bool | 
IsAttached
Gets a value indicating whether this object is activated.
Declaration
public virtual bool IsAttached { get; }
  Property Value
| Type | Description | 
|---|---|
| bool | 
IsDestroyed
Gets a value indicating whether this object is destroyed.
Declaration
public virtual bool IsDestroyed { get; }
  Property Value
| Type | Description | 
|---|---|
| bool | 
IsStarted
Gets a value indicating whether this object is started.
Declaration
public virtual bool IsStarted { get; }
  Property Value
| Type | Description | 
|---|---|
| bool | 
Methods
InitializeServices()
Initializes the registered services.
Declaration
public void InitializeServices()
  Remarks
This method initialize only new services, not initialized yet.
OnInstanced(Service)
Called every time an instance of a type assignable from Service is instanced by the container.
Declaration
protected override void OnInstanced(Service instance)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Service | instance | The generated instance.  | 
      
Overrides
OnRegistered(Type)
Called when a type assignable from 
Declaration
public override void OnRegistered(Type type)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Type | type | The registered type.  | 
      
Overrides
OnUnregistered(Type)
Called when a type assignable from 
Declaration
public override void OnUnregistered(Type type)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Type | type | The unregistered type.  | 
      
Overrides
UpdateServices(TimeSpan)
Updates the registered UpdatableService instances.
Declaration
public void UpdateServices(TimeSpan gameTime)
  Parameters
| Type | Name | Description | 
|---|---|---|
| TimeSpan | gameTime | The game time.  |