MockAudience Class
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
For more information about our API support guarantees, see here.
Signature
constructor();
Method Details
addMember
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 |
getMember
For more information about our API support guarantees, see here.
Signature
getMember(clientId: string): IClient | undefined;
Parameters
Parameter | Type | Description |
---|---|---|
clientId | string |
Returns
Return type: IClient | undefined
getMembers
For more information about our API support guarantees, see here.
Signature
getMembers(): Map<string, IClient>;
Returns
Return type: Map<string, IClient>
getSelf
For more information about our API support guarantees, see here.
Signature
getSelf(): ISelf | undefined;
Returns
Return type: ISelf | undefined
removeMember
For more information about our API support guarantees, see here.
Signature
removeMember(clientId: string): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
clientId | string |
Returns
Return type: boolean
setCurrentClientId
For more information about our API support guarantees, see here.
Signature
setCurrentClientId(clientId: string): void;
Parameters
Parameter | Type | Description |
---|---|---|
clientId | string |