From bf6264af464773cdb059dbd496d3513f1bee011d Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 3 Jun 2019 16:33:14 +0200 Subject: [PATCH] Test --- .../Squidex.ClientLibrary.csproj | 2 +- .../Squidex.ClientLibrary/SquidexClient.cs | 2 +- .../SquidexClientExtensions.cs | 19 ++++++++++--------- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/Squidex.ClientLibrary.csproj b/csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/Squidex.ClientLibrary.csproj index 23e7446b..570d03aa 100644 --- a/csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/Squidex.ClientLibrary.csproj +++ b/csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/Squidex.ClientLibrary.csproj @@ -10,7 +10,7 @@ https://raw.githubusercontent.com/Squidex/squidex/master/media/logo-squared.png https://github.com/Squidex/squidex/blob/master/LICENSE.txt https://github.com/Squidex/squidex/ - 2.8 + 2.9 true diff --git a/csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/SquidexClient.cs b/csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/SquidexClient.cs index 9491e212..d1579005 100644 --- a/csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/SquidexClient.cs +++ b/csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/SquidexClient.cs @@ -49,7 +49,7 @@ public async Task> GetAsync(long? skip = null, l if (!string.IsNullOrWhiteSpace(search)) { - queries.Add($"$search={search}"); + queries.Add($"$search=\"{search}\""); } else if (!string.IsNullOrWhiteSpace(filter)) { diff --git a/csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/SquidexClientExtensions.cs b/csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/SquidexClientExtensions.cs index fc314ce1..8975a7d9 100644 --- a/csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/SquidexClientExtensions.cs +++ b/csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/SquidexClientExtensions.cs @@ -1,18 +1,21 @@ +// ========================================================================== +// Squidex Headless CMS +// ========================================================================== +// Copyright (c) Squidex UG (haftungsbeschraenkt) +// All rights reserved. Licensed under the MIT license. +// ========================================================================== + using System.Threading.Tasks; namespace Squidex.ClientLibrary { public static class SquidexClientExtensions { - public static async Task> GetAllAsync( - this SquidexClient client, - int batchSize = 200) + public static async Task> GetAllAsync(this SquidexClient client, int batchSize = 200) where TEntity : SquidexEntityBase where TData : class, new() { - Guard.NotNull(client, nameof(client)); - - int skip = 0; + var skip = 0; var entities = new SquidexEntities(); do { @@ -30,9 +33,7 @@ public static async Task> GetAllAsync GetAllAssetsAsync(this SquidexAssetClient assetClient, int batchSize = 200) { - Guard.NotNull(assetClient, nameof(assetClient)); - - int skip = 0; + var skip = 0; var entities = new AssetEntities(); do {