Table of Contents

Class HookRegistration

Namespace
Styra.Opa.OpenApi.Hooks
Assembly
Styra.Opa.dll

This file is only ever generated once on the first generation and then is free to be modified. Any hooks you wish to add should be registered in the InitHooks function. Feel free to define them in this file or in separate files in the Hooks folder.

public static class HookRegistration
Inheritance
HookRegistration
Inherited Members

Methods

InitHooks(IHooks)

Add hooks by calling Styra.Opa.OpenApi.Hooks.Register<HookInterface>(myHook); where I<HookInterface> is one of the following interfaces defined in HookTypes.cs:

  • ISDKInitHook
  • IBeforeRequestHook
  • IAfterSuccess
  • IAfterError and myHook an instance that implements that specific interface.
public static void InitHooks(IHooks hooks)

Parameters

hooks IHooks