private void InternalProcess(CreatedTradeEvent @event)
        {
            var query = "SELECT * FROM Trades WHERE ID = " + @event.TradeId + " AND Amount = " + @event.Amount;

            NextActor.Tell(query, NextActor);

            ListenForCommands();
        }
Exemple #2
0
        private void BuildPageWithUserControls(List <string> fileUrls)
        {
            int numberOfActorsAdded = 0;

            // Set Active Actor
            string      firstActorFile = fileUrls.First();
            ActiveActor activeActor    = (ActiveActor)LoadControl("~/controls/ActiveActor.ascx");

            activeActor.SetImageUrl(firstActorFile);
            // Add actor to Actors PlaceHolder
            this.PlaceHolderActors.Controls.Add(activeActor);
            // Create a Page for this Actor
            PageTemplate firstActorsPage = (PageTemplate)LoadControl("~/controls/PageTemplate.ascx");

            firstActorsPage.SetActorName(Path.GetFileNameWithoutExtension(firstActorFile));
            firstActorsPage.SetPageNumber(numberOfActorsAdded.ToString());
            // Add it to Page PlaceHolder
            this.PlaceHolderPages.Controls.Add(firstActorsPage);
            numberOfActorsAdded++;
            fileUrls.Remove(firstActorFile);

            // Continue with other actors
            foreach (string actorFile in fileUrls)
            {
                NextActor nextActor = (NextActor)LoadControl("~/controls/NextActor.ascx");
                nextActor.SetImageUrl(actorFile);
                this.PlaceHolderActors.Controls.Add(nextActor);
                // Create a Page for this Actor
                PageTemplate nextActorsPage = (PageTemplate)LoadControl("~/controls/PageTemplate.ascx");
                nextActorsPage.SetActorName(Path.GetFileNameWithoutExtension(actorFile));
                nextActorsPage.SetPageNumber(numberOfActorsAdded.ToString());
                // Add it to Page PlaceHolder
                this.PlaceHolderPages.Controls.Add(nextActorsPage);
                numberOfActorsAdded++;
            }
        }