public static ImplicitSingleStatementBranches TryGetIfStatementBranches_BothSingle(IfStatementSyntax syntax) { var trueAction = syntax.Statement.CollapsedStatements().SingleOrDefaultAllowMany(); if (trueAction == null) return null; var falseAction = syntax.ElseStatementOrEmptyBlock().CollapsedStatements().SingleOrDefaultAllowMany(); if (falseAction == null) return null; return new ImplicitSingleStatementBranches(trueAction, falseAction, syntax); }