Skip to content

Commit

Permalink
Events cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianStehle committed Jan 15, 2025
1 parent c7d4fc1 commit d65ce1f
Show file tree
Hide file tree
Showing 16 changed files with 2 additions and 117 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PackageProjectUrl>https://github.com/squidex/squidex</PackageProjectUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<Version>6.24.0</Version>
<Version>6.25.0</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
Expand Down
1 change: 0 additions & 1 deletion assets/Squidex.Assets.Tests/MongoGridFsAssetStoreTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// All rights reserved. Licensed under the MIT license.
// ==========================================================================

using Squidex.Assets.TusAdapter;
using Xunit;

namespace Squidex.Assets;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// All rights reserved. Licensed under the MIT license.
// ==========================================================================

using Squidex.Assets;
using Squidex.Assets.TusAdapter;
using Squidex.Assets.TusAdapter.Internal;
using tusdotnet.Interfaces;
Expand Down
1 change: 0 additions & 1 deletion assets/TusTestServer/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// ==========================================================================

using Squidex.Assets;
using Squidex.Assets.Internal;
using Squidex.Assets.TusAdapter;
using Squidex.Assets.TusAdapter.Internal;
using tusdotnet;
Expand Down
1 change: 0 additions & 1 deletion events/Squidex.Events.Tests/EventStoreTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

using System.Globalization;
using FluentAssertions;
using Squidex.Events.EntityFramework;
using Xunit;

#pragma warning disable MA0040 // Forward the CancellationToken parameter to methods that take one
Expand Down
1 change: 0 additions & 1 deletion events/Squidex.Events.Tests/MariaDbEventStoreFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Squidex.Hosting;
using Testcontainers.MariaDb;
Expand Down
1 change: 0 additions & 1 deletion events/Squidex.Events.Tests/MysqlEventStoreFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Squidex.Hosting;
using Testcontainers.MySql;
Expand Down
1 change: 0 additions & 1 deletion events/Squidex.Events.Tests/PostgresEventStoreFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Squidex.Hosting;
using Testcontainers.PostgreSql;
Expand Down
1 change: 0 additions & 1 deletion events/Squidex.Events.Tests/SqlServerEventStoreFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Squidex.Hosting;
using Testcontainers.MsSql;
Expand Down
14 changes: 0 additions & 14 deletions events/Squidex.Events/CollectionNameAttribute.cs

This file was deleted.

19 changes: 0 additions & 19 deletions events/Squidex.Events/CommonHeaders.cs

This file was deleted.

40 changes: 0 additions & 40 deletions events/Squidex.Events/EnvelopeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,6 @@ namespace Squidex.Events;

public static class EnvelopeExtensions
{
public static long EventStreamNumber(this EnvelopeHeaders headers)
{
return headers.GetLong(CommonHeaders.EventStreamNumber);
}

public static Guid CommitId(this EnvelopeHeaders headers)
{
return headers.GetGuid(CommonHeaders.CommitId);
}

public static Guid EventId(this EnvelopeHeaders headers)
{
return headers.GetGuid(CommonHeaders.EventId);
}

public static DateTime Timestamp(this EnvelopeHeaders headers)
{
return headers.GetInstant(CommonHeaders.Timestamp);
}

public static long GetLong(this EnvelopeHeaders obj, string key)
{
if (obj.TryGetValue(key, out var found))
Expand All @@ -48,26 +28,6 @@ public static long GetLong(this EnvelopeHeaders obj, string key)
return 0;
}

public static Guid GetGuid(this EnvelopeHeaders obj, string key)
{
if (obj.TryGetValue(key, out var found) && found is HeaderStringValue s && Guid.TryParse(s.Value, out var guid))
{
return guid;
}

return default;
}

public static DateTime GetInstant(this EnvelopeHeaders obj, string key)
{
if (obj.TryGetValue(key, out var found) && found is HeaderStringValue s && DateTime.TryParseExact(s.Value, "o", CultureInfo.InvariantCulture, DateTimeStyles.None, out var instant))
{
return instant;
}

return default;
}

public static string GetString(this EnvelopeHeaders obj, string key)
{
if (obj.TryGetValue(key, out var found))
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace Squidex.Events;

public static class Telemetry
public static class EventsTelemetry
{
public static readonly ActivitySource Activities = new ActivitySource("Squidex");
}
13 changes: 0 additions & 13 deletions events/Squidex.Events/IOnRead.cs

This file was deleted.

21 changes: 0 additions & 21 deletions events/Squidex.Events/InconsistentStateException.cs

This file was deleted.

0 comments on commit d65ce1f

Please sign in to comment.