> For the complete documentation index, see [llms.txt](https://docs.zongsoft.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zongsoft.com/documentation/en/framework/core/components/events.md).

# Events

Understand assembly boundaries for module events from the Event Registry entry in Discussions.

Module events provide explicit event entry for business components. The Discussions Module inherits the [ApplicationModule](https://github.com/Zongsoft/framework/blob/main/Zongsoft.Core/src/Services/ApplicationModule.cs) with event registry type parameters and exposes Events in the plugin tree.

Source: [src/Module.cs](https://github.com/Zongsoft/Zongsoft.Discussions/blob/main/src/Module.cs#L56) (excerpt; see source for context).

{% code title="Module.cs" %}

```csharp
public sealed class EventRegistry : EventRegistryBase
{
	#region 构造函数
	public EventRegistry() : base(NAME)
	{
	}
	#endregion
```

{% endcode %}

The EventRegistry currently does not declare a forum business event, so posting, moderation, or message sending cannot be described as having posted an event. It only provides extended locations.

## Plugin Exposure Event Entry

Source: [src/Zongsoft.Discussions.plugin](https://github.com/Zongsoft/Zongsoft.Discussions/blob/main/src/Zongsoft.Discussions.plugin#L26) (excerpt; see source for context).

{% code title="Zongsoft.Discussions.plugin" %}

```xml
<expose name="Events" value="{path:../@Events}" />
<expose name="Properties" value="{path:../@Properties}" />
```

{% endcode %}

Exposing the registry allows the plugin system to discover module events. Adding an event still requires defining the event name, payload, triggering time, processing method and failure strategy. In particular, it is necessary to distinguish between before and after transaction submission to avoid sending uncommitted data to external consumers.

## Full Reference in the Framework

Discussions There is no complete business event process yet, so you can continue to check the actual event definitions of frames [Component event implementation](https://github.com/Zongsoft/framework/tree/main/Zongsoft.Core/src/Components) and [security module](https://github.com/Zongsoft/framework/tree/main/Zongsoft.Security/src). There needs to be a clear bridge between events and message queues, and it cannot be inferred that the forum has used a Broker just because the framework supports events.

Related concepts: [Handlers](/documentation/en/framework/core/components/handler.md), [Message Queues](/documentation/en/framework/messaging.md), [affairs](/documentation/en/framework/data/transactions.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zongsoft.com/documentation/en/framework/core/components/events.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
