void OnCallClean(CleanupMessage pMessage) { if (pMessage.Sender.GetComponent <TurbineObject>() == this.GetComponent <TurbineObject>()) { Dispatcher <CleanupMessage> .Unsubscribe(OnCallClean); OnCallHelp(); } }
public async Task StoreMessage(DiscordMessage message, ulong ttl) { logger.LogInformation($"Saving message: {message} with ttl {ttl}"); var cleanupMessage = new CleanupMessage(); cleanupMessage.MessageCleanupTableId = message.Id.ToString(); cleanupMessage.ChannelId = message.ChannelId; cleanupMessage.InsertedAt = DateTime.Now; cleanupMessage.LastEdited = DateTime.Now; cleanupMessage.TTL = ttl; await dbContext.SaveAsync(cleanupMessage); logger.LogInformation($"Saved message with ID {message.Id}"); }
private void CleanViewModel(CleanupMessage obj) { base.Cleanup(); }
void SendCleaners(CleanupMessage rm) { GetFreeAgent().Send(rm.Sender.GetComponent <TurbineObject> ()); }