Skip to content

Commit

Permalink
fix: XML comment and generation fix (#588)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewTriesToCode authored Sep 17, 2022
1 parent 398126c commit c1de82d
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 13 deletions.
2 changes: 2 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageTags>finbuckle;multitenant;multitenancy;aspnet;aspnetcore;entityframework;entityframework-core;efcore</PackageTags>
<PackageIcon>finbuckle-128x128.png</PackageIcon>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>CS1591</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Finbuckle.MultiTenant.AspNetCore" Version="6.6.1" />
<PackageReference Include="Finbuckle.MultiTenant.AspNetCore" Version="6.*" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions samples/net6.0/IdentitySample/IdentitySample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.2" />
<PackageReference Include="Finbuckle.MultiTenant.AspNetCore" Version="6.6.1" />
<PackageReference Include="Finbuckle.MultiTenant.EntityFrameworkCore" Version="6.6.1" />
<PackageReference Include="Finbuckle.MultiTenant.AspNetCore" Version="6.*" />
<PackageReference Include="Finbuckle.MultiTenant.EntityFrameworkCore" Version="6.*" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.2" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ private class ExpressionVariableScope
/// Adds MultiTenant support for an entity. Call <see cref="IsMultiTenant" /> after
/// <see cref="EntityTypeBuilder.HasQueryFilter" /> to merge query filters.
/// </summary>
/// <typeparam name="T">The specific type of <see cref="EntityTypeBuilder"/></typeparam>
/// <param name="builder">The typed EntityTypeBuilder instance.</param>
/// <returns>A MultiTenantEntityTypeBuilder instance.</returns>
public static MultiTenantEntityTypeBuilder IsMultiTenant(this EntityTypeBuilder builder)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public static class EntityTypeExtensions
/// Whether or not the <see cref="IEntityType"/> is configured as MultiTenant.
/// </summary>
/// <param name="entityType">The entity type to test for MultiTenant configuration.</param>
/// <returns><see cref="true"/> if the entity type has MultiTenant configuration, <see cref="false"/> if not.</returns>
/// <returns>Returns true if the entity type has MultiTenant configuration, false if not.</returns>
public static bool IsMultiTenant(this IMutableEntityType? entityType)
{
while (entityType != null)
Expand Down
8 changes: 4 additions & 4 deletions src/Finbuckle.MultiTenant/Abstractions/IMultiTenantStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ namespace Finbuckle.MultiTenant
/// <summary>
/// Try to add the TTenantInfo to the store.
/// </summary>
/// <param name="context"></param>
/// <param name="tenantInfo"></param>
/// <returns></returns>
Task<bool> TryAddAsync(TTenantInfo tenantInfo);

/// <summary>
/// Try to update the TTenantInfo in the store.
/// </summary>
/// <param name="context"></param>
/// <param name="tenantInfo"></param>
/// <returns></returns>
Task<bool> TryUpdateAsync(TTenantInfo tenantInfo);

/// <summary>
/// Try to remove the TTenantInfo from the store.
/// </summary>
/// <param name="id"></param>
/// <param name="tenantInfo"></param>
/// <returns></returns>
Task<bool> TryRemoveAsync(string identifier);
Task<bool> TryRemoveAsync(string tenantInfo);

/// <summary>
/// Retrieve the TTenantInfo for a given identifier.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace Finbuckle.MultiTenant.Options
/// Implementation of IOptionsFactory.
/// </summary>
/// <typeparam name="TOptions">The type of options being requested.</typeparam>
/// <typeparam name="TTenantInfo">The type of the tenant info.</typeparam>
public class MultiTenantOptionsFactory<TOptions, TTenantInfo> : IOptionsFactory<TOptions>
where TOptions : class, new()
where TTenantInfo : class, ITenantInfo, new()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ namespace Finbuckle.MultiTenant.Options
/// Initializes a new instance with the specified options configurations.
/// </summary>
/// <param name="factory">The factory to use to create options.</param>
/// <param name="cache">The cache used for options.</param>
public MultiTenantOptionsManager(IOptionsFactory<TOptions> factory, IOptionsMonitorCache<TOptions> cache)
{
_factory = factory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public void AdjustPrimaryKeyOnAdjustKey()
{
var key = db.Model.FindEntityType(typeof(Post))?.GetKeys().ToList();

Assert.Single(key);
Assert.Single(key!);
Assert.Equal(2, key![0].Properties.Count);
Assert.Contains("PostId", key[0].Properties.Select(p => p.Name));
Assert.Contains("TenantId", key[0].Properties.Select(p => p.Name));
Expand All @@ -131,7 +131,7 @@ public void AdjustDependentForeignKeyOnAdjustPrimaryKey()
{
var key = db.Model.FindEntityType(typeof(Post))?.GetForeignKeys().ToList();

Assert.Single(key);
Assert.Single(key!);
Assert.Equal(2, key![0].Properties.Count);
Assert.Contains("BlogId", key[0].Properties.Select(p => p.Name));
Assert.Contains("TenantId", key[0].Properties.Select(p => p.Name));
Expand All @@ -149,7 +149,7 @@ public void AdjustAlternateKeyOnAdjustKey()
{
var key = db.Model.FindEntityType(typeof(Blog))?.GetKeys().Where(k => !k.IsPrimaryKey()).ToList();

Assert.Single(key);
Assert.Single(key!);
Assert.Equal(2, key![0].Properties.Count);
Assert.Contains("Url", key[0].Properties.Select(p => p.Name));
Assert.Contains("TenantId", key[0].Properties.Select(p => p.Name));
Expand All @@ -172,7 +172,7 @@ public void AdjustDependentForeignKeyOnAdjustAlternateKey()
{
var key = db.Model.FindEntityType(typeof(Post))?.GetForeignKeys().ToList();

Assert.Single(key);
Assert.Single(key!);
Assert.Equal(2, key![0].Properties.Count);
Assert.Contains("Title", key[0].Properties.Select(p => p.Name));
Assert.Contains("TenantId", key[0].Properties.Select(p => p.Name));
Expand Down

0 comments on commit c1de82d

Please sign in to comment.