public async Task ReportResult(FizzBuzzResult result)
        {
            ActorEventSource.Current.Message($"Input: {result.Input} | Result: {result.Output}");

            var entryPoint = ActorProxy.Create <IApplicationEntryPoint>(new ActorId(FizzBuzzActorIdentity.EntryPoint));
            await entryPoint.ReportResult(result);
        }
Beispiel #2
0
        public ActionResult Index(FizzBuzzModel fizzBuzzModel)
        {
            FizzBuzzResult fizzBuzzResult = new FizzBuzzResult();

            fizzBuzzModel.FizzBuzzList = fizzBuzzResult.ExecuteCalculate(fizzBuzzModel.Num);


            return(View("FizzBuzzView", fizzBuzzModel));
        }
Beispiel #3
0
        public ActionResult <IEnumerable <FizzBuzzResult> > GetFizzBuzzPlay([Required, FromQuery] long start, [Required, FromQuery] long count)
        {
            long i;
            var  fbResultArr = new FizzBuzzResult[count];

            for (i = 0; i < count; i++)
            {
                fbResultArr[i]       = new FizzBuzzResult();
                fbResultArr[i].value = FizzBuzzCheckRules(start + i);
            }
            return(fbResultArr);
        }
Beispiel #4
0
        public FizzBuzzResult Analize(int number)
        {
            var result = new FizzBuzzResult();

            if (number % 3 == 0)
            {
                result.IsFizz = true;
            }
            if (number % 5 == 0)
            {
                result.IsBuzz = true;
            }

            return(result);
        }
Beispiel #5
0
 private async Task ReportResult(FizzBuzzResult result)
 {
     var reporter = ActorProxy.Create <IResultReporter>(new ActorId(FizzBuzzActorIdentity.Reporter));
     await reporter.ReportResult(result);
 }
 public async Task ReportResult(FizzBuzzResult result)
 {
     _results.Add(result);
     await Task.Delay(0);
 }
Beispiel #7
0
 private bool Equals(FizzBuzzResult other) => other._origin.Equals(_origin);