Daraja HTTP Framework 3.0-MS1 HTTP server framework for Object Pascal

Loading...
Searching...
No Matches
Public Member Functions | List of all members
TdjContext Class Reference

Context implementation. More...

Inheritance diagram for TdjContext:

## Public Member Functions
| TdjContext (const string ContextPath)
| Create a context with the given path.
| Init (const IContextConfig Config)
| Called by the container on start.
IContextConfig | GetContextConfig ()
| Get the context configuration.
string | GetContextPath ()
| Get the context path.
string | GetInitParameter (const string Key)
| Get the init parameter with the given name.
TdjStrings | GetInitParameterNames ()
| Get the list of init parameter names.
| Log (const string Msg)
| Write a log message.

## Detailed Description

Context implementation.

## Constructor & Destructor Documentation

## ◆ TdjContext()

TdjContext::TdjContext | ( | const string | ContextPath | ) |

Create a context with the given path.

Parameters

  ContextPath | the context path

Exceptions

  EWebComponentException | if the conext name contains invalid characters

## Member Function Documentation

## ◆ GetContextConfig()

IContextConfig TdjContext::GetContextConfig | ( |  | ) |

Get the context configuration.

Returns
  the context configuration

## ◆ GetContextPath()

string TdjContext::GetContextPath | ( |  | ) |

Get the context path.

Returns
  the context path.

## ◆ GetInitParameter()

string TdjContext::GetInitParameter | ( | const string | Key | ) |

Get the init parameter with the given name.

Parameters

  Key | the parameter name

Returns
  the init parameter value

## ◆ GetInitParameterNames()

TdjStrings TdjContext::GetInitParameterNames | ( |  | ) |

Get the list of init parameter names.

Returns
  list of init parameter names.

## ◆ Init()

TdjContext::Init | ( | const IContextConfig | Config | ) |

Called by the container on start.

Parameters

  Config | the context configuration

## ◆ Log()

TdjContext::Log | ( | const string | Msg | ) |

Write a log message.

Note
  if DARAJA_LOGGING is defined, it will write using the logging framework. Otherwise, it will log to console if System.IsConsole is True.

Parameters

  Msg | the log message.