DCoding.Data.DVault.Analyzers
0.11.0
See the version list below for details.
dotnet add package DCoding.Data.DVault.Analyzers --version 0.11.0
NuGet\Install-Package DCoding.Data.DVault.Analyzers -Version 0.11.0
<PackageReference Include="DCoding.Data.DVault.Analyzers" Version="0.11.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="DCoding.Data.DVault.Analyzers" Version="0.11.0" />
<PackageReference Include="DCoding.Data.DVault.Analyzers"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add DCoding.Data.DVault.Analyzers --version 0.11.0
#r "nuget: DCoding.Data.DVault.Analyzers, 0.11.0"
#:package DCoding.Data.DVault.Analyzers@0.11.0
#addin nuget:?package=DCoding.Data.DVault.Analyzers&version=0.11.0
#tool nuget:?package=DCoding.Data.DVault.Analyzers&version=0.11.0
DCoding.Data.DVault.Analyzers
Roslyn analyzers for DVault Code-First metadata declarations. The v1 package reports:
DMV1901for unsupportedBusinessKey(...),Payload(...), orDrivingKey(...)selector shapes.DMV1902for duplicate logical member declarations inside the same applicable Code-First builder lambda scope.
Installation
Install the analyzer package in projects that declare DVault Code-First metadata through normal Roslyn analyzer package conventions:
<ItemGroup>
<PackageReference Include="DCoding.Data.DVault.Analyzers" Version="0.11.0" PrivateAssets="all" />
</ItemGroup>
PrivateAssets="all" keeps the analyzer local to the project that owns the fluent declarations. The package supplies analyzer assets and does not require a runtime reference from application code.
Scope
The current analyzer slice inspects the first direct lambda selector passed to BusinessKey(...), Payload(...), and DrivingKey(...). It expects one direct readable scalar member on the configured entity type, such as hub.BusinessKey(customer => customer.CustomerId) or satellite.Payload(customer => customer.EmailAddress).
Composite business keys, payloads, and driving keys should use repeated single-member calls in their canonical order. Selector variables, indirect selectors, computed selectors, nested selectors, method calls, anonymous objects, and collection-valued selectors are intentionally outside the first direct-lambda slice unless a diagnostic can be reported with high confidence.
Suppression
Suppress DMV diagnostics only where the consuming project intentionally accepts a pattern outside this analyzer slice. Use standard C# and Roslyn analyzer suppression mechanisms.
For a narrow local exception, use a pragma around the intentional declaration:
#pragma warning disable DMV1901
satellite.Payload(emailSelector);
#pragma warning restore DMV1901
For a project or path-level policy, configure analyzer severities in .editorconfig:
dotnet_diagnostic.DMV1901.severity = none
dotnet_diagnostic.DMV1902.severity = none
For MSBuild-level suppression, append the diagnostic ids to NoWarn:
<PropertyGroup>
<NoWarn>$(NoWarn);DMV1901;DMV1902</NoWarn>
</PropertyGroup>
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.