public void Done(string key, CrawlUrl crawlUrl) { var typedClient = Client.As <CrawlUrl>(); if (typedClient.RemoveEntryFromHash(typedClient.GetHash <string>(WorkingHashId), crawlUrl.Hash)) { typedClient.SetEntryInHashIfNotExists(typedClient.GetHash <string>(DoneHashId), crawlUrl.Hash, crawlUrl); } }
public bool TryAdd(string key, CrawlUrl crawlUrl) { Client.As <string>().Lists[ScheduledListId].Add(key); var typedClient = Client.As <CrawlUrl>(); typedClient.SetEntryInHashIfNotExists(typedClient.GetHash <string>(ScheduledHashId), key, crawlUrl); return(true); }