You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Commits this transaction. Once a transaction has
67
-
/// been committed, further calls to this method
68
-
/// will do nothing. You should always call this
69
-
/// method after creating a transaction to ensure
70
-
/// that the transaction is closed properly.
40
+
/// Commits this transaction. Once a transaction has been committed, further
41
+
/// calls to this method will do nothing. You should always call this method
42
+
/// after creating a transaction to ensure that the transaction is closed properly.
71
43
/// </summary>
72
44
publicvoidCommit()
73
45
{
@@ -81,51 +53,36 @@ public void Commit()
81
53
}
82
54
83
55
/// <summary>
84
-
/// User code should implement this method to perform
85
-
/// the actual work of committing a transaction.
56
+
/// User code should implement this method to perform the actual work of
57
+
/// committing a transaction.
86
58
/// </summary>
87
59
protectedabstractvoidOnCancel();
88
60
89
61
/// <summary>
90
-
/// User code should implement this method to perform
91
-
/// the actual work of committing a transaction.
62
+
/// User code should implement this method to perform the actual work of
63
+
/// committing a transaction.
92
64
/// </summary>
93
65
protectedabstractvoidOnCommit();
94
66
95
67
/// <summary>
96
-
/// Overrides Object to commit this transaction
97
-
/// in case the user forgot.
68
+
/// Overrides Object to commit this transaction in case the user forgot.
98
69
/// </summary>
99
-
~DesignerTransaction()
100
-
{
101
-
Dispose(false);
102
-
}
70
+
~DesignerTransaction()=>Dispose(false);
103
71
104
-
/// <internalonly/>
105
72
/// <summary>
106
-
/// Private implementation of IDisaposable.
107
-
/// When a transaction is disposed it is
108
-
/// committed.
73
+
/// Private implementation of IDisaposable. When a transaction is disposed
74
+
/// it is committed.
109
75
/// </summary>
110
76
voidIDisposable.Dispose()
111
77
{
112
78
Dispose(true);
113
79
114
-
// note - Dispose calls Cancel which sets this bit, so
115
-
// this should never be hit.
116
-
//
117
80
if(!_suppressedFinalization)
118
81
{
119
-
System.Diagnostics.Debug.Fail("Invalid state. Dispose(true) should have called cancel which does the SuppressFinalize");
120
82
GC.SuppressFinalize(this);
121
83
}
122
84
}
123
-
protectedvirtualvoidDispose(booldisposing)
124
-
{
125
-
System.Diagnostics.Debug.Assert(disposing,"Designer transaction garbage collected, unable to cancel, please Cancel, Close, or Dispose your transaction.");
126
-
System.Diagnostics.Debug.Assert(disposing||Canceled||Committed,"Disposing DesignerTransaction that has not been comitted or canceled; forcing Cancel");
0 commit comments