public WorkerRole() { _pulsers = Pulsers.FromAssembly(Assembly.GetAssembly(typeof(ImportFileProcessed))) .ToList(); var container = new WindsorContainer(); _configurationValueProvider = new AzureConfigurationValueProvider(); SetupDi(container, _configurationValueProvider, _pulsers.ToArray()); _pulserPublisher = container.Resolve <PulserPublisher>(); _orchestrator = container.Resolve <Orchestrator>(); // insert the list here var keyValueStore = container.Resolve <IDynamoStore>(); var blob = new SimpleBlob() { Body = Assembly.GetExecutingAssembly() .GetManifestResourceStream("BeeHive.Sample.FileImport.Worker.Data.SampleData.txt"), Id = "FileDrop/ImportFiles/SampleData.txt", LastModified = DateTimeOffset.Now }; keyValueStore.UpsertAsync(blob); // add one topic that will not be created automagically by orchestrator // because no actor registered against it var q = container.Resolve <IEventQueueOperator>(); q.CreateQueueAsync(QueueName.FromSimpleQueueName("NewIndexUpserted")).Wait(); }
public WorkerRole() { _pulsers = Pulsers.FromAssembly(Assembly.GetAssembly(typeof(NewsFeedPulsed))) .ToList(); var container = new WindsorContainer(); _configurationValueProvider = new AzureConfigurationValueProvider(); SetupDi(container, _configurationValueProvider, _pulsers.ToArray()); _pulserPublisher = container.Resolve <PulserPublisher>(); _orchestrator = container.Resolve <Orchestrator>(); // insert the list here var keyValueStore = container.Resolve <IKeyValueStore>(); var blob = new SimpleBlob() { Body = new MemoryStream(Encoding.UTF8.GetBytes("http://feeds.bbci.co.uk/news/rss.xml")), Id = "newsFeeds.txt", LastModofied = DateTimeOffset.Now }; keyValueStore.UpsertAsync(blob); }