Forge
csharpdeeb25a2
1namespace CascadeIDE.Models;
2
3/// <summary>Маркер полярности исходящего ребра от <c>condition_step</c> (wire: <c>edge_provenance</c>).</summary>
4public static class CodeNavigationMapConditionBranchProvenance
5{
6 public const string True = "cf_branch_true";
7 public const string False = "cf_branch_false";
8
9 public static bool TryParseDisplayPolarity(string? edgeProvenance, out bool isTrueBranch)
10 {
11 if (string.Equals(edgeProvenance, True, StringComparison.Ordinal))
12 {
13 isTrueBranch = true;
14 return true;
15 }
16
17 if (string.Equals(edgeProvenance, False, StringComparison.Ordinal))
18 {
19 isTrueBranch = false;
20 return true;
21 }
22
23 isTrueBranch = false;
24 return false;
25 }
26}
27
View only · write via MCP/CIDE