private async Task OnQuery(object source, EventArgs e) { if (Queried == null) { return; } await Queried.Invoke(source, e); }
/// <inheritdoc /> /// <summary> /// Queries the channel with the specified character spawn. /// </summary> /// <param name="characterSpawn">The character spawn.</param> public void Query(ICharacterSpawn characterSpawn) { QueryingChannelEventArgs queryingChannelEventArgs = new QueryingChannelEventArgs(characterSpawn); Querying?.Invoke(this, queryingChannelEventArgs); if (queryingChannelEventArgs.Cancel) { return; } QueriedChannelEventArgs queriedChannelEventArgs = new QueriedChannelEventArgs(characterSpawn); Queried?.Invoke(this, queriedChannelEventArgs); }