Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ protected sealed override Task LoadPersistedStateAsync(SecretVault inMemoryStore
/// <returns>
/// A task representing the asynchronous operation.
/// </returns>
protected sealed override Task PersistInMemoryStoreAsync(SecretVault inMemoryStore, IConcurrencyControlToken controlToken) => inMemoryStore.ExportAsync().ContinueWith(async exportTask =>
protected sealed override Task PersistInMemoryStoreAsync(SecretVault inMemoryStore, IConcurrencyControlToken controlToken) => inMemoryStore.ExportAsync().ContinueWith(exportTask =>
{
var inMemoryStoreCiphertext = ObscurityProcessor.EncryptToBase64String(exportTask.Result, ObscurityKey);
await PersistInMemoryStoreAsync(inMemoryStore.SemanticIdentity, inMemoryStoreCiphertext).ConfigureAwait(false);
PersistInMemoryStoreAsync(inMemoryStore.SemanticIdentity, inMemoryStoreCiphertext).Wait();
});

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@ public void RegisterMessageHandler(Action<PrimitiveMessage> handleMessageAction)
/// </exception>
public Task SendAsync(PrimitiveMessage message) => EntityType switch
{
MessagingEntityType.Queue => EnsureQueueExistanceAsync(Path).ContinueWith(async ensureQueueExistenceTask =>
MessagingEntityType.Queue => EnsureQueueExistanceAsync(Path).ContinueWith(ensureQueueExistenceTask =>
{
await Connection.Transport.SendToQueueAsync(Path, message).ConfigureAwait(false);
Connection.Transport.SendToQueueAsync(Path, message).Wait();
}),
MessagingEntityType.Topic => EnsureTopicExistanceAsync(Path).ContinueWith(async ensureTopicExistenceTask =>
MessagingEntityType.Topic => EnsureTopicExistanceAsync(Path).ContinueWith(ensureTopicExistenceTask =>
{
await Connection.Transport.SendToTopicAsync(Path, message).ConfigureAwait(false);
Connection.Transport.SendToTopicAsync(Path, message).Wait();
}),
_ => throw new UnsupportedSpecificationException($"The specified messaging entity type, {EntityType}, is not supported.")
};
Expand Down