public void AddShutdownHook(Runnable r) { ShutdownHook item = new ShutdownHook (); item.Runnable = r; this.shutdownHooks.Add (item); }