Table of Contents

Class RequiredParameterAttribute

Namespace
BSGameLib.Chat.Attributes
Assembly
BSGameLib.Chat.dll

Marks a property as a parameter the player must give. A command typed without it reports the parameter as missing and does not run.

[AttributeUsage(AttributeTargets.Property)]
public class RequiredParameterAttribute : Attribute
Inheritance
RequiredParameterAttribute
Inherited Members

Constructors

RequiredParameterAttribute(int, string)

Creates the attribute for a parameter at position order.

public RequiredParameterAttribute(int order, string name = null)

Parameters

order int
name string

Properties

CapturesRemainder

Take the entire remainder of the message instead of one space-delimited token. Set this on free-text parameters -- a chat message, a broadcast body -- which otherwise silently receive only the first word. Only the highest-Order parameter of a command should set it.

public bool CapturesRemainder { get; set; }

Property Value

bool

HelpText

The help text for the parameter.

public string HelpText { get; set; }

Property Value

string

Name

The name the parameter has in the command's context. Defaults to the property's name.

public string Name { get; }

Property Value

string

Order

The parameter's position among the command's parameters. Parameters are read in this order.

public int Order { get; set; }

Property Value

int

Suggestions

What the game suggests as it is typed: a name it knows the values of, such as players.

public string Suggestions { get; set; }

Property Value

string