DurableServiceAttribute.SaveStateInOperationTransaction Eigenschaft
Definition
Ruft einen Wert ab oder legt einen Wert fest, der angibt, ob der Dienstinstanzzustand im PersistenceProvider unter Verwendung der gleichen Transaktion beibehalten wird, unter der der Vorgang ausgeführt wird.Gets or sets a value that indicates whether the service instance state is persisted to the PersistenceProvider using the same transaction under which the operation is run.
public:
property bool SaveStateInOperationTransaction { bool get(); void set(bool value); };
public bool SaveStateInOperationTransaction { get; set; }
member this.SaveStateInOperationTransaction : bool with get, set
Public Property SaveStateInOperationTransaction As Boolean
Eigenschaftswert
true
, wenn der Dienstinstanzzustand mit der gleichen Transaktion beibehalten wird, andernfalls false
.true
if the service instance state is persisted using the same transaction; otherwise, false
.
Hinweise
Wenn SaveStateInOperationTransaction auf true
festgelegt ist, müssen alle Vorgänge auf dem Dienst entweder mit OperationBehaviorAttribute.TransactionScopeRequired, festgelegt auf true
, oder mit TransactionFlowOption.Mandatory markiert sein.If SaveStateInOperationTransaction is set to true
, then all operations on the service must either be marked with OperationBehaviorAttribute.TransactionScopeRequired set to true
or marked with TransactionFlowOption.Mandatory. Zusätzlich muss ConcurrencyMode auf "Single" festgelegt sein.Additionally, ConcurrencyMode must be set to Single.
Durch das Festlegen von SaveStateInOperationTransaction auf true
wird der Dienstzustand transaktional mit der Vorgangstransaktion gemacht.Setting SaveStateInOperationTransaction to true
makes the service state transactional with the operation transaction. Dies bedeutet, dass bei einem Rollback der Vorgangstransaktion auch für den Dienstzustand ein Rollback ausgeführt wird.This means that if the operation's transaction rolls back, the service state also rolls back.