Here are the examples of the csharp api System.Collections.Generic.HashSet.Add(WarframeUpdate) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
19
Source : WFNotificationHandler.cs
with GNU Affero General Public License v3.0
from TRKS-Team
with GNU Affero General Public License v3.0
from TRKS-Team
public async Task CheckWarframeUpdates()
{
var updates = await GetWarframeUpdates();
if (!sendedUpdateSet.Contains(updates.First()))
{
var msg = WFFormatter.ToString(updates.First());
Messenger.Broadcast(msg);
sendedUpdateSet.Add(updates.First());
}
}
19
Source : WFNotificationHandler.cs
with GNU Affero General Public License v3.0
from TRKS-Team
with GNU Affero General Public License v3.0
from TRKS-Team
private async Task InitWFNotificationAsync()
{
AsyncContext.SetCancellationToken(CancellationToken.None);
var alerts = api.GetAlerts();
var invs = api.GetInvasions();
var enemies = api.GetPersistentEnemies();
var updates = GetWarframeUpdates();
foreach (var alert in await alerts)
sendedAlertsSet.Add(alert.Id);
foreach (var inv in await invs)
sendedInvSet.Add(inv.id);
foreach (var enemy in await enemies)
sendedStalkerSet.Add(enemy.lastDiscoveredTime);
foreach (var update in await updates)
sendedUpdateSet.Add(update);
WFNotificationLoaded = true;
Trace.WriteLine("WF 通知初始化完成.");
}