public async void Procedure() { var resource = resourceStore.Get(); while (resource != null) { await dataSender.Send(resource); resource = resourceStore.Get(); } }
public void Procedure() { var resource = resourceStore.Get(); while (resource != null) { resource.Id = Guid.NewGuid(); Console.WriteLine($"Sending publication: {resource.Id} {resource.Item}"); statisticsDataSender.Send(resource.ToItemModel(false, name)); var brokerUrl = settings.BrokersUrls[random.Next(0, settings.BrokersUrls.Count - 1)]; var dataSender = new DataSender <Publication>(brokerUrl); dataSender.Send(resource); resource = resourceStore.Get(); Thread.Sleep(settings.WaitTimeInMs); } }
internal byte[] LoadRaw(string name) { byte[] rawData = null; #if DEBUG if (File.Exists(name)) { rawData = File.ReadAllBytes(name); } #endif if (rawData == null) { rawData = store.Get(name); if (rawData == null) { return(null); } } return(rawData); }
internal byte[] LoadRaw(string name) => store.Get(name);
public static bool WebResourceAvailable(string name) => Store.Get(name) != null;