2sxc has a lot of WebApis - grouped into two types

  1. Stateless - these don't need a Block-context, so they don't need to know what module the call was made from.
  2. Stateful - these have commands which may need the block, but sometimes also work without a block context.

To keep our code clean and optimized, we must create these two base controllers, which the other controllers will inherit. 

Create the Stateless ControllerBase

  1. Look at the OqtStatelesControllerBase, and create your similar implementation. Note that it's very trivial, the main feature is the Log-Name, which inheriting classes will have to provide.

Create the Stateful ControllerBase

  1. Look at the OqtStatefulControllerBase and create your similar implementation. Some notes
    1. As you'll end up adding more dependencies with time, I recommend creating a StatefulControllerDependencies object which makes it easier to inherit this class
    2. GetBlock should ensure that a block configuration is built/created if the headers are provided. In the initial implementation, please just return null to signal than blocks are not yet supported. 
    3. GetContext should return the context of the block, or otherwise a neutral site/user only context
    4. GetApp(appId) should return a simple app object, just like in the Oqtane implementation

Note that you won't be able to test these, until you've actually implemented an API, so continue with the next step.