Hi,
When I try and paste and convert this to oxygene
static async Task SendMessagesAsync()
{
Console.WriteLine($"==========================================================================");
Console.WriteLine("Sending Messages to Topic");
try
{
await Task.WhenAll(
SendMessageAsync(label: "Red"),
SendMessageAsync(label: "Blue"),
SendMessageAsync(label: "Red", correlationId: "important"),
SendMessageAsync(label: "Blue", correlationId: "important"),
SendMessageAsync(label: "Red", correlationId: "notimportant"),
SendMessageAsync(label: "Blue", correlationId: "notimportant"),
SendMessageAsync(label: "Green"),
SendMessageAsync(label: "Green", correlationId: "important"),
SendMessageAsync(label: "Green", correlationId: "notimportant")
);
}
catch (Exception exception)
{
Console.WriteLine($"{DateTime.Now} :: Exception: {exception.Message}");
}
}
I get a dot before the method name
class method .SendMessagesAsync: Task;
begin
Console.WriteLine(String.Format('=========================================================================={0}'));
Console.WriteLine('Sending Messages to Topic');
try
await Task.WhenAll(SendMessageAsync('Red'), SendMessageAsync('Blue'), SendMessageAsync('Red', 'important'), SendMessageAsync('Blue', 'important'), SendMessageAsync('Red', 'notimportant'), SendMessageAsync('Blue', 'notimportant'), SendMessageAsync('Green'), SendMessageAsync('Green', 'important'), SendMessageAsync('Green', 'notimportant'));
except
on exception: Exception do begin
Console.WriteLine(String.Format('{0} :: Exception: {1}', DateTime.Now, exception.Message));
end;
end;
end;
cheers,
John