Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove redundant class body #854

Merged
merged 1 commit into from
May 6, 2024
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
namespace Wolverine.FluentValidation.Internals;

internal class WolverineFluentValidationMarker
{
}
internal class WolverineFluentValidationMarker;
5 changes: 1 addition & 4 deletions src/Http/NSwagDemonstrator/TodoListEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ namespace NSwagDemonstrator;

public record CreateTodoListRequest(string Title);

public class TodoList
{

}
public class TodoList;

public record TodoListCreated(Guid ListId, string Title);

Expand Down
2 changes: 1 addition & 1 deletion src/Http/OpenApiDemonstrator/Endpoints.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public Task StopAsync(CancellationToken cancellationToken)
}
}

public class Message1{}
public class Message1;

public class ResponseModel
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,7 @@ await host.Scenario(x =>
}
}

public class Breeder
{

}
public class Breeder;

public class AggregateRepository
{
Expand Down
13 changes: 4 additions & 9 deletions src/Http/Wolverine.Http.Tests/IntegrationContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,7 @@ public async Task ResetHost()
}

[CollectionDefinition("integration")]
public class IntegrationCollection : ICollectionFixture<AppFixture>
{
}


public class IntegrationCollection : ICollectionFixture<AppFixture>;

[Collection("integration")]
public abstract class IntegrationContext : IAsyncLifetime, IOpenApiSource
Expand All @@ -112,7 +108,7 @@ protected IntegrationContext(AppFixture fixture)
{
_fixture = fixture;
}

// more....

public HttpGraph HttpChains => Host.Services.GetRequiredService<WolverineHttpOptions>().Endpoints!;
Expand All @@ -128,7 +124,7 @@ public IDocumentStore Store
{
_fixture.ResetHost().GetAwaiter().GetResult();
}

return _fixture.Host.Services.GetRequiredService<IDocumentStore>();
}
}
Expand All @@ -147,8 +143,7 @@ public Task DisposeAsync()
{
return Task.CompletedTask;
}



public async Task<IScenarioResult> Scenario(Action<Scenario> configure)
{
try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,5 @@ public void is_valid_response_type(Type type, bool canBeResponse)
HttpChain.IsValidResponseType(type).ShouldBe(canBeResponse);
}

public class SpecialReturnType : IWolverineReturnType
{
}
public class SpecialReturnType : IWolverineReturnType;
}
10 changes: 2 additions & 8 deletions src/Http/Wolverine.Http/IHttpAware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,7 @@ void IHttpAware.Apply(HttpContext context)

#endregion

public record CreationResponse<T>(string Url, T Value) : CreationResponse(Url)
{

}
public record CreationResponse<T>(string Url, T Value) : CreationResponse(Url);


#region sample_AcceptResponse
Expand Down Expand Up @@ -139,7 +136,4 @@ void IHttpAware.Apply(HttpContext context)

#endregion

public record AcceptResponse<T>(string Url, T Value) : AcceptResponse(Url)
{

}
public record AcceptResponse<T>(string Url, T Value) : AcceptResponse(Url);
4 changes: 1 addition & 3 deletions src/Http/Wolverine.Http/NotBodyAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,5 @@ namespace Wolverine.Http;
/// HTTP request body
/// </summary>
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.ReturnValue)]
public class NotBodyAttribute : Attribute, IFromServiceMetadata
{
}
public class NotBodyAttribute : Attribute, IFromServiceMetadata;

2 changes: 1 addition & 1 deletion src/Http/Wolverine.Http/Runtime/RequestIdMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void Apply(IReadOnlyList<HttpChain> chains, GenerationRules rules, IConta

#endregion

internal class MyAuthenticationMiddleware{}
internal class MyAuthenticationMiddleware;

// Leave this alone, it's used in sample code for docs
internal class RequestIdPolicyApplication
Expand Down
5 changes: 1 addition & 4 deletions src/Http/Wolverine.Http/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@

namespace Wolverine.Http;

public static class ServiceCollectionExtensions
{

}
public static class ServiceCollectionExtensions;
4 changes: 1 addition & 3 deletions src/Http/Wolverine.Http/WolverineMarker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ namespace Wolverine.Http;
/// <summary>
/// Merely marks an endpoint as being sourced from Wolverine
/// </summary>
public class WolverineMarker
{
}
public class WolverineMarker;
4 changes: 1 addition & 3 deletions src/Http/WolverineWebApi/CustomMetadata.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
namespace WolverineWebApi;

public class CustomMetadata
{
}
public class CustomMetadata;
4 changes: 1 addition & 3 deletions src/Http/WolverineWebApi/FakeEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,4 @@ public string ReadEnumArgument(Direction direction)
}
}

public class BigResponse
{
}
public class BigResponse;
5 changes: 1 addition & 4 deletions src/Http/WolverineWebApi/UserEndpoints.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@

namespace WolverineWebApi;

public class UserEndpoints
{

}
public class UserEndpoints;

public record UserId(Guid Id);

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

namespace EfCoreTests.Sagas;

public class basic_mechanics_with_guid : GuidIdentifiedSagaComplianceSpecs<EfCoreSagaHost>
{
}
public class basic_mechanics_with_guid : GuidIdentifiedSagaComplianceSpecs<EfCoreSagaHost>;
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace EfCoreTests.Sagas;

public class basic_mechanics_with_int : IntIdentifiedSagaComplianceSpecs<EfCoreSagaHost>
{
}
public class basic_mechanics_with_int : IntIdentifiedSagaComplianceSpecs<EfCoreSagaHost>;
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace EfCoreTests.Sagas;

public class basic_mechanics_with_long : LongIdentifiedSagaComplianceSpecs<EfCoreSagaHost>
{
}
public class basic_mechanics_with_long : LongIdentifiedSagaComplianceSpecs<EfCoreSagaHost>;
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace EfCoreTests.Sagas;

public class basic_mechanics_with_string : StringIdentifiedSagaComplianceSpecs<EfCoreSagaHost>
{
}
public class basic_mechanics_with_string : StringIdentifiedSagaComplianceSpecs<EfCoreSagaHost>;
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ public async Task should_find_handler()
await host.InvokeMessageAndWaitAsync(new StoreSomething(id));
}

public interface IDependencyRequiringLogger
{
}
public interface IDependencyRequiringLogger;

public class DependencyRequiringLogger : IDependencyRequiringLogger
{
Expand Down
4 changes: 1 addition & 3 deletions src/Persistence/MartenTests/DurableTcpTransportCompliance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,4 @@ public async Task DisposeAsync()
}

[Collection("marten")]
public class DurableTcpTransportCompliance : TransportCompliance<DurableTcpTransportFixture>
{
}
public class DurableTcpTransportCompliance : TransportCompliance<DurableTcpTransportFixture>;
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace MartenTests.Persistence.Sagas;

public class basic_mechanics_with_guid : GuidIdentifiedSagaComplianceSpecs<MartenSagaHost>
{
}
public class basic_mechanics_with_guid : GuidIdentifiedSagaComplianceSpecs<MartenSagaHost>;
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace MartenTests.Persistence.Sagas;

public class basic_mechanics_with_int : IntIdentifiedSagaComplianceSpecs<MartenSagaHost>
{
}
public class basic_mechanics_with_int : IntIdentifiedSagaComplianceSpecs<MartenSagaHost>;
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace MartenTests.Persistence.Sagas;

public class basic_mechanics_with_long : LongIdentifiedSagaComplianceSpecs<MartenSagaHost>
{
}
public class basic_mechanics_with_long : LongIdentifiedSagaComplianceSpecs<MartenSagaHost>;
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace MartenTests.Persistence.Sagas;

public class basic_mechanics_with_string : StringIdentifiedSagaComplianceSpecs<MartenSagaHost>
{
}
public class basic_mechanics_with_string : StringIdentifiedSagaComplianceSpecs<MartenSagaHost>;
4 changes: 1 addition & 3 deletions src/Persistence/MartenTests/PostgresqlContext.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
namespace MartenTests;

[Collection("marten")]
public abstract class PostgresqlContext
{
}
public abstract class PostgresqlContext;
11 changes: 4 additions & 7 deletions src/Persistence/MartenTests/event_streaming.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,11 @@ public void Handle(IEvent<FifthEvent> e)

public record SecondMessage(Guid AggregateId, long Sequence);

public class SecondEvent
{

}
public class SecondEvent;

public class ThirdEvent{}
public class FourthEvent{}
public class FifthEvent{}
public class ThirdEvent;
public class FourthEvent;
public class FifthEvent;

public class TriggeredEvent
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,7 @@ await OnAggregate(a =>
// }
}

public class LetterStarted
{
}
public class LetterStarted;

public class LetterAggregate
{
Expand Down
4 changes: 1 addition & 3 deletions src/Persistence/PersistenceTests/PostgresqlContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@
namespace PersistenceTests;

[Collection("marten")]
public abstract class PostgresqlContext
{
}
public abstract class PostgresqlContext;
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,7 @@ public void Handle(T5 message)
}
}

public interface ISomeService
{
}
public interface ISomeService;

public class SomeService : ISomeService
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,4 @@ public async Task DisposeAsync()
}

[Collection("marten")]
public class LocalPostgresqlBackedTransportCompliance : TransportCompliance<LocalPostgresqlBackedFixture>
{
}
public class LocalPostgresqlBackedTransportCompliance : TransportCompliance<LocalPostgresqlBackedFixture>;
4 changes: 1 addition & 3 deletions src/Persistence/PostgresqlTests/PostgresqlContext.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
namespace PostgresqlTests;

[Collection("marten")]
public abstract class PostgresqlContext
{
}
public abstract class PostgresqlContext;
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ public async Task DisposeAsync()
}

[Collection("marten")]
public class PostgresqlTransport_Durable_Compliance : TransportCompliance<PostgresqlTransportDurableFixture>
{

}
public class PostgresqlTransport_Durable_Compliance : TransportCompliance<PostgresqlTransportDurableFixture>;

public class PostgresqlTransportBufferedFixture : TransportComplianceFixture, IAsyncLifetime
{
Expand Down
Loading
Loading