Struct FeedbackTarget
Engine-agnostic addressing for "which pad should react". Exactly one addressing mode is meaningful at a time; the infrastructure resolver decides precedence (acting pad, then explicit player index, then explicit device id).
Inherited Members
Namespace: Serenity.Feedback.Application.DTO
Assembly: Serenity.Feedback.Application.dll
Syntax
public readonly struct FeedbackTarget
Constructors
FeedbackTarget(int?, string, bool)
Initializes a new instance of the FeedbackTarget struct.
Declaration
public FeedbackTarget(int? playerIndex, string deviceId, bool useActingPad)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | playerIndex | Zero-based player index, or null. |
| string | deviceId | Input device id, or null. |
| bool | useActingPad | Whether to target the acting/current pad. |
Fields
DeviceId
Declaration
public readonly string DeviceId
Field Value
| Type | Description |
|---|---|
| string | Input device id, when targeting a specific device directly. |
PlayerIndex
Declaration
public readonly int? PlayerIndex
Field Value
| Type | Description |
|---|---|
| int? | Zero-based player index, when targeting a specific joined player. |
UseActingPad
Declaration
public readonly bool UseActingPad
Field Value
| Type | Description |
|---|---|
| bool | When true, target the pad that most recently acted (single-player convenience). |
Properties
ActingPad
Targets the pad that most recently acted.
Declaration
public static FeedbackTarget ActingPad { get; }
Property Value
| Type | Description |
|---|---|
| FeedbackTarget |
Methods
ForDevice(string)
Targets a specific input device by id.
Declaration
public static FeedbackTarget ForDevice(string deviceId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | deviceId | Input device id. |
Returns
| Type | Description |
|---|---|
| FeedbackTarget | A target addressing that device. |
ForPlayer(int)
Targets a specific joined player by zero-based index.
Declaration
public static FeedbackTarget ForPlayer(int playerIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| int | playerIndex | Zero-based player index. |
Returns
| Type | Description |
|---|---|
| FeedbackTarget | A target addressing that player. |