initial commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
public enum BatchTrack { Backfill, LiveCapture }
|
||||
|
||||
public static class BatchTrackExtensions
|
||||
{
|
||||
public static string ToDbString(this BatchTrack t) => t switch
|
||||
{
|
||||
BatchTrack.Backfill => "BACKFILL",
|
||||
BatchTrack.LiveCapture => "LIVE_CAPTURE",
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(t))
|
||||
};
|
||||
|
||||
public static BatchTrack FromDbString(string v) => v switch
|
||||
{
|
||||
"BACKFILL" => BatchTrack.Backfill,
|
||||
"LIVE_CAPTURE" => BatchTrack.LiveCapture,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(v), $"Unknown batch track: '{v}'")
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user