namespace Bit.Seeder;
///
/// Helper for exposing a interface with a SeedAsync method.
///
public class SceneResult(Dictionary mangleMap)
: SceneResult(result: null, mangleMap: mangleMap);
///
/// Generic result from executing a Scene.
/// Contains custom scene-specific data and a mangle map that maps magic strings from the
/// request to their mangled (collision-free) values inserted into the database.
///
/// The type of custom result data returned by the scene.
public class SceneResult(TResult result, Dictionary mangleMap)
{
public TResult Result { get; init; } = result;
public Dictionary MangleMap { get; init; } = mangleMap;
public static explicit operator SceneResult(SceneResult v)
{
var result = v.Result;
return result is null
? new SceneResult(result: null, mangleMap: v.MangleMap)
: new SceneResult(result: result, mangleMap: v.MangleMap);
}
}