Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Couchbase.Analytics.sln
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "fit", "fit", "{A58FEC0E-429
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Couchbase.Analytics.Performer.UnitTests", "fit\Couchbase.Analytics.Performer.UnitTests\Couchbase.Analytics.Performer.UnitTests.csproj", "{65B53BDA-D674-4CD8-A5DC-763A8F816F0B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Couchbase.Text.Json", "src\Couchbase.Text.Json\Couchbase.Text.Json.csproj", "{0B9D51A9-E71B-4151-A177-73BE3BE34FCD}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Couchbase.Core", "src\Couchbase.Core\Couchbase.Core.csproj", "{0B9D51A9-E71B-4151-A177-73BE3BE34FCD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -68,4 +68,4 @@ Global
{0B9D51A9-E71B-4151-A177-73BE3BE34FCD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0B9D51A9-E71B-4151-A177-73BE3BE34FCD}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
EndGlobal
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Couchbase.AnalyticsClient.Options;
using Couchbase.AnalyticsClient.Results;
using Couchbase.Grpc.Protocol.Columnar;
using Couchbase.Text.Json.Utils;
using Couchbase.Core.Utils;
using Google.Protobuf.WellKnownTypes;
using Grpc.Core;
using Error = Couchbase.Grpc.Protocol.Columnar.Error;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Couchbase.AnalyticsClient;
using Couchbase.Grpc.Protocol.Columnar;
using Couchbase.Grpc.Protocol.Shared;
using Couchbase.Text.Json.Utils;
using Couchbase.Core.Utils;
using Google.Protobuf.WellKnownTypes;
using Grpc.Core;
using Exception = System.Exception;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Diagnostics;
using Couchbase.Grpc.Protocol.Columnar;
using Couchbase.Text.Json.Utils;
using Couchbase.Core.Utils;
using Google.Protobuf.WellKnownTypes;

namespace Couchbase.Analytics.Performer.Internal.Utils;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Couchbase.AnalyticsClient.Options;
using Couchbase.AnalyticsClient.Query;
using Couchbase.Grpc.Protocol.Columnar;
using Couchbase.Text.Json;
using Couchbase.Core.Json;
using Google.Protobuf.Collections;
using Google.Protobuf.WellKnownTypes;
using ArgumentOutOfRangeException = System.ArgumentOutOfRangeException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using Couchbase.AnalyticsClient.Results;
using Couchbase.Grpc.Protocol.Columnar;
using Google.Protobuf;
using Google.Protobuf.Collections;
using Google.Protobuf.WellKnownTypes;
using Error = Couchbase.Grpc.Protocol.Columnar.Error;

namespace Couchbase.Analytics.Performer.Internal.Utils;

Expand Down
2 changes: 1 addition & 1 deletion src/Couchbase.Analytics/Couchbase.Analytics.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Couchbase.Text.Json\Couchbase.Text.Json.csproj" />
<ProjectReference Include="..\Couchbase.Core\Couchbase.Core.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Couchbase.Analytics/Internal/AnalyticsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
using Couchbase.AnalyticsClient.Internal.Retry;
using Couchbase.AnalyticsClient.Options;
using Couchbase.AnalyticsClient.Results;
using Couchbase.Text.Json;
using Couchbase.Text.Json.Utils;
using Couchbase.Core.Json;
using Couchbase.Core.Utils;
using Microsoft.Extensions.Logging;

namespace Couchbase.AnalyticsClient.Internal;
Expand Down
2 changes: 1 addition & 1 deletion src/Couchbase.Analytics/Internal/DI/DefaultServices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

using System.Text.Json;
using Couchbase.AnalyticsClient.Internal.HTTP;
using Couchbase.Text.Json;
using Couchbase.Core.Json;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
using System.Net;
using Couchbase.AnalyticsClient.Query;
using Couchbase.AnalyticsClient.Results;
using Couchbase.Text.Json;
using Couchbase.Core.Json;

namespace Couchbase.AnalyticsClient.Internal.Results;

Expand All @@ -39,7 +39,7 @@
/// <param name="responseStream"><see cref="Stream"/> to read.</param>
/// <param name="serializer">The <see cref="ISerializer"/> to use for converting the response to an object.</param>
/// <param name="ownedForCleanup">Additional object to dispose when complete.</param>
protected AnalyticsResultBase(Stream responseStream, IDeserializer serializer, IDisposable? ownedForCleanup = null)

Check warning on line 42 in src/Couchbase.Analytics/Internal/Results/AnalyticsResultBase.cs

View workflow job for this annotation

GitHub Actions / Functional Tests (ubuntu-22.04)

Non-nullable property 'Rows' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
{
ResponseStream = responseStream ?? throw new ArgumentNullException(nameof(responseStream));
Serializer = serializer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
using Couchbase.AnalyticsClient.Query;
using Couchbase.AnalyticsClient.Results;
using Couchbase.AnalyticsClient.Utils;
using Couchbase.Text.Json;
using Couchbase.Core.Json;

namespace Couchbase.AnalyticsClient.Internal.Results;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
using System.Runtime.CompilerServices;
using Couchbase.AnalyticsClient.Query;
using Couchbase.AnalyticsClient.Results;
using Couchbase.Text.Json;
using Couchbase.Core.Json;

namespace Couchbase.AnalyticsClient.Internal.Results;

Expand Down
2 changes: 1 addition & 1 deletion src/Couchbase.Analytics/Internal/Retry/ErrorContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
using Couchbase.AnalyticsClient.Query;
using Couchbase.Text.Json.Utils;
using Couchbase.Core.Utils;

namespace Couchbase.AnalyticsClient.Internal.Retry;

Expand Down
2 changes: 1 addition & 1 deletion src/Couchbase.Analytics/Options/ClusterOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
using Couchbase.AnalyticsClient.Internal;
using Couchbase.AnalyticsClient.Internal.DI;
using Couchbase.AnalyticsClient.Internal.Utils;
using Couchbase.Text.Json.Utils;
using Couchbase.Core.Utils;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;

Expand Down
4 changes: 2 additions & 2 deletions src/Couchbase.Analytics/Options/QueryOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

using System.Text.Json;
using Couchbase.AnalyticsClient.Query;
using Couchbase.Text.Json;
using Couchbase.Text.Json.Utils;
using Couchbase.Core.Json;
using Couchbase.Core.Utils;

namespace Couchbase.AnalyticsClient.Options;

Expand Down
2 changes: 1 addition & 1 deletion src/Couchbase.Analytics/Query/QueryMetrics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#endregion

using System.Text.Json.Serialization;
using Couchbase.Text.Json;
using Couchbase.Core.Json;

namespace Couchbase.AnalyticsClient.Query;

Expand Down Expand Up @@ -52,4 +52,4 @@
public int ProcessedObjects { get; init; }

[JsonPropertyName("bufferCacheHitRatio")]
public string BufferCacheHitRatio { get; init; }

Check warning on line 55 in src/Couchbase.Analytics/Query/QueryMetrics.cs

View workflow job for this annotation

GitHub Actions / Build and Unit Tests (windows-latest)

Non-nullable property 'BufferCacheHitRatio' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 55 in src/Couchbase.Analytics/Query/QueryMetrics.cs

View workflow job for this annotation

GitHub Actions / Build and Unit Tests (ubuntu-latest)

Non-nullable property 'BufferCacheHitRatio' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 55 in src/Couchbase.Analytics/Query/QueryMetrics.cs

View workflow job for this annotation

GitHub Actions / Functional Tests (ubuntu-22.04)

Non-nullable property 'BufferCacheHitRatio' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
Expand Down
2 changes: 1 addition & 1 deletion src/Couchbase.Analytics/Results/AnalyticsRow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* ************************************************************/
#endregion

using Couchbase.Text.Json;
using Couchbase.Core.Json;

namespace Couchbase.AnalyticsClient.Results;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

using System.Text.Json;

namespace Couchbase.Text.Json.Internal;
namespace Couchbase.Core.Internal;

/// <summary>
/// Extensions for <see cref="JsonElement"/>.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using System.Dynamic;
using System.Text.Json;
using Couchbase.Core.Json;

namespace Couchbase.Text.Json.Internal;
namespace Couchbase.Core.Internal;

internal sealed class JsonToken : IJsonToken
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* ************************************************************/
#endregion

namespace Couchbase.Text.Json;
namespace Couchbase.Core.Json;

public interface IDeserializer
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* ************************************************************/
#endregion

namespace Couchbase.Text.Json;
namespace Couchbase.Core.Json;

/// <summary>
/// Reads values and objects from a JSON stream asynchronously.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* ************************************************************/
#endregion

namespace Couchbase.Text.Json;
namespace Couchbase.Core.Json;

/// <summary>
/// Used to support dynamic object reading during streaming JSON deserialization.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* ************************************************************/
#endregion

namespace Couchbase.Text.Json;
namespace Couchbase.Core.Json;

/// <summary>
/// The Default serializer that is based on System.Text.Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* ************************************************************/
#endregion

namespace Couchbase.Text.Json;
namespace Couchbase.Core.Json;

public interface ISerializerDeserializer
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* ************************************************************/
#endregion

namespace Couchbase.Text.Json;
namespace Couchbase.Core.Json;

/// <summary>
/// Extensions for <seealso cref="IJsonStreamReader"/>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
using System.Runtime.InteropServices;
using System.Text.Json;
using System.Text.Json.Serialization.Metadata;
using Couchbase.Text.Json.Internal;
using Couchbase.Core.Internal;

namespace Couchbase.Text.Json;
namespace Couchbase.Core.Json;

public sealed class JsonStreamReader : IJsonStreamReader
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
* ************************************************************/
#endregion

using System.Globalization;
using System.Text.Json;
Comment on lines +22 to 23
Copy link

Copilot AI Oct 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Using statements should be ordered alphabetically. System.Globalization should come before System.Text.Json statements.

Suggested change
using System.Globalization;
using System.Text.Json;
using System.Text.Json;
using System.Globalization;

Copilot uses AI. Check for mistakes.
using System.Text.Json.Serialization;
using System.Globalization;

namespace Couchbase.Text.Json;
namespace Couchbase.Core.Json;

/// <summary>
/// Serializes and deserializes <see cref="TimeSpan"/> as the number of whole milliseconds in the format
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

using System.Text.Json;

namespace Couchbase.Text.Json;
namespace Couchbase.Core.Json;

/// <inheritdoc />>
public class StjJsonDeserializer(JsonSerializerOptions jsonSerializerOptions): IDeserializer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

using System.Text.Json;

namespace Couchbase.Text.Json;
namespace Couchbase.Core.Json;

/// <inheritdoc />
public class StjJsonSerializer(JsonSerializerOptions jsonSerializerOptions) : ISerializer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* ************************************************************/
#endregion

namespace Couchbase.Text.Json.Utils;
namespace Couchbase.Core.Utils;

/// <summary>
/// Annotation for the interface stability of a given API. A stable interface is one that
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* ************************************************************/
#endregion

namespace Couchbase.Text.Json.Utils;
namespace Couchbase.Core.Utils;

/// <summary>
/// A lightweight stopwatch implementation for measuring elapsed time.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* ************************************************************/
#endregion

namespace Couchbase.Text.Json.Utils;
namespace Couchbase.Core.Utils;

/// <summary>
/// Designates the interface stability of a given API; how likely the interface is to change or be removed entirely.
Expand Down
1 change: 0 additions & 1 deletion tests/Couchbase.Analytics.FunctionalTests/ClusterTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Net;
using Couchbase.AnalyticsClient.FunctionalTests.Fixtures;
using Xunit;
using Xunit.Abstractions;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System.Net;
using Couchbase.AnalyticsClient.HTTP;
using Couchbase.AnalyticsClient.Options;
using Microsoft.Extensions.Configuration;
using Xunit;

namespace Couchbase.AnalyticsClient.FunctionalTests.Fixtures;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Net;
using Couchbase.AnalyticsClient.DnsUtil;
using Couchbase.AnalyticsClient.Exceptions;
using Couchbase.AnalyticsClient.FunctionalTests.Utils;
using Couchbase.AnalyticsClient.Internal;
using Couchbase.AnalyticsClient.Internal.DI;
using Couchbase.AnalyticsClient.Internal.DnsUtil;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System.Text.Json.Serialization;

namespace Couchbase.AnalyticsClient.FunctionalTests.Utils;

public class GreetingResponse
{
[JsonPropertyName("greeting")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
using System.Net;
using System.Net.Http.Headers;
using System.Runtime.InteropServices.JavaScript;
using System.Text;
using Couchbase.AnalyticsClient.Internal;
using Couchbase.AnalyticsClient.Internal.HTTP;
using Couchbase.AnalyticsClient.Internal.Results;
using Couchbase.AnalyticsClient.Options;
using Couchbase.Text.Json;
using Couchbase.Core.Json;
using Microsoft.Extensions.Logging;
using Moq;
using Moq.Protected;
using Newtonsoft.Json;
using Xunit;
using Xunit.Abstractions;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System.Text.Json;
using Couchbase.AnalyticsClient.Internal.Results;
using Couchbase.Text.Json;
using Newtonsoft.Json;
using Couchbase.Core.Json;
using Xunit;

namespace Couchbase.AnalyticsClient.UnitTests.Internal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using Couchbase.AnalyticsClient.Internal.HTTP;
using Couchbase.AnalyticsClient.Options;
using Couchbase.AnalyticsClient.Query;
using Couchbase.Text.Json;
using Couchbase.Core.Json;
using Microsoft.Extensions.Logging;
using Moq;
using Moq.Protected;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using System;
using Couchbase.AnalyticsClient.Internal.DI;
using Microsoft.Extensions.DependencyInjection;
using Xunit;

namespace Couchbase.Analytics.UnitTests.Internal
namespace Couchbase.AnalyticsClient.UnitTests.Internal.DI
{
public class ConstructorSelectorTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
using Xunit.Abstractions;
using Xunit.Sdk;

namespace Couchbase.AnalyticsClient.UnitTests.Internal.HTTP;
namespace Couchbase.AnalyticsClient.UnitTests.Internal.DnsUtil;

public class ConnectCallbackRoundRobinTests
{
Expand Down
Loading
Loading