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
9 changes: 8 additions & 1 deletion src/Ramstack.HtmxToolkit/Configuration/HtmxV1Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Ramstack.HtmxToolkit.Configuration;
/// <summary>
/// Represents the configuration for HTMX 1.9.x.
/// </summary>
public sealed class HtmxV1Config() : HtmxConfig(HtmxTargetVersion.V1)
public sealed class HtmxV1Config : HtmxConfig
{
/// <summary>
/// Gets or sets a value indicating whether HTMX history support is enabled.
Expand Down Expand Up @@ -327,6 +327,13 @@ public bool? TriggerSpecsCacheEnabled
set => SetField(ref field, value);
}

/// <summary>
/// Initializes a new instance of the <see cref="HtmxV1Config" /> class.
/// </summary>
internal HtmxV1Config() : base(HtmxTargetVersion.V1)
{
}

/// <inheritdoc />
private protected override string Serialize() =>
JsonSerializer.Serialize(this, HtmxConfigJsonSerializerContext.Default.HtmxV1Config);
Expand Down
9 changes: 8 additions & 1 deletion src/Ramstack.HtmxToolkit/Configuration/HtmxV2Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Ramstack.HtmxToolkit.Configuration;
/// <summary>
/// Represents the configuration for HTMX 2.x.
/// </summary>
public sealed class HtmxV2Config() : HtmxConfig(HtmxTargetVersion.V2)
public sealed class HtmxV2Config : HtmxConfig
{
/// <summary>
/// Gets or sets a value indicating whether HTMX history support is enabled.
Expand Down Expand Up @@ -385,6 +385,13 @@ public bool? ReportValidityOfForms
set => SetField(ref field, value);
}

/// <summary>
/// Initializes a new instance of the <see cref="HtmxV2Config" /> class.
/// </summary>
internal HtmxV2Config() : base(HtmxTargetVersion.V2)
{
}

/// <inheritdoc />
private protected override string Serialize() =>
JsonSerializer.Serialize(this, HtmxConfigJsonSerializerContext.Default.HtmxV2Config);
Expand Down
9 changes: 8 additions & 1 deletion src/Ramstack.HtmxToolkit/Configuration/HtmxV4Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Ramstack.HtmxToolkit.Configuration;
/// <summary>
/// Represents the configuration for HTMX 4.x.
/// </summary>
public sealed class HtmxV4Config() : HtmxConfig(HtmxTargetVersion.V4)
public sealed class HtmxV4Config : HtmxConfig
{
/// <summary>
/// Gets or sets a value indicating whether all HTMX events are logged to the console.
Expand Down Expand Up @@ -252,6 +252,13 @@ public IReadOnlyList<string>? NoSwap
set => SetField(ref field, value);
}

/// <summary>
/// Initializes a new instance of the <see cref="HtmxV4Config" /> class.
/// </summary>
internal HtmxV4Config() : base(HtmxTargetVersion.V4)
{
}

/// <inheritdoc />
private protected override string Serialize() =>
JsonSerializer.Serialize(this, HtmxConfigJsonSerializerContext.Default.HtmxV4Config);
Expand Down
Loading