public Task <RandomSequenceModel> GenerateRandomSequence()
 {
     return(Task.Run(async() =>
     {
         try
         {
             return new RandomSequenceModel
             {
                 Id = IdService.GenerateId(),
                 RandomSequence = randomSequenceGeneratorService.ThirdGenerateRandomSequenceMethod(),
             };
         }
         catch (Exception exception)
         {
             await LogExceptionAsync(exception.Message, exception);
             return default;
         }
     }));
 }
Exemple #2
0
 public void ThirdGenerateRandomSequenceMethod_OverANumberOfIterations_AlwaysReturnsAUniqueCollection()
 {
     ExecuteGenerateRandomSequenceMethodIterativeTestCase(() =>
                                                          randomSequenceGeneratorService.ThirdGenerateRandomSequenceMethod());
 }
 private async Task <RandomSequencePerformance> ExecuteThirdGenerateRandomSequenceMethodAsync()
 {
     return(await ExecuteGenerateRandomSequenceMethodAsync(RandomSequenceMethodCodes.ThirdRandomSequenceMethod,
                                                           () => randomSequenceGeneratorService.ThirdGenerateRandomSequenceMethod())
            .ConfigureAwait(false));
 }