public static IDictionary<string, Func<IDataPageRow, bool>> SetupActions( ) { return new Dictionary<string, Func<IDataPageRow, bool>> {{@"Shutdown", delegate( IDataPageRow rowObj ) { var row = rowObj as DprComputerInfo; Helpers.AssertNotNull( row, @"PtComputerSoftware Action called with another class as second parameter" ); using( var csd = new ConfirmShutdownDialog( new ShutdownComputerParameters( row.ComputerName ) ) ) { csd.ShowDialog( ); } return false; }}}; }
public static IDictionary <string, Func <IDataPageRow, bool> > SetupActions( ) { return(new Dictionary <string, Func <IDataPageRow, bool> > { { @"Shutdown", delegate(IDataPageRow rowObj) { var row = rowObj as DprComputerInfo; Helpers.AssertNotNull(row, @"PtComputerSoftware Action called with another class as second parameter"); using (var csd = new ConfirmShutdownDialog(new ShutdownComputerParameters(row.ComputerName))) { csd.ShowDialog( ); } return false; } } }); }