Class GroupLinkDetectionHelper
Internal utility helper for detecting and building group links in outgoing messages.
Inheritance
System.Object
GroupLinkDetectionHelper
Namespace: TehGM.Wolfringo.Utilities.Internal
Assembly: Wolfringo.Core.dll
Syntax
public static class GroupLinkDetectionHelper
Methods
| Improve this Doc View SourceFindGroupLinksAsync(IWolfClient, String, CancellationToken)
Finds group links in the text, and builds metadata for each found link.
Declaration
public static async Task<IEnumerable<ChatMessageFormatting.GroupLinkData>> FindGroupLinksAsync(IWolfClient client, string text, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IWolfClient | client | Client to use when retrieving profiles of unknown groups. |
System.String | text | Text to find group links in. |
System.Threading.CancellationToken | cancellationToken | Token to cancel operation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ChatMessageFormatting.GroupLinkData>> | Built metadata with information about group links to be used when sending a message. |
FindGroupLinksInText(String)
Enumerates all group links found in the text.
Declaration
public static IEnumerable<GroupLinkPosition> FindGroupLinksInText(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | Text to find group links in. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<GroupLinkPosition> | Names and positions of groups found in the text. |