Skip to content

Get Sansar

Script API

AddEntryAttribute

Where: Client
More page actions

For the complete documentation index, see llms.txt. This page is also available as Markdown.

Class Namespace Sansar.Script Inherits Attribute

A

[System.AttributeUsage(System.AttributeTargets.Field, AllowMultiple=true)]
public class AddEntryAttribute : Attribute

Members at a glance

KindMembers
ConstructorsAddEntryAttribute

Constructors

AddEntryAttribute

public AddEntryAttribute(object entry)

Add an entry to the initial values in the parameter for IList and IDictionary

ParameterTypeDescription
entryobjectIDictionary: the key of the entry. IList: the default value of the entry.
Remarks

For IDictionary sets the key only, with no default value.

For IList sets the default value of the entry.

Has no effect for other parameter types.

public AddEntryAttribute(string key, object value)

Add an entry to the initial values in the parameter for IList and IDictionary

ParameterTypeDescription
keystringIDictionary: the key of the entry. IList: the default value.
valueobjectIDictionary: the default value of the entry. IList: ignored
Remarks

For IDictionary sets both a key and a default value for that key.

For IList the value is ignored.

Has no effect for other parameter types.

Can be used multiple times to add multiple entries for IDictionary

Generated from the Sansar 47.10.0 client ScriptApi snapshot.