Root / Assembly / ARCAPI / Class



_DescriptionAll classes with some AgoRapide specific attributes found in assembly ARCAPI.
AddControllerParses a PropertyStreamLine.
Sends to ExternalReceiver if given.
Adds to the given DataStorage unless DoNotStoreInternally is specified.

TODO: Support use of Query for adding values to multiple entities at once.
TODO: like 'Add/std/Customer/WHERE FirstName = John/NameEvaluation = NiceName'

_Member, AssemblyName, BaseTypes, ClassType, Description, Interfaces, LongDescription
BaseControllerContains basic functionality for serving API methods.

The specific controller instances serving requests are usually stored in a global DataStorage.
For instance for an API node with id 'API/1/' it would typically be stored as 'API/1/Controller/api/[TypeOfController]/[ControllerId]...'.
(in other words, ControllerStorage actually points to a branch inside Storage.)

Examples of API requests and how they are resolved to a container by CatchAll:
API request URL:
Controller instance (in this case of type RQController) to be found in controllerStorage["api"]["RQ"]["std"]
Method APIMethod is called on this instance.

This system has the following advantages:

1) The API-routing syntax is by default exposed to the outside because 'controller storage' is normally inserted into the global DataStorage.
Therefore the standard query mechanism in AgoRapide can be used to get this information.
For instance by querying like this: 'api/RQ/API/1/Controller' you will get suggestions starting with the 'api'.

2) The API itself is discoverable even without querying like above, without much special code.
This is because an invalid API request is actually analyzed by the same mechanism answering standard queries.
When the error message is returned it actually contains data about the correct syntax.

3) The API is configurable both through the API itself and also over the PropertyStream.
For instance like 'API/1/Controller/RQ/std/LogLevel = Warning' which would change the log level for the standard instance ('std') of RQController to 'Warning'.

4) Different instances of the same controller type can exist and be configured individually. For instance if some specific query needs additional logging down to debug level, a dedicated controller can be created for this, like
'API/1/Controller/RQ/dbg/LogLevel = Debug'
This controller instance will be immediately available as request 'api/RQ/dbg/[Parameters]'
Note that a 'dbg' controller is always available, which does detailed logging.

Some limitations of this approach are:
1) Actual API method name is limited to the name of the controller type (without the 'Controller' part).
That is, a controller called CustomerController can only serve queries starting with 'Customer'.

Note however that in your ApplicationSpecificCode you can implement any additional controllers with routing structure totally independent of this standard generic AgoRapide mechanism.

Note how the BaseController classes (like this class) do not inherit any special Microsoft.AspNetCore.Mvc class.
They are totally stand-alone with regard to Microsoft.AspNetCore.Mvc.

_Member, AssemblyName, BaseTypes, ClassType, CorrespondingEnumType, Description, Interfaces
ContentResultMimicks Microsoft.AspNetCore.Mvc.ContentResult.

Note that although ARCAPI is supposed to work with a Microsoft.AspNetCore.Mvc application, it does not link to the Microsoft.AspNetCore.Mvc library itself.
Therefore the returned instance from controller methods like APIMethod or APIMethod) is not an instance of Microsoft.AspNetCore.Mvc.ContentResult (or Microsoft.AspNetCore.Mvc.ActionResult) but rather an instance of this class, AgoRapide ContentResult.

This class reflects the components needed to construct a Microsoft.AspNetCore.Mvc.ContentResult instance, namely
'(string Content, string ContentType, System.Net.HttpStatusCode StatusCode)'.

This class is immutable.

_Member, AssemblyName, ClassType, Description
DataStorageThe all-in-memory global application data storage.
Does also contain the necessary global locking object for thread-safe access.

Can be kept up to date by Subscription to PropertyStream (see OutsideLocalReceiver).

See constructor for information about ExposingApplicationState through this class.

This class is immutable.

_Member, AssemblyName, ClassType, Description
GQControllerOffers GraphQL queries

_Member, AssemblyName, BaseTypes, ClassType, Description, Interfaces
RQControllerExecutes a REST like query request against the given DataStorage.

This class understands two main query-methods, 1) Direct key-based into data storage, and 2) QueryExpression based.

1) Direct key-based into data storage:
Some query-examples:
'Customer/42' => Get all the keys for Customer with id 42, but do not get sub-keys.
'Customer/42/*' => Get all the keys for Customer with id 42, and also all underlying sub-keys (and their sub-keys and so on).
Append query with '.html' in order to get HTML (default is JSON) .
For HTML this controller is able to do LinkInsertionInDocumentation, presumed that necessary potential links are present in PotentialHTMLLinks.

2) QueryExpression based.
Some query-examples:
'Customer/WHERE FirstName = John/SELECT FirstName, LastName/SKIP 10/TAKE 10'
(see QueryExpression for more examples).

_Member, AssemblyName, BaseTypes, ClassType, Description, Interfaces

7 items

Generated 2020-10-13 11:11:00.911 UTC