As traduções são geradas por tradução automática. Em caso de conflito entre o conteúdo da tradução e da versão original em inglês, a versão em inglês prevalecerá.
AllSubscriptionEventseOwnershipChanges conter eventos da última chamada
Os valores de retorno das chamadas paraApi::AllSubscriptionEvents()
eApi::OwnershipChanges()
contêm eventos da última chamada, não da última marcação. No exemplo a seguir,secondSubscriptionEvents
esecondOwnershipChangeList
estão vazios porque suas funções são chamadas imediatamente após as primeiras chamadas.
Se você esperar 10 tiques e depois ligar paraApi::AllSubscriptionEvents()
eApi::OwnershipChanges()
, seus resultados conterão eventos e alterações dos últimos 10 tiques (não do último tick).
exemplo Exemplo
Result<void> ProcessOwnershipChanges(Transaction& transaction) { WEAVERRUNTIME_TRY( Api::SubscriptionChangeList firstSubscriptionEvents, Api::AllSubscriptionEvents(transaction)); WEAVERRUNTIME_TRY( Api::OwnershipChangeList firstOwnershipChangeList, Api::OwnershipChanges(transaction)); WEAVERRUNTIME_TRY( Api::SubscriptionChangeList secondSubscriptionEvents, Api::AllSubscriptionEvents(transaction)); WEAVERRUNTIME_TRY( Api::OwnershipChangeList secondOwnershipChangeList, Api::OwnershipChanges(transaction)); /** * secondSubscriptionEvents and secondOwnershipChangeList are * both empty because there are no changes since the last call. */ }
A funçãoAllSubscriptionEvents()
está implementada, mas a função nãoSubscriptionEvents()
está implementada.