System.Threading.Tasks.Task.FromResult(System.Collections.Generic.IEnumerable)

Here are the examples of the csharp api System.Threading.Tasks.Task.FromResult(System.Collections.Generic.IEnumerable) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

646 Examples 7

19 View Source File : LiteDbAccountDataRepository.cs
License : GNU General Public License v3.0
Project Creator : atomex-me

public Task<IEnumerable<ITxOutput>> GetOutputsAsync(string currency, Type outputType)
        {
            try
            {
                lock (_syncRoot)
                {
                    using var db = new LiteDatabase(ConnectionString, _bsonMapper);
                    
                    var outputs = db.GetCollection(OutputsCollectionName)
                        .Find(Query.EQ(CurrencyKey, currency))
                        .Select(d => (ITxOutput)_bsonMapper.ToObject(
                            type: outputType,
                            doc: d))
                        .ToList();

                    return Task.FromResult<IEnumerable<ITxOutput>>(outputs);
                }
            }
            catch (Exception e)
            {
                Log.Error(e, "Error getting outputs");
            }

            return Task.FromResult(Enumerable.Empty<ITxOutput>());
        }

19 View Source File : WebAccountDataRepository.cs
License : GNU General Public License v3.0
Project Creator : atomex-me

public Task<IEnumerable<WalletAddress>> GetTezosTokenAddressesAsync()
        {
            lock (_sync)
            {
                return Task.FromResult<IEnumerable<WalletAddress>>(
                    _tezosTokensAddresses
                        .Values
                        .Select(a => a.Copy()));
            }
        }

19 View Source File : YoutubeMusicProvider.cs
License : GNU Affero General Public License v3.0
Project Creator : ankenyr

public Task<IEnumerable<RemoteSearchResult>> GetSearchResults(MusicVideoInfo searchInfo, CancellationToken cancellationToken)
            => Task.FromResult(Enumerable.Empty<RemoteSearchResult>());

19 View Source File : LiteDbAccountDataRepository.cs
License : GNU General Public License v3.0
Project Creator : atomex-me

public Task<IEnumerable<WalletAddress>> GetUnspentTezosTokenAddressesAsync(
            string currency,
            string tokenContract,
            decimal tokenId)
        {
            var query = Query.And(
                //Query.EQ(CurrencyKey, currency),
                Query.EQ(TokenContractKey, tokenContract),
                Query.EQ(TokenIdKey, tokenId),
                Query.Or(
                    Query.Not(BalanceKey, 0m),
                    Query.Not(UnconfirmedIncomeKey, 0m),
                    Query.Not(UnconfirmedOutcomeKey, 0m))
                );

            try
            {
                lock (_syncRoot)
                {
                    using var db = new LiteDatabase(ConnectionString, _bsonMapper);
                    var addresses = db.GetCollection(TezosTokensAddresses);

                    var unspentAddresses = addresses
                        .Find(query)
                        .Select(d => _bsonMapper.ToObject<WalletAddress>(d))
                        .ToList();

                    return Task.FromResult<IEnumerable<WalletAddress>>(unspentAddresses);
                }
            }
            catch (Exception e)
            {
                Log.Error(e, "Error getting unspent tezos tokens wallet addresses");
            }

            return Task.FromResult(Enumerable.Empty<WalletAddress>());
        }

19 View Source File : BirdAtlasMockAPI.cs
License : MIT License
Project Creator : AppCreativity

public Task<IEnumerable<Story>> GetStoriesAsync()
        {
            return Task.FromResult<IEnumerable<Story>>(_stories);
        }

19 View Source File : CodeEditorViewModel.cs
License : MIT License
Project Creator : Aminator

public Task<IEnumerable<ClreplacedifiedSpan>> GetClreplacedifiedSpansAsync()
        {
            return CodeEditor != null ? CodeEditor.GetClreplacedifiedSpansAsync() : Task.FromResult(Enumerable.Empty<ClreplacedifiedSpan>());
        }

19 View Source File : LiteDbAccountDataRepository.cs
License : GNU General Public License v3.0
Project Creator : atomex-me

public Task<IEnumerable<Swap>> GetSwapsAsync()
        {
            if (_swapsLoaded)
                return Task.FromResult<IEnumerable<Swap>>(_swapById.Values);

            try
            {
                lock (_syncRoot)
                {
                    using var db = new LiteDatabase(ConnectionString, _bsonMapper);

                    var swaps = db.GetCollection<Swap>(SwapsCollectionName)
                        .Find(Query.All())
                        .ToList();

                    foreach (var swap in swaps)
                        if (!_swapById.ContainsKey(swap.Id))
                            _swapById.TryAdd(swap.Id, swap);

                    _swapsLoaded = true;

                    return Task.FromResult<IEnumerable<Swap>>(_swapById.Values);
                }
            }
            catch (Exception e)
            {
                Log.Error(e, "Swaps getting error");
            }

            return Task.FromResult(Enumerable.Empty<Swap>());
        }

19 View Source File : LogManager.cs
License : MIT License
Project Creator : aguang-xyz

public Task<IEnumerable<string>> GetLogFileNamesAsync()
        {
            try
            {
                var directoryInfo = new DirectoryInfo(PathUtils.LogFolder);
                var fileNames = directoryInfo
                    .GetFiles("*.log")
                    .Select(file => file.Name)
                    .OrderByDescending(fileName => fileName)
                    .AsEnumerable();
                
                return Task.FromResult(fileNames);
            }
            catch (Exception)
            {
                return Task.FromResult(Array.Empty<string>().AsEnumerable());
            }
        }

19 View Source File : WebAccountDataRepository.cs
License : GNU General Public License v3.0
Project Creator : atomex-me

public virtual Task<IEnumerable<IBlockchainTransaction>> GetTransactionsAsync(
            string currency,
            Type transactionType)
        {
            lock (_sync)
            {
                var txs = _transactions.Values
                    .Where(t => t.Currency == currency);

                return Task.FromResult(txs);
            }
        }

19 View Source File : FileSystemStore.cs
License : MIT License
Project Creator : aishang2015

public Task<IEnumerable<IFileStoreEntry>> GetDirectoryContentAsync(string path = null, bool includeSubDirectories = false)
        {
            var physicalPath = GetPhysicalPath(path);
            var results = new List<IFileStoreEntry>();

            if (!Directory.Exists(physicalPath))
            {
                return Task.FromResult((IEnumerable<IFileStoreEntry>)results);
            }

            // Add directories.
            results.AddRange(
                Directory
                    .GetDirectories(physicalPath, "*", includeSubDirectories ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly)
                    .Select(f =>
                    {
                        var fileSystemInfo = new PhysicalDirectoryInfo(new DirectoryInfo(f));
                        var fileRelativePath = f.Substring(_fileSystemRootPath.Length);
                        var filePath = this.NormalizePath(fileRelativePath);
                        return new FileSystemStoreEntry(filePath, fileSystemInfo);
                    }));

            // Add files.
            results.AddRange(
                Directory
                    .GetFiles(physicalPath, "*", includeSubDirectories ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly)
                    .Select(f =>
                    {
                        var fileSystemInfo = new PhysicalFileInfo(new FileInfo(f));
                        var fileRelativePath = f.Substring(_fileSystemRootPath.Length);
                        var filePath = this.NormalizePath(fileRelativePath);
                        return new FileSystemStoreEntry(filePath, fileSystemInfo);
                    }));

            return Task.FromResult((IEnumerable<IFileStoreEntry>)results);
        }

19 View Source File : DefaultAuthorizationHandlerProvider.cs
License : MIT License
Project Creator : Async-Hub

public Task<IEnumerable<IAuthorizationHandler>> GetHandlersAsync(AuthorizationHandlerContext context)
            => Task.FromResult(_handlers);

19 View Source File : BirdAtlasMockAPI.cs
License : MIT License
Project Creator : AppCreativity

public Task<IEnumerable<Story>> GetNewestStories(int amount)
        {
            amount = amount > _stories.Count ? _stories.Count : amount;
            return Task.FromResult<IEnumerable<Story>>(_stories.OrderByDescending(story => story.PublishedOn).Take(amount));
        }

19 View Source File : CodeEditorViewModel.cs
License : MIT License
Project Creator : Aminator

public async Task<IEnumerable<Diagnostic>> GetDiagnosticsAsync()
        {
            var diagnostics = await (CodeEditor != null ? CodeEditor.GetDiagnosticsAsync() : Task.FromResult(Enumerable.Empty<Diagnostic>()));

            CurrentDiagnostics.Clear();

            foreach (Diagnostic diagnostic in diagnostics)
            {
                CurrentDiagnostics.Add(diagnostic);
            }

            return diagnostics;
        }

19 View Source File : LiteDbAccountDataRepository.cs
License : GNU General Public License v3.0
Project Creator : atomex-me

public Task<IEnumerable<TokenTransfer>> GetTezosTokenTransfersAsync(
            string contractAddress,
            int offset = 0,
            int limit = int.MaxValue)
        {
            try
            {
                lock (_syncRoot)
                {
                    using var db = new LiteDatabase(ConnectionString, _bsonMapper);

                    var transfers = db.GetCollection(TezosTokensTransfers)
                        .Find(Query.EQ(TransferContract, contractAddress), skip: offset, limit: limit)
                        .Select(d => _bsonMapper.ToObject<TokenTransfer>(d))
                        .ToList();

                    return Task.FromResult<IEnumerable<TokenTransfer>>(transfers);
                }
            }
            catch (Exception e)
            {
                Log.Error(e, "Error getting tezos tokens transfers");
            }

            return Task.FromResult(Enumerable.Empty<TokenTransfer>());
        }

19 View Source File : ProfileService.cs
License : Apache License 2.0
Project Creator : Aguafrommars

private Task<IEnumerable<Claim>> GetClaimsFromResource(Resource resource, ClaimsPrincipal subject, Client client, string caller)
        {
            if (!resource.Properties.TryGetValue(ProfileServiceProperties.ClaimProviderTypeKey, out string providerTypeName))
            {
                return Task.FromResult(Array.Empty<Claim>() as IEnumerable<Claim>);
            }

            return GetClaimsFromResource(resource, subject, client, caller, providerTypeName);
        }

19 View Source File : LiteDbAccountDataRepository.cs
License : GNU General Public License v3.0
Project Creator : atomex-me

public Task<IEnumerable<ITxOutput>> GetOutputsAsync(
            string currency,
            string address,
            Type outputType)
        {
            try
            {
                lock (_syncRoot)
                {
                    using var db = new LiteDatabase(ConnectionString, _bsonMapper);
                    
                    var outputs = db
                        .GetCollection(OutputsCollectionName)
                        .Find(Query.And(
                            left: Query.EQ(CurrencyKey, currency),
                            right: Query.EQ(AddressKey, address)))
                        .Select(d => (ITxOutput)_bsonMapper.ToObject(
                            type: outputType,
                            doc: d))
                        .ToList();

                    return Task.FromResult<IEnumerable<ITxOutput>>(outputs);
                }
            }
            catch (Exception e)
            {
                Log.Error(e, "Error getting outputs");
            }

            return Task.FromResult(Enumerable.Empty<ITxOutput>());
        }

19 View Source File : InMemoryUserTracker.cs
License : The Unlicense
Project Creator : AndrejsAbrickis

public Task<IEnumerable<UserDetailsDto>> UsersOnline (string groupId) {
            return Task.FromResult (_usersOnline.Values.Where (u => u.GroupId == groupId).AsEnumerable ());
        }

19 View Source File : WebAccountDataRepository.cs
License : GNU General Public License v3.0
Project Creator : atomex-me

public virtual Task<IEnumerable<WalletAddress>> GetUnspentAddressesAsync(
            string currency,
            bool includeUnconfirmed = true)
        {
            lock (_sync)
            {
                var addresses = includeUnconfirmed
                    ? _addresses.Values
                        .Where(w => w.Currency == currency &&
                                    (w.Balance != 0 || w.UnconfirmedIncome != 0 || w.UnconfirmedOutcome != 0))
                    : _addresses.Values
                        .Where(w => w.Currency == currency && w.Balance != 0);
                return Task.FromResult(addresses.Select(a => a.Copy()));
            }
        }

19 View Source File : DeleteDataFromStateDbPostExecutionPlugin.cs
License : MIT License
Project Creator : AElfProject

public Task<IEnumerable<Transaction>> GetPostTransactionsAsync(IReadOnlyList<ServiceDescriptor> descriptors, ITransactionContext transactionContext)
        {
            if (!descriptors.Any(service => service.File.Name == "test_basic_function_with_parallel_contract.proto"))
            {
                return Task.FromResult(new List<Transaction>().AsEnumerable());
            }

            if (transactionContext.Transaction.To == ParallelTestHelper.BasicFunctionWithParallelContractAddress &&
                !transactionContext.Transaction.MethodName.EndsWith("Plugin"))
            {
                return Task.FromResult(new List<Transaction>().AsEnumerable());
            }

            var context = _contextService.Create();
            context.TransactionContext = transactionContext;
            
            var transactions = new List<Transaction>();
            switch (transactionContext.Transaction.MethodName)
            {
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.RemoveValueFromInlineWithPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.RemoveValueFromPrePlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.RemoveValueWithPlugin):
                {
                    var input = RemoveValueInput.Parser.ParseFrom(transactionContext.Transaction.Params);
                    transactions.Add(new Transaction
                    {
                        From = transactionContext.Transaction.From,
                        To = ParallelTestHelper.BasicFunctionWithParallelContractAddress,
                        Params = new IncreaseValueInput
                        {
                            Key = input.Key,
                            Memo = Guid.NewGuid().ToString()
                        }.ToByteString(),
                        MethodName = nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValue),
                        RefBlockNumber = transactionContext.BlockHeight - 1,
                        RefBlockPrefix =
                            BlockHelper.GetRefBlockPrefix(transactionContext.PreviousBlockHash)
                    });
                    break;
                }

                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.RemoveValueFromPostPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.RemoveValueParallelFromPostPlugin):
                {
                    var input = RemoveValueInput.Parser.ParseFrom(transactionContext.Transaction.Params);
                    transactions.Add(new Transaction
                    {
                        From = transactionContext.Transaction.From,
                        To = ParallelTestHelper.BasicFunctionWithParallelContractAddress,
                        Params = input.ToByteString(),
                        MethodName = nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.RemoveValue),
                        RefBlockNumber = transactionContext.BlockHeight - 1,
                        RefBlockPrefix =
                            BlockHelper.GetRefBlockPrefix(transactionContext.PreviousBlockHash)
                    });
                    break;
                }
                
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueWithPostPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueWithInlineAndPostPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueWithPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueWithInlineAndPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueParallelWithInlineAndPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueFailedWithPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueFailedWithPostPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueFailedWithInlineAndPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueFailedWithInlineAndPostPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueFailedParallelWithInlineAndPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueWithFailedInlineAndPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueWithFailedInlineAndPostPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueParallelWithFailedInlineAndPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueWithFailedPrePluginAndPostPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueWithInlineAndFailedPrePluginAndPostPlugin):
                {
                    var input = IncreaseValueInput.Parser.ParseFrom(transactionContext.Transaction.Params);
                    transactions.Add(new Transaction
                    {
                        From = transactionContext.Transaction.From,
                        To = ParallelTestHelper.BasicFunctionWithParallelContractAddress,
                        Params = new IncreaseValueInput
                        {
                            Key = input.Key,
                            Memo = Guid.NewGuid().ToString()
                        }.ToByteString(),
                        MethodName = nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValue),
                        RefBlockNumber = transactionContext.BlockHeight - 1,
                        RefBlockPrefix =
                            BlockHelper.GetRefBlockPrefix(transactionContext.PreviousBlockHash)
                    });
                    break;
                }
                
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueWithFailedPostPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueWithInlineAndFailedPostPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueWithPrePluginAndFailedPostPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueWithInlineAndPrePluginAndFailedPostPlugin):
                {
                    var input = IncreaseValueInput.Parser.ParseFrom(transactionContext.Transaction.Params);
                    transactions.Add(new Transaction
                    {
                        From = transactionContext.Transaction.From,
                        To = ParallelTestHelper.BasicFunctionWithParallelContractAddress,
                        Params = new IncreaseValueInput
                        {
                            Key = input.Key,
                            Memo = Guid.NewGuid().ToString()
                        }.ToByteString(),
                        MethodName = nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueFailed),
                        RefBlockNumber = transactionContext.BlockHeight - 1,
                        RefBlockPrefix =
                            BlockHelper.GetRefBlockPrefix(transactionContext.PreviousBlockHash)
                    });
                    break;
                }
            }
            
            return Task.FromResult(transactions.AsEnumerable());
        
        }

19 View Source File : WebAccountDataRepository.cs
License : GNU General Public License v3.0
Project Creator : atomex-me

public Task<IEnumerable<TokenContract>> GetTezosTokenContractsAsync()
        {
            lock (_sync)
            {
                return Task.FromResult<IEnumerable<TokenContract>>(_tezosTokensContracts.Values);
            }
        }

19 View Source File : OrdersWebApiTest.cs
License : MIT License
Project Creator : anjoy8

[Fact]
        public async Task Get_cardTypes_success()
        {
            //Arrange
            var fakeDynamicResult = Enumerable.Empty<CardType>();
            _orderQueriesMock.Setup(x => x.GetCardTypesAsync())
                .Returns(Task.FromResult(fakeDynamicResult));

            //Act
            var orderController = new OrdersController(_mediatorMock.Object, _orderQueriesMock.Object, _idenreplacedyServiceMock.Object, _loggerMock.Object);
            var actionResult = await orderController.GetCardTypesAsync();

            //replacedert
            replacedert.Equal((actionResult.Result as OkObjectResult).StatusCode, (int)System.Net.HttpStatusCode.OK);
        }

19 View Source File : InMemoryHooksRepository.cs
License : MIT License
Project Creator : anjoy8

public Task<IEnumerable<WebHookReceived>> GetAll()
        {
            return Task.FromResult(_data.AsEnumerable());
        }

19 View Source File : TestDiagnosticProvider.cs
License : Apache License 2.0
Project Creator : agoda-com

public override Task<IEnumerable<Diagnostic>> GetAllDiagnosticsAsync(Project project, CancellationToken cancellationToken)
        {
            return Task.FromResult<IEnumerable<Diagnostic>>(diagnostics);
        }

19 View Source File : BirdAtlasMockAPI.cs
License : MIT License
Project Creator : AppCreativity

public Task<IEnumerable<Story>> GetFeaturedStories(int amount)
        {
            amount = amount > _stories.Count ? _stories.Count : amount;
            return Task.FromResult<IEnumerable<Story>>(_stories.Shuffle().Take(amount));
        }

19 View Source File : MultiTenantAuthenticationSchemeProvider.cs
License : MIT License
Project Creator : alonsoalon

public virtual Task<IEnumerable<AuthenticationScheme>> GetRequestHandlerSchemesAsync()
            => Task.FromResult<IEnumerable<AuthenticationScheme>>(_requestHandlers);

19 View Source File : IStateProvider.cs
License : MIT License
Project Creator : ARKlab

public Task<IEnumerable<ResourceState>> LoadStateAsync(string tenant, string[] resourceIds = null, CancellationToken ctk = default)
        {
            var res = new List<ResourceState>();
            if (resourceIds == null)
                res.AddRange(_store.Values);
            else
            {
                foreach (var r in resourceIds)
                    if (_store.TryGetValue(r, out var s))
                        res.Add(s);
            }

            return Task.FromResult(res.AsEnumerable());
        }

19 View Source File : InstantMessageControllerTest.cs
License : MIT License
Project Creator : appsonsf

[TestMethod]
        public async Task CreateDepConverationAsync()
        {
            var conversationCtrlAppService = Subsreplacedute.For<IConversationCtrlAppService>();
            conversationCtrlAppService.GetByIdAsync(Arg.Any<Guid>())
                .Returns(default(Conversation?));
            conversationCtrlAppService.AddDepAsync(Arg.Any<AddDepConversationInput>())
                .Returns(RemotingResult.Success());

            Task<IEnumerable<IConversationMsgAppService>> getConversationMsgAppServices()
            {
                var conversationMsgAppServices = new List<IConversationMsgAppService> { Subsreplacedute.For<IConversationMsgAppService>() };
                return Task.FromResult(conversationMsgAppServices.AsEnumerable());
            }

            var target = new InstantMessageController(conversationCtrlAppService,
                _ => Subsreplacedute.For<IConversationMsgAppService>(),
                getConversationMsgAppServices,
                Subsreplacedute.For<IEmployeeCacheService>(),
                Subsreplacedute.For<IGroupAppService>(),
                Subsreplacedute.For<IDepartmentAppService>())
            {
                ControllerContext = CreateMockContext()
            };

            var result = await target.CreateDepConverationAsync(Guid.NewGuid());
            result.Value.Should().BeOfType<ResponseData>();
            result.Value.Status.Should().Be(0);

            var depId = Guid.NewGuid();
            conversationCtrlAppService.GetByIdAsync(depId)
             .Returns(new Conversation
             {
                 Id = depId,
                 Participants = new List<Guid> { User_Id },
                 Type = ConversationType.DepartmentGroup
             });
            result = await target.CreateDepConverationAsync(depId);
            result.Value.Status.Should().Be(0);

            conversationCtrlAppService.GetByIdAsync(depId)
            .Returns(new Conversation
            {
                Id = depId,
                Participants = new List<Guid> { Guid.NewGuid() },
                Type = ConversationType.DepartmentGroup
            });
            result = await target.CreateDepConverationAsync(depId);
            result.Value.Status.Should().Be(1);

            conversationCtrlAppService.GetByIdAsync(depId)
               .Returns(default(Conversation?));
            conversationCtrlAppService.AddDepAsync(Arg.Is<AddDepConversationInput>(x => x.DepartmentId == depId && x.UserId == User_Id))
               .Returns(RemotingResult.Fail(1));
            result = await target.CreateDepConverationAsync(depId);
            result.Value.Status.Should().Be(2);

            conversationCtrlAppService.AddDepAsync(Arg.Is<AddDepConversationInput>(x => x.DepartmentId == depId && x.UserId == User_Id))
               .Returns(RemotingResult.Fail(2));
            result = await target.CreateDepConverationAsync(depId);
            result.Value.Status.Should().Be(3);
        }

19 View Source File : SigningKeyResolverStub.cs
License : BSD 3-Clause "New" or "Revised" License
Project Creator : Altinn

public Task<IEnumerable<SecurityKey>> GetSigningKeys(string issuer)
        {
            List<SecurityKey> signingKeys = new List<SecurityKey>();

            X509Certificate2 cert = new X509Certificate2($"{issuer}-org.pem");
            SecurityKey key = new X509SecurityKey(cert);

            signingKeys.Add(key);

            return Task.FromResult(signingKeys.AsEnumerable());
        }

19 View Source File : LiteDbAccountDataRepository.cs
License : GNU General Public License v3.0
Project Creator : atomex-me

public Task<IEnumerable<WalletAddress>> GetTezosTokenAddressesByContractAsync(
            string tokenContract)
        {
            try
            {
                lock (_syncRoot)
                {
                    using var db = new LiteDatabase(ConnectionString, _bsonMapper);
                    var tezosTokenAddresses = db.GetCollection(TezosTokensAddresses);

                    var addresses = tezosTokenAddresses
                        .Find(Query.EQ(TokenContractKey, tokenContract))
                        .Select(d => _bsonMapper.ToObject<WalletAddress>(d))
                        .ToList();

                    return Task.FromResult<IEnumerable<WalletAddress>>(addresses);
                }
            }
            catch (Exception e)
            {
                Log.Error(e, "Error getting tezos tokens addresses");
            }

            return Task.FromResult(Enumerable.Empty<WalletAddress>());
        }

19 View Source File : CultureInfos.razor.cs
License : Apache License 2.0
Project Creator : Aguafrommars

protected override Task<IEnumerable<string>> GetFilteredValues(string term, CancellationToken cancellationToken)
        {
            term = term ?? string.Empty;
            _filterValues = _cultureInfos
                .Where(c => c.Name.Contains(term, StringComparison.OrdinalIgnoreCase) || c.DisplayName.Contains(term, StringComparison.OrdinalIgnoreCase))
                .OrderBy(c => c.Name)
                .Take(5);

            return Task.FromResult(_filterValues.Select(c => c.Name));
        }

19 View Source File : LiteDbAccountDataRepository.cs
License : GNU General Public License v3.0
Project Creator : atomex-me

public Task<IEnumerable<WalletAddress>> GetUnspentTezosTokenAddressesAsync(
            string currency,
            string tokenContract,
            decimal tokenId)
        {
            var query = Query.And(
                //Query.EQ(CurrencyKey, currency),
                Query.EQ(TokenContractKey, tokenContract),
                Query.EQ(TokenIdKey, tokenId),
                Query.Or(
                    Query.Not(BalanceKey, 0m),
                    Query.Not(UnconfirmedIncomeKey, 0m),
                    Query.Not(UnconfirmedOutcomeKey, 0m))
                );

            try
            {
                lock (_syncRoot)
                {
                    using var db = new LiteDatabase(ConnectionString, _bsonMapper);
                    var addresses = db.GetCollection(TezosTokensAddresses);

                    var unspentAddresses = addresses
                        .Find(query)
                        .Select(d => _bsonMapper.ToObject<WalletAddress>(d))
                        .ToList();

                    return Task.FromResult<IEnumerable<WalletAddress>>(unspentAddresses);
                }
            }
            catch (Exception e)
            {
                Log.Error(e, "Error getting unspent tezos tokens wallet addresses");
            }

            return Task.FromResult(Enumerable.Empty<WalletAddress>());
        }

19 View Source File : CodeEditorViewModel.cs
License : MIT License
Project Creator : Aminator

public Task<IEnumerable<ClreplacedifiedSpan>> GetChangedClreplacedifiedSpansAsync()
        {
            return CodeEditor != null ? CodeEditor.GetChangedClreplacedifiedSpansAsync() : Task.FromResult(Enumerable.Empty<ClreplacedifiedSpan>());
        }

19 View Source File : LiteDbAccountDataRepository.cs
License : GNU General Public License v3.0
Project Creator : atomex-me

public Task<IEnumerable<TokenTransfer>> GetTezosTokenTransfersAsync(
            string contractAddress,
            int offset = 0,
            int limit = int.MaxValue)
        {
            try
            {
                lock (_syncRoot)
                {
                    using var db = new LiteDatabase(ConnectionString, _bsonMapper);

                    var transfers = db.GetCollection(TezosTokensTransfers)
                        .Find(Query.EQ(TransferContract, contractAddress), skip: offset, limit: limit)
                        .Select(d => _bsonMapper.ToObject<TokenTransfer>(d))
                        .ToList();

                    return Task.FromResult<IEnumerable<TokenTransfer>>(transfers);
                }
            }
            catch (Exception e)
            {
                Log.Error(e, "Error getting tezos tokens transfers");
            }

            return Task.FromResult(Enumerable.Empty<TokenTransfer>());
        }

19 View Source File : DeleteDataFromStateDbPreExecutionAcsPlugin.cs
License : MIT License
Project Creator : AElfProject

public Task<IEnumerable<Transaction>> GetPreTransactionsAsync(IReadOnlyList<ServiceDescriptor> descriptors, ITransactionContext transactionContext)
        {
            if (!descriptors.Any(service => service.File.Name == "test_basic_function_with_parallel_contract.proto"))
            {
                return Task.FromResult(new List<Transaction>().AsEnumerable());
            }
            
            if (transactionContext.Transaction.To == ParallelTestHelper.BasicFunctionWithParallelContractAddress &&
                !transactionContext.Transaction.MethodName.EndsWith("Plugin"))
            {
                return Task.FromResult(new List<Transaction>().AsEnumerable());
            }
            
            var context = _contextService.Create();
            context.TransactionContext = transactionContext;
            
            var transactions = new List<Transaction>();

            switch (transactionContext.Transaction.MethodName)
            {
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.RemoveValueFromInlineWithPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.RemoveValueFromPostPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.RemoveValueWithPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.RemoveValueParallelFromPostPlugin):
                {
                    var input = RemoveValueInput.Parser.ParseFrom(transactionContext.Transaction.Params);
                    transactions.Add(new Transaction
                    {
                        From = transactionContext.Transaction.From,
                        To = ParallelTestHelper.BasicFunctionWithParallelContractAddress,
                        Params = new IncreaseValueInput
                        {
                            Key = input.Key,
                            Memo = Guid.NewGuid().ToString()
                        }.ToByteString(),
                        MethodName = nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValue),
                        RefBlockNumber = transactionContext.BlockHeight - 1,
                        RefBlockPrefix =
                            BlockHelper.GetRefBlockPrefix(transactionContext.PreviousBlockHash)
                    });
                    break;
                }

                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.RemoveValueFromPrePlugin):
                {
                    var input = RemoveValueInput.Parser.ParseFrom(transactionContext.Transaction.Params);
                    transactions.Add(new Transaction
                    {
                        From = transactionContext.Transaction.From,
                        To = ParallelTestHelper.BasicFunctionWithParallelContractAddress,
                        Params = input.ToByteString(),
                        MethodName = nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.RemoveValue),
                        RefBlockNumber = transactionContext.BlockHeight - 1,
                        RefBlockPrefix =
                            BlockHelper.GetRefBlockPrefix(transactionContext.PreviousBlockHash)
                    });
                    break;
                }
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueWithPrePlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueWithInlineAndPrePlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueWithPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueWithInlineAndPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueParallelWithInlineAndPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueFailedWithPlugin): 
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueFailedWithPrePlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueFailedWithInlineAndPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueFailedParallelWithInlineAndPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueFailedWithInlineAndPrePlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueWithFailedInlineAndPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueWithFailedInlineAndPrePlugin): 
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueParallelWithFailedInlineAndPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueWithPrePluginAndFailedPostPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueWithInlineAndPrePluginAndFailedPostPlugin):
                {
                    var input = IncreaseValueInput.Parser.ParseFrom(transactionContext.Transaction.Params);
                    transactions.Add(new Transaction
                    {
                        From = transactionContext.Transaction.From,
                        To = ParallelTestHelper.BasicFunctionWithParallelContractAddress,
                        Params = new IncreaseValueInput
                        {
                            Key = input.Key,
                            Memo = Guid.NewGuid().ToString()
                        }.ToByteString(),
                        MethodName = nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValue),
                        RefBlockNumber = transactionContext.BlockHeight - 1,
                        RefBlockPrefix =
                            BlockHelper.GetRefBlockPrefix(transactionContext.PreviousBlockHash)
                    });
                    break;
                }

                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueWithFailedPrePlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueWithInlineAndFailedPrePlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueWithFailedPrePluginAndPostPlugin):
                case nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueWithInlineAndFailedPrePluginAndPostPlugin):
                {
                    var input = IncreaseValueInput.Parser.ParseFrom(transactionContext.Transaction.Params);
                    transactions.Add(new Transaction
                    {
                        From = transactionContext.Transaction.From,
                        To = ParallelTestHelper.BasicFunctionWithParallelContractAddress,
                        Params = new IncreaseValueInput
                        {
                            Key = input.Key,
                            Memo = Guid.NewGuid().ToString()
                        }.ToByteString(),
                        MethodName = nameof(BasicFunctionWithParallelContractContainer.BasicFunctionWithParallelContractStub.IncreaseValueFailed),
                        RefBlockNumber = transactionContext.BlockHeight - 1,
                        RefBlockPrefix =
                            BlockHelper.GetRefBlockPrefix(transactionContext.PreviousBlockHash)
                    });
                    break;
                }
            }
            
            return Task.FromResult(transactions.AsEnumerable());
        }

19 View Source File : LiteDbAccountDataRepository.cs
License : GNU General Public License v3.0
Project Creator : atomex-me

public Task<IEnumerable<ITxOutput>> GetOutputsAsync(string currency, Type outputType)
        {
            try
            {
                lock (_syncRoot)
                {
                    using var db = new LiteDatabase(ConnectionString, _bsonMapper);
                    
                    var outputs = db.GetCollection(OutputsCollectionName)
                        .Find(Query.EQ(CurrencyKey, currency))
                        .Select(d => (ITxOutput)_bsonMapper.ToObject(
                            type: outputType,
                            doc: d))
                        .ToList();

                    return Task.FromResult<IEnumerable<ITxOutput>>(outputs);
                }
            }
            catch (Exception e)
            {
                Log.Error(e, "Error getting outputs");
            }

            return Task.FromResult(Enumerable.Empty<ITxOutput>());
        }

19 View Source File : InMemoryUserTracker.cs
License : The Unlicense
Project Creator : AndrejsAbrickis

public Task<IEnumerable<UserDetailsDto>> UsersOnline () => Task.FromResult (_usersOnline.Values.AsEnumerable ());

19 View Source File : LiteDbAccountDataRepository.cs
License : GNU General Public License v3.0
Project Creator : atomex-me

public Task<IEnumerable<ITxOutput>> GetOutputsAsync(
            string currency,
            string address,
            Type outputType)
        {
            try
            {
                lock (_syncRoot)
                {
                    using var db = new LiteDatabase(ConnectionString, _bsonMapper);
                    
                    var outputs = db
                        .GetCollection(OutputsCollectionName)
                        .Find(Query.And(
                            left: Query.EQ(CurrencyKey, currency),
                            right: Query.EQ(AddressKey, address)))
                        .Select(d => (ITxOutput)_bsonMapper.ToObject(
                            type: outputType,
                            doc: d))
                        .ToList();

                    return Task.FromResult<IEnumerable<ITxOutput>>(outputs);
                }
            }
            catch (Exception e)
            {
                Log.Error(e, "Error getting outputs");
            }

            return Task.FromResult(Enumerable.Empty<ITxOutput>());
        }

19 View Source File : ProfileServiceTest.cs
License : Apache License 2.0
Project Creator : Aguafrommars

public Task<IEnumerable<Claim>> ProvideClaims(ClaimsPrincipal subject, Client client, string caller, Resource resource)
            {
                return Task.FromResult(new Claim[] { new Claim("test", "test") } as IEnumerable<Claim>);
            }

19 View Source File : EthereumAccount.cs
License : GNU General Public License v3.0
Project Creator : atomex-me

public Task<IEnumerable<SelectedWalletAddress>> SelectUnspentAddressesAsync(
            IList<WalletAddress> from,
            decimal amount,
            decimal fee,
            decimal feePrice,
            FeeUsagePolicy feeUsagePolicy,
            AddressUsagePolicy addressUsagePolicy,
            BlockchainTransactionType transactionType,
            CancellationToken cancellationToken = default)
        {
            var eth = EthConfig;

            if (addressUsagePolicy == AddressUsagePolicy.UseMinimalBalanceFirst)
            {
                from = from.ToList().SortList(new AvailableBalanceAscending());
            }
            else if (addressUsagePolicy == AddressUsagePolicy.UseMaximumBalanceFirst)
            {
                from = from.ToList().SortList(new AvailableBalanceDescending());
            }
            else if (addressUsagePolicy == AddressUsagePolicy.UseOnlyOneAddress)
            {
                var feeInEth = feeUsagePolicy == FeeUsagePolicy.EstimatedFee
                    ? eth.GetFeeAmount(GasLimitByType(transactionType, isFirstTx: true), feePrice)
                    : eth.GetFeeAmount(fee, feePrice);

                var address = from.FirstOrDefault(w => w.AvailableBalance() >= amount + feeInEth);

                var selectedAddresses = address != null
                    ? new List<SelectedWalletAddress>
                    {
                        new SelectedWalletAddress
                        {
                            WalletAddress = address,
                            UsedAmount = amount,
                            UsedFee = feeInEth
                        }
                    }
                    : Enumerable.Empty<SelectedWalletAddress>();

                return Task.FromResult(selectedAddresses);
            }

            for (var txCount = 1; txCount <= from.Count; ++txCount)
            {
                var result = new List<SelectedWalletAddress>();
                var requiredAmount = amount;

                var isFirstTx = true;
                var completed = false;

                foreach (var address in from)
                {
                    var availableBalance = address.AvailableBalance();

                    var txFee = feeUsagePolicy == FeeUsagePolicy.EstimatedFee
                        ? eth.GetFeeAmount(GasLimitByType(transactionType, isFirstTx), feePrice)
                        : feeUsagePolicy == FeeUsagePolicy.FeeForAllTransactions
                            ? Math.Round(eth.GetFeeAmount(fee, feePrice) / txCount, eth.Digits)
                            : eth.GetFeeAmount(fee, feePrice);

                    if (availableBalance <= txFee) // ignore address with balance less than fee
                    {
                        if (result.Count + from.Count - from.IndexOf(address) <= txCount)
                            break;
                        else
                            continue;
                    }

                    var amountToUse = Math.Min(Math.Max(availableBalance - txFee, 0), requiredAmount);

                    result.Add(new SelectedWalletAddress
                    {
                        WalletAddress = address,
                        UsedAmount = amountToUse,
                        UsedFee = txFee
                    });
                    requiredAmount -= amountToUse;

                    if (requiredAmount <= 0)
                    {
                        completed = true;
                        break;
                    }

                    if (result.Count == txCount) // will need more transactions
                        break;

                    if (isFirstTx)
                        isFirstTx = false;
                }

                if (completed)
                    return Task.FromResult<IEnumerable<SelectedWalletAddress>>(result);
            }

            return Task.FromResult(Enumerable.Empty<SelectedWalletAddress>());
        }

19 View Source File : YoutubeDLMetadataProvider.cs
License : GNU Affero General Public License v3.0
Project Creator : ankenyr

public Task<IEnumerable<RemoteSearchResult>> GetSearchResults(MovieInfo searchInfo, CancellationToken cancellationToken)
            => Task.FromResult(Enumerable.Empty<RemoteSearchResult>());

19 View Source File : WebAccountDataRepository.cs
License : GNU General Public License v3.0
Project Creator : atomex-me

public virtual Task<IEnumerable<WalletAddress>> GetAddressesAsync(
            string currency)
        {
            lock (_sync)
            {
                var addresses = _addresses.Values
                    .Where(w => w.Currency == currency)
                    .Select(w => w.Copy());

                return Task.FromResult(addresses);
            }
        }

19 View Source File : SimpleCodeActionWithOptionalPreview.cs
License : GNU General Public License v3.0
Project Creator : Acumatica

protected override Task<IEnumerable<CodeActionOperation>> ComputePreviewOperationsAsync(CancellationToken cancellationToken) =>
			DisplayPreview
				? base.ComputePreviewOperationsAsync(cancellationToken)
				: Task.FromResult<IEnumerable<CodeActionOperation>>(null);

19 View Source File : WebAccountDataRepository.cs
License : GNU General Public License v3.0
Project Creator : atomex-me

public Task<IEnumerable<WalletAddress>> GetTezosTokenAddressesByContractAsync(
            string tokenContract)
        {
            lock (_sync)
            {
                var addresses = _tezosTokensAddresses.Values
                    .Where(w => w.TokenBalance.Contract == tokenContract)
                    .ToList();

                return Task.FromResult<IEnumerable<WalletAddress>>(addresses);
            }
        }

19 View Source File : OrdersWebApiTest.cs
License : MIT License
Project Creator : anjoy8

[Fact]
        public async Task Get_orders_success()
        {
            //Arrange
            var fakeDynamicResult = Enumerable.Empty<OrderSummary>();

            _idenreplacedyServiceMock.Setup(x => x.GetUserIdenreplacedy())
                .Returns(Guid.NewGuid().ToString());

            _orderQueriesMock.Setup(x => x.GetOrdersFromUserAsync(Guid.NewGuid()))
                .Returns(Task.FromResult(fakeDynamicResult));

            //Act
            var orderController = new OrdersController(_mediatorMock.Object, _orderQueriesMock.Object, _idenreplacedyServiceMock.Object, _loggerMock.Object);
            var actionResult = await orderController.GetOrdersAsync();

            //replacedert
            replacedert.Equal((actionResult.Result as OkObjectResult).StatusCode, (int)System.Net.HttpStatusCode.OK);
        }

19 View Source File : ButtonPaginationRequest.cs
License : MIT License
Project Creator : Aiko-IT-Systems

public Task<IEnumerable<DiscordButtonComponent>> GetButtonsAsync()
            => Task.FromResult((IEnumerable<DiscordButtonComponent>)this._buttons.ButtonArray);

19 View Source File : FileDownloaderBuilder.cs
License : MIT License
Project Creator : Accelerider

public IDownloader Build(DownloadContext context, IEnumerable<BlockTransferContext> blockContexts)
        {
            Guards.ThrowIfNull(context);

            if (context.RemotePathProvider == null)
            {
                context.RemotePathProvider = _remotePathProvider ?? throw new ArgumentException("The Context.RemotePathProvider cannot be null");
            }

            context.RemotePathProvider = _remotePathProviderInterceptor(context.RemotePathProvider);

            var blockContextsArray = blockContexts?.ToArray();
            return blockContextsArray != null && blockContextsArray.Any()
                ? InternalBuild(context, ctx => token =>
                {
                    blockContextsArray.ForEach(item =>
                    {
                        item.LocalPath = ctx.LocalPath;
                        item.RemotePathGetter = ctx.RemotePathProvider.GetAsync;
                    });
                    return Task.FromResult(blockContextsArray.AsEnumerable());
                })
                : InternalBuild(context, GetBlockTransferContextGenerator);
        }

19 View Source File : PXColorizerMainTagger.cs
License : GNU General Public License v3.0
Project Creator : Acumatica

protected internal override Task<IEnumerable<ITagSpan<IClreplacedificationTag>>> GetTagsAsyncImplementationAsync(ITextSnapshot snapshot, 
                                                                                                               CancellationToken cancellationToken)
        {
            TaggerType currentTaggerType = GetCurrentTaggerTypeFromSettings();

            if (!_taggersByType.TryGetValue(currentTaggerType, out PXColorizerTaggerBase activeTagger))
                return Task.FromResult(Enumerable.Empty<ITagSpan<IClreplacedificationTag>>());

            if (activeTagger.UseAsyncTagging)
            {
                return activeTagger.GetTagsAsyncImplementationAsync(snapshot, cancellationToken);
            }
            else
            {
                var tags = activeTagger.GetTagsSynchronousImplementation(snapshot);
                return Task.FromResult(tags);
            }
        }

19 View Source File : MapClaimsProvider.cs
License : Apache License 2.0
Project Creator : Aguafrommars

public Task<IEnumerable<Claim>> ProvideClaims(ClaimsPrincipal subject, Client client, string caller, Resource resource)
        {
            var defaultOutboundClaimMap = JwtSecurityTokenHandler.DefaultOutboundClaimTypeMap;
            var claims = new List<Claim>(subject.Claims.Count());
            foreach (var claim in subject.Claims)
            {
                if (defaultOutboundClaimMap.TryGetValue(claim.Type, out string toClaimType))
                {
                    claims.Add(new Claim(toClaimType, claim.Value, claim.ValueType, claim.Issuer));
                }
            }

            return Task.FromResult(claims as IEnumerable<Claim>);
        }

19 View Source File : MultiTenantAuthenticationSchemeProvider.cs
License : MIT License
Project Creator : alonsoalon

public virtual Task<IEnumerable<AuthenticationScheme>> GetAllSchemesAsync()
            => Task.FromResult<IEnumerable<AuthenticationScheme>>(_schemes.Values);

19 View Source File : WeatherServiceWithExceptions.cs
License : MIT License
Project Creator : ardalis

public Task<IEnumerable<WeatherForecast>> GetForecastAsync(ForecastRequestDto model)
        {
            return Task.FromResult(GetForecast(model));
        }

See More Examples