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
8 changes: 8 additions & 0 deletions src/CoreTests/StoreOptionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Linq;
using System.Text.Json;
using JasperFx.CodeGeneration;
using JasperFx.Core.Descriptions;
using Marten;
using Marten.Services;
using Marten.Storage;
Expand Down Expand Up @@ -441,6 +442,13 @@ public void maybe_correct_tenant_id(TenantIdStyle style, string tenantId, string
options.MaybeCorrectTenantId(tenantId).ShouldBe(corrected);
}

[Fact]
public void can_generate_options_description()
{
// just a smoke test
var description = new OptionsDescription(new StoreOptions());
}


private class DummyNpgsqlDataSourceFactory: INpgsqlDataSourceFactory
{
Expand Down
2 changes: 1 addition & 1 deletion src/Marten/Marten.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

<ItemGroup>
<PackageReference Include="FSharp.Core" Version="9.0.100" />
<PackageReference Include="JasperFx.Core" Version="1.9.0" />
<PackageReference Include="JasperFx.Core" Version="1.12.0" />
<PackageReference Include="JasperFx.CodeGeneration" Version="3.7.2" />
<PackageReference Include="JasperFx.RuntimeCompiler" Version="3.7.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
Expand Down
6 changes: 6 additions & 0 deletions src/Marten/StoreOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Text.Json;
using JasperFx.CodeGeneration;
using JasperFx.Core;
using JasperFx.Core.Descriptions;
using JasperFx.Core.Reflection;
using Marten.Events;
using Marten.Events.Daemon;
Expand Down Expand Up @@ -261,6 +262,7 @@ public TypeLoadMode GeneratedCodeMode
/// <summary>
/// Access to adding custom schema features to this Marten-enabled Postgresql database
/// </summary>
[IgnoreDescription]
public StorageFeatures Storage => _storage;

internal Action<IDatabaseCreationExpressions>? CreateDatabases
Expand All @@ -274,6 +276,7 @@ internal Action<IDatabaseCreationExpressions>? CreateDatabases
/// <summary>
/// Advanced configuration options for this DocumentStore
/// </summary>
[ChildDescription]
public AdvancedOptions Advanced => _advanced;

internal EventGraph EventGraph => _eventGraph;
Expand All @@ -286,11 +289,13 @@ internal Action<IDatabaseCreationExpressions>? CreateDatabases
/// <summary>
/// Extension point to add custom Linq query parsers
/// </summary>
[IgnoreDescription]
public LinqParsing Linq => _linq;

/// <summary>
/// Apply conventional policies to how documents are mapped
/// </summary>
[IgnoreDescription]
public PoliciesExpression Policies => new(this);


Expand Down Expand Up @@ -394,6 +399,7 @@ void IReadOnlyStoreOptions.AssertDocumentTypeIsSoftDeleted(Type documentType)
/// <summary>
/// Get or set the tenancy model for this DocumentStore
/// </summary>
[IgnoreDescription]
public ITenancy Tenancy
{
get => (_tenancy ?? throw new InvalidOperationException(
Expand Down
Loading
Loading