This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Test gist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension { | |
name = "InstallDotNet" | |
publisher = "Microsoft.Compute" | |
type = "CustomScriptExtension" | |
type_handler_version = "1.8" | |
auto_upgrade_minor_version = true | |
settings = <<EOF | |
{ | |
"fileUris": [ | |
"https://yourblobstorageaccount.blob.core.windows.net/dotnet48/InstallDotNet-48.ps1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension { | |
name = "InstallDotNet" | |
publisher = "Microsoft.Compute" | |
type = "CustomScriptExtension" | |
type_handler_version = "1.8" | |
auto_upgrade_minor_version = true | |
settings = <<EOF | |
{ | |
"fileUris": [ | |
"https://yourblobstorageaccount.blob.core.windows.net/dotnet48/InstallDotNet-48.ps1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async Task ExecuteTransaction(Func<Task> action) | |
{ | |
using var session = await client.StartSessionAsync(); | |
session.StartTransaction(); | |
try | |
{ | |
await action(); | |
await session.CommitTransactionAsync(); | |
} | |
catch (Exception) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using MassTransit; | |
using MessageOutbox.Outbox; | |
using Microsoft.Extensions.Logging; | |
using System.Threading.Tasks; | |
namespace MessageOutbox.Consumer | |
{ | |
public class MessageConsumer : IConsumer<IMessage> | |
{ | |
private readonly ILogger<MessageConsumer> logger; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using MassTransit; | |
using Microsoft.Extensions.Logging; | |
using System; | |
using System.Linq; | |
using System.Threading.Tasks; | |
namespace MessageOutbox.Outbox | |
{ | |
internal interface IMessageOutboxProcessor | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using MassTransit; | |
using MessageOutbox.Outbox; | |
using Microsoft.Extensions.Hosting; | |
using Microsoft.Extensions.Logging; | |
using System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace MessageOutbox.Publisher | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading.Tasks; | |
using GreenPipes; | |
using MassTransit; | |
namespace Retries | |
{ | |
internal static class Program | |
{ | |
static async Task Main(string[] args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading.Tasks; | |
using GreenPipes; | |
using MassTransit; | |
namespace Retries | |
{ | |
internal static class Program | |
{ | |
static async Task Main(string[] args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading.Tasks; | |
using GreenPipes; | |
using MassTransit; | |
namespace Retries | |
{ | |
internal static class Program | |
{ | |
static async Task Main(string[] args) |
NewerOlder