public static bool TryAsConcurrentStatements(this Function func, out List <ConcurrentStatement> statements) { statements = null; if (func.InputVariables.Any() || func.OutputVariables.Any()) { return(false); } var xform = new ConcurrentStatementExtractor(func.Body); xform.Run(); if (!xform.Success) { return(false); } statements = xform.Statements; return(true); }
public static bool TryAsConcurrentStatements(this Function func, out List<ConcurrentStatement> statements) { statements = null; if (func.InputVariables.Any() || func.OutputVariables.Any()) return false; var xform = new ConcurrentStatementExtractor(func.Body); xform.Run(); if (!xform.Success) return false; statements = xform.Statements; return true; }