Browse Source

Some renaming fixes

pull/1/head
Sebastian 9 years ago
parent
commit
03fcf0d08b
  1. 8
      src/Squidex.Infrastructure/CQRS/Events/DefaultEventNotifier.cs
  2. 4
      src/Squidex.Read/Schemas/Services/Implementations/CachingSchemaProvider.cs
  3. 2
      src/Squidex/Config/Domain/InfrastructureModule.cs
  4. 6
      tests/Squidex.Infrastructure.Tests/CQRS/Events/DefaultEventNotifierTests.cs

8
src/Squidex.Infrastructure/CQRS/Events/DefaultMemoryEventNotifier.cs → src/Squidex.Infrastructure/CQRS/Events/DefaultEventNotifier.cs

@ -1,5 +1,5 @@
// ==========================================================================
// InMemoryEventNotifier.cs
// DefaultEventNotifier.cs
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex Group
@ -10,13 +10,13 @@ using System;
namespace Squidex.Infrastructure.CQRS.Events
{
public sealed class DefaultMemoryEventNotifier : IEventNotifier
public sealed class DefaultEventNotifier : IEventNotifier
{
private static readonly string ChannelName = typeof(DefaultMemoryEventNotifier).Name;
private static readonly string ChannelName = typeof(DefaultEventNotifier).Name;
private readonly IPubSub invalidator;
public DefaultMemoryEventNotifier(IPubSub invalidator)
public DefaultEventNotifier(IPubSub invalidator)
{
Guard.NotNull(invalidator, nameof(invalidator));

4
src/Squidex.Read/Schemas/Services/Implementations/CachingSchemaProvider.cs

@ -108,6 +108,10 @@ namespace Squidex.Read.Schemas.Services.Implementations
{
Remove(fieldEvent.AppId, fieldEvent.SchemaId);
}
else if (@event.Payload is SchemaCreated schemaCreatedEvent)
{
Remove(schemaCreatedEvent.AppId, schemaCreatedEvent.SchemaId);
}
else if (@event.Payload is SchemaDeleted schemaDeletedEvent)
{
Remove(schemaDeletedEvent.AppId, schemaDeletedEvent.SchemaId);

2
src/Squidex/Config/Domain/InfrastructureModule.cs

@ -63,7 +63,7 @@ namespace Squidex.Config.Domain
.As<ICommandBus>()
.SingleInstance();
builder.RegisterType<DefaultMemoryEventNotifier>()
builder.RegisterType<DefaultEventNotifier>()
.As<IEventNotifier>()
.SingleInstance();

6
tests/Squidex.Infrastructure.Tests/CQRS/Events/DefaultMemoryEventNotifierTests.cs → tests/Squidex.Infrastructure.Tests/CQRS/Events/DefaultEventNotifierTests.cs

@ -1,5 +1,5 @@
// ==========================================================================
// DefaultMemoryEventNotifierTests.cs
// DefaultEventNotifierTests.cs
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex Group
@ -10,9 +10,9 @@ using Xunit;
namespace Squidex.Infrastructure.CQRS.Events
{
public sealed class DefaultMemoryEventNotifierTests
public sealed class DefaultEventNotifierTests
{
private readonly DefaultMemoryEventNotifier sut = new DefaultMemoryEventNotifier(new InMemoryPubSub());
private readonly DefaultEventNotifier sut = new DefaultEventNotifier(new InMemoryPubSub());
[Fact]
public void Should_invalidate_all_actions()
Loading…
Cancel
Save