Skip to content

XMediator::Api::UserProperties

Public Functions

Name
UserProperties(string userId =null, CustomProperties customProperties =null)
Creates a new UserProperties instance with the provided values.
override bool Equals(object obj)
override int GetHashCode()
override string ToString()
UserProperties CopyWith(string userId =null, Action< CustomProperties.Builder > customPropertiesEditAction =null)
Creates a new UserProperties instance with the current values as defaults, but overrideable.

Protected Functions

Name
bool Equals(UserProperties other)

Public Properties

Name
string UserId
The current user's unique identifier.
CustomProperties CustomProperties
The current user's custom properties

Public Functions Documentation

function UserProperties

UserProperties(
    string userId =null,
    CustomProperties customProperties =null
)

Creates a new UserProperties instance with the provided values.

Parameters:

  • userId An Id that uniquely identifies a user on your app. This value is optional and not mandatory.
  • customProperties Custom properties object with additional properties you can provide.

function Equals

override bool Equals(
    object obj
)

function GetHashCode

override int GetHashCode()

function ToString

override string ToString()

function CopyWith

UserProperties CopyWith(
    string userId =null,
    Action< CustomProperties.Builder > customPropertiesEditAction =null
)

Creates a new UserProperties instance with the current values as defaults, but overrideable.

Parameters:

  • userId The user id. If null, the current value of UserId will be used.
  • customPropertiesEditAction An action which will be invoked with a CustomProperties.Builder instance, allowing the caller to modify the custom properties. If null, the properties will be left unchanged.

Return: A new UserProperties with the modified properties.

This convenience method does not allow to null the UserId. If that is desired, you should create a new instance instead (just don't forget to set again the previous properties that you do not want to lose).

Protected Functions Documentation

function Equals

bool Equals(
    UserProperties other
)

Public Property Documentation

property UserId

string UserId;

The current user's unique identifier.

property CustomProperties

CustomProperties CustomProperties;

The current user's custom properties


Updated on 2025-05-03 at 22:32:16 +0000