Skip to content

Instantly share code, notes, and snippets.

View viktors-telle's full-sized avatar
🏠
Working from home

Viktors Telle viktors-telle

🏠
Working from home
View GitHub Profile
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"
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"
public async Task ExecuteTransaction(Func<Task> action)
{
using var session = await client.StartSessionAsync();
session.StartTransaction();
try
{
await action();
await session.CommitTransactionAsync();
}
catch (Exception)
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;
using MassTransit;
using Microsoft.Extensions.Logging;
using System;
using System.Linq;
using System.Threading.Tasks;
namespace MessageOutbox.Outbox
{
internal interface IMessageOutboxProcessor
{
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
{
using System;
using System.Threading.Tasks;
using GreenPipes;
using MassTransit;
namespace Retries
{
internal static class Program
{
static async Task Main(string[] args)
using System;
using System.Threading.Tasks;
using GreenPipes;
using MassTransit;
namespace Retries
{
internal static class Program
{
static async Task Main(string[] args)
using System;
using System.Threading.Tasks;
using GreenPipes;
using MassTransit;
namespace Retries
{
internal static class Program
{
static async Task Main(string[] args)