Ejemplo n.º 1
0
        private async Task <IFunctionDefinition[]> GetFunctionDefinitionsHelperAsync(CloudTable table, string hostName)
        {
            TableQuery <FunctionDefinitionEntity> query;

            if (hostName == null)
            {
                query = TableScheme.GetRowsInPartition <FunctionDefinitionEntity>(TableScheme.FuncDefIndexPK);
            }
            else
            {
                query = TableScheme.GetRowsWithPrefixAsync <FunctionDefinitionEntity>(TableScheme.FuncDefIndexPK,
                                                                                      TableScheme.NormalizeFunctionName(hostName));
            }
            var results = await table.SafeExecuteQueryAsync(query);

            return(results);
        }