MockAudience Class
This API is provided for existing users, but is not recommended for new users.
To use, import via @fluidframework/test-runtime-utils/legacy.
For more information about our API support guarantees, see here.
Signature
export declare class MockAudience extends TypedEventEmitter<IAudienceEvents> implements IAudienceOwner
Extends: TypedEventEmitter<IAudienceEvents>
Implements: IAudienceOwner
Constructors
| Constructor | Alerts | Description |
|---|---|---|
| (constructor)() | Beta | Constructs a new instance of the MockAudience class |
Methods
| Method | Alerts | Return Type | Description |
|---|---|---|---|
| addMember(clientId, member) | Beta | void | |
| getMember(clientId) | Beta | IClient | undefined | |
| getMembers() | Beta | Map<string, IClient> | |
| getSelf() | Beta | ISelf | undefined | |
| removeMember(clientId) | Beta | boolean | |
| setCurrentClientId(clientId) | Beta | void |
Constructor Details
(constructor)
Constructs a new instance of the MockAudience class
This API is provided for existing users, but is not recommended for new users.
For more information about our API support guarantees, see here.
Signature
constructor();
Method Details
addMember
This API is provided for existing users, but is not recommended for new users.
For more information about our API support guarantees, see here.
Signature
addMember(clientId: string, member: IClient): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| clientId | string | |
| member | IClient |