Table of Contents

Class Inventory.Item

Namespace
Nekoyume.Model.Item
Assembly
Lib9c.dll
[Serializable]
public class Inventory.Item : IState, IComparer<Inventory.Item>, IComparable<Inventory.Item>
Inheritance
Inventory.Item
Implements
Inherited Members

Constructors

Item(Dictionary)

public Item(Dictionary serialized)

Parameters

serialized Dictionary

Item(ItemBase, int)

public Item(ItemBase itemBase, int count = 1)

Parameters

itemBase ItemBase
count int

Fields

Lock

public ILock Lock

Field Value

ILock

count

public int count

Field Value

int

item

public ItemBase item

Field Value

ItemBase

Properties

Locked

public bool Locked { get; }

Property Value

bool

Methods

Compare(Item, Item)

Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.

public int Compare(Inventory.Item x, Inventory.Item y)

Parameters

x Inventory.Item

The first object to compare.

y Inventory.Item

The second object to compare.

Returns

int

A signed integer that indicates the relative values of x and y, as shown in the following table.

Value Meaning
Less than zerox is less than y.
Zerox equals y.
Greater than zerox is greater than y.

CompareTo(Item)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

public int CompareTo(Inventory.Item other)

Parameters

other Inventory.Item

An object to compare with this instance.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has these meanings:

Value Meaning
Less than zero This instance precedes other in the sort order.
Zero This instance occurs in the same position in the sort order as other.
Greater than zero This instance follows other in the sort order.

Equals(Item)

protected bool Equals(Inventory.Item other)

Parameters

other Inventory.Item

Returns

bool

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

LockUp(ILock)

public void LockUp(ILock iLock)

Parameters

iLock ILock

Serialize()

public IValue Serialize()

Returns

IValue

Unlock()

public void Unlock()