Table of Contents

Interface ISubscriptionDefinition

Namespace
Microsoft.AutoGen.Contracts
Assembly
Microsoft.AutoGen.Contracts.dll

Defines a subscription that matches topics and maps them to agents.

public interface ISubscriptionDefinition

Properties

Id

Gets the unique identifier of the subscription.

string Id { get; }

Property Value

string

Methods

Equals(ISubscriptionDefinition?)

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

bool Equals(ISubscriptionDefinition? other)

Parameters

other ISubscriptionDefinition

The subscription to compare.

Returns

bool

true if the subscriptions are equal; otherwise, false.

Equals(object?)

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

bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

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

GetHashCode()

Returns a hash code for this subscription.

int GetHashCode()

Returns

int

A hash code for the subscription.

MapToAgent(TopicId)

Maps a TopicId to an AgentId. Should only be called if Matches(TopicId) returns true.

AgentId MapToAgent(TopicId topic)

Parameters

topic TopicId

The topic to map.

Returns

AgentId

The AgentId that should handle the topic.

Matches(TopicId)

Checks if a given TopicId matches the subscription.

bool Matches(TopicId topic)

Parameters

topic TopicId

The topic to check.

Returns

bool

true if the topic matches the subscription; otherwise, false.