OpenMod Docs OpenMod Docs
OpenMod Docs OpenMod Docs
OpenMod .NET Plugin Framework.

Interface IUserDataStore

The service for storing user data.

Namespace: OpenMod.API.Users
Assembly: OpenMod.API.dll
Syntax
public interface IUserDataStore

Methods

| Improve this Doc View Source

GetUserDataAsync(String, String)

Gets user data.

Declaration
Task<UserData> GetUserDataAsync(string userId, string userType)
Parameters
Type Name Description
System.String userId

The user id.

System.String userType

The user actor type.

Returns
Type Description
Task<UserData>

The user data.

| Improve this Doc View Source

GetUserDataAsync<T>(String, String, String)

Gets user data for the given key.

Declaration
Task<T> GetUserDataAsync<T>(string userId, string userType, string key)
Parameters
Type Name Description
System.String userId

The user id.

System.String userType

The user actor type.

System.String key

The data key.

Returns
Type Description
Task<T>

The deserialized data.

Type Parameters
Name Description
T

The user data type.

| Improve this Doc View Source

GetUsersDataAsync(String)

Gets all user data for the given user type.

Declaration
Task<IReadOnlyCollection<UserData>> GetUsersDataAsync(string type)
Parameters
Type Name Description
System.String type

The user type.

Returns
Type Description
Task<IReadOnlyCollection<UserData>>

All user data for the given user type.

| Improve this Doc View Source

SetUserDataAsync(UserData)

Sets user data. Will replace data if it already exists.

Declaration
Task SetUserDataAsync(UserData userData)
Parameters
Type Name Description
UserData userData

The user data to set.

Returns
Type Description
Task
| Improve this Doc View Source

SetUserDataAsync<T>(String, String, String, T)

Sets user data for the given key.

Declaration
Task SetUserDataAsync<T>(string userId, string userType, string key, T value)
Parameters
Type Name Description
System.String userId

The user id.

System.String userType

The user actor type.

System.String key

The data key.

T value

The value

Returns
Type Description
Task
Type Parameters
Name Description
T

The user data type.

Extension Methods

DisposeHelper.DisposeSyncOrAsync(Object)