iikoFront Api V8 Code Reference
iikoFront Api V8 Code Reference
Resto.Front.Api
PluginContext Class
PluginContext Methods
Initialize Method
Shutdown Method
Uninitialize Method

# PluginContext Initialize Method

Fills the context with Api services on plugin startup. This method isn't intended to be called from plugin.

Namespace: Resto.Front.Api
Assembly: Resto.Front.Api.V8 (in Resto.Front.Api.V8.dll) Version: 1ca4876affdd3bc5359a98b321fc115a647d2251
Syntax
C#
Copy

    public static void Initialize(
    	IServiceProvider services,
    	Action shutdownSignal,
    	ILog log
    )

#### Parameters

services
  Type: System
  IServiceProvider
shutdownSignal
  Type: System
  Action
log
  Type: Resto.Front.Api
  ILog

Remarks
Primarily this method is used by Api infrastructure, but it also can be used in unit tests for checking plugin's code. When writing tests against code which is using static properties of PluginContext, you can initialize the context with dummy (mocked) services. Services are retrieved from the provider when corresponding static properties are called, so for testing purposes you may provide minimum set of services which are actually used in the code being tested.
See Also

#### Reference

PluginContext Class
Resto.Front.Api Namespace
PluginContext
Uninitialize