Class ItemDirectoryExtensions
Inheritance
System.Object
ItemDirectoryExtensions
Namespace: OpenMod.Extensions.Games.Abstractions.Items
Assembly: OpenMod.Extensions.Games.Abstractions.dll
Syntax
public static class ItemDirectoryExtensions : object
Methods
| Improve this Doc View SourceFindByIdAsync(IItemDirectory, String)
Searches for items by the item asset id.
Declaration
public static Task<IItemAsset> FindByIdAsync(this IItemDirectory directory, string itemAssetId)
Parameters
Type | Name | Description |
---|---|---|
IItem |
directory | The item directory service. |
System. |
itemAssetId | The item asset id to search for. |
Returns
Type | Description |
---|---|
Task<IItem |
The IItem |
FindByNameAsync(IItemDirectory, String, Boolean)
Searches for items by the item asset name.
Declaration
public static Task<IItemAsset> FindByNameAsync(this IItemDirectory directory, string itemName, bool exact = true)
Parameters
Type | Name | Description |
---|---|---|
IItem |
directory | The item directory service. |
System. |
itemName | The name of the item asset. |
System. |
exact | If true, only exact name matches will be used. |
Returns
Type | Description |
---|---|
Task<IItem |
The IItem |