Table of Contents

Class SerializableItemInfo

Namespace
Archipelago.MultiClient.Net.Models
Assembly
Archipelago.MultiClient.Net.dll

An Json Serializable version of an ItemInfo

public class SerializableItemInfo : MinimalSerializableItemInfo
Inheritance
SerializableItemInfo
Inherited Members

Properties

IsScout

Whether or not this ItemInfo came from an location scout

public bool IsScout { get; set; }

Property Value

bool

ItemDisplayName

The name of the item for display purposes, returns a fallback string containing the ItemId if the name cannot be resolved

[JsonIgnore]
public string ItemDisplayName { get; }

Property Value

string

ItemName

The name of the item, null if the name cannot be resolved

public string ItemName { get; set; }

Property Value

string

LocationDisplayName

The name of the location for display purposes, returns a fallback string containing the LocationId if the name cannot be resolved

[JsonIgnore]
public string LocationDisplayName { get; }

Property Value

string

LocationName

The name of the location that item is at, null if the name cannot be resolved

public string LocationName { get; set; }

Property Value

string

Player

The player of the world the item is located in, unless IsScout is true than its the player who will receive the item

public PlayerInfo Player { get; set; }

Property Value

PlayerInfo

Methods

FromJson(string, IArchipelagoSession)

Converts the json string back to an SerializableItemInfo If the json string contained the full context, than the optional ArchipelagoSession can be left empty If the json string contained the minimal context, the optional ArchipelagoSession should be provided else context will be missing

public static SerializableItemInfo FromJson(string json, IArchipelagoSession session = null)

Parameters

json string

the json string to input

session IArchipelagoSession

an reference to an active archipelago session to retrieve contexts such as items names and player data

Returns

SerializableItemInfo

The deserialized ItemInfo

ToJson(bool)

Converts the SerializableItemInfo into an json string, either the full length context or a compact context can be preserved If the json string contained the full context, then it can be deserialized even when no Archipelago session is provided If the json string contained the minimal context, then during deserialization an active archipelago session must be provided for additional context

public string ToJson(bool full = false)

Parameters

full bool

Should the json contain the full lengthy context, or just the minimal info to reconstruct it later

Returns

string

The json representation of this ItemInfo