DPB2Class · Bots, plugins and tasks

Logic

Describe a named logic request passed between components. The receiving component decides whether it can handle the request.

Namespace: DreamPoeBot.Loki.Bot

public class Logic
Reference: DPB2 0.4.5.103Compare the DPB1 reference → Check signatures and usage notes separately; a matching type is not a compatibility guarantee.

Members and overloads

18 declared here

Logic

MethodLink ↗
public Logic.Logic(string id, object sender = null)

Creates a new Logic instance using the supplied arguments.

Parameters

id
Parameter type: stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies id.

sender
Parameter type: objectNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies sender. Optional; the default is shown in the signature.

Logic

MethodLink ↗
public Logic.Logic(string id, object sender, params dynamic[] input)

Creates a new Logic instance using the supplied arguments.

Parameters

id
Parameter type: stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies id.

sender
Parameter type: objectNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies sender.

input
Parameter type: dynamic[]No current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies input.

AddInput

MethodLink ↗
public void Logic.AddInput<T>(T input, string name)

Adds input using the supplied arguments.

Return type: voidNo return value.

Parameters

input
Parameter type: TNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies input.

name
Parameter type: stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies name.

AddInputs

MethodLink ↗
public void Logic.AddInputs(params dynamic[] input)

Adds inputs using the supplied arguments.

Return type: voidNo return value.

Parameters

input
Parameter type: dynamic[]No current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies input.

AddOutput

MethodLink ↗
public void Logic.AddOutput<T>(ILogicProvider handler, T output, string name = "")

Adds output using the supplied arguments.

Return type: voidNo return value.

Parameters

handler
Parameter type: ILogicProvider

Specifies handler.

output
Parameter type: TNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies output.

name
Parameter type: stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies name. Optional; the default is shown in the signature.

AddOutputs

MethodLink ↗
public void Logic.AddOutputs(ILogicProvider handler, params dynamic[] output)

Adds outputs using the supplied arguments.

Return type: voidNo return value.

Parameters

handler
Parameter type: ILogicProvider

Specifies handler.

output
Parameter type: dynamic[]No current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies output.

GetInput

MethodLink ↗
public T Logic.GetInput<T>(int index = 0)

Calls GetInput on Logic with index and returns T. Open the return contract below before using the result.

Return type: TNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

index
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies index. Optional; the default is shown in the signature.

Returns: The T result.

GetInput

MethodLink ↗
public T Logic.GetInput<T>(string name)

Calls GetInput on Logic with name and returns T. Open the return contract below before using the result.

Return type: TNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

name
Parameter type: stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies name.

Returns: The T result.

GetOutput

MethodLink ↗
public T Logic.GetOutput<T>(int index = 0)

Calls GetOutput on Logic with index and returns T. Open the return contract below before using the result.

Return type: TNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

index
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies index. Optional; the default is shown in the signature.

Returns: The T result.

GetOutput

MethodLink ↗
public T Logic.GetOutput<T>(string name)

Calls GetOutput on Logic with name and returns T. Open the return contract below before using the result.

Return type: TNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

name
Parameter type: stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies name.

Returns: The T result.

TryGetInput

MethodLink ↗
public bool Logic.TryGetInput<T>(int index, out T input)

Calls TryGetInput on Logic with index, input and returns bool. Open the return contract below before using the result.

Return type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

index
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies index.

input
Parameter type: TNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Receives input.

Returns: True when the request succeeds; read any out parameters only after checking the result.

TryGetInput

MethodLink ↗
public bool Logic.TryGetInput<T>(string name, out T input)

Calls TryGetInput on Logic with name, input and returns bool. Open the return contract below before using the result.

Return type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

name
Parameter type: stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies name.

input
Parameter type: TNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Receives input.

Returns: True when the request succeeds; read any out parameters only after checking the result.

TryGetOutput

MethodLink ↗
public bool Logic.TryGetOutput<T>(int index, out T input)

Calls TryGetOutput on Logic with index, input and returns bool. Open the return contract below before using the result.

Return type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

index
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies index.

input
Parameter type: TNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Receives input.

Returns: True when the request succeeds; read any out parameters only after checking the result.

TryGetOutput

MethodLink ↗
public bool Logic.TryGetOutput<T>(string name, out T output)

Calls TryGetOutput on Logic with name, output and returns bool. Open the return contract below before using the result.

Return type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

name
Parameter type: stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies name.

output
Parameter type: TNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Receives output.

Returns: True when the request succeeds; read any out parameters only after checking the result.

Id

PropertyLink ↗
public string Logic.Id { get; }

Reads id on Logic as string. The exact type and accessors are shown below.

Value type: stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Inputs

PropertyLink ↗
public IReadOnlyList<Tuple<object, string>> Logic.Inputs { get; }

Gets the inputs collection. Its element types are linked below.

Value type: IReadOnlyList<Tuple<object, string>>No current DPB page is linked for this built-in, external, generic or compatibility-only type.

Outputs

PropertyLink ↗
public IReadOnlyList<Tuple<ILogicProvider, object, string>> Logic.Outputs { get; }

Gets the outputs collection. Its element types are linked below.

Value type: IReadOnlyList<Tuple<ILogicProvider, object, string>>
Explore ILogicProvider → members & methods

Defines the logic provider contract. Implement the listed members to provide this capability.

Sender

PropertyLink ↗
public object Logic.Sender { get; }

Reads sender on Logic as object. The exact type and accessors are shown below.

Value type: objectNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Guides using this class

See how these APIs fit together. Labs include complete source; the FollowBot walkthrough teaches you to build your own bot from selected fragments and checkpoints.

DPB2 0.4.5.103 · Reference reviewed 2026-10-30. Descriptions use source summaries where available, otherwise concise signature-based descriptions. Examples illustrate usage; they are not a live-game test.