InterestTemplate Class

Namespace: Improbable.Gdk.QueryBasedInterestSource

Utility class to help construct Interest component snapshots.


Static Methods

Create Source
InterestTemplate Create()

Creates a new InterestTemplate object.

Returns:
A new InterestTemplate object.

Create Source
InterestTemplate Create(InterestTemplate interestTemplate)

Creates a new InterestTemplate object given an existing InterestTemplate.

Returns:
An InterestTemplate object.

Parameters

Notes:
  • The underlying data is deep copied.

Create Source
InterestTemplate Create(Dictionary<uint, ComponentInterest> interest)

Creates a new InterestTemplate object from the content of an existing Interest component.

Returns:
An InterestTemplate object.

Parameters
  • Dictionary<uint, ComponentInterest> interest : The underlying dictionary of an Interest component.

Notes:
  • The underlying data is deep copied.


Methods

AddQueries<T> Source
InterestTemplate AddQueries<T>(InterestQuery interestQuery, params InterestQuery[] interestQueries)

Add InterestQueries to the Interest component.

Returns:
An InterestTemplate object.

Parameters
  • InterestQuery interestQuery : First InterestQuery to add for a given authoritative component.
  • params InterestQuery[] interestQueries : Further InterestQueries to add for a given authoritative component.

Notes:
  • At least one InterestQuery must be provided to update the Interest component.

Type parameters:
  • T : Type of the authoritative component to add the InterestQueries to.

AddQueries Source
InterestTemplate AddQueries(uint componentId, InterestQuery interestQuery, params InterestQuery[] interestQueries)

Add InterestQueries to the Interest component.

Returns:
An InterestTemplate object.

Parameters
  • uint componentId : Component ID of the authoritative component to add the InterestQueries to.
  • InterestQuery interestQuery : First InterestQuery to add for a given authoritative component.
  • params InterestQuery[] interestQueries : Further InterestQueries to add for a given authoritative component.

Notes:
  • At least one InterestQuery must be provided to update the Interest component.

AddQueries<T> Source
InterestTemplate AddQueries<T>(IEnumerable<InterestQuery> interestQueries)

Add InterestQueries to the Interest component.

Returns:
An InterestTemplate object.

Parameters
  • IEnumerable<InterestQuery> interestQueries : Set of InterestQueries to add for a given authoritative component.

Notes:
  • At least one InterestQuery must be provided to update the Interest component.

Type parameters:
  • T : Type of the authoritative component to add the InterestQueries to.

AddQueries Source
InterestTemplate AddQueries(uint componentId, IEnumerable<InterestQuery> interestQueries)

Add InterestQueries to the Interest component.

Returns:
An InterestTemplate object.

Parameters
  • uint componentId : Component ID of the authoritative component to add the InterestQueries to.
  • IEnumerable<InterestQuery> interestQueries : Set of InterestQueries to add for a given authoritative component.

Notes:
  • At least one InterestQuery must be provided to update the Interest component. No queries are added if interestQueries is empty.

ReplaceQueries<T> Source
InterestTemplate ReplaceQueries<T>(InterestQuery interestQuery, params InterestQuery[] interestQueries)

Replaces a component's InterestQueries in the Interest component.

Returns:
An InterestTemplate object.

Parameters
  • InterestQuery interestQuery : First InterestQuery to add for a given authoritative component.
  • params InterestQuery[] interestQueries : Further InterestQueries to add for a given authoritative component.

Notes:
  • At least one InterestQuery must be provided to replace a component's interest.

Type parameters:
  • T : Type of the authoritative component to replace InterestQueries of.

ReplaceQueries Source
InterestTemplate ReplaceQueries(uint componentId, InterestQuery interestQuery, params InterestQuery[] interestQueries)

Replaces a component's InterestQueries in the Interest component.

Returns:
An InterestTemplate object.

Parameters
  • uint componentId : Component ID of the authoritative component to replace InterestQueries of.
  • InterestQuery interestQuery : First InterestQuery to add for a given authoritative component.
  • params InterestQuery[] interestQueries : Further InterestQueries to add for a given authoritative component.

Notes:
  • At least one InterestQuery must be provided to replace a component's interest.

ReplaceQueries<T> Source
InterestTemplate ReplaceQueries<T>(IEnumerable<InterestQuery> interestQueries)

Replaces a component's InterestQueries in the Interest component.

Returns:
An InterestTemplate object.

Parameters
  • IEnumerable<InterestQuery> interestQueries : Set of InterestQueries to add for a given authoritative component.

Notes:
  • At least one InterestQuery must be provided to replace a component's interest.

Type parameters:
  • T : Type of the authoritative component to replace InterestQueries of.

ReplaceQueries Source
InterestTemplate ReplaceQueries(uint componentId, IEnumerable<InterestQuery> interestQueries)

Replaces a component's InterestQueries in the Interest component.

Returns:
An InterestTemplate object.

Parameters
  • uint componentId : Component ID of the authoritative component to replace InterestQueries of.
  • IEnumerable<InterestQuery> interestQueries : Set of InterestQueries to add for a given authoritative component.

Notes:
  • At least one InterestQuery must be provided to replace a component's interest. No queries are replaced if interestQueries is empty.

ClearQueries<T> Source
InterestTemplate ClearQueries<T>()

Clears all InterestQueries for a given authoritative component.

Returns:
An InterestTemplate object.

Type parameters:
  • T : Type of the authoritative component to clear InterestQueries from.

ClearQueries Source
InterestTemplate ClearQueries(uint componentId)

Clears all InterestQueries for a given authoritative component.

Returns:
An InterestTemplate object.

Parameters
  • uint componentId : Component ID of the authoritative component to clear InterestQueries from.

ClearAllQueries Source
InterestTemplate ClearAllQueries()

Clears all InterestQueries.

Returns:
An InterestTemplate object.

ToSnapshot Source
Interest.Snapshot ToSnapshot()

Builds the Interest snapshot.

Returns:
A Interest.Snapshot object.

AsComponentInterest Source
Dictionary<uint, ComponentInterest> AsComponentInterest()

Returns the underlying data of an Interest component.

Returns:
A Dictionary<uint, ComponentInterest>.

Updated about a year ago


InterestTemplate Class


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.