1 implementation of InTransaction
System.Windows.Forms.Design (1)
System\ComponentModel\Design\DesignerHost.cs (1)
869
bool IDesignerHost.
InTransaction
=> (_transactions is not null && _transactions.Count > 0) || IsClosingTransaction;
36 references to InTransaction
System.Windows.Forms.Design (11)
System\ComponentModel\Design\DesignerActionUI.cs (2)
280
if (host is {
InTransaction
: true } and not IDesignerHostTransactionState { IsClosingTransaction: true })
538
if (_serviceProvider.TryGetService(out IDesignerHost? host) && host.
InTransaction
)
System\ComponentModel\Design\DesignerEventService.cs (2)
262
if (host.
InTransaction
)
289
if (host.
InTransaction
)
System\ComponentModel\Design\DesignerHost.cs (1)
1012
if (((IDesignerHost)this).
InTransaction
)
System\ComponentModel\Design\SelectionService.cs (2)
73
if (host.
InTransaction
)
277
if (host.
InTransaction
)
System\ComponentModel\Design\UndoEngine.cs (1)
157
if (reason != PopUnitReason.Normal || !_host.
InTransaction
)
System\Windows\Forms\Design\Behavior\SelectionManager.cs (1)
289
if (!_designerHost.
InTransaction
)
System\Windows\Forms\Design\SelectionUIService.cs (2)
81
if (host.
InTransaction
)
157
if (_host.
InTransaction
)
System.Windows.Forms.Design.Tests (25)
System\ComponentModel\Design\DesignerHostTests.cs (11)
82
Assert.False(host.
InTransaction
);
1875
Assert.True(host.
InTransaction
);
1882
Assert.True(host.
InTransaction
);
1900
Assert.True(host.
InTransaction
);
1907
Assert.True(host.
InTransaction
);
1975
Assert.True(host.
InTransaction
);
1986
Assert.True(host.
InTransaction
);
1997
Assert.False(host.
InTransaction
);
2088
Assert.True(host.
InTransaction
);
2099
Assert.True(host.
InTransaction
);
2110
Assert.False(host.
InTransaction
);
System\ComponentModel\Design\DesignSurfaceTests.cs (14)
24
Assert.False(surface.Host.
InTransaction
);
63
Assert.False(surface.Host.
InTransaction
);
85
Assert.False(surface.Host.
InTransaction
);
107
Assert.False(surface.Host.
InTransaction
);
154
Assert.False(surface.Host.
InTransaction
);
1212
Assert.True(host.
InTransaction
);
1216
Assert.True(host.
InTransaction
);
1222
Assert.True(host.
InTransaction
);
1331
Assert.True(host.
InTransaction
);
1335
Assert.True(host.
InTransaction
);
1341
Assert.True(host.
InTransaction
);
1356
Assert.True(host.
InTransaction
);
1360
Assert.True(host.
InTransaction
);
1366
Assert.True(host.
InTransaction
);