// the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
// Boston, MA 02110-1301, USA.
+#nullable enable
+
using System;
using System.Collections.Generic;
using System.Linq;
public static class ControlTransaction
{
public static IDisposable Update(ListView control)
- {
- return new Transaction<ListView>(control, x => x.BeginUpdate(), x => x.EndUpdate());
- }
+ => new Transaction<ListView>(control, x => x.BeginUpdate(), x => x.EndUpdate());
public static IDisposable Update(ListBox control)
- {
- return new Transaction<ListBox>(control, x => x.BeginUpdate(), x => x.EndUpdate());
- }
+ => new Transaction<ListBox>(control, x => x.BeginUpdate(), x => x.EndUpdate());
public static IDisposable Update(ComboBox control)
- {
- return new Transaction<ComboBox>(control, x => x.BeginUpdate(), x => x.EndUpdate());
- }
+ => new Transaction<ComboBox>(control, x => x.BeginUpdate(), x => x.EndUpdate());
public static IDisposable Update(TreeView control)
- {
- return new Transaction<TreeView>(control, x => x.BeginUpdate(), x => x.EndUpdate());
- }
+ => new Transaction<TreeView>(control, x => x.BeginUpdate(), x => x.EndUpdate());
public static IDisposable Update(Control control)
{
}
public static IDisposable Layout(Control control)
- {
- return Layout(control, performLayout: true);
- }
+ => Layout(control, performLayout: true);
public static IDisposable Layout(Control control, bool performLayout)
- {
- return new Transaction<Control>(control, x => x.SuspendLayout(), x => x.ResumeLayout(performLayout));
- }
+ => new Transaction<Control>(control, x => x.SuspendLayout(), x => x.ResumeLayout(performLayout));
public static IDisposable Init(ISupportInitialize control)
- {
- return new Transaction<ISupportInitialize>(control, x => x.BeginInit(), x => x.EndInit());
- }
+ => new Transaction<ISupportInitialize>(control, x => x.BeginInit(), x => x.EndInit());
public static IDisposable Cursor(Control control, Cursor newCursor)
{
}
public void Dispose()
- {
- this.endTransaction(this.control);
- }
+ => this.endTransaction(this.control);
}
}
}