예제 #1
0
        static string Group(SignalExpressionPart signalExpression)
        {
            if (signalExpression.Kind == SignalExpressionKind.Signal)
            {
                return(signalExpression.ToString());
            }

            return($"({signalExpression})");
        }
예제 #2
0
        public static SignalExpressionPart Union(SignalExpressionPart left, SignalExpressionPart right)
        {
            if (left == null)
            {
                throw new ArgumentNullException(nameof(left));
            }
            if (right == null)
            {
                throw new ArgumentNullException(nameof(right));
            }

            return(new SignalExpressionPart
            {
                Kind = SignalExpressionKind.Union,
                Left = left,
                Right = right
            });
        }