internal void AddTouched(AST <Program> p, InstallKind kind) { Contract.Requires(p != null); InstallStatus status; if (!touched.TryFindValue(p.Node.Name, out status)) { var inst = new InstallStatus(p, kind); touched.Add(p.Node.Name, inst); touchedOrder.AddLast(inst); } else if (status.Status == InstallKind.Failed || kind == InstallKind.Failed) { status.Status = InstallKind.Failed; } }
internal void AddFlag(AST <Program> p, Flag flag) { Contract.Requires(p != null && flag != null); flags.Add(new Tuple <AST <Program>, Flag>(p, flag)); if (flag.Severity == SeverityKind.Error) { if (p.Node.Name == ProgramName.ApiErrorName && !touched.ContainsKey(ProgramName.ApiErrorName)) { var inst = new InstallStatus(p, InstallKind.Failed); touched.Add(ProgramName.ApiErrorName, inst); touchedOrder.AddLast(inst); } touched[p.Node.Name].Status = InstallKind.Failed; Succeeded = false; } }
public bool TryGetStatus(ProgramName name, out InstallStatus status) { Contract.Requires(name != null); return(touched.TryFindValue(name, out status)); }