Restructure solution layout by module
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace StellaOps.Concelier.Merge.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Canonical conflict detail used to materialize structured payloads for persistence and explainers.
|
||||
/// </summary>
|
||||
public sealed record ConflictDetailPayload(
|
||||
string Type,
|
||||
string Reason,
|
||||
IReadOnlyList<string> PrimarySources,
|
||||
int PrimaryRank,
|
||||
IReadOnlyList<string> SuppressedSources,
|
||||
int SuppressedRank,
|
||||
string? PrimaryValue,
|
||||
string? SuppressedValue)
|
||||
{
|
||||
public static ConflictDetailPayload FromDetail(MergeConflictDetail detail)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(detail);
|
||||
|
||||
return new ConflictDetailPayload(
|
||||
detail.ConflictType,
|
||||
detail.Reason,
|
||||
detail.PrimarySources,
|
||||
detail.PrimaryRank,
|
||||
detail.SuppressedSources,
|
||||
detail.SuppressedRank,
|
||||
detail.PrimaryValue,
|
||||
detail.SuppressedValue);
|
||||
}
|
||||
|
||||
public MergeConflictExplainerPayload ToExplainer() =>
|
||||
new(
|
||||
Type,
|
||||
Reason,
|
||||
PrimarySources,
|
||||
PrimaryRank,
|
||||
SuppressedSources,
|
||||
SuppressedRank,
|
||||
PrimaryValue,
|
||||
SuppressedValue);
|
||||
}
|
||||
Reference in New Issue
Block a user