Ejemplo n.º 1
0
        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;
            }
        }
Ejemplo n.º 2
0
        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;
            }
        }
Ejemplo n.º 3
0
 public bool TryGetStatus(ProgramName name, out InstallStatus status)
 {
     Contract.Requires(name != null);
     return(touched.TryFindValue(name, out status));
 }