SlackModel Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before itβs released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Base class for Slack model objects that expose dot-notation path navigation via Get<T>(String) and TryGet<T>(String, T).
public abstract class SlackModel
type SlackModel = class
Public MustInherit Class SlackModel
- Inheritance
-
SlackModel
- Derived
Remarks
Subclasses that are plain POCOs (e.g. SlackResponse, EventEnvelope) rely on the default GetData() implementation, which lazily serializes the instance to a JsonObject on first use so every field β including [JsonExtensionData] catch-alls β is reachable by path. Subclasses that are themselves backed by a JsonObject (e.g. EventContent) override GetData() to return that object directly, avoiding redundant serialization.
Subclasses whose JSON field names differ from their C# property names (e.g. EventEnvelope maps "event_content" β "event") override NormalizePath(String) to remap the alias before navigation.
Constructors
| Name | Description |
|---|---|
| SlackModel() | |
Methods
| Name | Description |
|---|---|
| Get<T>(String) |
Gets a value at the given dot-notation path. Supports dot-separated property
access and bracket array indexing (e.g. |
| GetData() |
Returns the JsonObject used for path navigation.
The default implementation lazily serializes this instance via
|
| NormalizePath(String) |
Normalizes a caller-supplied path before it is passed to the navigator. Override to remap C# property-name aliases to their JSON field names. The default implementation returns the path unchanged. |
| TryGet<T>(String, T) |
Tries to get a value at the given dot-notation path.
Returns |