public void ExecuteRateMessage(ICommandContext context, int[] messageIds, MessageRates rate) { using (var rateForm = new RateForm(context, rate)) if (rateForm.ShowDialog( context .GetRequiredService <IUIShell>() .GetMainWindowParent()) == DialogResult.Yes) { ForumCommandHelper .GetMessageIds(context, messageIds) .ForEach( msgId => context .GetRequiredService <IOutboxManager>() .RateMarks .Add(msgId, rate)); } }
public void ExecuteRateMessage(ICommandContext context, int[] messageIds, MessageRates rate) { using (var rateForm = new RateForm(context, rate)) if (rateForm.ShowDialog( context .GetRequiredService<IUIShell>() .GetMainWindowParent()) == DialogResult.Yes) foreach (var msgId in ForumCommandHelper.GetMessageIds(context, messageIds)) context .GetRequiredService<IOutboxManager>() .RateMarks .Add(msgId, rate); }