Skip to content

Commit

Permalink
Add previous topic section
Browse files Browse the repository at this point in the history
  • Loading branch information
YuriyDurov committed Sep 29, 2023
1 parent 68723cf commit c9272ec
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
9 changes: 7 additions & 2 deletions docs/2.architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ Back to the [Table of Contents](README.md)

---

Previous topic:
[Getting started with OCPI.Net](1.introduction.md)

---

# Architecture

The OCPI.Net package is designed to be as flexible as possible, allowing you to implement OCPI modules in any way you see fit. The package uses Asp.Net Core Controllers for handling incoming OCPI requests and returning OCPI responses. The package also contains a number of services which are used to perform various tasks such as validating incoming requests, generating responses, and handling errors.
Expand All @@ -12,9 +17,9 @@ The package follows a modular design, allowing you to use only the functionality

The package uses the default Asp.Net Core dependency injection container to inject services into your controllers. The package also uses the default Asp.Net Core routing system to route incoming requests to the appropriate controllers.

The package uses the `OcpiEndpoint` attribute to determine which controllers are used to handle incoming OCPI requests. The package will perform an automated scan of your controllers and generate a list of supported OCPI versions for each module.
The package uses the `OcpiEndpoint` attribute to determine which controllers are used to handle incoming OCPI requests. The package will perform an automated scan of your controllers and generate a list of supported OCPI versions for each module. See more in [Implementation](3.implementation.md).

The package uses Exceptions as a way to handle errors. The exceptions can be thrown from anywhere in your code, and the package will automatically handle them and generate the appropriate OCPI response. Exception handling is done by the `OcpiExceptionFilter` attribute, which is automatically applied to all controllers that inherit from the `OcpiController` base class. Exceptions can be populated with a custom data payload, which will be included in the OCPI response.
The package uses Exceptions as a way to handle errors. The exceptions can be thrown from anywhere in your code, and the package will automatically handle them and generate the appropriate OCPI response. Exception handling is done by the `OcpiExceptionFilter` attribute, which is automatically applied to all controllers that inherit from the `OcpiController` base class. Exceptions can be populated with a custom data payload, which will be included in the OCPI response. See more in [Error Handling](5.error-handling.md).

## Integration with Asp.Net Core

Expand Down
5 changes: 5 additions & 0 deletions docs/3.implementation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ Back to the [Table of Contents](README.md)

---

Previous topic:
[Architecture](2.architecture.md)

---

# Implementation

You can always refer to the [Sample application](sample/OCPI.Net.Sample) for a working example of how to use the package.
Expand Down
5 changes: 5 additions & 0 deletions docs/4.versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ Back to the [Table of Contents](README.md)

---

Previous topic:
[Implementation](3.implementation.md)

---

# Versioning

The OCPI.Net package supports multiple OCPI versions at the same time. The package uses the `OcpiEndpoint` attribute to determine which OCPI versions are supported by a given controller.
Expand Down
5 changes: 5 additions & 0 deletions docs/5.error-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ Back to the [Table of Contents](README.md)

---

Previous topic:
[Versioning](4.versioning.md)

---

# Error Handling

The package uses Exceptions as a way to handle errors. The exceptions can be thrown from anywhere in your code, and the package will automatically handle them and generate the appropriate OCPI response. Exception handling is done by the `OcpiExceptionFilter` attribute, which is automatically applied to all controllers that inherit from the `OcpiController` base class. Exceptions can be populated with a custom data payload, which will be included in the OCPI response.
Expand Down

0 comments on commit c9272ec

Please sign in to comment.