Skip to content

Commit

Permalink
Remove unused options.
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianStehle committed Aug 18, 2024
1 parent 4c5e9c6 commit a98d8ae
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion csharp/Squidex.ClientLibrary/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<PackageTags>Squidex HeadlessCMS</PackageTags>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<Version>19.5.0</Version>
<Version>19.6.0</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public void ContentUpsertOptions_as_default()
[Fact]
public void ContentUpsertOptions_with_everything()
{
var query = new ContentUpsertOptions { Publish = true, Patch = true, EnrichDefaults = true, EnrichRequiredFields = true }
var query = new ContentUpsertOptions { Publish = true, Patch = true, EnrichDefaults = true, EnrichRequiredFields = true }
.ToQuery()
.ToString();

Expand Down Expand Up @@ -164,11 +164,11 @@ public void ContentUpdateOptions_as_default()
[Fact]
public void ContentUpdateOptions_with_everything()
{
var query = new ContentUpdateOptions { EnrichDefaults = true, EnrichRequiredFields = true }
var query = new ContentUpdateOptions { EnrichDefaults = true }
.ToQuery()
.ToString();

Assert.Equal("?enrichDefaults=true&enrichRequiredFields=true", query);
Assert.Equal("?enrichDefaults=true", query);
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,10 @@ public record struct ContentUpdateOptions
/// </summary>
public bool EnrichDefaults { get; set; }

/// <summary>
/// True, to also enrich required fields. Default: false.
/// </summary>
public bool EnrichRequiredFields { get; set; }

internal readonly Query ToQuery()
{
return Query.Create()
.Append("enrichDefaults", EnrichDefaults)
.Append("enrichRequiredFields", EnrichRequiredFields);
.Append("enrichDefaults", EnrichDefaults);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
using System.Globalization;
using System.Text;

#pragma warning disable MA0089 // Optimize string method usage

namespace Squidex.ClientLibrary.Utils;

internal sealed class Query
Expand Down

0 comments on commit a98d8ae

Please sign in to comment.