8000 Extract function · somnathzankar/rabbitmq-tutorials@390106a · GitHub
[go: up one dir, main page]

Skip to content

Commit 390106a

Browse files
author
Michael Klishin
committed
Extract function
1 parent 474038b commit 390106a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

dotnet/NewTask.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public static void Main(string[] args)
1313
{
1414
channel.QueueDeclare("task_queue", true, false, false, null);
1515

16-
var message = (args.Length > 0) ? string.Join(" ", args) : "Hello World!";
16+
var message = GetMessage(args);
1717
var body = Encoding.UTF8.GetBytes(message);
1818

1919
var properties = channel.CreateBasicProperties();
@@ -24,4 +24,9 @@ public static void Main(string[] args)
2424
}
2525
}
2626
}
27+
28+
private static string GetMessage(string[] args)
29+
{
30+
return ((args.Length > 0) ? string.Join(" ", args) : "Hello World!");
31+
}
2732
}

0 commit comments

Comments
 (0)
0