public void KillAllThatMatch(Predicate <SqlProcess> match) { IFindable <SqlProcess> procs = base.FindAll(match); for (int i = 0; i < procs.Count; i++) { try { procs[i].Kill(this.Server); } catch (Exception e) { this.ThrowInnerException(e); } } this.Server.Refresh(); }
//static void DoUno() //{ // Mammifero mammiferoTest = new Mammifero(); non posso farla // Cane cane = new Cane(6, 4); // cane.Stampa(); // Mammifero mammifero = cane; // mammifero.Stampa(); // Cane cane2 = (Cane)mammifero; // cane2.Stampa(); // Console.ReadLine(); // Orso orso = new Orso("mangia miele", 2); // orso.Stampa(); // mammifero = orso; // mammifero.Stampa(); // Console.ReadLine(); // List<Mammifero> animali = new List<Mammifero> // { // new Cane(6, 4), // new Orso("mangia miele", 2) // }; // animali.ForEach(animale => animale.Stampa()); // Console.ReadLine(); //} static void DoDue() { DocumentoSpeciale documentoSpeciale = new DocumentoSpeciale(); IFindable findableSpeciale = documentoSpeciale; ISortable sortableSpeciale = documentoSpeciale; IPrintable printableSpeciale = documentoSpeciale; Documento documento = documentoSpeciale; IFindable findable = documento; ISortable sortable = documento; IPrintable printable = documento; documentoSpeciale.Find(); findableSpeciale.Find(); documento.Find(); findable.Find(); Console.WriteLine(); documentoSpeciale.Sort(); sortableSpeciale.Sort(); documento.Sort(); sortable.Sort(); Console.WriteLine(); //documentoSpeciale.Print(); printableSpeciale.Print(); //documento.Print(); printable.Print(); Console.ReadLine(); Documento documento2 = new Documento(); IFindable findable2 = documento2; ISortable sortable2 = documento2; IPrintable printable2 = documento2; documento2.Find(); findable2.Find(); documento2.Sort(); sortable2.Sort(); //documento2.Print(); printable2.Print(); Console.ReadLine(); }
public FindDialog(IFindable findable) { this.findform = findable; InitializeComponent(); }
public static async Task <bool> Execute(IFindable actor, float radiusDistanceRequired = -1f, int interactLimit = 5) { return(await Execute(actor.Position, actor.ActorId, radiusDistanceRequired, interactLimit)); }
public FindForm(IFindable target) : base() { this.target = target; InitializeComponent(); }
public static async Task <bool> Execute(IFindable actor, int interactLimit = 5) { return(await Execute(actor.Position, actor.ActorId, interactLimit)); }
public Task <IFindable> FindAsync(IFindable findable, int id) { NullCheck.ThrowIfNull <IFindable>(findable); return(findable.FindAsync(_context, id)); }